@itwin/components-react 4.1.0-dev.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -6
- package/lib/cjs/components-react/UiComponents.d.ts +1 -1
- package/lib/cjs/components-react/UiComponents.d.ts.map +1 -1
- package/lib/cjs/components-react/UiComponents.js.map +1 -1
- package/lib/cjs/components-react/common/DelayedSpinner.d.ts +1 -1
- package/lib/cjs/components-react/common/DelayedSpinner.d.ts.map +1 -1
- package/lib/cjs/components-react/common/DelayedSpinner.js +3 -2
- package/lib/cjs/components-react/common/DelayedSpinner.js.map +1 -1
- package/lib/cjs/components-react/common/ImageRenderer.d.ts +1 -1
- package/lib/cjs/components-react/common/ImageRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/common/ImageRenderer.js.map +1 -1
- package/lib/cjs/components-react/common/SubscriptionScheduler.d.ts +1 -1
- package/lib/cjs/components-react/common/SubscriptionScheduler.d.ts.map +1 -1
- package/lib/cjs/components-react/common/SubscriptionScheduler.js.map +1 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js +2 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/cjs/components-react/converters/BooleanTypeConverter.d.ts +1 -1
- package/lib/cjs/components-react/converters/BooleanTypeConverter.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/BooleanTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/CompositeTypeConverter.d.ts +1 -1
- package/lib/cjs/components-react/converters/CompositeTypeConverter.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/CompositeTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/DateTimeTypeConverter.d.ts +5 -3
- package/lib/cjs/components-react/converters/DateTimeTypeConverter.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/DateTimeTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/EnumTypeConverter.d.ts +1 -1
- package/lib/cjs/components-react/converters/EnumTypeConverter.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/EnumTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/HexadecimalTypeConverter.d.ts +1 -1
- package/lib/cjs/components-react/converters/HexadecimalTypeConverter.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/HexadecimalTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/NavigationPropertyTypeConverter.d.ts +1 -1
- package/lib/cjs/components-react/converters/NavigationPropertyTypeConverter.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/NavigationPropertyTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/NumericTypeConverter.d.ts +3 -2
- package/lib/cjs/components-react/converters/NumericTypeConverter.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/NumericTypeConverter.js +4 -2
- package/lib/cjs/components-react/converters/NumericTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/PointTypeConverter.d.ts +2 -2
- package/lib/cjs/components-react/converters/PointTypeConverter.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/PointTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/StringTypeConverter.d.ts +1 -1
- package/lib/cjs/components-react/converters/StringTypeConverter.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/StringTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverter.d.ts +2 -2
- package/lib/cjs/components-react/converters/TypeConverter.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverter.js +2 -2
- package/lib/cjs/components-react/converters/TypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverterManager.d.ts +1 -1
- package/lib/cjs/components-react/converters/TypeConverterManager.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverterManager.js.map +1 -1
- package/lib/cjs/components-react/converters/valuetypes/ConvertedTypes.d.ts +1 -1
- package/lib/cjs/components-react/converters/valuetypes/ConvertedTypes.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/valuetypes/ConvertedTypes.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DateField.d.ts +3 -2
- package/lib/cjs/components-react/datepicker/DateField.d.ts.map +1 -1
- package/lib/cjs/components-react/datepicker/DateField.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.d.ts +2 -2
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.d.ts.map +1 -1
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
- package/lib/cjs/components-react/datepicker/IntlFormatter.d.ts +1 -1
- package/lib/cjs/components-react/datepicker/IntlFormatter.d.ts.map +1 -1
- package/lib/cjs/components-react/datepicker/IntlFormatter.js.map +1 -1
- package/lib/cjs/components-react/datepicker/TimeField.d.ts +1 -1
- package/lib/cjs/components-react/datepicker/TimeField.d.ts.map +1 -1
- package/lib/cjs/components-react/datepicker/TimeField.js.map +1 -1
- package/lib/cjs/components-react/editors/BooleanEditor.d.ts +2 -2
- package/lib/cjs/components-react/editors/BooleanEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/BooleanEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/CustomNumberEditor.d.ts +2 -2
- package/lib/cjs/components-react/editors/CustomNumberEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/CustomNumberEditor.js +4 -2
- package/lib/cjs/components-react/editors/CustomNumberEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/DateTimeEditor.d.ts +4 -3
- package/lib/cjs/components-react/editors/DateTimeEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/DateTimeEditor.js +3 -2
- package/lib/cjs/components-react/editors/DateTimeEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/EditorContainer.d.ts +2 -2
- package/lib/cjs/components-react/editors/EditorContainer.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/EditorContainer.js.map +1 -1
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.d.ts +2 -2
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/EnumEditor.d.ts +3 -3
- package/lib/cjs/components-react/editors/EnumEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/EnumEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/IconEditor.d.ts +2 -2
- package/lib/cjs/components-react/editors/IconEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/IconEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/ImageCheckBoxEditor.d.ts +2 -2
- package/lib/cjs/components-react/editors/ImageCheckBoxEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/NumericInputEditor.d.ts +2 -2
- package/lib/cjs/components-react/editors/NumericInputEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/NumericInputEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/PopupButton.d.ts +1 -1
- package/lib/cjs/components-react/editors/PopupButton.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/PopupButton.js +4 -3
- package/lib/cjs/components-react/editors/PopupButton.js.map +1 -1
- package/lib/cjs/components-react/editors/PropertyEditorManager.d.ts +1 -1
- package/lib/cjs/components-react/editors/PropertyEditorManager.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/PropertyEditorManager.js.map +1 -1
- package/lib/cjs/components-react/editors/SliderEditor.d.ts +2 -2
- package/lib/cjs/components-react/editors/SliderEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/SliderEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/TextEditor.d.ts +2 -2
- package/lib/cjs/components-react/editors/TextEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/TextEditor.js +4 -2
- package/lib/cjs/components-react/editors/TextEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/TextareaEditor.d.ts +2 -2
- package/lib/cjs/components-react/editors/TextareaEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/TextareaEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/ToggleEditor.d.ts +2 -2
- package/lib/cjs/components-react/editors/ToggleEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/ToggleEditor.js.map +1 -1
- package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.d.ts +2 -2
- package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
- package/lib/cjs/components-react/favorite/FavoritePropertyList.d.ts +1 -1
- package/lib/cjs/components-react/favorite/FavoritePropertyList.d.ts.map +1 -1
- package/lib/cjs/components-react/favorite/FavoritePropertyList.js +3 -2
- package/lib/cjs/components-react/favorite/FavoritePropertyList.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts +4 -4
- package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts +4 -4
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +2 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js +2 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js +3 -3
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts +4 -3
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.d.ts +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Types.d.ts +2 -2
- package/lib/cjs/components-react/filter-builder/Types.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/Types.js.map +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.d.ts +2 -2
- package/lib/cjs/components-react/filtering/FilteringInput.d.ts.map +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/cjs/components-react/filtering/ResultSelector.d.ts +1 -1
- package/lib/cjs/components-react/filtering/ResultSelector.d.ts.map +1 -1
- package/lib/cjs/components-react/filtering/ResultSelector.js.map +1 -1
- package/lib/cjs/components-react/iconpicker/IconPickerButton.d.ts +1 -1
- package/lib/cjs/components-react/iconpicker/IconPickerButton.d.ts.map +1 -1
- package/lib/cjs/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/cjs/components-react/inputs/ParsedInput.d.ts +2 -2
- package/lib/cjs/components-react/inputs/ParsedInput.d.ts.map +1 -1
- package/lib/cjs/components-react/inputs/ParsedInput.js.map +1 -1
- package/lib/cjs/components-react/properties/ItemStyle.d.ts +1 -1
- package/lib/cjs/components-react/properties/ItemStyle.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/ItemStyle.js.map +1 -1
- package/lib/cjs/components-react/properties/LinkHandler.d.ts +1 -1
- package/lib/cjs/components-react/properties/LinkHandler.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/cjs/components-react/properties/ValueRendererManager.d.ts +3 -3
- package/lib/cjs/components-react/properties/ValueRendererManager.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/ValueRendererManager.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonList.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/ActionButtonList.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonList.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonRenderer.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/ActionButtonRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.js +4 -3
- package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.d.ts +1 -1
- package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js +1 -1
- package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.js +3 -2
- package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyRenderer.d.ts +7 -7
- package/lib/cjs/components-react/properties/renderers/PropertyRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.d.ts +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.scss +5 -0
- package/lib/cjs/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.d.ts +1 -1
- package/lib/cjs/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PrimitivePropertyLabelRenderer.d.ts +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PrimitivePropertyLabelRenderer.d.ts.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 +2 -1
- package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/ArrayPropertyValueRenderer.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/value/ArrayPropertyValueRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/ArrayPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js +2 -1
- package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/MergedPropertyValueRenderer.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/value/MergedPropertyValueRenderer.d.ts.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.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js +18 -17
- package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js +2 -1
- package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js +7 -4
- package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/StructPropertyValueRenderer.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/value/StructPropertyValueRenderer.d.ts.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.d.ts +2 -2
- package/lib/cjs/components-react/properties/renderers/value/UrlPropertyValueRenderer.d.ts.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.d.ts +1 -1
- package/lib/cjs/components-react/properties/renderers/value/WithContextStyle.d.ts.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.d.ts +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/ArrayValueRenderer.d.ts.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.d.ts +3 -3
- package/lib/cjs/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.d.ts.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.d.ts +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/StructValueRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/StructValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js +2 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/SimplePropertyDataProvider.d.ts +6 -1
- package/lib/cjs/components-react/propertygrid/SimplePropertyDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/SimplePropertyDataProvider.js +17 -4
- package/lib/cjs/components-react/propertygrid/SimplePropertyDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.js +2 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts +9 -8
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js +2 -2
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyList.d.ts +8 -7
- package/lib/cjs/components-react/propertygrid/component/PropertyList.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyList.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +12 -11
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js +51 -46
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.d.ts +5 -4
- package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.js +13 -11
- package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.d.ts +4 -3
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js +2 -2
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.d.ts +3 -2
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js +2 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.d.ts +3 -2
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.d.ts.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.d.ts +3 -2
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.d.ts.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.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts.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 +4 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.d.ts +4 -4
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.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.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts +4 -3
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts.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.d.ts +3 -2
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.d.ts.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.d.ts +4 -3
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.d.ts.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.d.ts +5 -4
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js +2 -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.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +2 -2
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts +5 -4
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +3 -2
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts +4 -4
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -8
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js +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.d.ts +5 -5
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +7 -5
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/selectable-content/SelectableContent.d.ts.map +1 -1
- package/lib/cjs/components-react/selectable-content/SelectableContent.js +3 -2
- package/lib/cjs/components-react/selectable-content/SelectableContent.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Item.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/Item.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/Item.js.map +1 -1
- package/lib/cjs/components-react/toolbar/ItemWrapper.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/ItemWrapper.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/ItemWrapper.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Items.d.ts +2 -2
- package/lib/cjs/components-react/toolbar/Items.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/Items.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Overflow.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/Overflow.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/Overflow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/OverflowPanel.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/OverflowPanel.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/OverflowPanel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItem.d.ts +2 -2
- package/lib/cjs/components-react/toolbar/PopupItem.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItem.js.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItemWithDrag.d.ts +3 -2
- package/lib/cjs/components-react/toolbar/PopupItemWithDrag.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItemsPanel.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/PopupItemsPanel.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItemsPanel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.d.ts +2 -2
- package/lib/cjs/components-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.d.ts +2 -2
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.js +8 -4
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/BackArrow.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/BackArrow.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/BackArrow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Column.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Column.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Column.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Columns.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Columns.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Columns.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Panel.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Panel.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Panel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Title.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Title.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Title.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Expander.d.ts +2 -2
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Expander.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Expander.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.d.ts +2 -2
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.js +3 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
- package/lib/cjs/components-react/tree/ImageLoader.d.ts +2 -2
- package/lib/cjs/components-react/tree/ImageLoader.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/ImageLoader.js.map +1 -1
- package/lib/cjs/components-react/tree/SimpleTreeDataProvider.d.ts +2 -2
- package/lib/cjs/components-react/tree/SimpleTreeDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/SimpleTreeDataProvider.js.map +1 -1
- package/lib/cjs/components-react/tree/TreeDataProvider.d.ts +4 -4
- package/lib/cjs/components-react/tree/TreeDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeActions.d.ts +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeActions.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeActions.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.d.ts +6 -6
- package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEventHandler.d.ts +6 -6
- package/lib/cjs/components-react/tree/controlled/TreeEventHandler.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEventHandler.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEvents.d.ts +3 -3
- package/lib/cjs/components-react/tree/controlled/TreeEvents.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEvents.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeHooks.d.ts +4 -3
- package/lib/cjs/components-react/tree/controlled/TreeHooks.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeHooks.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeModel.d.ts +3 -3
- package/lib/cjs/components-react/tree/controlled/TreeModel.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeModel.js +7 -4
- package/lib/cjs/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeModelSource.d.ts +2 -1
- package/lib/cjs/components-react/tree/controlled/TreeModelSource.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeModelSource.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.d.ts +5 -5
- package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js +8 -6
- package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts +7 -7
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.scss +2 -2
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.d.ts +5 -5
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeEditor.d.ts +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeEditor.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeRenderer.d.ts +6 -6
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeRenderer.d.ts.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.d.ts +5 -5
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js +3 -23
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/SparseTree.js +2 -1
- package/lib/cjs/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/TreeModelMutator.d.ts +6 -6
- package/lib/cjs/components-react/tree/controlled/internal/TreeModelMutator.d.ts.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.d.ts +4 -4
- package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js +4 -2
- package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
- package/lib/esm/components-react/UiComponents.d.ts +1 -1
- package/lib/esm/components-react/UiComponents.d.ts.map +1 -1
- package/lib/esm/components-react/UiComponents.js.map +1 -1
- package/lib/esm/components-react/common/DelayedSpinner.d.ts +1 -1
- package/lib/esm/components-react/common/DelayedSpinner.d.ts.map +1 -1
- package/lib/esm/components-react/common/DelayedSpinner.js +3 -2
- package/lib/esm/components-react/common/DelayedSpinner.js.map +1 -1
- package/lib/esm/components-react/common/ImageRenderer.d.ts +1 -1
- package/lib/esm/components-react/common/ImageRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/common/ImageRenderer.js.map +1 -1
- package/lib/esm/components-react/common/SubscriptionScheduler.d.ts +1 -1
- package/lib/esm/components-react/common/SubscriptionScheduler.d.ts.map +1 -1
- package/lib/esm/components-react/common/SubscriptionScheduler.js.map +1 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js +2 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/esm/components-react/converters/BooleanTypeConverter.d.ts +1 -1
- package/lib/esm/components-react/converters/BooleanTypeConverter.d.ts.map +1 -1
- package/lib/esm/components-react/converters/BooleanTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/CompositeTypeConverter.d.ts +1 -1
- package/lib/esm/components-react/converters/CompositeTypeConverter.d.ts.map +1 -1
- package/lib/esm/components-react/converters/CompositeTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/DateTimeTypeConverter.d.ts +5 -3
- package/lib/esm/components-react/converters/DateTimeTypeConverter.d.ts.map +1 -1
- package/lib/esm/components-react/converters/DateTimeTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/EnumTypeConverter.d.ts +1 -1
- package/lib/esm/components-react/converters/EnumTypeConverter.d.ts.map +1 -1
- package/lib/esm/components-react/converters/EnumTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/HexadecimalTypeConverter.d.ts +1 -1
- package/lib/esm/components-react/converters/HexadecimalTypeConverter.d.ts.map +1 -1
- package/lib/esm/components-react/converters/HexadecimalTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/NavigationPropertyTypeConverter.d.ts +1 -1
- package/lib/esm/components-react/converters/NavigationPropertyTypeConverter.d.ts.map +1 -1
- package/lib/esm/components-react/converters/NavigationPropertyTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/NumericTypeConverter.d.ts +3 -2
- package/lib/esm/components-react/converters/NumericTypeConverter.d.ts.map +1 -1
- package/lib/esm/components-react/converters/NumericTypeConverter.js +4 -2
- package/lib/esm/components-react/converters/NumericTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/PointTypeConverter.d.ts +2 -2
- package/lib/esm/components-react/converters/PointTypeConverter.d.ts.map +1 -1
- package/lib/esm/components-react/converters/PointTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/StringTypeConverter.d.ts +1 -1
- package/lib/esm/components-react/converters/StringTypeConverter.d.ts.map +1 -1
- package/lib/esm/components-react/converters/StringTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/TypeConverter.d.ts +2 -2
- package/lib/esm/components-react/converters/TypeConverter.d.ts.map +1 -1
- package/lib/esm/components-react/converters/TypeConverter.js +2 -2
- package/lib/esm/components-react/converters/TypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/TypeConverterManager.d.ts +1 -1
- package/lib/esm/components-react/converters/TypeConverterManager.d.ts.map +1 -1
- package/lib/esm/components-react/converters/TypeConverterManager.js.map +1 -1
- package/lib/esm/components-react/converters/valuetypes/ConvertedTypes.d.ts +1 -1
- package/lib/esm/components-react/converters/valuetypes/ConvertedTypes.d.ts.map +1 -1
- package/lib/esm/components-react/converters/valuetypes/ConvertedTypes.js.map +1 -1
- package/lib/esm/components-react/datepicker/DateField.d.ts +3 -2
- package/lib/esm/components-react/datepicker/DateField.d.ts.map +1 -1
- package/lib/esm/components-react/datepicker/DateField.js.map +1 -1
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.d.ts +2 -2
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.d.ts.map +1 -1
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
- package/lib/esm/components-react/datepicker/IntlFormatter.d.ts +1 -1
- package/lib/esm/components-react/datepicker/IntlFormatter.d.ts.map +1 -1
- package/lib/esm/components-react/datepicker/IntlFormatter.js.map +1 -1
- package/lib/esm/components-react/datepicker/TimeField.d.ts +1 -1
- package/lib/esm/components-react/datepicker/TimeField.d.ts.map +1 -1
- package/lib/esm/components-react/datepicker/TimeField.js.map +1 -1
- package/lib/esm/components-react/editors/BooleanEditor.d.ts +2 -2
- package/lib/esm/components-react/editors/BooleanEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/BooleanEditor.js.map +1 -1
- package/lib/esm/components-react/editors/CustomNumberEditor.d.ts +2 -2
- package/lib/esm/components-react/editors/CustomNumberEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/CustomNumberEditor.js +4 -2
- package/lib/esm/components-react/editors/CustomNumberEditor.js.map +1 -1
- package/lib/esm/components-react/editors/DateTimeEditor.d.ts +4 -3
- package/lib/esm/components-react/editors/DateTimeEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/DateTimeEditor.js +3 -2
- package/lib/esm/components-react/editors/DateTimeEditor.js.map +1 -1
- package/lib/esm/components-react/editors/EditorContainer.d.ts +2 -2
- package/lib/esm/components-react/editors/EditorContainer.d.ts.map +1 -1
- package/lib/esm/components-react/editors/EditorContainer.js.map +1 -1
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.d.ts +2 -2
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
- package/lib/esm/components-react/editors/EnumEditor.d.ts +3 -3
- package/lib/esm/components-react/editors/EnumEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/EnumEditor.js.map +1 -1
- package/lib/esm/components-react/editors/IconEditor.d.ts +2 -2
- package/lib/esm/components-react/editors/IconEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/IconEditor.js.map +1 -1
- package/lib/esm/components-react/editors/ImageCheckBoxEditor.d.ts +2 -2
- package/lib/esm/components-react/editors/ImageCheckBoxEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
- package/lib/esm/components-react/editors/NumericInputEditor.d.ts +2 -2
- package/lib/esm/components-react/editors/NumericInputEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/NumericInputEditor.js.map +1 -1
- package/lib/esm/components-react/editors/PopupButton.d.ts +1 -1
- package/lib/esm/components-react/editors/PopupButton.d.ts.map +1 -1
- package/lib/esm/components-react/editors/PopupButton.js +4 -3
- package/lib/esm/components-react/editors/PopupButton.js.map +1 -1
- package/lib/esm/components-react/editors/PropertyEditorManager.d.ts +1 -1
- package/lib/esm/components-react/editors/PropertyEditorManager.d.ts.map +1 -1
- package/lib/esm/components-react/editors/PropertyEditorManager.js.map +1 -1
- package/lib/esm/components-react/editors/SliderEditor.d.ts +2 -2
- package/lib/esm/components-react/editors/SliderEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/SliderEditor.js.map +1 -1
- package/lib/esm/components-react/editors/TextEditor.d.ts +2 -2
- package/lib/esm/components-react/editors/TextEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/TextEditor.js +4 -2
- package/lib/esm/components-react/editors/TextEditor.js.map +1 -1
- package/lib/esm/components-react/editors/TextareaEditor.d.ts +2 -2
- package/lib/esm/components-react/editors/TextareaEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/TextareaEditor.js.map +1 -1
- package/lib/esm/components-react/editors/ToggleEditor.d.ts +2 -2
- package/lib/esm/components-react/editors/ToggleEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/ToggleEditor.js.map +1 -1
- package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.d.ts +2 -2
- package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
- package/lib/esm/components-react/favorite/FavoritePropertyList.d.ts +1 -1
- package/lib/esm/components-react/favorite/FavoritePropertyList.d.ts.map +1 -1
- package/lib/esm/components-react/favorite/FavoritePropertyList.js +3 -2
- package/lib/esm/components-react/favorite/FavoritePropertyList.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts +4 -4
- package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts +4 -4
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +2 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js +2 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js +3 -3
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts +4 -3
- package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Operators.d.ts +1 -1
- package/lib/esm/components-react/filter-builder/Operators.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Types.d.ts +2 -2
- package/lib/esm/components-react/filter-builder/Types.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/Types.js.map +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.d.ts +2 -2
- package/lib/esm/components-react/filtering/FilteringInput.d.ts.map +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/esm/components-react/filtering/ResultSelector.d.ts +1 -1
- package/lib/esm/components-react/filtering/ResultSelector.d.ts.map +1 -1
- package/lib/esm/components-react/filtering/ResultSelector.js.map +1 -1
- package/lib/esm/components-react/iconpicker/IconPickerButton.d.ts +1 -1
- package/lib/esm/components-react/iconpicker/IconPickerButton.d.ts.map +1 -1
- package/lib/esm/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/esm/components-react/inputs/ParsedInput.d.ts +2 -2
- package/lib/esm/components-react/inputs/ParsedInput.d.ts.map +1 -1
- package/lib/esm/components-react/inputs/ParsedInput.js.map +1 -1
- package/lib/esm/components-react/properties/ItemStyle.d.ts +1 -1
- package/lib/esm/components-react/properties/ItemStyle.d.ts.map +1 -1
- package/lib/esm/components-react/properties/ItemStyle.js.map +1 -1
- package/lib/esm/components-react/properties/LinkHandler.d.ts +1 -1
- package/lib/esm/components-react/properties/LinkHandler.d.ts.map +1 -1
- package/lib/esm/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/esm/components-react/properties/ValueRendererManager.d.ts +3 -3
- package/lib/esm/components-react/properties/ValueRendererManager.d.ts.map +1 -1
- package/lib/esm/components-react/properties/ValueRendererManager.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/ActionButtonList.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/ActionButtonList.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/ActionButtonList.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/ActionButtonRenderer.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/ActionButtonRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/ActionButtonRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.js +4 -3
- package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.d.ts +1 -1
- package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.js +1 -1
- package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.js +3 -2
- package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyRenderer.d.ts +7 -7
- package/lib/esm/components-react/properties/renderers/PropertyRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyView.d.ts +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyView.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyView.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyView.scss +5 -0
- package/lib/esm/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.d.ts +1 -1
- package/lib/esm/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/PrimitivePropertyLabelRenderer.d.ts +1 -1
- package/lib/esm/components-react/properties/renderers/label/PrimitivePropertyLabelRenderer.d.ts.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 +2 -1
- package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/ArrayPropertyValueRenderer.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/value/ArrayPropertyValueRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/ArrayPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js +2 -1
- package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/MergedPropertyValueRenderer.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/value/MergedPropertyValueRenderer.d.ts.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.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js +16 -18
- package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js +2 -1
- package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js +7 -4
- package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/StructPropertyValueRenderer.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/value/StructPropertyValueRenderer.d.ts.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.d.ts +2 -2
- package/lib/esm/components-react/properties/renderers/value/UrlPropertyValueRenderer.d.ts.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.d.ts +1 -1
- package/lib/esm/components-react/properties/renderers/value/WithContextStyle.d.ts.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.d.ts +1 -1
- package/lib/esm/components-react/properties/renderers/value/table/ArrayValueRenderer.d.ts.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.d.ts +3 -3
- package/lib/esm/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.d.ts.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.d.ts +1 -1
- package/lib/esm/components-react/properties/renderers/value/table/StructValueRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/table/StructValueRenderer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js +2 -1
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/SimplePropertyDataProvider.d.ts +6 -1
- package/lib/esm/components-react/propertygrid/SimplePropertyDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/SimplePropertyDataProvider.js +17 -4
- package/lib/esm/components-react/propertygrid/SimplePropertyDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.js +2 -1
- package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts +9 -8
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js +2 -2
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyList.d.ts +8 -7
- package/lib/esm/components-react/propertygrid/component/PropertyList.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyList.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +12 -11
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js +51 -46
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.d.ts +5 -4
- package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.js +13 -11
- package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.d.ts +4 -3
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js +2 -2
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.d.ts +3 -2
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js +2 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.d.ts +3 -2
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.d.ts.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.d.ts +3 -2
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.d.ts.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.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts.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 +4 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.d.ts +4 -4
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.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.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts +4 -3
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts.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.d.ts +3 -2
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.d.ts.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.d.ts +4 -3
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.d.ts.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.d.ts +5 -4
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js +2 -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.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +2 -2
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts +5 -4
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +3 -2
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts +4 -4
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -8
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js +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.d.ts +5 -5
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +7 -5
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/selectable-content/SelectableContent.d.ts.map +1 -1
- package/lib/esm/components-react/selectable-content/SelectableContent.js +3 -2
- package/lib/esm/components-react/selectable-content/SelectableContent.js.map +1 -1
- package/lib/esm/components-react/toolbar/Item.d.ts +1 -1
- package/lib/esm/components-react/toolbar/Item.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/Item.js.map +1 -1
- package/lib/esm/components-react/toolbar/ItemWrapper.d.ts +1 -1
- package/lib/esm/components-react/toolbar/ItemWrapper.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/ItemWrapper.js.map +1 -1
- package/lib/esm/components-react/toolbar/Items.d.ts +2 -2
- package/lib/esm/components-react/toolbar/Items.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/Items.js.map +1 -1
- package/lib/esm/components-react/toolbar/Overflow.d.ts +1 -1
- package/lib/esm/components-react/toolbar/Overflow.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/Overflow.js.map +1 -1
- package/lib/esm/components-react/toolbar/OverflowPanel.d.ts +1 -1
- package/lib/esm/components-react/toolbar/OverflowPanel.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/OverflowPanel.js.map +1 -1
- package/lib/esm/components-react/toolbar/PopupItem.d.ts +2 -2
- package/lib/esm/components-react/toolbar/PopupItem.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/PopupItem.js.map +1 -1
- package/lib/esm/components-react/toolbar/PopupItemWithDrag.d.ts +3 -2
- package/lib/esm/components-react/toolbar/PopupItemWithDrag.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
- package/lib/esm/components-react/toolbar/PopupItemsPanel.d.ts +1 -1
- package/lib/esm/components-react/toolbar/PopupItemsPanel.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/PopupItemsPanel.js.map +1 -1
- package/lib/esm/components-react/toolbar/Toolbar.d.ts +2 -2
- package/lib/esm/components-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.d.ts +2 -2
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.js +8 -4
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/BackArrow.d.ts +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/BackArrow.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/BackArrow.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Column.d.ts +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Column.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Column.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Columns.d.ts +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Columns.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Columns.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Panel.d.ts +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Panel.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Panel.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Title.d.ts +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Title.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Title.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/tool/Expander.d.ts +2 -2
- package/lib/esm/components-react/toolbar/groupPanel/tool/Expander.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/tool/Expander.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.d.ts +2 -2
- package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.js +3 -1
- package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
- package/lib/esm/components-react/tree/ImageLoader.d.ts +2 -2
- package/lib/esm/components-react/tree/ImageLoader.d.ts.map +1 -1
- package/lib/esm/components-react/tree/ImageLoader.js.map +1 -1
- package/lib/esm/components-react/tree/SimpleTreeDataProvider.d.ts +2 -2
- package/lib/esm/components-react/tree/SimpleTreeDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/tree/SimpleTreeDataProvider.js.map +1 -1
- package/lib/esm/components-react/tree/TreeDataProvider.d.ts +4 -4
- package/lib/esm/components-react/tree/TreeDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeActions.d.ts +1 -1
- package/lib/esm/components-react/tree/controlled/TreeActions.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeActions.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.d.ts +6 -6
- package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEventHandler.d.ts +6 -6
- package/lib/esm/components-react/tree/controlled/TreeEventHandler.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEventHandler.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEvents.d.ts +3 -3
- package/lib/esm/components-react/tree/controlled/TreeEvents.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEvents.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeHooks.d.ts +4 -3
- package/lib/esm/components-react/tree/controlled/TreeHooks.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeHooks.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeModel.d.ts +3 -3
- package/lib/esm/components-react/tree/controlled/TreeModel.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeModel.js +7 -4
- package/lib/esm/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeModelSource.d.ts +2 -1
- package/lib/esm/components-react/tree/controlled/TreeModelSource.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeModelSource.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeNodeLoader.d.ts +5 -5
- package/lib/esm/components-react/tree/controlled/TreeNodeLoader.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js +8 -6
- package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts +7 -7
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.scss +2 -2
- package/lib/esm/components-react/tree/controlled/component/NodeContent.d.ts +5 -5
- package/lib/esm/components-react/tree/controlled/component/NodeContent.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/NodeContent.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeNodeEditor.d.ts +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeNodeEditor.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeNodeEditor.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeNodeRenderer.d.ts +6 -6
- package/lib/esm/components-react/tree/controlled/component/TreeNodeRenderer.d.ts.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.d.ts +5 -5
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js +3 -23
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/SparseTree.js +2 -1
- package/lib/esm/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/TreeModelMutator.d.ts +6 -6
- package/lib/esm/components-react/tree/controlled/internal/TreeModelMutator.d.ts.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.d.ts +4 -4
- package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js +4 -2
- package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
- package/package.json +11 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerPopupButton.js","sourceRoot":"","sources":["../../../../src/components-react/datepicker/DatePickerPopupButton.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAAiG;AACjG,kDAAuD;AACvD,wDAA4C;AAC5C,kDAA+C;AAC/C,6CAA0C;AAC1C,2CAAwC;AACxC,2CAAkD;AAClD,wCAAsC;AAwBtC;;KAEK;AACL,SAAgB,qBAAqB,CAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAC1G,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAA8B;IAC9E,MAAM,CAAC,WAAW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WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,GAAI,CACtM,CACJ,CAAC;AACJ,CAAC;AAnFD,sDAmFC","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 Date\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { DateFormatter, RelativePosition, SpecialKey, TimeDisplay } from \"@itwin/appui-abstract\";\r\nimport { CommonProps, Popup } from \"@itwin/core-react\";\r\nimport { Text } from \"@itwin/itwinui-react\";\r\nimport { UiComponents } from \"../UiComponents\";\r\nimport { DatePicker } from \"./DatePicker\";\r\nimport { DateField } from \"./DateField\";\r\nimport { TimeField, TimeSpec } from \"./TimeField\";\r\nimport \"./DatePickerPopupButton.scss\";\r\n\r\n/** Props used by [[DatePickerPopupButton]] component.\r\n * @alpha */\r\nexport interface DatePickerPopupButtonProps extends CommonProps {\r\n /** Date to be shown as the selected date. */\r\n selected: Date;\r\n /** If true show the date (and optionally time) edit field next to button */\r\n displayEditField?: boolean;\r\n // If defined show time in popup and also display time if input field is shown\r\n timeDisplay?: TimeDisplay;\r\n /** Function called when Date changes. */\r\n onDateChange?: (day: Date) => void;\r\n /** Optional tooltip */\r\n buttonToolTip?: string;\r\n /* Custom date formatter. WARNING: if used values will only be shown in specified format and will not be based on locale.\r\n * If used the existence of a parseDate function will determine if the edit field allows editing. */\r\n dateFormatter?: DateFormatter;\r\n /** User defined class name for edit field. */\r\n fieldClassName?: string;\r\n /** User defined style for edit field. */\r\n fieldStyle?: React.CSSProperties;\r\n}\r\n\r\n/** Component that displays a button used to pick a date and optionally a time.\r\n * @alpha\r\n * */\r\nexport function DatePickerPopupButton({ displayEditField, timeDisplay, selected, onDateChange, dateFormatter,\r\n buttonToolTip, fieldStyle, fieldClassName, style }: DatePickerPopupButtonProps) {\r\n const [workingDate, setWorkingDate] = React.useState(new Date(selected.getTime()));\r\n const [isSettingsOpen, setIsSettingsOpen] = React.useState(false);\r\n const timeLabelRef = React.useRef(UiComponents.translate(\"datepicker.time\"));\r\n const toolTipLabelRef = React.useRef(UiComponents.translate(\"datepicker.selectDate\"));\r\n const toolTipLabel = React.useMemo(() => buttonToolTip ? buttonToolTip : toolTipLabelRef.current, [buttonToolTip]);\r\n\r\n // See if props have changed since component mounted\r\n React.useEffect(() => {\r\n const newWorkingDate = new Date(selected.getTime());\r\n setWorkingDate(newWorkingDate);\r\n }, [selected]);\r\n\r\n const buttonRef = React.useRef<HTMLButtonElement>(null);\r\n const togglePopupDisplay = React.useCallback((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\r\n event.preventDefault();\r\n setShowFocusOutline(false);\r\n setIsSettingsOpen((prev) => !prev);\r\n }, [setIsSettingsOpen]);\r\n\r\n const handleCloseSetting = React.useCallback(() => {\r\n setIsSettingsOpen(false);\r\n }, [setIsSettingsOpen]);\r\n\r\n const handleOnDateChanged = (day: Date) => {\r\n // combine current time into selected Date\r\n const newWorkingDate = new Date(day.getTime());\r\n newWorkingDate.setHours(workingDate.getHours(), workingDate.getMinutes(), workingDate.getSeconds());\r\n onDateChange && onDateChange(newWorkingDate);\r\n !timeDisplay && setIsSettingsOpen(false);\r\n };\r\n\r\n const handleOnTimeChanged = (time: TimeSpec) => {\r\n // Combine new time into selected Date\r\n const newWorkingDate = new Date(workingDate.getTime());\r\n newWorkingDate.setHours(time.hours, time.minutes, time.seconds);\r\n setWorkingDate(newWorkingDate);\r\n onDateChange && onDateChange(newWorkingDate);\r\n };\r\n\r\n const [showFocusOutline, setShowFocusOutline] = React.useState(false);\r\n const handlePopupKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLButtonElement>) => {\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.Space) {\r\n setShowFocusOutline(true);\r\n setIsSettingsOpen(true);\r\n }\r\n }, []);\r\n\r\n const timeSpec: TimeSpec = { hours: workingDate.getHours(), minutes: workingDate.getMinutes(), seconds: workingDate.getSeconds() };\r\n return (\r\n <>\r\n <button title={toolTipLabel} style={style} className=\"components-date-picker-calendar-popup-button\" onKeyDown={handlePopupKeyDown}\r\n data-testid=\"components-date-picker-calendar-popup-button\" onPointerDown={togglePopupDisplay} ref={buttonRef}>\r\n <div className=\"datepicker-button\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\r\n <path d=\"M13,13H9V10h4ZM16,3V15a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V3A1,1,0,0,1,1,2H3V0H4V2h8V0h1V2h2A1,1,0,0,1,16,3ZM15,6H1v9H15Z\" />\r\n </svg>\r\n </div>\r\n </button>\r\n <Popup\r\n isOpen={isSettingsOpen}\r\n position={RelativePosition.BottomLeft}\r\n onClose={handleCloseSetting}\r\n target={buttonRef.current}\r\n closeOnEnter={false}\r\n moveFocus={showFocusOutline}\r\n closeOnNestedPopupOutsideClick\r\n >\r\n <div className=\"components-date-picker-calendar-popup-panel\" data-testid=\"components-date-picker-calendar-popup-panel\">\r\n <DatePicker selected={workingDate} onDateChange={handleOnDateChanged} showFocusOutline={showFocusOutline} />\r\n {timeDisplay &&\r\n <div className=\"time-container\">\r\n <Text variant=\"body\" className=\"time-label\">{timeLabelRef.current}</Text>\r\n <TimeField time={timeSpec} timeDisplay={timeDisplay} onTimeChange={handleOnTimeChanged} />\r\n </div>\r\n }\r\n </div>\r\n </Popup >\r\n {!!displayEditField && <DateField style={fieldStyle} className={fieldClassName} initialDate={workingDate} timeDisplay={timeDisplay} dateFormatter={dateFormatter} onDateChange={handleOnDateChanged} />}\r\n </>\r\n );\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"DatePickerPopupButton.js","sourceRoot":"","sources":["../../../../src/components-react/datepicker/DatePickerPopupButton.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;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BAAC,oBAAI,IAAC,OAAO,EAAC,MAAM,EAAC,SAAS,EAAC,YAAY,IAAE,YAAY,CAAC,OAAO,CAAQ;wBACzE,oBAAC,qBAAS,IAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,mBAAmB,GAAI,CACtF,CAEJ,CACC;QACR,CAAC,CAAC,gBAAgB,IAAI,oBAAC,qBAAS,IAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,GAAI,CACtM,CACJ,CAAC;AACJ,CAAC;AAnFD,sDAmFC","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 Date\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport type { DateFormatter, TimeDisplay } from \"@itwin/appui-abstract\";\r\nimport { RelativePosition, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport type { CommonProps} from \"@itwin/core-react\";\r\nimport { Popup } from \"@itwin/core-react\";\r\nimport { Text } from \"@itwin/itwinui-react\";\r\nimport { UiComponents } from \"../UiComponents\";\r\nimport { DatePicker } from \"./DatePicker\";\r\nimport { DateField } from \"./DateField\";\r\nimport type { TimeSpec } from \"./TimeField\";\r\nimport { TimeField } from \"./TimeField\";\r\nimport \"./DatePickerPopupButton.scss\";\r\n\r\n/** Props used by [[DatePickerPopupButton]] component.\r\n * @alpha */\r\nexport interface DatePickerPopupButtonProps extends CommonProps {\r\n /** Date to be shown as the selected date. */\r\n selected: Date;\r\n /** If true show the date (and optionally time) edit field next to button */\r\n displayEditField?: boolean;\r\n // If defined show time in popup and also display time if input field is shown\r\n timeDisplay?: TimeDisplay;\r\n /** Function called when Date changes. */\r\n onDateChange?: (day: Date) => void;\r\n /** Optional tooltip */\r\n buttonToolTip?: string;\r\n /* Custom date formatter. WARNING: if used values will only be shown in specified format and will not be based on locale.\r\n * If used the existence of a parseDate function will determine if the edit field allows editing. */\r\n dateFormatter?: DateFormatter;\r\n /** User defined class name for edit field. */\r\n fieldClassName?: string;\r\n /** User defined style for edit field. */\r\n fieldStyle?: React.CSSProperties;\r\n}\r\n\r\n/** Component that displays a button used to pick a date and optionally a time.\r\n * @alpha\r\n * */\r\nexport function DatePickerPopupButton({ displayEditField, timeDisplay, selected, onDateChange, dateFormatter,\r\n buttonToolTip, fieldStyle, fieldClassName, style }: DatePickerPopupButtonProps) {\r\n const [workingDate, setWorkingDate] = React.useState(new Date(selected.getTime()));\r\n const [isSettingsOpen, setIsSettingsOpen] = React.useState(false);\r\n const timeLabelRef = React.useRef(UiComponents.translate(\"datepicker.time\"));\r\n const toolTipLabelRef = React.useRef(UiComponents.translate(\"datepicker.selectDate\"));\r\n const toolTipLabel = React.useMemo(() => buttonToolTip ? buttonToolTip : toolTipLabelRef.current, [buttonToolTip]);\r\n\r\n // See if props have changed since component mounted\r\n React.useEffect(() => {\r\n const newWorkingDate = new Date(selected.getTime());\r\n setWorkingDate(newWorkingDate);\r\n }, [selected]);\r\n\r\n const buttonRef = React.useRef<HTMLButtonElement>(null);\r\n const togglePopupDisplay = React.useCallback((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\r\n event.preventDefault();\r\n setShowFocusOutline(false);\r\n setIsSettingsOpen((prev) => !prev);\r\n }, [setIsSettingsOpen]);\r\n\r\n const handleCloseSetting = React.useCallback(() => {\r\n setIsSettingsOpen(false);\r\n }, [setIsSettingsOpen]);\r\n\r\n const handleOnDateChanged = (day: Date) => {\r\n // combine current time into selected Date\r\n const newWorkingDate = new Date(day.getTime());\r\n newWorkingDate.setHours(workingDate.getHours(), workingDate.getMinutes(), workingDate.getSeconds());\r\n onDateChange && onDateChange(newWorkingDate);\r\n !timeDisplay && setIsSettingsOpen(false);\r\n };\r\n\r\n const handleOnTimeChanged = (time: TimeSpec) => {\r\n // Combine new time into selected Date\r\n const newWorkingDate = new Date(workingDate.getTime());\r\n newWorkingDate.setHours(time.hours, time.minutes, time.seconds);\r\n setWorkingDate(newWorkingDate);\r\n onDateChange && onDateChange(newWorkingDate);\r\n };\r\n\r\n const [showFocusOutline, setShowFocusOutline] = React.useState(false);\r\n const handlePopupKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLButtonElement>) => {\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.Space) {\r\n setShowFocusOutline(true);\r\n setIsSettingsOpen(true);\r\n }\r\n }, []);\r\n\r\n const timeSpec: TimeSpec = { hours: workingDate.getHours(), minutes: workingDate.getMinutes(), seconds: workingDate.getSeconds() };\r\n return (\r\n <>\r\n <button title={toolTipLabel} style={style} className=\"components-date-picker-calendar-popup-button\" onKeyDown={handlePopupKeyDown}\r\n data-testid=\"components-date-picker-calendar-popup-button\" onPointerDown={togglePopupDisplay} ref={buttonRef}>\r\n <div className=\"datepicker-button\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\r\n <path d=\"M13,13H9V10h4ZM16,3V15a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V3A1,1,0,0,1,1,2H3V0H4V2h8V0h1V2h2A1,1,0,0,1,16,3ZM15,6H1v9H15Z\" />\r\n </svg>\r\n </div>\r\n </button>\r\n <Popup\r\n isOpen={isSettingsOpen}\r\n position={RelativePosition.BottomLeft}\r\n onClose={handleCloseSetting}\r\n target={buttonRef.current}\r\n closeOnEnter={false}\r\n moveFocus={showFocusOutline}\r\n closeOnNestedPopupOutsideClick\r\n >\r\n <div className=\"components-date-picker-calendar-popup-panel\" data-testid=\"components-date-picker-calendar-popup-panel\">\r\n <DatePicker selected={workingDate} onDateChange={handleOnDateChanged} showFocusOutline={showFocusOutline} />\r\n {timeDisplay &&\r\n <div className=\"time-container\">\r\n <Text variant=\"body\" className=\"time-label\">{timeLabelRef.current}</Text>\r\n <TimeField time={timeSpec} timeDisplay={timeDisplay} onTimeChange={handleOnTimeChanged} />\r\n </div>\r\n }\r\n </div>\r\n </Popup >\r\n {!!displayEditField && <DateField style={fieldStyle} className={fieldClassName} initialDate={workingDate} timeDisplay={timeDisplay} dateFormatter={dateFormatter} onDateChange={handleOnDateChanged} />}\r\n </>\r\n );\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Date
|
|
3
3
|
*/
|
|
4
|
-
import { DateFormatter } from "@itwin/appui-abstract";
|
|
4
|
+
import type { DateFormatter } from "@itwin/appui-abstract";
|
|
5
5
|
/**
|
|
6
6
|
* A basic class that allows user to provide an Intl.DateTimeFormat
|
|
7
7
|
* that can be used to format the date and time display. If no format is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlFormatter.d.ts","sourceRoot":"","sources":["../../../../src/components-react/datepicker/IntlFormatter.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"IntlFormatter.d.ts","sourceRoot":"","sources":["../../../../src/components-react/datepicker/IntlFormatter.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;;;GAOG;AACH,qBAAa,aAAc,YAAW,aAAa;IACrC,OAAO,CAAC,cAAc,CAAC;gBAAf,cAAc,CAAC,iCAAqB;IAGxD,IAAW,SAAS,IAAI,IAAI,CAAC,cAAc,CAiB1C;IAEM,WAAW,CAAC,GAAG,EAAE,IAAI;CAO7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlFormatter.js","sourceRoot":"","sources":["../../../../src/components-react/datepicker/IntlFormatter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;;;;;GAOG;AACH,MAAa,aAAa;IACxB,YAAoB,cAAoC;QAApC,mBAAc,GAAd,cAAc,CAAsB;IACxD,CAAC;IAED,IAAW,SAAS;QAClB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;YACxB,+DAA+D;YAC/D,IAAI,CAAC,cAAc,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,EACrD;gBACE,OAAO,EAAE,OAAO;gBAChB,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,GAAG,EAAE,SAAS;gBACd,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,IAAI;gBACZ,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE,SAAS,EAAG,0BAA0B;gBAC9C,4BAA4B,CAAC,qBAAqB;aACnD,CAAC,CAAC;SACN;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,WAAW,CAAC,GAAS;QAC1B,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;CAKF;AA9BD,sCA8BC","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 Date\r\n */\r\n\r\nimport { DateFormatter } from \"@itwin/appui-abstract\";\r\n\r\n/**\r\n * A basic class that allows user to provide an Intl.DateTimeFormat\r\n * that can be used to format the date and time display. If no format is\r\n * specified a default format will be used. This default implementation does not\r\n * support parsing, so when used by [[DatePickerPopup]] the edit field will be readonly. If\r\n * a parseData function is implemented then the edit field will be editable.\r\n * @alpha\r\n */\r\nexport class IntlFormatter implements DateFormatter {\r\n constructor(private _intlFormatter?: Intl.DateTimeFormat) {\r\n }\r\n\r\n public get formatter(): Intl.DateTimeFormat {\r\n if (!this._intlFormatter) {\r\n // https://tc39.es/ecma402/#sec-intl-datetimeformat-constructor\r\n this._intlFormatter = new Intl.DateTimeFormat(undefined,\r\n {\r\n weekday: \"short\", /* \"narrow\", \"short\", \"long\" */\r\n year: \"numeric\", /* \"2-digit\", \"numeric\" */\r\n month: \"2-digit\", /* \"2-digit\", \"numeric\", \"narrow\", \"short\", \"long\" */\r\n day: \"2-digit\", /* \"2-digit\", \"numeric\" */\r\n hour: \"numeric\", /* \"2-digit\", \"numeric\" */\r\n hour12: true,\r\n minute: \"numeric\", /* \"2-digit\", \"numeric\" */\r\n second: \"numeric\", /* \"2-digit\", \"numeric\" */\r\n /* timeZoneName:\t\"short\", */ /* \"short\", \"long\" */\r\n });\r\n }\r\n return this._intlFormatter;\r\n }\r\n\r\n public formateDate(day: Date) {\r\n return this.formatter.format(day);\r\n }\r\n\r\n // The default implementation does not currently support parsing. If a derived class supports parsing then the\r\n // parseDate function must be implemented.\r\n // parseDate(dateString: string): Date|undefined {}\r\n}\r\n\r\n"]}
|
|
1
|
+
{"version":3,"file":"IntlFormatter.js","sourceRoot":"","sources":["../../../../src/components-react/datepicker/IntlFormatter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;;;;;;GAOG;AACH,MAAa,aAAa;IACxB,YAAoB,cAAoC;QAApC,mBAAc,GAAd,cAAc,CAAsB;IACxD,CAAC;IAED,IAAW,SAAS;QAClB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;YACxB,+DAA+D;YAC/D,IAAI,CAAC,cAAc,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,EACrD;gBACE,OAAO,EAAE,OAAO;gBAChB,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,GAAG,EAAE,SAAS;gBACd,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,IAAI;gBACZ,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE,SAAS,EAAG,0BAA0B;gBAC9C,4BAA4B,CAAC,qBAAqB;aACnD,CAAC,CAAC;SACN;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,WAAW,CAAC,GAAS;QAC1B,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;CAKF;AA9BD,sCA8BC","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 Date\r\n */\r\n\r\nimport type { DateFormatter } from \"@itwin/appui-abstract\";\r\n\r\n/**\r\n * A basic class that allows user to provide an Intl.DateTimeFormat\r\n * that can be used to format the date and time display. If no format is\r\n * specified a default format will be used. This default implementation does not\r\n * support parsing, so when used by [[DatePickerPopup]] the edit field will be readonly. If\r\n * a parseData function is implemented then the edit field will be editable.\r\n * @alpha\r\n */\r\nexport class IntlFormatter implements DateFormatter {\r\n constructor(private _intlFormatter?: Intl.DateTimeFormat) {\r\n }\r\n\r\n public get formatter(): Intl.DateTimeFormat {\r\n if (!this._intlFormatter) {\r\n // https://tc39.es/ecma402/#sec-intl-datetimeformat-constructor\r\n this._intlFormatter = new Intl.DateTimeFormat(undefined,\r\n {\r\n weekday: \"short\", /* \"narrow\", \"short\", \"long\" */\r\n year: \"numeric\", /* \"2-digit\", \"numeric\" */\r\n month: \"2-digit\", /* \"2-digit\", \"numeric\", \"narrow\", \"short\", \"long\" */\r\n day: \"2-digit\", /* \"2-digit\", \"numeric\" */\r\n hour: \"numeric\", /* \"2-digit\", \"numeric\" */\r\n hour12: true,\r\n minute: \"numeric\", /* \"2-digit\", \"numeric\" */\r\n second: \"numeric\", /* \"2-digit\", \"numeric\" */\r\n /* timeZoneName:\t\"short\", */ /* \"short\", \"long\" */\r\n });\r\n }\r\n return this._intlFormatter;\r\n }\r\n\r\n public formateDate(day: Date) {\r\n return this.formatter.format(day);\r\n }\r\n\r\n // The default implementation does not currently support parsing. If a derived class supports parsing then the\r\n // parseDate function must be implemented.\r\n // parseDate(dateString: string): Date|undefined {}\r\n}\r\n\r\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Date
|
|
3
3
|
*/
|
|
4
4
|
/// <reference types="react" />
|
|
5
|
-
import { TimeDisplay } from "@itwin/appui-abstract";
|
|
5
|
+
import type { TimeDisplay } from "@itwin/appui-abstract";
|
|
6
6
|
import "./TimeField.scss";
|
|
7
7
|
/** Interface used to hold 24 hour time in
|
|
8
8
|
* hours, minutes, and seconds.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeField.d.ts","sourceRoot":"","sources":["../../../../src/components-react/datepicker/TimeField.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"TimeField.d.ts","sourceRoot":"","sources":["../../../../src/components-react/datepicker/TimeField.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,kBAAkB,CAAC;AAE1B;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAkBD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,cAAc,eAuMtF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeField.js","sourceRoot":"","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EAAE,IAAI,EAAC,OAAO,GAAG;QAC9L,WAAW;YACV;gBACE,8BAAM,SAAS,EAAC,0BAA0B,QAAS;gBACnD,oBAAC,qBAAK,IAAC,SAAS,EAAC,uBAAuB,EAAC,SAAS,EAAE,sBAAsB,EAAE,MAAM,EAAE,mBAAmB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAG,CAC9L;QAEJ,aAAa;YACZ,oBAAC,qBAAK,IAAC,SAAS,EAAC,8BAA8B,EAAC,SAAS,EAAE,wBAAwB,EAAE,MAAM,EAAE,qBAAqB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAG,CAE5M,CAAC;AACT,CAAC;AAvMD,8BAuMC","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 Date\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Input } from \"@itwin/itwinui-react\";\r\nimport { SpecialKey, TimeDisplay } from \"@itwin/appui-abstract\";\r\nimport { UiComponents } from \"../UiComponents\";\r\nimport \"./TimeField.scss\";\r\n\r\n/** Interface used to hold 24 hour time in\r\n * hours, minutes, and seconds.\r\n * @internal\r\n */\r\nexport interface TimeSpec {\r\n hours: number;\r\n minutes: number;\r\n seconds: number;\r\n}\r\n\r\n/** Interface for props used by [[TimeField]] component.\r\n * @internal\r\n */\r\nexport interface TimeFieldProps {\r\n time: TimeSpec;\r\n timeDisplay: TimeDisplay;\r\n onTimeChange?: (time: TimeSpec) => void;\r\n readOnly?: boolean;\r\n}\r\n\r\nfunction getValidInt(intText: string, min: number, max: number, defaultValue: number) {\r\n try {\r\n const newValue = parseInt(intText, 10);\r\n if (newValue >= min && newValue <= max)\r\n return newValue;\r\n } catch (_e) {\r\n // istanbul ignore next\r\n return defaultValue;\r\n }\r\n return defaultValue;\r\n}\r\n\r\nfunction isSameTime(a: TimeSpec, b: TimeSpec) {\r\n return a.hours === b.hours && a.minutes === b.minutes && a.seconds === b.seconds;\r\n}\r\n\r\n/** Field used to set the Hour:Minutes:Seconds in the [[DatePicker]] Popup panel. The user may key-in the value or use up/down keys to\r\n * change the time.\r\n * @internal\r\n */\r\nexport function TimeField({ time, timeDisplay, readOnly, onTimeChange }: TimeFieldProps) {\r\n const initialDateRef = React.useRef(time);\r\n const amLabelRef = React.useRef(UiComponents.translate(\"timepicker.day-period-am\"));\r\n const pmLabelRef = React.useRef(UiComponents.translate(\"timepicker.day-period-pm\"));\r\n const [timeSpec, setTimeSpec] = React.useState(time);\r\n const { hours, minutes, seconds } = timeSpec;\r\n const showDayPeriod = -1 !== (timeDisplay as string).search(\"aa\");\r\n\r\n const getDisplayHours = React.useCallback((timeHours: number) => {\r\n if (!showDayPeriod) {\r\n return timeHours;\r\n }\r\n const outHours = (0 === timeHours) ? 12 : timeHours > 12 ? timeHours - 12 : timeHours;\r\n return outHours;\r\n }, [showDayPeriod]);\r\n\r\n // See if new initialDate props have changed since component mounted\r\n React.useEffect(() => {\r\n if (!isSameTime(time, initialDateRef.current)) {\r\n setTimeSpec(time);\r\n initialDateRef.current = time;\r\n }\r\n }, [time]);\r\n\r\n const displayHour = getDisplayHours(hours);\r\n const [dayPeriodText, setDayPeriodText] = React.useState(showDayPeriod ? (hours >= 12 ? pmLabelRef.current : amLabelRef.current) : undefined);\r\n const [hoursText, setHoursText] = React.useState(displayHour.toString().padStart(2, \"0\"));\r\n const [minutesText, setMinutesText] = React.useState(minutes.toString().padStart(2, \"0\"));\r\n const [secondsText, setSecondsText] = React.useState(seconds.toString().padStart(2, \"0\"));\r\n\r\n const updateTimeSpec = React.useCallback((newTime: TimeSpec) => {\r\n if (newTime.hours !== timeSpec.hours || newTime.minutes !== timeSpec.minutes || newTime.seconds !== timeSpec.seconds) {\r\n setTimeSpec(newTime);\r\n onTimeChange && onTimeChange(newTime);\r\n }\r\n }, [onTimeChange, timeSpec.hours, timeSpec.minutes, timeSpec.seconds]);\r\n\r\n const handleHoursChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\r\n setHoursText(event.currentTarget.value);\r\n }, []);\r\n\r\n const handleMinutesChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\r\n setMinutesText(event.currentTarget.value);\r\n }, []);\r\n const handleSecondsChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\r\n setSecondsText(event.currentTarget.value);\r\n }, []);\r\n const handleDayPeriodChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\r\n setDayPeriodText(event.currentTarget.value);\r\n }, []);\r\n\r\n const handleHoursOnBlur = React.useCallback(() => {\r\n const newHours = getValidInt(hoursText, 0, 24, hours);\r\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, hours: newHours });\r\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\r\n }, [getDisplayHours, hours, hoursText, showDayPeriod, timeSpec, updateTimeSpec]);\r\n const handleMinutesOnBlur = React.useCallback(() => {\r\n const newMinutes = getValidInt(minutesText, 0, 59, minutes);\r\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\r\n }, [minutes, minutesText, timeSpec, updateTimeSpec]);\r\n const handleSecondsOnBlur = React.useCallback(() => {\r\n const newSeconds = getValidInt(secondsText, 0, 59, seconds);\r\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\r\n }, [seconds, secondsText, timeSpec, updateTimeSpec]);\r\n const handleDayPeriodOnBlur = React.useCallback(() => {\r\n let newPeriodText: string | undefined;\r\n // istanbul ignore else\r\n if (dayPeriodText === \"AM\" || dayPeriodText === \"am\" || dayPeriodText === amLabelRef.current)\r\n newPeriodText = amLabelRef.current;\r\n else if (dayPeriodText === \"PM\" || dayPeriodText === \"pm\" || dayPeriodText === pmLabelRef.current)\r\n newPeriodText = pmLabelRef.current;\r\n\r\n // istanbul ignore else\r\n if (undefined !== newPeriodText) {\r\n setDayPeriodText(newPeriodText);\r\n if (newPeriodText === amLabelRef.current && hours > 12) {\r\n updateTimeSpec({ ...timeSpec, hours: hours - 12 });\r\n } else if (newPeriodText === pmLabelRef.current && hours <= 11) {\r\n updateTimeSpec({ ...timeSpec, hours: hours + 12 });\r\n }\r\n }\r\n\r\n }, [dayPeriodText, hours, timeSpec, updateTimeSpec]);\r\n\r\n const handleHoursOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.ArrowDown || event.key === SpecialKey.ArrowUp) {\r\n let newHours = hours + (event.key === SpecialKey.ArrowDown ? -1 : 1);\r\n if (newHours < 0) newHours = 24;\r\n if (newHours > 24 || (newHours > 23 && ((minutes + seconds) > 0))) newHours = 0;\r\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, hours: newHours });\r\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.Enter) {\r\n const newHours = getValidInt(hoursText, 0, 24, hours);\r\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, hours: newHours });\r\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\r\n event.preventDefault();\r\n }\r\n }, [getDisplayHours, hours, hoursText, minutes, seconds, showDayPeriod, timeSpec, updateTimeSpec]);\r\n\r\n const handleMinutesOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\r\n if (event.key === SpecialKey.ArrowDown) {\r\n const newMinutes = minutes === 0 ? 59 : minutes - 1;\r\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.ArrowUp) {\r\n const newMinutes = minutes === 59 ? 0 : minutes + 1;\r\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.Home || event.key === SpecialKey.End) {\r\n const newMinutes = event.key === SpecialKey.Home ? 0 : 59;\r\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\r\n event.preventDefault();\r\n } else /* istanbul ignore next */ if (event.key === SpecialKey.Enter) {\r\n const newMinutes = getValidInt(minutesText, 0, 59, minutes);\r\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\r\n event.preventDefault();\r\n }\r\n }, [minutesText, minutes, timeSpec, updateTimeSpec]);\r\n\r\n const handleSecondsOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.ArrowDown) {\r\n const newSeconds = seconds === 0 ? 59 : seconds - 1;\r\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.ArrowUp) {\r\n const newSeconds = seconds === 59 ? 0 : seconds + 1;\r\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.Home || event.key === SpecialKey.End) {\r\n const newSeconds = event.key === SpecialKey.Home ? 0 : 59;\r\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.Enter) {\r\n const newSeconds = getValidInt(secondsText, 0, 59, seconds);\r\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\r\n event.preventDefault();\r\n }\r\n }, [seconds, secondsText, timeSpec, updateTimeSpec]);\r\n\r\n const handleDayPeriodOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\r\n let newPeriodText: string | undefined;\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.ArrowDown || event.key === SpecialKey.Home || event.key === \"a\" || event.key === \"A\") {\r\n newPeriodText = amLabelRef.current;\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.End || event.key === \"p\" || event.key === \"P\") {\r\n newPeriodText = pmLabelRef.current;\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.Enter) {\r\n if (dayPeriodText === \"AM\" || dayPeriodText === \"am\" || dayPeriodText === amLabelRef.current)\r\n newPeriodText = amLabelRef.current;\r\n else if (dayPeriodText === \"PM\" || dayPeriodText === \"pm\" || dayPeriodText === pmLabelRef.current)\r\n newPeriodText = pmLabelRef.current;\r\n event.preventDefault();\r\n }\r\n // istanbul ignore else\r\n if (undefined !== newPeriodText) {\r\n setDayPeriodText(newPeriodText);\r\n /* istanbul ignore else */\r\n if (newPeriodText === amLabelRef.current && hours > 12) {\r\n updateTimeSpec({ ...timeSpec, hours: hours - 12 });\r\n } else if (newPeriodText === pmLabelRef.current && hours <= 11) {\r\n updateTimeSpec({ ...timeSpec, hours: hours + 12 });\r\n }\r\n }\r\n }, [dayPeriodText, hours, timeSpec, updateTimeSpec]);\r\n\r\n const showSeconds = -1 !== (timeDisplay as string).search(\":ss\");\r\n\r\n return <div data-testid=\"components-time-input\" className=\"components-time\">\r\n <Input className=\"components-time-input\" onKeyDown={handleHoursOnKeyDown} onBlur={handleHoursOnBlur} onChange={handleHoursChange} value={hoursText} disabled={readOnly} size=\"small\" />\r\n <span className=\"component-time-separator\">:</span>\r\n <Input className=\"components-time-input\" onKeyDown={handleMinutesOnKeyDown} onBlur={handleMinutesOnBlur} onChange={handleMinutesChange} value={minutesText} disabled={readOnly} size=\"small\" />\r\n {showSeconds &&\r\n <>\r\n <span className=\"component-time-separator\">:</span>\r\n <Input className=\"components-time-input\" onKeyDown={handleSecondsOnKeyDown} onBlur={handleSecondsOnBlur} onChange={handleSecondsChange} value={secondsText} disabled={readOnly} size=\"small\" />\r\n </>\r\n }\r\n {dayPeriodText &&\r\n <Input className=\"components-time-period-input\" onKeyDown={handleDayPeriodOnKeyDown} onBlur={handleDayPeriodOnBlur} onChange={handleDayPeriodChange} value={dayPeriodText} disabled={readOnly} size=\"small\" />\r\n }\r\n </div>;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"TimeField.js","sourceRoot":"","sources":["../../../../src/components-react/datepicker/TimeField.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,wDAA6C;AAE7C,0DAAmD;AACnD,kDAA+C;AAC/C,4BAA0B;AAsB1B,SAAS,WAAW,CAAC,OAAe,EAAE,GAAW,EAAE,GAAW,EAAE,YAAoB;IAClF,IAAI;QACF,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACvC,IAAI,QAAQ,IAAI,GAAG,IAAI,QAAQ,IAAI,GAAG;YACpC,OAAO,QAAQ,CAAC;KACnB;IAAC,OAAO,EAAE,EAAE;QACX,uBAAuB;QACvB,OAAO,YAAY,CAAC;KACrB;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,UAAU,CAAC,CAAW,EAAE,CAAW;IAC1C,OAAO,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAA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Ac,CAAC,CAAC,CAAC;IAErD,MAAM,WAAW,GAAG,CAAC,CAAC,KAAM,WAAsB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAEjE,OAAO,4CAAiB,uBAAuB,EAAC,SAAS,EAAC,iBAAiB;QACzE,oBAAC,qBAAK,IAAC,SAAS,EAAC,uBAAuB,EAAC,SAAS,EAAE,oBAAoB,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAG;QACvL,8BAAM,SAAS,EAAC,0BAA0B,QAAS;QACnD,oBAAC,qBAAK,IAAC,SAAS,EAAC,uBAAuB,EAAC,SAAS,EAAE,sBAAsB,EAAE,MAAM,EAAE,mBAAmB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAG;QAC9L,WAAW;YACV;gBACE,8BAAM,SAAS,EAAC,0BAA0B,QAAS;gBACnD,oBAAC,qBAAK,IAAC,SAAS,EAAC,uBAAuB,EAAC,SAAS,EAAE,sBAAsB,EAAE,MAAM,EAAE,mBAAmB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAG,CAC9L;QAEJ,aAAa;YACZ,oBAAC,qBAAK,IAAC,SAAS,EAAC,8BAA8B,EAAC,SAAS,EAAE,wBAAwB,EAAE,MAAM,EAAE,qBAAqB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAG,CAE5M,CAAC;AACT,CAAC;AAvMD,8BAuMC","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 Date\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { Input } from \"@itwin/itwinui-react\";\r\nimport type { TimeDisplay } from \"@itwin/appui-abstract\";\r\nimport { SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { UiComponents } from \"../UiComponents\";\r\nimport \"./TimeField.scss\";\r\n\r\n/** Interface used to hold 24 hour time in\r\n * hours, minutes, and seconds.\r\n * @internal\r\n */\r\nexport interface TimeSpec {\r\n hours: number;\r\n minutes: number;\r\n seconds: number;\r\n}\r\n\r\n/** Interface for props used by [[TimeField]] component.\r\n * @internal\r\n */\r\nexport interface TimeFieldProps {\r\n time: TimeSpec;\r\n timeDisplay: TimeDisplay;\r\n onTimeChange?: (time: TimeSpec) => void;\r\n readOnly?: boolean;\r\n}\r\n\r\nfunction getValidInt(intText: string, min: number, max: number, defaultValue: number) {\r\n try {\r\n const newValue = parseInt(intText, 10);\r\n if (newValue >= min && newValue <= max)\r\n return newValue;\r\n } catch (_e) {\r\n // istanbul ignore next\r\n return defaultValue;\r\n }\r\n return defaultValue;\r\n}\r\n\r\nfunction isSameTime(a: TimeSpec, b: TimeSpec) {\r\n return a.hours === b.hours && a.minutes === b.minutes && a.seconds === b.seconds;\r\n}\r\n\r\n/** Field used to set the Hour:Minutes:Seconds in the [[DatePicker]] Popup panel. The user may key-in the value or use up/down keys to\r\n * change the time.\r\n * @internal\r\n */\r\nexport function TimeField({ time, timeDisplay, readOnly, onTimeChange }: TimeFieldProps) {\r\n const initialDateRef = React.useRef(time);\r\n const amLabelRef = React.useRef(UiComponents.translate(\"timepicker.day-period-am\"));\r\n const pmLabelRef = React.useRef(UiComponents.translate(\"timepicker.day-period-pm\"));\r\n const [timeSpec, setTimeSpec] = React.useState(time);\r\n const { hours, minutes, seconds } = timeSpec;\r\n const showDayPeriod = -1 !== (timeDisplay as string).search(\"aa\");\r\n\r\n const getDisplayHours = React.useCallback((timeHours: number) => {\r\n if (!showDayPeriod) {\r\n return timeHours;\r\n }\r\n const outHours = (0 === timeHours) ? 12 : timeHours > 12 ? timeHours - 12 : timeHours;\r\n return outHours;\r\n }, [showDayPeriod]);\r\n\r\n // See if new initialDate props have changed since component mounted\r\n React.useEffect(() => {\r\n if (!isSameTime(time, initialDateRef.current)) {\r\n setTimeSpec(time);\r\n initialDateRef.current = time;\r\n }\r\n }, [time]);\r\n\r\n const displayHour = getDisplayHours(hours);\r\n const [dayPeriodText, setDayPeriodText] = React.useState(showDayPeriod ? (hours >= 12 ? pmLabelRef.current : amLabelRef.current) : undefined);\r\n const [hoursText, setHoursText] = React.useState(displayHour.toString().padStart(2, \"0\"));\r\n const [minutesText, setMinutesText] = React.useState(minutes.toString().padStart(2, \"0\"));\r\n const [secondsText, setSecondsText] = React.useState(seconds.toString().padStart(2, \"0\"));\r\n\r\n const updateTimeSpec = React.useCallback((newTime: TimeSpec) => {\r\n if (newTime.hours !== timeSpec.hours || newTime.minutes !== timeSpec.minutes || newTime.seconds !== timeSpec.seconds) {\r\n setTimeSpec(newTime);\r\n onTimeChange && onTimeChange(newTime);\r\n }\r\n }, [onTimeChange, timeSpec.hours, timeSpec.minutes, timeSpec.seconds]);\r\n\r\n const handleHoursChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\r\n setHoursText(event.currentTarget.value);\r\n }, []);\r\n\r\n const handleMinutesChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\r\n setMinutesText(event.currentTarget.value);\r\n }, []);\r\n const handleSecondsChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\r\n setSecondsText(event.currentTarget.value);\r\n }, []);\r\n const handleDayPeriodChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\r\n setDayPeriodText(event.currentTarget.value);\r\n }, []);\r\n\r\n const handleHoursOnBlur = React.useCallback(() => {\r\n const newHours = getValidInt(hoursText, 0, 24, hours);\r\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, hours: newHours });\r\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\r\n }, [getDisplayHours, hours, hoursText, showDayPeriod, timeSpec, updateTimeSpec]);\r\n const handleMinutesOnBlur = React.useCallback(() => {\r\n const newMinutes = getValidInt(minutesText, 0, 59, minutes);\r\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\r\n }, [minutes, minutesText, timeSpec, updateTimeSpec]);\r\n const handleSecondsOnBlur = React.useCallback(() => {\r\n const newSeconds = getValidInt(secondsText, 0, 59, seconds);\r\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\r\n }, [seconds, secondsText, timeSpec, updateTimeSpec]);\r\n const handleDayPeriodOnBlur = React.useCallback(() => {\r\n let newPeriodText: string | undefined;\r\n // istanbul ignore else\r\n if (dayPeriodText === \"AM\" || dayPeriodText === \"am\" || dayPeriodText === amLabelRef.current)\r\n newPeriodText = amLabelRef.current;\r\n else if (dayPeriodText === \"PM\" || dayPeriodText === \"pm\" || dayPeriodText === pmLabelRef.current)\r\n newPeriodText = pmLabelRef.current;\r\n\r\n // istanbul ignore else\r\n if (undefined !== newPeriodText) {\r\n setDayPeriodText(newPeriodText);\r\n if (newPeriodText === amLabelRef.current && hours > 12) {\r\n updateTimeSpec({ ...timeSpec, hours: hours - 12 });\r\n } else if (newPeriodText === pmLabelRef.current && hours <= 11) {\r\n updateTimeSpec({ ...timeSpec, hours: hours + 12 });\r\n }\r\n }\r\n\r\n }, [dayPeriodText, hours, timeSpec, updateTimeSpec]);\r\n\r\n const handleHoursOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.ArrowDown || event.key === SpecialKey.ArrowUp) {\r\n let newHours = hours + (event.key === SpecialKey.ArrowDown ? -1 : 1);\r\n if (newHours < 0) newHours = 24;\r\n if (newHours > 24 || (newHours > 23 && ((minutes + seconds) > 0))) newHours = 0;\r\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, hours: newHours });\r\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.Enter) {\r\n const newHours = getValidInt(hoursText, 0, 24, hours);\r\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, hours: newHours });\r\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\r\n event.preventDefault();\r\n }\r\n }, [getDisplayHours, hours, hoursText, minutes, seconds, showDayPeriod, timeSpec, updateTimeSpec]);\r\n\r\n const handleMinutesOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\r\n if (event.key === SpecialKey.ArrowDown) {\r\n const newMinutes = minutes === 0 ? 59 : minutes - 1;\r\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.ArrowUp) {\r\n const newMinutes = minutes === 59 ? 0 : minutes + 1;\r\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.Home || event.key === SpecialKey.End) {\r\n const newMinutes = event.key === SpecialKey.Home ? 0 : 59;\r\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\r\n event.preventDefault();\r\n } else /* istanbul ignore next */ if (event.key === SpecialKey.Enter) {\r\n const newMinutes = getValidInt(minutesText, 0, 59, minutes);\r\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\r\n event.preventDefault();\r\n }\r\n }, [minutesText, minutes, timeSpec, updateTimeSpec]);\r\n\r\n const handleSecondsOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.ArrowDown) {\r\n const newSeconds = seconds === 0 ? 59 : seconds - 1;\r\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.ArrowUp) {\r\n const newSeconds = seconds === 59 ? 0 : seconds + 1;\r\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.Home || event.key === SpecialKey.End) {\r\n const newSeconds = event.key === SpecialKey.Home ? 0 : 59;\r\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.Enter) {\r\n const newSeconds = getValidInt(secondsText, 0, 59, seconds);\r\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\r\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\r\n event.preventDefault();\r\n }\r\n }, [seconds, secondsText, timeSpec, updateTimeSpec]);\r\n\r\n const handleDayPeriodOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\r\n let newPeriodText: string | undefined;\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.ArrowDown || event.key === SpecialKey.Home || event.key === \"a\" || event.key === \"A\") {\r\n newPeriodText = amLabelRef.current;\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.End || event.key === \"p\" || event.key === \"P\") {\r\n newPeriodText = pmLabelRef.current;\r\n event.preventDefault();\r\n } else if (event.key === SpecialKey.Enter) {\r\n if (dayPeriodText === \"AM\" || dayPeriodText === \"am\" || dayPeriodText === amLabelRef.current)\r\n newPeriodText = amLabelRef.current;\r\n else if (dayPeriodText === \"PM\" || dayPeriodText === \"pm\" || dayPeriodText === pmLabelRef.current)\r\n newPeriodText = pmLabelRef.current;\r\n event.preventDefault();\r\n }\r\n // istanbul ignore else\r\n if (undefined !== newPeriodText) {\r\n setDayPeriodText(newPeriodText);\r\n /* istanbul ignore else */\r\n if (newPeriodText === amLabelRef.current && hours > 12) {\r\n updateTimeSpec({ ...timeSpec, hours: hours - 12 });\r\n } else if (newPeriodText === pmLabelRef.current && hours <= 11) {\r\n updateTimeSpec({ ...timeSpec, hours: hours + 12 });\r\n }\r\n }\r\n }, [dayPeriodText, hours, timeSpec, updateTimeSpec]);\r\n\r\n const showSeconds = -1 !== (timeDisplay as string).search(\":ss\");\r\n\r\n return <div data-testid=\"components-time-input\" className=\"components-time\">\r\n <Input className=\"components-time-input\" onKeyDown={handleHoursOnKeyDown} onBlur={handleHoursOnBlur} onChange={handleHoursChange} value={hoursText} disabled={readOnly} size=\"small\" />\r\n <span className=\"component-time-separator\">:</span>\r\n <Input className=\"components-time-input\" onKeyDown={handleMinutesOnKeyDown} onBlur={handleMinutesOnBlur} onChange={handleMinutesChange} value={minutesText} disabled={readOnly} size=\"small\" />\r\n {showSeconds &&\r\n <>\r\n <span className=\"component-time-separator\">:</span>\r\n <Input className=\"components-time-input\" onKeyDown={handleSecondsOnKeyDown} onBlur={handleSecondsOnBlur} onChange={handleSecondsChange} value={secondsText} disabled={readOnly} size=\"small\" />\r\n </>\r\n }\r\n {dayPeriodText &&\r\n <Input className=\"components-time-period-input\" onKeyDown={handleDayPeriodOnKeyDown} onBlur={handleDayPeriodOnBlur} onChange={handleDayPeriodChange} value={dayPeriodText} disabled={readOnly} size=\"small\" />\r\n }\r\n </div>;\r\n}\r\n"]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import "./BooleanEditor.scss";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import { PropertyValue } from "@itwin/appui-abstract";
|
|
7
|
-
import { PropertyEditorProps, TypeEditor } from "./EditorContainer";
|
|
6
|
+
import type { PropertyValue } from "@itwin/appui-abstract";
|
|
7
|
+
import type { PropertyEditorProps, TypeEditor } from "./EditorContainer";
|
|
8
8
|
import { PropertyEditorBase } from "./PropertyEditorManager";
|
|
9
9
|
/** @internal */
|
|
10
10
|
interface BooleanEditorState {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanEditor.d.ts","sourceRoot":"","sources":["../../../../src/components-react/editors/BooleanEditor.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"BooleanEditor.d.ts","sourceRoot":"","sources":["../../../../src/components-react/editors/BooleanEditor.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAG1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAyB,MAAM,yBAAyB,CAAC;AAEpF,gBAAgB;AAChB,UAAU,kBAAkB;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE,kBAAkB,CAAE,YAAW,UAAU;IACnH,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,aAAa,CAAuC;IAE5D,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAG1D;IAEW,gBAAgB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAInE,OAAO,CAAC,oBAAoB;IAgB5B,IAAW,WAAW,IAAI,WAAW,GAAG,IAAI,CAE3C;IAED,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED,OAAO,CAAC,oBAAoB,CAkB1B;IAEF,gBAAgB;IACA,iBAAiB;IAKjC,gBAAgB;IACA,oBAAoB;IAIpC,gBAAgB;IACA,kBAAkB,CAAC,SAAS,EAAE,mBAAmB;IAMjE,OAAO,CAAC,iBAAiB;IAoBzB,gBAAgB;IACA,MAAM;CAmBvB;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,kBAAkB;IAE3D,IAAoB,oBAAoB,IAAI,OAAO,CAElD;IAED,IAAW,SAAS,IAAI,KAAK,CAAC,SAAS,CAEtC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanEditor.js","sourceRoot":"","sources":["../../../../src/components-react/editors/BooleanEditor.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gCAA8B;AAC9B,4DAAoC;AACpC,6CAA+B;
|
|
1
|
+
{"version":3,"file":"BooleanEditor.js","sourceRoot":"","sources":["../../../../src/components-react/editors/BooleanEditor.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gCAA8B;AAC9B,4DAAoC;AACpC,6CAA+B;AAE/B,0DAA+E;AAC/E,wDAAgD;AAEhD,mEAAoF;AAQpF;;GAEG;AACH,MAAa,aAAc,SAAQ,KAAK,CAAC,aAAsD;IAA/F;;QACU,eAAU,GAAG,KAAK,CAAC;QACnB,kBAAa,GAAG,KAAK,CAAC,SAAS,EAAoB,CAAC;QAE5D,gBAAgB;QACS,UAAK,GAAiC;YAC7D,aAAa,EAAE,KAAK;YACpB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AO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;QACzC,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;QAE3C,OAAO,CACL,oBAAC,wBAAQ,IACP,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,IAAI,CAAC,oBAAoB,EACnC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,QAAQ,EAAE,UAAU,iBACR,4BAA4B,GAC/B,CACZ,CAAC;IACJ,CAAC;CACF;AApHD,sCAoHC;AAED;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,0CAAkB;IAC3D,uBAAuB;IACvB,IAAoB,oBAAoB;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAW,SAAS;QAClB,OAAO,oBAAC,aAAa,OAAG,CAAC;IAC3B,CAAC;CACF;AATD,sDASC;AAED,6CAAqB,CAAC,cAAc,CAAC,kCAAiB,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;AACpF,6CAAqB,CAAC,cAAc,CAAC,kCAAiB,CAAC,OAAO,EAAE,qBAAqB,CAAC,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 PropertyEditors\r\n */\r\n\r\nimport \"./BooleanEditor.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport type { PropertyValue} from \"@itwin/appui-abstract\";\r\nimport { PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\r\nimport { Checkbox } from \"@itwin/itwinui-react\";\r\nimport type { PropertyEditorProps, TypeEditor } from \"./EditorContainer\";\r\nimport { PropertyEditorBase, PropertyEditorManager } from \"./PropertyEditorManager\";\r\n\r\n/** @internal */\r\ninterface BooleanEditorState {\r\n checkboxValue: boolean;\r\n isDisabled?: boolean;\r\n}\r\n\r\n/** BooleanEditor React component that is a property editor with checkbox input\r\n * @public\r\n */\r\nexport class BooleanEditor extends React.PureComponent<PropertyEditorProps, BooleanEditorState> implements TypeEditor {\r\n private _isMounted = false;\r\n private _inputElement = React.createRef<HTMLInputElement>();\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<BooleanEditorState> = {\r\n checkboxValue: false,\r\n isDisabled: false,\r\n };\r\n\r\n public async getPropertyValue(): Promise<PropertyValue | undefined> {\r\n return this.getPropertyValueSync();\r\n }\r\n\r\n private getPropertyValueSync(): PropertyValue | undefined {\r\n const record = this.props.propertyRecord;\r\n let propertyValue: PropertyValue | undefined;\r\n\r\n // istanbul ignore else\r\n if (record && record.value.valueFormat === PropertyValueFormat.Primitive) {\r\n propertyValue = {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n value: this.state.checkboxValue,\r\n displayValue: \"\",\r\n };\r\n }\r\n\r\n return propertyValue;\r\n }\r\n\r\n public get htmlElement(): HTMLElement | null {\r\n return this._inputElement.current;\r\n }\r\n\r\n public get hasFocus(): boolean {\r\n return document.activeElement === this._inputElement.current;\r\n }\r\n\r\n private _updateCheckboxValue = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (this._isMounted) {\r\n const checkboxValue = !!e.target.checked;\r\n\r\n this.setState({\r\n checkboxValue,\r\n }, () => {\r\n // istanbul ignore else\r\n if (this.props.propertyRecord && this.props.onCommit) {\r\n const propertyValue = this.getPropertyValueSync();\r\n // istanbul ignore else\r\n if (propertyValue !== undefined) {\r\n this.props.onCommit({ propertyRecord: this.props.propertyRecord, newValue: propertyValue });\r\n }\r\n }\r\n });\r\n }\r\n };\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._isMounted = true;\r\n this.setStateFromProps();\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(prevProps: PropertyEditorProps) {\r\n if (this.props.propertyRecord !== prevProps.propertyRecord) {\r\n this.setStateFromProps();\r\n }\r\n }\r\n\r\n private setStateFromProps() {\r\n const { propertyRecord } = this.props;\r\n let checkboxValue = false;\r\n let isDisabled = false;\r\n\r\n // istanbul ignore else\r\n if (propertyRecord && propertyRecord.value.valueFormat === PropertyValueFormat.Primitive) {\r\n const primitiveValue = propertyRecord.value.value;\r\n checkboxValue = primitiveValue as boolean;\r\n }\r\n\r\n // istanbul ignore else\r\n if (propertyRecord && propertyRecord.isDisabled)\r\n isDisabled = propertyRecord.isDisabled;\r\n\r\n // istanbul ignore else\r\n if (this._isMounted)\r\n this.setState({ checkboxValue, isDisabled });\r\n }\r\n\r\n /** @internal */\r\n public override render() {\r\n const className = classnames(\"components-cell-editor\", \"components-boolean-editor\", this.props.className);\r\n const checked = this.state.checkboxValue;\r\n const isDisabled = !!this.state.isDisabled;\r\n\r\n return (\r\n <Checkbox\r\n ref={this._inputElement}\r\n onBlur={this.props.onBlur}\r\n className={className}\r\n style={this.props.style}\r\n checked={checked}\r\n onChange={this._updateCheckboxValue}\r\n setFocus={this.props.setFocus}\r\n disabled={isDisabled}\r\n data-testid=\"components-checkbox-editor\">\r\n </Checkbox>\r\n );\r\n }\r\n}\r\n\r\n/** Boolean Property Editor registered for the \"bool\" and \"boolean\" type names.\r\n * It uses the [[BooleanEditor]] React component.\r\n * @public\r\n */\r\nexport class BooleanPropertyEditor extends PropertyEditorBase {\r\n // istanbul ignore next\r\n public override get containerHandlesBlur(): boolean {\r\n return false;\r\n }\r\n\r\n public get reactNode(): React.ReactNode {\r\n return <BooleanEditor />;\r\n }\r\n}\r\n\r\nPropertyEditorManager.registerEditor(StandardTypeNames.Bool, BooleanPropertyEditor);\r\nPropertyEditorManager.registerEditor(StandardTypeNames.Boolean, BooleanPropertyEditor);\r\n"]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import "./CustomNumberEditor.scss";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import { PropertyValue } from "@itwin/appui-abstract";
|
|
7
|
-
import { PropertyEditorProps, TypeEditor } from "./EditorContainer";
|
|
6
|
+
import type { PropertyValue } from "@itwin/appui-abstract";
|
|
7
|
+
import type { PropertyEditorProps, TypeEditor } from "./EditorContainer";
|
|
8
8
|
import { PropertyEditorBase } from "./PropertyEditorManager";
|
|
9
9
|
/** @internal */
|
|
10
10
|
interface CustomNumberEditorState {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomNumberEditor.d.ts","sourceRoot":"","sources":["../../../../src/components-react/editors/CustomNumberEditor.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,2BAA2B,CAAC;AAEnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,
|
|
1
|
+
{"version":3,"file":"CustomNumberEditor.d.ts","sourceRoot":"","sources":["../../../../src/components-react/editors/CustomNumberEditor.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,2BAA2B,CAAC;AAEnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAEM,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAQ9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAyB,MAAM,yBAAyB,CAAC;AAEpF,gBAAgB;AAChB,UAAU,uBAAuB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE,uBAAuB,CAAE,YAAW,UAAU;IAC7H,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,aAAa,CAA0C;IAC/D,OAAO,CAAC,aAAa,CAAuC;IAC5D,OAAO,CAAC,eAAe,CAA4B;IAEnD,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,uBAAuB,CAAC,CAE/D;IAEW,gBAAgB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAiDnE,IAAW,WAAW,IAAI,WAAW,GAAG,IAAI,CAE3C;IAED,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,kBAAkB;IAe1B,OAAO,CAAC,iBAAiB,CAEvB;IAEF,gBAAgB;IACA,iBAAiB;IAKjC,gBAAgB;IACA,oBAAoB;IAIpC,gBAAgB;IACA,kBAAkB,CAAC,SAAS,EAAE,mBAAmB;IAMjE,OAAO,CAAC,uBAAuB;YAqBjB,iBAAiB;IAuD/B,OAAO,CAAC,6BAA6B;IAKrC,OAAO,CAAC,WAAW,CAmBjB;IAGF,OAAO,CAAC,QAAQ,CAEd;IAEF,gBAAgB;IACA,MAAM,IAAI,KAAK,CAAC,SAAS;CAqD1C;AAED;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,kBAAkB;IAChE,IAAW,SAAS,IAAI,KAAK,CAAC,SAAS,CAEtC;IACD,IAAoB,sBAAsB,IAAI,OAAO,CAEpD;CACF"}
|
|
@@ -60,9 +60,10 @@ class CustomNumberEditor extends React.PureComponent {
|
|
|
60
60
|
this._applyUpdatedValue(e.target.value);
|
|
61
61
|
};
|
|
62
62
|
this._onKeyPress = (e) => {
|
|
63
|
+
var _a;
|
|
63
64
|
// istanbul ignore else
|
|
64
65
|
if (e.key === appui_abstract_1.SpecialKey.Escape) {
|
|
65
|
-
const initialDisplayValue = (this._lastValidValue && this._lastValidValue.displayValue)
|
|
66
|
+
const initialDisplayValue = (_a = (this._lastValidValue && this._lastValidValue.displayValue)) !== null && _a !== void 0 ? _a : ( /* istanbul ignore next */this._getInitialDisplayValue());
|
|
66
67
|
if (initialDisplayValue !== this.state.inputValue) {
|
|
67
68
|
e.preventDefault();
|
|
68
69
|
e.stopPropagation();
|
|
@@ -240,7 +241,8 @@ class CustomNumberEditor extends React.PureComponent {
|
|
|
240
241
|
this.setState({ inputValue: initialDisplayValue, size, maxLength, iconSpec });
|
|
241
242
|
}
|
|
242
243
|
_resetToLastValidDisplayValue() {
|
|
243
|
-
|
|
244
|
+
var _a;
|
|
245
|
+
const initialDisplayValue = (_a = (this._lastValidValue && this._lastValidValue.displayValue)) !== null && _a !== void 0 ? _a : ( /* istanbul ignore next */this._getInitialDisplayValue());
|
|
244
246
|
this.setState({ inputValue: initialDisplayValue });
|
|
245
247
|
}
|
|
246
248
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomNumberEditor.js","sourceRoot":"","sources":["../../../../src/components-react/editors/CustomNumberEditor.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oCAAoC;AAEpC,qCAAmC;AACnC,4DAAoC;AACpC,6CAA+B;AAC/B,sDAA6C;AAC7C,0DAG+B;AAC/B,kDAAoD;AACpD,wDAAyD;AAEzD,kDAA+C;AAE/C,mEAAoF;AAUpF;;GAEG;AACH,MAAa,kBAAmB,SAAQ,KAAK,CAAC,aAA2D;IAAzG;;QACU,eAAU,GAAG,KAAK,CAAC;QAEnB,kBAAa,GAAG,KAAK,CAAC,SAAS,EAAoB,CAAC;QAG5D,gBAAgB;QACS,UAAK,GAAsC;YAClE,UAAU,EAAE,EAAE;SACf,CAAC;QAqFM,sBAAiB,GAAG,CAAC,CAAsC,EAAE,EAAE;YACrE,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAA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AE,oCAAmB,CAAC,YAAY,CAAC,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 PropertyEditors\r\n */\r\n\r\n// cSpell:ignore customnumber testid\r\n\r\nimport \"./CustomNumberEditor.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport {\r\n CustomFormattedNumberParams, IconEditorParams, InputEditorSizeParams, MessageSeverity, PrimitiveValue, PropertyEditorParams, PropertyEditorParamTypes,\r\n PropertyRecord, PropertyValue, PropertyValueFormat, SpecialKey, StandardEditorNames, StandardTypeNames, UiAdmin,\r\n} from \"@itwin/appui-abstract\";\r\nimport { Icon, IconInput } from \"@itwin/core-react\";\r\nimport { Input, InputProps } from \"@itwin/itwinui-react\";\r\n\r\nimport { UiComponents } from \"../UiComponents\";\r\nimport { PropertyEditorProps, TypeEditor } from \"./EditorContainer\";\r\nimport { PropertyEditorBase, PropertyEditorManager } from \"./PropertyEditorManager\";\r\n\r\n/** @internal */\r\ninterface CustomNumberEditorState {\r\n inputValue: string;\r\n size?: number;\r\n maxLength?: number;\r\n iconSpec?: string;\r\n}\r\n\r\n/** CustomNumberEditor is a React component that is a property editor for numbers that specify custom formatting and parsing functions.\r\n * @alpha\r\n */\r\nexport class CustomNumberEditor extends React.PureComponent<PropertyEditorProps, CustomNumberEditorState> implements TypeEditor {\r\n private _isMounted = false;\r\n private _formatParams: CustomFormattedNumberParams | undefined;\r\n private _inputElement = React.createRef<HTMLInputElement>();\r\n private _lastValidValue: PropertyValue | undefined;\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<CustomNumberEditorState> = {\r\n inputValue: \"\",\r\n };\r\n\r\n public async getPropertyValue(): Promise<PropertyValue | undefined> {\r\n const record = this.props.propertyRecord as PropertyRecord;\r\n let propertyValue: PropertyValue | undefined;\r\n\r\n if (record.isReadonly) {\r\n return {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n value: (record.value as PrimitiveValue).value,\r\n displayValue: (record.value as PrimitiveValue).displayValue,\r\n };\r\n }\r\n\r\n // istanbul ignore else\r\n if (record && record.value.valueFormat === PropertyValueFormat.Primitive) {\r\n const parseResults = (this._formatParams as CustomFormattedNumberParams).parseFunction(this.state.inputValue);\r\n if (!parseResults.parseError && undefined !== parseResults.value) {\r\n const newDisplayValue = (this._formatParams as CustomFormattedNumberParams).formatFunction(parseResults.value as number);\r\n propertyValue = {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n value: parseResults.value,\r\n displayValue: newDisplayValue,\r\n };\r\n this._lastValidValue = { ...propertyValue };\r\n // make sure the text in the input item matches the latest formatted text... this could get out if the input string say 1.5 === the display string of 1'-6\"\r\n // istanbul ignore else\r\n if (newDisplayValue !== this.state.inputValue) {\r\n this.setState({ inputValue: newDisplayValue });\r\n }\r\n } else {\r\n // istanbul ignore else\r\n if (this.htmlElement) {\r\n UiAdmin.messagePresenter.displayInputFieldMessage(this.htmlElement, MessageSeverity.Error, parseResults.parseError ? parseResults.parseError : /* istanbul ignore next */ UiComponents.translate(\"errors.unable-to-parse-quantity\"));\r\n this.htmlElement.focus();\r\n } else {\r\n UiAdmin.messagePresenter.displayMessage(MessageSeverity.Error, parseResults.parseError ? parseResults.parseError : /* istanbul ignore next */ UiComponents.translate(\"errors.unable-to-parse-quantity\"));\r\n }\r\n\r\n const displayValue = (record.value.displayValue && record.value.displayValue.length > 0) ? record.value.displayValue : /* istanbul ignore next */ (this._formatParams as CustomFormattedNumberParams).formatFunction(record.value.value as number);\r\n propertyValue = this._lastValidValue ? { ...this._lastValidValue } : /* istanbul ignore next */ {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n value: record.value.value,\r\n displayValue,\r\n };\r\n }\r\n }\r\n\r\n return propertyValue;\r\n }\r\n\r\n public get htmlElement(): HTMLElement | null {\r\n return this._inputElement.current;\r\n }\r\n\r\n public get hasFocus(): boolean {\r\n return document.activeElement === this._inputElement.current;\r\n }\r\n\r\n private shouldSetFocus(): boolean {\r\n if (!this.props.setFocus)\r\n return false;\r\n\r\n const record = this.props.propertyRecord as PropertyRecord;\r\n const disabled = (record && !record.isDisabled) ? false : true;\r\n const readonly = (record && !record.isReadonly) ? false : true;\r\n\r\n return (!disabled && !readonly);\r\n }\r\n\r\n private _applyUpdatedValue(userInput: string) {\r\n const record = this.props.propertyRecord as PropertyRecord;\r\n const readonly = (record && !record.isReadonly) ? false : true;\r\n const disabled = (record && !record.isDisabled) ? false : true;\r\n\r\n if (readonly || disabled)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (this._isMounted)\r\n this.setState({\r\n inputValue: userInput,\r\n });\r\n }\r\n\r\n private _updateInputValue = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n this._applyUpdatedValue(e.target.value);\r\n };\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._isMounted = true;\r\n this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(prevProps: PropertyEditorProps) {\r\n if (this.props.propertyRecord !== prevProps.propertyRecord) {\r\n this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n }\r\n\r\n private _getInitialDisplayValue(): string {\r\n const record = this.props.propertyRecord;\r\n let initialDisplayValue = \"\";\r\n let numberValue = 0;\r\n // istanbul ignore else\r\n if (record) {\r\n // istanbul ignore else\r\n if (record.value.valueFormat === PropertyValueFormat.Primitive) {\r\n const primitiveValue = record.value;\r\n numberValue = (undefined !== primitiveValue.value) ? primitiveValue.value as number : /* istanbul ignore next */ 0;\r\n // istanbul ignore else\r\n if (primitiveValue.displayValue)\r\n initialDisplayValue = primitiveValue.displayValue;\r\n else\r\n initialDisplayValue = (this._formatParams as CustomFormattedNumberParams).formatFunction(numberValue);\r\n }\r\n }\r\n\r\n return initialDisplayValue;\r\n }\r\n\r\n private async setStateFromProps() {\r\n const record = this.props.propertyRecord;\r\n // istanbul ignore next\r\n if (!record || !record.property) {\r\n Logger.logError(UiComponents.loggerCategory(this), \"PropertyRecord must be defined to use CustomNumberPropertyEditor\");\r\n // eslint-disable-next-line no-console\r\n // console.log(\"PropertyRecord must be defined to use CustomNumberPropertyEditor\");\r\n return;\r\n }\r\n // istanbul ignore else\r\n if (record.property && record.property.editor && record.property.editor.params) {\r\n this._formatParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.CustomFormattedNumber) as CustomFormattedNumberParams;\r\n }\r\n\r\n if (!this._formatParams) {\r\n Logger.logError(UiComponents.loggerCategory(this), `CustomFormattedNumberParams must be defined for property ${record.property.name}`);\r\n // eslint-disable-next-line no-console\r\n // console.log(`CustomFormattedNumberParams must be defined for property ${record!.property!.name}`);\r\n return;\r\n }\r\n\r\n const initialDisplayValue = this._getInitialDisplayValue();\r\n this._lastValidValue = {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n value: (record.value as PrimitiveValue).value,\r\n displayValue: initialDisplayValue,\r\n };\r\n let size: number | undefined;\r\n let maxLength: number | undefined;\r\n let iconSpec: string | undefined;\r\n\r\n // istanbul ignore else\r\n if (record.property && record.property.editor && record.property.editor.params) {\r\n const editorSizeParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.InputEditorSize) as InputEditorSizeParams;\r\n // istanbul ignore else\r\n if (editorSizeParams) {\r\n // istanbul ignore else\r\n if (editorSizeParams.size)\r\n size = editorSizeParams.size;\r\n // istanbul ignore else\r\n if (editorSizeParams.maxLength)\r\n maxLength = editorSizeParams.maxLength;\r\n }\r\n\r\n const iconParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.Icon) as IconEditorParams;\r\n if (iconParams) {\r\n iconSpec = iconParams.definition.iconSpec;\r\n }\r\n }\r\n\r\n // istanbul ignore else\r\n if (this._isMounted)\r\n this.setState({ inputValue: initialDisplayValue, size, maxLength, iconSpec });\r\n }\r\n\r\n private _resetToLastValidDisplayValue() {\r\n const initialDisplayValue = (this._lastValidValue && (this._lastValidValue as PrimitiveValue).displayValue) ?? (/* istanbul ignore next */ this._getInitialDisplayValue());\r\n this.setState({ inputValue: initialDisplayValue });\r\n }\r\n\r\n private _onKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (e.key === SpecialKey.Escape) {\r\n const initialDisplayValue = (this._lastValidValue && (this._lastValidValue as PrimitiveValue).displayValue) ?? (/* istanbul ignore next */ this._getInitialDisplayValue());\r\n if (initialDisplayValue !== this.state.inputValue) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this._resetToLastValidDisplayValue();\r\n } else {\r\n // istanbul ignore else\r\n if (this.props.onCancel)\r\n this.props.onCancel();\r\n }\r\n }\r\n\r\n // istanbul ignore else\r\n if (e.key !== SpecialKey.Enter) {\r\n UiAdmin.messagePresenter.closeInputFieldMessage();\r\n }\r\n };\r\n\r\n // istanbul ignore next\r\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\r\n e.target.select();\r\n };\r\n\r\n /** @internal */\r\n public override render(): React.ReactNode {\r\n const minSize = this.state.size ? this.state.size : 8;\r\n const minWidthStyle: React.CSSProperties = {\r\n minWidth: `${minSize * 0.75}em`,\r\n };\r\n const record = this.props.propertyRecord as PropertyRecord;\r\n if (!record || !this._formatParams)\r\n return null;\r\n\r\n const readOnly = !record.isReadonly ? false : true;\r\n const disabled = !record.isDisabled ? false : true;\r\n\r\n const className = classnames(\"components-cell-editor\", \"components-customnumber-editor\", this.props.className);\r\n\r\n const inputProps: Omit<InputProps, \"size\"> = { // eslint-disable-line deprecation/deprecation\r\n className,\r\n style: this.props.style ? this.props.style : minWidthStyle,\r\n readOnly,\r\n disabled,\r\n maxLength: this.state.maxLength,\r\n value: this.state.inputValue,\r\n onChange: this._updateInputValue,\r\n onBlur: this.props.onBlur,\r\n onFocus: this._onFocus,\r\n setFocus: this.shouldSetFocus(),\r\n onKeyDown: this._onKeyPress,\r\n };\r\n\r\n let reactNode: React.ReactNode;\r\n if (this.state.iconSpec) {\r\n const icon = <Icon iconSpec={this.state.iconSpec} />;\r\n reactNode = (\r\n <IconInput\r\n {...inputProps}\r\n ref={this._inputElement}\r\n icon={icon}\r\n data-testid=\"components-customnumber-editor\"\r\n />\r\n );\r\n } else {\r\n // NEEDSWORK: still using core-react Input component because of `nativeKeyHandler` prop\r\n reactNode = (\r\n <Input\r\n {...inputProps}\r\n ref={this._inputElement}\r\n data-testid=\"components-customnumber-editor\"\r\n size=\"small\"\r\n />\r\n );\r\n }\r\n\r\n return reactNode;\r\n }\r\n}\r\n\r\n/** Custom Property Editor registered for the \"number\" type name and the \"number-custom\" editor name.\r\n * It uses the [[CustomNumberEditor]] React component.\r\n * @alpha\r\n */\r\nexport class CustomNumberPropertyEditor extends PropertyEditorBase {\r\n public get reactNode(): React.ReactNode {\r\n return <CustomNumberEditor />;\r\n }\r\n public override get containerHandlesEscape(): boolean {\r\n return false;\r\n }\r\n}\r\nPropertyEditorManager.registerEditor(StandardTypeNames.Number, CustomNumberPropertyEditor, StandardEditorNames.NumberCustom);\r\n"]}
|
|
1
|
+
{"version":3,"file":"CustomNumberEditor.js","sourceRoot":"","sources":["../../../../src/components-react/editors/CustomNumberEditor.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oCAAoC;AAEpC,qCAAmC;AACnC,4DAAoC;AACpC,6CAA+B;AAC/B,sDAA6C;AAI7C,0DAC+B;AAC/B,kDAAoD;AAEpD,wDAA6C;AAE7C,kDAA+C;AAE/C,mEAAoF;AAUpF;;GAEG;AACH,MAAa,kBAAmB,SAAQ,KAAK,CAAC,aAA2D;IAAzG;;QACU,e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G;AACH,MAAa,0BAA2B,SAAQ,0CAAkB;IAChE,IAAW,SAAS;QAClB,OAAO,oBAAC,kBAAkB,OAAG,CAAC;IAChC,CAAC;IACD,IAAoB,sBAAsB;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAPD,gEAOC;AACD,6CAAqB,CAAC,cAAc,CAAC,kCAAiB,CAAC,MAAM,EAAE,0BAA0B,EAAE,oCAAmB,CAAC,YAAY,CAAC,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 PropertyEditors\r\n */\r\n\r\n// cSpell:ignore customnumber testid\r\n\r\nimport \"./CustomNumberEditor.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport type {\r\n CustomFormattedNumberParams, IconEditorParams, InputEditorSizeParams, PrimitiveValue, PropertyEditorParams,\r\n PropertyRecord, PropertyValue} from \"@itwin/appui-abstract\";\r\nimport { MessageSeverity, PropertyEditorParamTypes, PropertyValueFormat, SpecialKey, StandardEditorNames, StandardTypeNames, UiAdmin,\r\n} from \"@itwin/appui-abstract\";\r\nimport { Icon, IconInput } from \"@itwin/core-react\";\r\nimport type { InputProps } from \"@itwin/itwinui-react\";\r\nimport { Input } from \"@itwin/itwinui-react\";\r\n\r\nimport { UiComponents } from \"../UiComponents\";\r\nimport type { PropertyEditorProps, TypeEditor } from \"./EditorContainer\";\r\nimport { PropertyEditorBase, PropertyEditorManager } from \"./PropertyEditorManager\";\r\n\r\n/** @internal */\r\ninterface CustomNumberEditorState {\r\n inputValue: string;\r\n size?: number;\r\n maxLength?: number;\r\n iconSpec?: string;\r\n}\r\n\r\n/** CustomNumberEditor is a React component that is a property editor for numbers that specify custom formatting and parsing functions.\r\n * @alpha\r\n */\r\nexport class CustomNumberEditor extends React.PureComponent<PropertyEditorProps, CustomNumberEditorState> implements TypeEditor {\r\n private _isMounted = false;\r\n private _formatParams: CustomFormattedNumberParams | undefined;\r\n private _inputElement = React.createRef<HTMLInputElement>();\r\n private _lastValidValue: PropertyValue | undefined;\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<CustomNumberEditorState> = {\r\n inputValue: \"\",\r\n };\r\n\r\n public async getPropertyValue(): Promise<PropertyValue | undefined> {\r\n const record = this.props.propertyRecord as PropertyRecord;\r\n let propertyValue: PropertyValue | undefined;\r\n\r\n if (record.isReadonly) {\r\n return {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n value: (record.value as PrimitiveValue).value,\r\n displayValue: (record.value as PrimitiveValue).displayValue,\r\n };\r\n }\r\n\r\n // istanbul ignore else\r\n if (record && record.value.valueFormat === PropertyValueFormat.Primitive) {\r\n const parseResults = (this._formatParams as CustomFormattedNumberParams).parseFunction(this.state.inputValue);\r\n if (!parseResults.parseError && undefined !== parseResults.value) {\r\n const newDisplayValue = (this._formatParams as CustomFormattedNumberParams).formatFunction(parseResults.value as number);\r\n propertyValue = {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n value: parseResults.value,\r\n displayValue: newDisplayValue,\r\n };\r\n this._lastValidValue = { ...propertyValue };\r\n // make sure the text in the input item matches the latest formatted text... this could get out if the input string say 1.5 === the display string of 1'-6\"\r\n // istanbul ignore else\r\n if (newDisplayValue !== this.state.inputValue) {\r\n this.setState({ inputValue: newDisplayValue });\r\n }\r\n } else {\r\n // istanbul ignore else\r\n if (this.htmlElement) {\r\n UiAdmin.messagePresenter.displayInputFieldMessage(this.htmlElement, MessageSeverity.Error, parseResults.parseError ? parseResults.parseError : /* istanbul ignore next */ UiComponents.translate(\"errors.unable-to-parse-quantity\"));\r\n this.htmlElement.focus();\r\n } else {\r\n UiAdmin.messagePresenter.displayMessage(MessageSeverity.Error, parseResults.parseError ? parseResults.parseError : /* istanbul ignore next */ UiComponents.translate(\"errors.unable-to-parse-quantity\"));\r\n }\r\n\r\n const displayValue = (record.value.displayValue && record.value.displayValue.length > 0) ? record.value.displayValue : /* istanbul ignore next */ (this._formatParams as CustomFormattedNumberParams).formatFunction(record.value.value as number);\r\n propertyValue = this._lastValidValue ? { ...this._lastValidValue } : /* istanbul ignore next */ {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n value: record.value.value,\r\n displayValue,\r\n };\r\n }\r\n }\r\n\r\n return propertyValue;\r\n }\r\n\r\n public get htmlElement(): HTMLElement | null {\r\n return this._inputElement.current;\r\n }\r\n\r\n public get hasFocus(): boolean {\r\n return document.activeElement === this._inputElement.current;\r\n }\r\n\r\n private shouldSetFocus(): boolean {\r\n if (!this.props.setFocus)\r\n return false;\r\n\r\n const record = this.props.propertyRecord as PropertyRecord;\r\n const disabled = (record && !record.isDisabled) ? false : true;\r\n const readonly = (record && !record.isReadonly) ? false : true;\r\n\r\n return (!disabled && !readonly);\r\n }\r\n\r\n private _applyUpdatedValue(userInput: string) {\r\n const record = this.props.propertyRecord as PropertyRecord;\r\n const readonly = (record && !record.isReadonly) ? false : true;\r\n const disabled = (record && !record.isDisabled) ? false : true;\r\n\r\n if (readonly || disabled)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (this._isMounted)\r\n this.setState({\r\n inputValue: userInput,\r\n });\r\n }\r\n\r\n private _updateInputValue = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n this._applyUpdatedValue(e.target.value);\r\n };\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._isMounted = true;\r\n this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(prevProps: PropertyEditorProps) {\r\n if (this.props.propertyRecord !== prevProps.propertyRecord) {\r\n this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n }\r\n\r\n private _getInitialDisplayValue(): string {\r\n const record = this.props.propertyRecord;\r\n let initialDisplayValue = \"\";\r\n let numberValue = 0;\r\n // istanbul ignore else\r\n if (record) {\r\n // istanbul ignore else\r\n if (record.value.valueFormat === PropertyValueFormat.Primitive) {\r\n const primitiveValue = record.value;\r\n numberValue = (undefined !== primitiveValue.value) ? primitiveValue.value as number : /* istanbul ignore next */ 0;\r\n // istanbul ignore else\r\n if (primitiveValue.displayValue)\r\n initialDisplayValue = primitiveValue.displayValue;\r\n else\r\n initialDisplayValue = (this._formatParams as CustomFormattedNumberParams).formatFunction(numberValue);\r\n }\r\n }\r\n\r\n return initialDisplayValue;\r\n }\r\n\r\n private async setStateFromProps() {\r\n const record = this.props.propertyRecord;\r\n // istanbul ignore next\r\n if (!record || !record.property) {\r\n Logger.logError(UiComponents.loggerCategory(this), \"PropertyRecord must be defined to use CustomNumberPropertyEditor\");\r\n // eslint-disable-next-line no-console\r\n // console.log(\"PropertyRecord must be defined to use CustomNumberPropertyEditor\");\r\n return;\r\n }\r\n // istanbul ignore else\r\n if (record.property && record.property.editor && record.property.editor.params) {\r\n this._formatParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.CustomFormattedNumber) as CustomFormattedNumberParams;\r\n }\r\n\r\n if (!this._formatParams) {\r\n Logger.logError(UiComponents.loggerCategory(this), `CustomFormattedNumberParams must be defined for property ${record.property.name}`);\r\n // eslint-disable-next-line no-console\r\n // console.log(`CustomFormattedNumberParams must be defined for property ${record!.property!.name}`);\r\n return;\r\n }\r\n\r\n const initialDisplayValue = this._getInitialDisplayValue();\r\n this._lastValidValue = {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n value: (record.value as PrimitiveValue).value,\r\n displayValue: initialDisplayValue,\r\n };\r\n let size: number | undefined;\r\n let maxLength: number | undefined;\r\n let iconSpec: string | undefined;\r\n\r\n // istanbul ignore else\r\n if (record.property && record.property.editor && record.property.editor.params) {\r\n const editorSizeParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.InputEditorSize) as InputEditorSizeParams;\r\n // istanbul ignore else\r\n if (editorSizeParams) {\r\n // istanbul ignore else\r\n if (editorSizeParams.size)\r\n size = editorSizeParams.size;\r\n // istanbul ignore else\r\n if (editorSizeParams.maxLength)\r\n maxLength = editorSizeParams.maxLength;\r\n }\r\n\r\n const iconParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.Icon) as IconEditorParams;\r\n if (iconParams) {\r\n iconSpec = iconParams.definition.iconSpec;\r\n }\r\n }\r\n\r\n // istanbul ignore else\r\n if (this._isMounted)\r\n this.setState({ inputValue: initialDisplayValue, size, maxLength, iconSpec });\r\n }\r\n\r\n private _resetToLastValidDisplayValue() {\r\n const initialDisplayValue = (this._lastValidValue && (this._lastValidValue as PrimitiveValue).displayValue) ?? (/* istanbul ignore next */ this._getInitialDisplayValue());\r\n this.setState({ inputValue: initialDisplayValue });\r\n }\r\n\r\n private _onKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n // istanbul ignore else\r\n if (e.key === SpecialKey.Escape) {\r\n const initialDisplayValue = (this._lastValidValue && (this._lastValidValue as PrimitiveValue).displayValue) ?? (/* istanbul ignore next */ this._getInitialDisplayValue());\r\n if (initialDisplayValue !== this.state.inputValue) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this._resetToLastValidDisplayValue();\r\n } else {\r\n // istanbul ignore else\r\n if (this.props.onCancel)\r\n this.props.onCancel();\r\n }\r\n }\r\n\r\n // istanbul ignore else\r\n if (e.key !== SpecialKey.Enter) {\r\n UiAdmin.messagePresenter.closeInputFieldMessage();\r\n }\r\n };\r\n\r\n // istanbul ignore next\r\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\r\n e.target.select();\r\n };\r\n\r\n /** @internal */\r\n public override render(): React.ReactNode {\r\n const minSize = this.state.size ? this.state.size : 8;\r\n const minWidthStyle: React.CSSProperties = {\r\n minWidth: `${minSize * 0.75}em`,\r\n };\r\n const record = this.props.propertyRecord as PropertyRecord;\r\n if (!record || !this._formatParams)\r\n return null;\r\n\r\n const readOnly = !record.isReadonly ? false : true;\r\n const disabled = !record.isDisabled ? false : true;\r\n\r\n const className = classnames(\"components-cell-editor\", \"components-customnumber-editor\", this.props.className);\r\n\r\n const inputProps: Omit<InputProps, \"size\"> = { // eslint-disable-line deprecation/deprecation\r\n className,\r\n style: this.props.style ? this.props.style : minWidthStyle,\r\n readOnly,\r\n disabled,\r\n maxLength: this.state.maxLength,\r\n value: this.state.inputValue,\r\n onChange: this._updateInputValue,\r\n onBlur: this.props.onBlur,\r\n onFocus: this._onFocus,\r\n setFocus: this.shouldSetFocus(),\r\n onKeyDown: this._onKeyPress,\r\n };\r\n\r\n let reactNode: React.ReactNode;\r\n if (this.state.iconSpec) {\r\n const icon = <Icon iconSpec={this.state.iconSpec} />;\r\n reactNode = (\r\n <IconInput\r\n {...inputProps}\r\n ref={this._inputElement}\r\n icon={icon}\r\n data-testid=\"components-customnumber-editor\"\r\n />\r\n );\r\n } else {\r\n // NEEDSWORK: still using core-react Input component because of `nativeKeyHandler` prop\r\n reactNode = (\r\n <Input\r\n {...inputProps}\r\n ref={this._inputElement}\r\n data-testid=\"components-customnumber-editor\"\r\n size=\"small\"\r\n />\r\n );\r\n }\r\n\r\n return reactNode;\r\n }\r\n}\r\n\r\n/** Custom Property Editor registered for the \"number\" type name and the \"number-custom\" editor name.\r\n * It uses the [[CustomNumberEditor]] React component.\r\n * @alpha\r\n */\r\nexport class CustomNumberPropertyEditor extends PropertyEditorBase {\r\n public get reactNode(): React.ReactNode {\r\n return <CustomNumberEditor />;\r\n }\r\n public override get containerHandlesEscape(): boolean {\r\n return false;\r\n }\r\n}\r\nPropertyEditorManager.registerEditor(StandardTypeNames.Number, CustomNumberPropertyEditor, StandardEditorNames.NumberCustom);\r\n"]}
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import "./DateTimeEditor.scss";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import { PropertyValue
|
|
7
|
-
import {
|
|
6
|
+
import type { PropertyValue } from "@itwin/appui-abstract";
|
|
7
|
+
import { TimeDisplay } from "@itwin/appui-abstract";
|
|
8
|
+
import type { PropertyEditorProps, TypeEditor } from "./EditorContainer";
|
|
8
9
|
import { PropertyEditorBase } from "./PropertyEditorManager";
|
|
9
|
-
import { TypeConverter } from "../converters/TypeConverter";
|
|
10
|
+
import type { TypeConverter } from "../converters/TypeConverter";
|
|
10
11
|
/** @internal */
|
|
11
12
|
interface DateTimeEditorState {
|
|
12
13
|
value: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components-react/editors/DateTimeEditor.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"DateTimeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components-react/editors/DateTimeEditor.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EACyD,WAAW,EAC1E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAyB,MAAM,yBAAyB,CAAC;AAIpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AASjE,gBAAgB;AAChB,UAAU,mBAAmB;IAC3B,KAAK,EAAE,IAAI,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,UAAU,CAAC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AO,CAEjD;CACF;AAED;;;IAGI;AACJ,qBAAa,sBAAuB,SAAQ,kBAAkB;IAC5D,IAAW,SAAS,IAAI,KAAK,CAAC,SAAS,CAEtC;IAED,IAAoB,mBAAmB,IAAI,OAAO,CAEjD;CACF"}
|
|
@@ -167,6 +167,7 @@ class DateTimeEditor extends React.PureComponent {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
async setStateFromProps() {
|
|
170
|
+
var _a, _b;
|
|
170
171
|
const record = this.props.propertyRecord;
|
|
171
172
|
let initialValue;
|
|
172
173
|
let typeConverter;
|
|
@@ -185,8 +186,8 @@ class DateTimeEditor extends React.PureComponent {
|
|
|
185
186
|
initialValue = new Date(record.value.value);
|
|
186
187
|
else if (record.value.value === undefined)
|
|
187
188
|
initialValue = new Date();
|
|
188
|
-
typeConverter = TypeConverterManager_1.TypeConverterManager.getConverter(record.property.typename, record.property.converter
|
|
189
|
-
const options = record.property.converter
|
|
189
|
+
typeConverter = TypeConverterManager_1.TypeConverterManager.getConverter(record.property.typename, (_a = record.property.converter) === null || _a === void 0 ? void 0 : _a.name);
|
|
190
|
+
const options = (_b = record.property.converter) === null || _b === void 0 ? void 0 : _b.options;
|
|
190
191
|
if (options) {
|
|
191
192
|
// istanbul ignore else
|
|
192
193
|
if ("alternateDateFormat" in options) {
|