@itwin/components-react 4.0.0-dev.2 → 4.0.0-dev.20
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 +156 -6
- package/LICENSE.md +1 -1
- package/README.md +2 -2
- package/lib/cjs/components-react/UiComponents.js +1 -1
- package/lib/cjs/components-react/UiComponents.js.map +1 -1
- package/lib/cjs/components-react/common/DateUtils.d.ts +2 -2
- package/lib/cjs/components-react/common/DateUtils.d.ts.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 +7 -4
- package/lib/cjs/components-react/common/DelayedSpinner.js.map +1 -1
- package/lib/cjs/components-react/common/IImageLoader.d.ts +3 -3
- package/lib/cjs/components-react/common/IImageLoader.d.ts.map +1 -1
- package/lib/cjs/components-react/common/ImageRenderer.js +6 -2
- package/lib/cjs/components-react/common/ImageRenderer.js.map +1 -1
- package/lib/cjs/components-react/common/UseAsyncValue.d.ts +1 -1
- package/lib/cjs/components-react/common/UseAsyncValue.d.ts.map +1 -1
- package/lib/cjs/components-react/common/UseAsyncValue.js +7 -3
- package/lib/cjs/components-react/common/UseAsyncValue.js.map +1 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.d.ts +5 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.d.ts.map +1 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js +16 -2
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/cjs/components-react/converters/BooleanTypeConverter.js +1 -1
- package/lib/cjs/components-react/converters/BooleanTypeConverter.js.map +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.js +1 -1
- package/lib/cjs/components-react/converters/HexadecimalTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/NumericTypeConverter.js +2 -4
- package/lib/cjs/components-react/converters/NumericTypeConverter.js.map +1 -1
- 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.js +2 -2
- package/lib/cjs/components-react/converters/StringTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverter.js +1 -2
- package/lib/cjs/components-react/converters/TypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverterManager.js +1 -1
- package/lib/cjs/components-react/converters/TypeConverterManager.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DateField.js +5 -1
- package/lib/cjs/components-react/datepicker/DateField.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DateField.scss +1 -1
- package/lib/cjs/components-react/datepicker/DatePicker.d.ts.map +1 -1
- package/lib/cjs/components-react/datepicker/DatePicker.js +9 -4
- package/lib/cjs/components-react/datepicker/DatePicker.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DatePicker.scss +9 -10
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.d.ts.map +1 -1
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js +7 -2
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.scss +5 -5
- package/lib/cjs/components-react/datepicker/TimeField.js +5 -1
- package/lib/cjs/components-react/datepicker/TimeField.js.map +1 -1
- package/lib/cjs/components-react/datepicker/TimeField.scss +4 -4
- package/lib/cjs/components-react/editors/BooleanEditor.js +5 -1
- package/lib/cjs/components-react/editors/BooleanEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/CustomNumberEditor.js +7 -5
- package/lib/cjs/components-react/editors/CustomNumberEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/CustomNumberEditor.scss +1 -2
- package/lib/cjs/components-react/editors/DateTimeEditor.js +9 -6
- package/lib/cjs/components-react/editors/DateTimeEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/EditorContainer.d.ts +10 -0
- package/lib/cjs/components-react/editors/EditorContainer.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/EditorContainer.js +6 -1
- package/lib/cjs/components-react/editors/EditorContainer.js.map +1 -1
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.d.ts +1 -0
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js +8 -2
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.scss +16 -57
- package/lib/cjs/components-react/editors/EnumEditor.js +5 -1
- package/lib/cjs/components-react/editors/EnumEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/EnumEditor.scss +2 -2
- package/lib/cjs/components-react/editors/IconEditor.js +5 -1
- package/lib/cjs/components-react/editors/IconEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/IconEditor.scss +1 -1
- package/lib/cjs/components-react/editors/ImageCheckBoxEditor.js +5 -1
- package/lib/cjs/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/NumericInputEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/NumericInputEditor.js +6 -2
- package/lib/cjs/components-react/editors/NumericInputEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/NumericInputEditor.scss +1 -2
- package/lib/cjs/components-react/editors/PopupButton.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/PopupButton.js +13 -8
- package/lib/cjs/components-react/editors/PopupButton.js.map +1 -1
- package/lib/cjs/components-react/editors/PopupButton.scss +13 -13
- package/lib/cjs/components-react/editors/PropertyEditorManager.js +6 -2
- package/lib/cjs/components-react/editors/PropertyEditorManager.js.map +1 -1
- package/lib/cjs/components-react/editors/SliderEditor.js +5 -1
- package/lib/cjs/components-react/editors/SliderEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/SliderEditor.scss +2 -2
- package/lib/cjs/components-react/editors/TextEditor.d.ts.map +1 -1
- package/lib/cjs/components-react/editors/TextEditor.js +14 -5
- package/lib/cjs/components-react/editors/TextEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/TextEditor.scss +1 -2
- package/lib/cjs/components-react/editors/TextareaEditor.d.ts +1 -1
- package/lib/cjs/components-react/editors/TextareaEditor.js +6 -2
- package/lib/cjs/components-react/editors/TextareaEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/ToggleEditor.js +5 -1
- package/lib/cjs/components-react/editors/ToggleEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/variables.scss +1 -0
- package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.d.ts +25 -1
- package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.js +29 -3
- package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
- package/lib/cjs/components-react/favorite/FavoritePropertyList.js +7 -4
- package/lib/cjs/components-react/favorite/FavoritePropertyList.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts +22 -25
- package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js +24 -82
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts +80 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js +87 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js.map +1 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts +14 -3
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js +27 -13
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.scss +4 -6
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +25 -16
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js +27 -15
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.scss +3 -11
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +14 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js +17 -8
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +16 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js +20 -9
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts +14 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js +18 -8
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts +51 -8
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.js +65 -9
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.d.ts +23 -5
- package/lib/cjs/components-react/filter-builder/Operators.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.js +25 -7
- package/lib/cjs/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Types.d.ts +25 -5
- package/lib/cjs/components-react/filter-builder/Types.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/Types.js +11 -1
- package/lib/cjs/components-react/filter-builder/Types.js.map +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.d.ts.map +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.js +17 -6
- package/lib/cjs/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.scss +3 -13
- package/lib/cjs/components-react/filtering/ResultSelector.d.ts.map +1 -1
- package/lib/cjs/components-react/filtering/ResultSelector.js +11 -3
- package/lib/cjs/components-react/filtering/ResultSelector.js.map +1 -1
- package/lib/cjs/components-react/filtering/ResultSelector.scss +3 -8
- package/lib/cjs/components-react/iconpicker/IconPickerButton.d.ts.map +1 -1
- package/lib/cjs/components-react/iconpicker/IconPickerButton.js +13 -5
- package/lib/cjs/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/cjs/components-react/iconpicker/IconPickerButton.scss +5 -5
- package/lib/cjs/components-react/inputs/ParsedInput.js +5 -1
- package/lib/cjs/components-react/inputs/ParsedInput.js.map +1 -1
- package/lib/cjs/components-react/inputs/ParsedInput.scss +2 -2
- 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/LinkHandler.d.ts +3 -3
- package/lib/cjs/components-react/properties/LinkHandler.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/LinkHandler.js +6 -2
- package/lib/cjs/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonList.js +5 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonList.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonRenderer.d.ts +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.js +8 -5
- package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js +6 -2
- package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.js +7 -4
- package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyRenderer.js +5 -1
- package/lib/cjs/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.js +5 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.scss +5 -3
- package/lib/cjs/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.js +8 -3
- package/lib/cjs/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PrimitivePropertyLabelRenderer.js +5 -1
- package/lib/cjs/components-react/properties/renderers/label/PrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js +6 -3
- package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.scss +10 -10
- package/lib/cjs/components-react/properties/renderers/value/ArrayPropertyValueRenderer.js +5 -1
- package/lib/cjs/components-react/properties/renderers/value/ArrayPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js +6 -3
- package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js +8 -7
- package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js +6 -3
- package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js +9 -8
- package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/StructPropertyValueRenderer.js +5 -1
- package/lib/cjs/components-react/properties/renderers/value/StructPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/UrlPropertyValueRenderer.js +5 -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 +5 -1
- package/lib/cjs/components-react/properties/renderers/value/WithContextStyle.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/ArrayValueRenderer.js +5 -1
- package/lib/cjs/components-react/properties/renderers/value/table/ArrayValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js +5 -1
- package/lib/cjs/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/StructValueRenderer.js +5 -1
- package/lib/cjs/components-react/properties/renderers/value/table/StructValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +4 -4
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js +3 -4
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/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 +10 -2
- package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/FlatItemNestedBorderWrapper.js +5 -1
- package/lib/cjs/components-react/propertygrid/component/FlatItemNestedBorderWrapper.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.js +6 -3
- package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.scss +8 -7
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts +18 -10
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js +3 -3
- 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 +5 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyList.js +5 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyList.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +13 -12
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js +53 -54
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +17 -8
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +11 -10
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +3 -3
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.js +11 -13
- package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.js.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.js +1 -2
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.d.ts +5 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js +5 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts +5 -5
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js +1 -2
- 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 +10 -10
- 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 +5 -5
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +3 -4
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +2 -2
- 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.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js +6 -2
- 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 +3 -6
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +10 -8
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/selectable-content/SelectableContent.d.ts +2 -0
- package/lib/cjs/components-react/selectable-content/SelectableContent.d.ts.map +1 -1
- package/lib/cjs/components-react/selectable-content/SelectableContent.js +10 -7
- package/lib/cjs/components-react/selectable-content/SelectableContent.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Item.js +5 -1
- package/lib/cjs/components-react/toolbar/Item.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Item.scss +20 -51
- package/lib/cjs/components-react/toolbar/ItemWrapper.js +5 -1
- package/lib/cjs/components-react/toolbar/ItemWrapper.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Items.js +5 -1
- package/lib/cjs/components-react/toolbar/Items.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Items.scss +2 -3
- package/lib/cjs/components-react/toolbar/Overflow.js +5 -1
- package/lib/cjs/components-react/toolbar/Overflow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/OverflowPanel.js +5 -1
- package/lib/cjs/components-react/toolbar/OverflowPanel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItem.js +5 -1
- package/lib/cjs/components-react/toolbar/PopupItem.js.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js +5 -1
- package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItemsPanel.js +5 -1
- package/lib/cjs/components-react/toolbar/PopupItemsPanel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.d.ts +4 -2
- package/lib/cjs/components-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.js +7 -2
- package/lib/cjs/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.d.ts +7 -3
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.js +13 -6
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/_variables.scss +4 -4
- package/lib/cjs/components-react/toolbar/groupPanel/BackArrow.js +5 -1
- package/lib/cjs/components-react/toolbar/groupPanel/BackArrow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/BackArrow.scss +2 -2
- package/lib/cjs/components-react/toolbar/groupPanel/Column.js +5 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Column.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Columns.js +5 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Columns.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Panel.js +5 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Panel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Panel.scss +2 -4
- package/lib/cjs/components-react/toolbar/groupPanel/Title.js +5 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Title.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Title.scss +1 -2
- package/lib/cjs/components-react/toolbar/groupPanel/_variables.scss +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Expander.js +5 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Expander.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.js +5 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.scss +9 -38
- package/lib/cjs/components-react/toolbar/useDragInteraction.js +5 -1
- package/lib/cjs/components-react/toolbar/useDragInteraction.js.map +1 -1
- package/lib/cjs/components-react/toolbar/utilities/Direction.js +2 -2
- package/lib/cjs/components-react/toolbar/utilities/Direction.js.map +1 -1
- package/lib/cjs/components-react/tree/HighlightingEngine.js +6 -2
- package/lib/cjs/components-react/tree/HighlightingEngine.js.map +1 -1
- package/lib/cjs/components-react/tree/SimpleTreeDataProvider.d.ts +1 -1
- package/lib/cjs/components-react/tree/SimpleTreeDataProvider.d.ts.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/controlled/Observable.d.ts +12 -2
- package/lib/cjs/components-react/tree/controlled/Observable.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/Observable.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 -13
- package/lib/cjs/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js +6 -8
- package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts +1 -4
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js +6 -3
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.scss +7 -7
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.js +6 -1
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.scss +1 -2
- 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 +5 -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 +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeRenderer.js +6 -2
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeRenderer.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.d.ts +3 -6
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js +7 -3
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/SparseTree.js +1 -2
- package/lib/cjs/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.d.ts +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js +2 -4
- package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
- package/lib/cjs/components-react.d.ts +4 -8
- package/lib/cjs/components-react.d.ts.map +1 -1
- package/lib/cjs/components-react.js +9 -9
- package/lib/cjs/components-react.js.map +1 -1
- package/lib/esm/components-react/UiComponents.js +2 -1
- package/lib/esm/components-react/UiComponents.js.map +1 -1
- package/lib/esm/components-react/common/DateUtils.d.ts +2 -2
- package/lib/esm/components-react/common/DateUtils.d.ts.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 +2 -3
- package/lib/esm/components-react/common/DelayedSpinner.js.map +1 -1
- package/lib/esm/components-react/common/IImageLoader.d.ts +3 -3
- package/lib/esm/components-react/common/IImageLoader.d.ts.map +1 -1
- package/lib/esm/components-react/common/ImageRenderer.js +2 -1
- package/lib/esm/components-react/common/ImageRenderer.js.map +1 -1
- package/lib/esm/components-react/common/UseAsyncValue.d.ts +1 -1
- package/lib/esm/components-react/common/UseAsyncValue.d.ts.map +1 -1
- package/lib/esm/components-react/common/UseAsyncValue.js +2 -2
- package/lib/esm/components-react/common/UseAsyncValue.js.map +1 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.d.ts +5 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.d.ts.map +1 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js +16 -2
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/esm/components-react/converters/BooleanTypeConverter.js +2 -1
- package/lib/esm/components-react/converters/BooleanTypeConverter.js.map +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.js +1 -1
- package/lib/esm/components-react/converters/HexadecimalTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/NumericTypeConverter.js +2 -4
- package/lib/esm/components-react/converters/NumericTypeConverter.js.map +1 -1
- 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.js +2 -2
- package/lib/esm/components-react/converters/StringTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/TypeConverter.js +1 -2
- package/lib/esm/components-react/converters/TypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/TypeConverterManager.js +2 -1
- package/lib/esm/components-react/converters/TypeConverterManager.js.map +1 -1
- package/lib/esm/components-react/datepicker/DateField.scss +1 -1
- package/lib/esm/components-react/datepicker/DatePicker.d.ts.map +1 -1
- package/lib/esm/components-react/datepicker/DatePicker.js +4 -3
- package/lib/esm/components-react/datepicker/DatePicker.js.map +1 -1
- package/lib/esm/components-react/datepicker/DatePicker.scss +9 -10
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.d.ts.map +1 -1
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.js +3 -2
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.scss +5 -5
- package/lib/esm/components-react/datepicker/TimeField.scss +4 -4
- package/lib/esm/components-react/editors/CustomNumberEditor.js +2 -4
- package/lib/esm/components-react/editors/CustomNumberEditor.js.map +1 -1
- package/lib/esm/components-react/editors/CustomNumberEditor.scss +1 -2
- package/lib/esm/components-react/editors/DateTimeEditor.js +4 -5
- package/lib/esm/components-react/editors/DateTimeEditor.js.map +1 -1
- package/lib/esm/components-react/editors/EditorContainer.d.ts +10 -0
- package/lib/esm/components-react/editors/EditorContainer.d.ts.map +1 -1
- package/lib/esm/components-react/editors/EditorContainer.js +1 -0
- package/lib/esm/components-react/editors/EditorContainer.js.map +1 -1
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.d.ts +1 -0
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.js +4 -2
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.scss +16 -57
- package/lib/esm/components-react/editors/EnumEditor.scss +2 -2
- package/lib/esm/components-react/editors/IconEditor.scss +1 -1
- package/lib/esm/components-react/editors/NumericInputEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/NumericInputEditor.js +1 -1
- package/lib/esm/components-react/editors/NumericInputEditor.js.map +1 -1
- package/lib/esm/components-react/editors/NumericInputEditor.scss +1 -2
- package/lib/esm/components-react/editors/PopupButton.d.ts.map +1 -1
- package/lib/esm/components-react/editors/PopupButton.js +8 -7
- package/lib/esm/components-react/editors/PopupButton.js.map +1 -1
- package/lib/esm/components-react/editors/PopupButton.scss +13 -13
- package/lib/esm/components-react/editors/PropertyEditorManager.js +2 -1
- package/lib/esm/components-react/editors/PropertyEditorManager.js.map +1 -1
- package/lib/esm/components-react/editors/SliderEditor.scss +2 -2
- package/lib/esm/components-react/editors/TextEditor.d.ts.map +1 -1
- package/lib/esm/components-react/editors/TextEditor.js +9 -4
- package/lib/esm/components-react/editors/TextEditor.js.map +1 -1
- package/lib/esm/components-react/editors/TextEditor.scss +1 -2
- package/lib/esm/components-react/editors/TextareaEditor.d.ts +1 -1
- package/lib/esm/components-react/editors/TextareaEditor.js +1 -1
- package/lib/esm/components-react/editors/TextareaEditor.js.map +1 -1
- package/lib/esm/components-react/editors/variables.scss +1 -0
- package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.d.ts +25 -1
- package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.js +24 -2
- package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
- package/lib/esm/components-react/favorite/FavoritePropertyList.js +2 -3
- package/lib/esm/components-react/favorite/FavoritePropertyList.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts +22 -25
- package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.js +12 -73
- package/lib/esm/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts +80 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.js +60 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.js.map +1 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts +14 -3
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js +17 -7
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.scss +4 -6
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +25 -16
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js +15 -7
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.scss +3 -11
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +14 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js +8 -3
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +16 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js +11 -4
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts +14 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js +9 -3
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts +51 -8
- package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderState.js +54 -3
- package/lib/esm/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Operators.d.ts +23 -5
- package/lib/esm/components-react/filter-builder/Operators.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/Operators.js +23 -5
- package/lib/esm/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Types.d.ts +25 -5
- package/lib/esm/components-react/filter-builder/Types.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/Types.js +11 -1
- package/lib/esm/components-react/filter-builder/Types.js.map +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.d.ts.map +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.js +13 -6
- package/lib/esm/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.scss +3 -13
- package/lib/esm/components-react/filtering/ResultSelector.d.ts.map +1 -1
- package/lib/esm/components-react/filtering/ResultSelector.js +6 -2
- package/lib/esm/components-react/filtering/ResultSelector.js.map +1 -1
- package/lib/esm/components-react/filtering/ResultSelector.scss +3 -8
- package/lib/esm/components-react/iconpicker/IconPickerButton.d.ts.map +1 -1
- package/lib/esm/components-react/iconpicker/IconPickerButton.js +10 -5
- package/lib/esm/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/esm/components-react/iconpicker/IconPickerButton.scss +5 -5
- package/lib/esm/components-react/inputs/ParsedInput.scss +2 -2
- 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/LinkHandler.d.ts +3 -3
- package/lib/esm/components-react/properties/LinkHandler.d.ts.map +1 -1
- package/lib/esm/components-react/properties/LinkHandler.js +1 -1
- package/lib/esm/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/ActionButtonRenderer.d.ts +1 -1
- package/lib/esm/components-react/properties/renderers/ActionButtonRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.js +3 -4
- package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.js.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.js +2 -3
- package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyView.scss +5 -3
- package/lib/esm/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.js +3 -2
- package/lib/esm/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js +1 -2
- package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.scss +10 -10
- package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js +1 -2
- package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js +3 -6
- package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js +1 -2
- package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js +4 -7
- package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.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/propertygrid/PropertyCategoryRendererManager.d.ts +4 -4
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js +4 -4
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/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 +6 -1
- package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.js +1 -2
- package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.scss +8 -7
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts +18 -10
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js +4 -3
- 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/VirtualizedPropertyGrid.d.ts +13 -12
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js +48 -53
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +17 -8
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +11 -10
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +3 -3
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.js +11 -13
- package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.js.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.js +1 -2
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.d.ts +5 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js +5 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts +5 -5
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js +1 -2
- 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 +10 -10
- 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 +5 -5
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +3 -4
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +2 -2
- 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.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 +3 -6
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +5 -7
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/selectable-content/SelectableContent.d.ts +2 -0
- package/lib/esm/components-react/selectable-content/SelectableContent.d.ts.map +1 -1
- package/lib/esm/components-react/selectable-content/SelectableContent.js +5 -6
- package/lib/esm/components-react/selectable-content/SelectableContent.js.map +1 -1
- package/lib/esm/components-react/toolbar/Item.scss +20 -51
- package/lib/esm/components-react/toolbar/Items.scss +2 -3
- package/lib/esm/components-react/toolbar/Toolbar.d.ts +4 -2
- package/lib/esm/components-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/Toolbar.js +2 -1
- package/lib/esm/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.d.ts +7 -3
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.js +10 -6
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/esm/components-react/toolbar/_variables.scss +4 -4
- package/lib/esm/components-react/toolbar/groupPanel/BackArrow.scss +2 -2
- package/lib/esm/components-react/toolbar/groupPanel/Panel.scss +2 -4
- package/lib/esm/components-react/toolbar/groupPanel/Title.scss +1 -2
- package/lib/esm/components-react/toolbar/groupPanel/_variables.scss +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.scss +9 -38
- package/lib/esm/components-react/toolbar/utilities/Direction.js +4 -2
- package/lib/esm/components-react/toolbar/utilities/Direction.js.map +1 -1
- package/lib/esm/components-react/tree/HighlightingEngine.js +2 -1
- package/lib/esm/components-react/tree/HighlightingEngine.js.map +1 -1
- package/lib/esm/components-react/tree/SimpleTreeDataProvider.d.ts +1 -1
- package/lib/esm/components-react/tree/SimpleTreeDataProvider.d.ts.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/controlled/Observable.d.ts +12 -2
- package/lib/esm/components-react/tree/controlled/Observable.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/Observable.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 -10
- package/lib/esm/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js +6 -8
- package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts +1 -4
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.js +1 -2
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.scss +7 -7
- package/lib/esm/components-react/tree/controlled/component/NodeContent.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/NodeContent.js +1 -0
- package/lib/esm/components-react/tree/controlled/component/NodeContent.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/NodeContent.scss +1 -2
- 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/TreeNodeRenderer.d.ts +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeNodeRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeNodeRenderer.js +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 +3 -6
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js +2 -2
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/SparseTree.js +1 -2
- package/lib/esm/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.d.ts +1 -1
- package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js +2 -4
- package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
- package/lib/esm/components-react.d.ts +4 -8
- package/lib/esm/components-react.d.ts.map +1 -1
- package/lib/esm/components-react.js +4 -8
- package/lib/esm/components-react.js.map +1 -1
- package/package.json +30 -32
- package/ThirdPartyNotices.md +0 -31
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.d.ts +0 -60
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.d.ts.map +0 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.js +0 -185
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.js.map +0 -1
- package/lib/cjs/components-react/table/TableDataProvider.d.ts +0 -10
- package/lib/cjs/components-react/table/TableDataProvider.d.ts.map +0 -1
- package/lib/cjs/components-react/table/TableDataProvider.js +0 -18
- package/lib/cjs/components-react/table/TableDataProvider.js.map +0 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.d.ts +0 -60
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.d.ts.map +0 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.js +0 -159
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.js.map +0 -1
- package/lib/esm/components-react/table/TableDataProvider.d.ts +0 -10
- package/lib/esm/components-react/table/TableDataProvider.d.ts.map +0 -1
- package/lib/esm/components-react/table/TableDataProvider.js +0 -14
- package/lib/esm/components-react/table/TableDataProvider.js.map +0 -1
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
@import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
|
|
6
6
|
@import "~@itwin/core-react/lib/cjs/core-react/style/opacity";
|
|
7
7
|
@import "~@itwin/core-react/lib/cjs/core-react/icons/variables";
|
|
8
|
-
@import "~@itwin/core-react/lib/cjs/core-react/button/variables";
|
|
9
8
|
|
|
10
9
|
$date-picker-m: 16px;
|
|
11
10
|
$date-picker-icons-color-actionable: rgba(
|
|
@@ -16,13 +15,13 @@ $date-picker-icons-color-actionable-hover: rgba(
|
|
|
16
15
|
$buic-foreground-body,
|
|
17
16
|
$uicore-opacity-1
|
|
18
17
|
);
|
|
19
|
-
$date-picker-outside-month-color:
|
|
18
|
+
$date-picker-outside-month-color: var(--iui-color-text-disabled);
|
|
20
19
|
$outline-size: 2px;
|
|
21
20
|
|
|
22
21
|
.components-date-picker-calendar {
|
|
23
22
|
border-radius: var(--iui-border-radius-1) var(--iui-border-radius-1) 0 0;
|
|
24
23
|
background-color: $buic-background-control;
|
|
25
|
-
color:
|
|
24
|
+
color: var(--iui-color-text);
|
|
26
25
|
font-size: 14px;
|
|
27
26
|
|
|
28
27
|
* {
|
|
@@ -42,7 +41,7 @@ $outline-size: 2px;
|
|
|
42
41
|
border: none;
|
|
43
42
|
cursor: pointer;
|
|
44
43
|
padding: 5px;
|
|
45
|
-
font-size:
|
|
44
|
+
font-size: var(--iui-font-size-2);
|
|
46
45
|
user-select: none;
|
|
47
46
|
color: $date-picker-icons-color-actionable;
|
|
48
47
|
|
|
@@ -51,7 +50,7 @@ $outline-size: 2px;
|
|
|
51
50
|
|
|
52
51
|
&.showFocusOutline {
|
|
53
52
|
outline: 0px;
|
|
54
|
-
border: 0px solid
|
|
53
|
+
border: 0px solid var(--iui-color-border-foreground);
|
|
55
54
|
border-radius: var(--iui-border-radius-1);
|
|
56
55
|
border-color: var(--buic-foreground-focus-border);
|
|
57
56
|
box-shadow: var(--buic-focus-boxshadow-gradient1) 0px 1px 1px,
|
|
@@ -60,7 +59,7 @@ $outline-size: 2px;
|
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
&:hover {
|
|
63
|
-
color:
|
|
62
|
+
color: var(--iui-color-text-accent);
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
|
|
@@ -109,7 +108,7 @@ $outline-size: 2px;
|
|
|
109
108
|
outline: 0px;
|
|
110
109
|
|
|
111
110
|
&.showFocusOutline {
|
|
112
|
-
border: 0px solid
|
|
111
|
+
border: 0px solid var(--iui-color-border-foreground);
|
|
113
112
|
border-radius: var(--iui-border-radius-1);
|
|
114
113
|
border-color: var(--buic-foreground-focus-border);
|
|
115
114
|
box-shadow: var(--buic-focus-boxshadow-gradient1) 0px 1px 1px,
|
|
@@ -117,7 +116,7 @@ $outline-size: 2px;
|
|
|
117
116
|
|
|
118
117
|
.components-date-picker-calendar-day.focused {
|
|
119
118
|
outline: 0px;
|
|
120
|
-
border: 1px solid
|
|
119
|
+
border: 1px solid var(--iui-color-border-foreground);
|
|
121
120
|
border-radius: var(--iui-border-radius-1);
|
|
122
121
|
border-color: var(--buic-foreground-focus-border);
|
|
123
122
|
box-shadow: var(--buic-focus-boxshadow-gradient1) 0px 1px 1px,
|
|
@@ -150,13 +149,13 @@ $outline-size: 2px;
|
|
|
150
149
|
|
|
151
150
|
&.selected {
|
|
152
151
|
background-color: $buic-background-primary;
|
|
153
|
-
color:
|
|
152
|
+
color: var(--iui-color-white);
|
|
154
153
|
font-weight: var(--iui-font-weight-semibold);
|
|
155
154
|
border-radius: var(--iui-border-radius-1);
|
|
156
155
|
|
|
157
156
|
&:hover {
|
|
158
157
|
background-color: $buic-row-hover;
|
|
159
|
-
color:
|
|
158
|
+
color: var(--iui-color-text);
|
|
160
159
|
}
|
|
161
160
|
}
|
|
162
161
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerPopupButton.d.ts","sourceRoot":"","sources":["../../../../src/components-react/datepicker/DatePickerPopupButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAgC,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,
|
|
1
|
+
{"version":3,"file":"DatePickerPopupButton.d.ts","sourceRoot":"","sources":["../../../../src/components-react/datepicker/DatePickerPopupButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAgC,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAE,WAAW,EAAS,MAAM,mBAAmB,CAAC;AAMvD,OAAO,8BAA8B,CAAC;AAEtC;YACY;AACZ,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,6CAA6C;IAC7C,QAAQ,EAAE,IAAI,CAAC;IACf,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,yCAAyC;IACzC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,uBAAuB;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yCAAyC;IACzC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAClC;AAED;;KAEK;AACL,wBAAgB,qBAAqB,CAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAC1G,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,0BAA0B,eAkF/E"}
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -30,6 +34,7 @@ exports.DatePickerPopupButton = void 0;
|
|
|
30
34
|
const React = __importStar(require("react"));
|
|
31
35
|
const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
32
36
|
const core_react_1 = require("@itwin/core-react");
|
|
37
|
+
const itwinui_react_1 = require("@itwin/itwinui-react");
|
|
33
38
|
const UiComponents_1 = require("../UiComponents");
|
|
34
39
|
const DatePicker_1 = require("./DatePicker");
|
|
35
40
|
const DateField_1 = require("./DateField");
|
|
@@ -91,7 +96,7 @@ function DatePickerPopupButton({ displayEditField, timeDisplay, selected, onDate
|
|
|
91
96
|
React.createElement(DatePicker_1.DatePicker, { selected: workingDate, onDateChange: handleOnDateChanged, showFocusOutline: showFocusOutline }),
|
|
92
97
|
timeDisplay &&
|
|
93
98
|
React.createElement("div", { className: "time-container" },
|
|
94
|
-
React.createElement(
|
|
99
|
+
React.createElement(itwinui_react_1.Text, { variant: "body", className: "time-label" }, timeLabelRef.current),
|
|
95
100
|
React.createElement(TimeField_1.TimeField, { time: timeSpec, timeDisplay: timeDisplay, onTimeChange: handleOnTimeChanged })))),
|
|
96
101
|
!!displayEditField && React.createElement(DateField_1.DateField, { style: fieldStyle, className: fieldClassName, initialDate: workingDate, timeDisplay: timeDisplay, dateFormatter: dateFormatter, onDateChange: handleOnDateChanged })));
|
|
97
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerPopupButton.js","sourceRoot":"","sources":["../../../../src/components-react/datepicker/DatePickerPopupButton.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG
|
|
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,EA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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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Date\n */\n\nimport * as React from \"react\";\nimport { DateFormatter, RelativePosition, SpecialKey, TimeDisplay } from \"@itwin/appui-abstract\";\nimport { CommonProps, Popup } from \"@itwin/core-react\";\nimport { Text } from \"@itwin/itwinui-react\";\nimport { UiComponents } from \"../UiComponents\";\nimport { DatePicker } from \"./DatePicker\";\nimport { DateField } from \"./DateField\";\nimport { TimeField, TimeSpec } from \"./TimeField\";\nimport \"./DatePickerPopupButton.scss\";\n\n/** Props used by [[DatePickerPopupButton]] component.\n * @alpha */\nexport interface DatePickerPopupButtonProps extends CommonProps {\n /** Date to be shown as the selected date. */\n selected: Date;\n /** If true show the date (and optionally time) edit field next to button */\n displayEditField?: boolean;\n // If defined show time in popup and also display time if input field is shown\n timeDisplay?: TimeDisplay;\n /** Function called when Date changes. */\n onDateChange?: (day: Date) => void;\n /** Optional tooltip */\n buttonToolTip?: string;\n /* Custom date formatter. WARNING: if used values will only be shown in specified format and will not be based on locale.\n * If used the existence of a parseDate function will determine if the edit field allows editing. */\n dateFormatter?: DateFormatter;\n /** User defined class name for edit field. */\n fieldClassName?: string;\n /** User defined style for edit field. */\n fieldStyle?: React.CSSProperties;\n}\n\n/** Component that displays a button used to pick a date and optionally a time.\n * @alpha\n * */\nexport function DatePickerPopupButton({ displayEditField, timeDisplay, selected, onDateChange, dateFormatter,\n buttonToolTip, fieldStyle, fieldClassName, style }: DatePickerPopupButtonProps) {\n const [workingDate, setWorkingDate] = React.useState(new Date(selected.getTime()));\n const [isSettingsOpen, setIsSettingsOpen] = React.useState(false);\n const timeLabelRef = React.useRef(UiComponents.translate(\"datepicker.time\"));\n const toolTipLabelRef = React.useRef(UiComponents.translate(\"datepicker.selectDate\"));\n const toolTipLabel = React.useMemo(() => buttonToolTip ? buttonToolTip : toolTipLabelRef.current, [buttonToolTip]);\n\n // See if props have changed since component mounted\n React.useEffect(() => {\n const newWorkingDate = new Date(selected.getTime());\n setWorkingDate(newWorkingDate);\n }, [selected]);\n\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n const togglePopupDisplay = React.useCallback((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n event.preventDefault();\n setShowFocusOutline(false);\n setIsSettingsOpen((prev) => !prev);\n }, [setIsSettingsOpen]);\n\n const handleCloseSetting = React.useCallback(() => {\n setIsSettingsOpen(false);\n }, [setIsSettingsOpen]);\n\n const handleOnDateChanged = (day: Date) => {\n // combine current time into selected Date\n const newWorkingDate = new Date(day.getTime());\n newWorkingDate.setHours(workingDate.getHours(), workingDate.getMinutes(), workingDate.getSeconds());\n onDateChange && onDateChange(newWorkingDate);\n !timeDisplay && setIsSettingsOpen(false);\n };\n\n const handleOnTimeChanged = (time: TimeSpec) => {\n // Combine new time into selected Date\n const newWorkingDate = new Date(workingDate.getTime());\n newWorkingDate.setHours(time.hours, time.minutes, time.seconds);\n setWorkingDate(newWorkingDate);\n onDateChange && onDateChange(newWorkingDate);\n };\n\n const [showFocusOutline, setShowFocusOutline] = React.useState(false);\n const handlePopupKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLButtonElement>) => {\n // istanbul ignore else\n if (event.key === SpecialKey.Space) {\n setShowFocusOutline(true);\n setIsSettingsOpen(true);\n }\n }, []);\n\n const timeSpec: TimeSpec = { hours: workingDate.getHours(), minutes: workingDate.getMinutes(), seconds: workingDate.getSeconds() };\n return (\n <>\n <button title={toolTipLabel} style={style} className=\"components-date-picker-calendar-popup-button\" onKeyDown={handlePopupKeyDown}\n data-testid=\"components-date-picker-calendar-popup-button\" onPointerDown={togglePopupDisplay} ref={buttonRef}>\n <div className=\"datepicker-button\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\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\" />\n </svg>\n </div>\n </button>\n <Popup\n isOpen={isSettingsOpen}\n position={RelativePosition.BottomLeft}\n onClose={handleCloseSetting}\n target={buttonRef.current}\n closeOnEnter={false}\n moveFocus={showFocusOutline}\n closeOnNestedPopupOutsideClick\n >\n <div className=\"components-date-picker-calendar-popup-panel\" data-testid=\"components-date-picker-calendar-popup-panel\">\n <DatePicker selected={workingDate} onDateChange={handleOnDateChanged} showFocusOutline={showFocusOutline} />\n {timeDisplay &&\n <div className=\"time-container\">\n <Text variant=\"body\" className=\"time-label\">{timeLabelRef.current}</Text>\n <TimeField time={timeSpec} timeDisplay={timeDisplay} onTimeChange={handleOnTimeChanged} />\n </div>\n }\n </div>\n </Popup >\n {!!displayEditField && <DateField style={fieldStyle} className={fieldClassName} initialDate={workingDate} timeDisplay={timeDisplay} dateFormatter={dateFormatter} onDateChange={handleOnDateChanged} />}\n </>\n );\n}\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@import "~@itwin/core-react/lib/cjs/core-react/index";
|
|
6
6
|
|
|
7
7
|
.components-date-picker-calendar-popup-button {
|
|
8
|
-
color:
|
|
8
|
+
color: var(--iui-color-text);
|
|
9
9
|
font-size: var(--iui-font-size-1);
|
|
10
10
|
background-color: transparent;
|
|
11
11
|
height: 2.2em;
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
svg {
|
|
21
|
-
fill:
|
|
21
|
+
fill: var(--iui-color-icon);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&:hover {
|
|
25
|
-
color:
|
|
25
|
+
color: var(--iui-color-text-accent-hover);
|
|
26
26
|
cursor: auto;
|
|
27
27
|
|
|
28
28
|
svg {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
&:focus {
|
|
34
|
-
box-shadow: $
|
|
34
|
+
box-shadow: $buic-focus-boxshadow 0px 0px 0px 2px;
|
|
35
35
|
outline: none;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
flex-direction: row;
|
|
47
47
|
align-items: center;
|
|
48
48
|
justify-content: center;
|
|
49
|
-
border-top: 2px solid
|
|
49
|
+
border-top: 2px solid var(--iui-color-border-foreground);
|
|
50
50
|
padding-top: 8px;
|
|
51
51
|
padding-bottom: 8px;
|
|
52
52
|
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
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;AAC7C,0DAAgE;AAChE,kDAA+C;AAC/C,4BAA0B;AAsB1B,SAAS,WAA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AAE,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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Date\n */\n\nimport * as React from \"react\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { SpecialKey, TimeDisplay } from \"@itwin/appui-abstract\";\nimport { UiComponents } from \"../UiComponents\";\nimport \"./TimeField.scss\";\n\n/** Interface used to hold 24 hour time in\n * hours, minutes, and seconds.\n * @internal\n */\nexport interface TimeSpec {\n hours: number;\n minutes: number;\n seconds: number;\n}\n\n/** Interface for props used by [[TimeField]] component.\n * @internal\n */\nexport interface TimeFieldProps {\n time: TimeSpec;\n timeDisplay: TimeDisplay;\n onTimeChange?: (time: TimeSpec) => void;\n readOnly?: boolean;\n}\n\nfunction getValidInt(intText: string, min: number, max: number, defaultValue: number) {\n try {\n const newValue = parseInt(intText, 10);\n if (newValue >= min && newValue <= max)\n return newValue;\n } catch (_e) {\n // istanbul ignore next\n return defaultValue;\n }\n return defaultValue;\n}\n\nfunction isSameTime(a: TimeSpec, b: TimeSpec) {\n return a.hours === b.hours && a.minutes === b.minutes && a.seconds === b.seconds;\n}\n\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\n * change the time.\n * @internal\n */\nexport function TimeField({ time, timeDisplay, readOnly, onTimeChange }: TimeFieldProps) {\n const initialDateRef = React.useRef(time);\n const amLabelRef = React.useRef(UiComponents.translate(\"timepicker.day-period-am\"));\n const pmLabelRef = React.useRef(UiComponents.translate(\"timepicker.day-period-pm\"));\n const [timeSpec, setTimeSpec] = React.useState(time);\n const { hours, minutes, seconds } = timeSpec;\n const showDayPeriod = -1 !== (timeDisplay as string).search(\"aa\");\n\n const getDisplayHours = React.useCallback((timeHours: number) => {\n if (!showDayPeriod) {\n return timeHours;\n }\n const outHours = (0 === timeHours) ? 12 : timeHours > 12 ? timeHours - 12 : timeHours;\n return outHours;\n }, [showDayPeriod]);\n\n // See if new initialDate props have changed since component mounted\n React.useEffect(() => {\n if (!isSameTime(time, initialDateRef.current)) {\n setTimeSpec(time);\n initialDateRef.current = time;\n }\n }, [time]);\n\n const displayHour = getDisplayHours(hours);\n const [dayPeriodText, setDayPeriodText] = React.useState(showDayPeriod ? (hours >= 12 ? pmLabelRef.current : amLabelRef.current) : undefined);\n const [hoursText, setHoursText] = React.useState(displayHour.toString().padStart(2, \"0\"));\n const [minutesText, setMinutesText] = React.useState(minutes.toString().padStart(2, \"0\"));\n const [secondsText, setSecondsText] = React.useState(seconds.toString().padStart(2, \"0\"));\n\n const updateTimeSpec = React.useCallback((newTime: TimeSpec) => {\n if (newTime.hours !== timeSpec.hours || newTime.minutes !== timeSpec.minutes || newTime.seconds !== timeSpec.seconds) {\n setTimeSpec(newTime);\n onTimeChange && onTimeChange(newTime);\n }\n }, [onTimeChange, timeSpec.hours, timeSpec.minutes, timeSpec.seconds]);\n\n const handleHoursChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n setHoursText(event.currentTarget.value);\n }, []);\n\n const handleMinutesChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n setMinutesText(event.currentTarget.value);\n }, []);\n const handleSecondsChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n setSecondsText(event.currentTarget.value);\n }, []);\n const handleDayPeriodChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n setDayPeriodText(event.currentTarget.value);\n }, []);\n\n const handleHoursOnBlur = React.useCallback(() => {\n const newHours = getValidInt(hoursText, 0, 24, hours);\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, hours: newHours });\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\n }, [getDisplayHours, hours, hoursText, showDayPeriod, timeSpec, updateTimeSpec]);\n const handleMinutesOnBlur = React.useCallback(() => {\n const newMinutes = getValidInt(minutesText, 0, 59, minutes);\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\n }, [minutes, minutesText, timeSpec, updateTimeSpec]);\n const handleSecondsOnBlur = React.useCallback(() => {\n const newSeconds = getValidInt(secondsText, 0, 59, seconds);\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\n }, [seconds, secondsText, timeSpec, updateTimeSpec]);\n const handleDayPeriodOnBlur = React.useCallback(() => {\n let newPeriodText: string | undefined;\n // istanbul ignore else\n if (dayPeriodText === \"AM\" || dayPeriodText === \"am\" || dayPeriodText === amLabelRef.current)\n newPeriodText = amLabelRef.current;\n else if (dayPeriodText === \"PM\" || dayPeriodText === \"pm\" || dayPeriodText === pmLabelRef.current)\n newPeriodText = pmLabelRef.current;\n\n // istanbul ignore else\n if (undefined !== newPeriodText) {\n setDayPeriodText(newPeriodText);\n if (newPeriodText === amLabelRef.current && hours > 12) {\n updateTimeSpec({ ...timeSpec, hours: hours - 12 });\n } else if (newPeriodText === pmLabelRef.current && hours <= 11) {\n updateTimeSpec({ ...timeSpec, hours: hours + 12 });\n }\n }\n\n }, [dayPeriodText, hours, timeSpec, updateTimeSpec]);\n\n const handleHoursOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (event.key === SpecialKey.ArrowDown || event.key === SpecialKey.ArrowUp) {\n let newHours = hours + (event.key === SpecialKey.ArrowDown ? -1 : 1);\n if (newHours < 0) newHours = 24;\n if (newHours > 24 || (newHours > 23 && ((minutes + seconds) > 0))) newHours = 0;\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, hours: newHours });\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\n event.preventDefault();\n } else if (event.key === SpecialKey.Enter) {\n const newHours = getValidInt(hoursText, 0, 24, hours);\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, hours: newHours });\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\n event.preventDefault();\n }\n }, [getDisplayHours, hours, hoursText, minutes, seconds, showDayPeriod, timeSpec, updateTimeSpec]);\n\n const handleMinutesOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === SpecialKey.ArrowDown) {\n const newMinutes = minutes === 0 ? 59 : minutes - 1;\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\n event.preventDefault();\n } else if (event.key === SpecialKey.ArrowUp) {\n const newMinutes = minutes === 59 ? 0 : minutes + 1;\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\n event.preventDefault();\n } else if (event.key === SpecialKey.Home || event.key === SpecialKey.End) {\n const newMinutes = event.key === SpecialKey.Home ? 0 : 59;\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\n event.preventDefault();\n } else /* istanbul ignore next */ if (event.key === SpecialKey.Enter) {\n const newMinutes = getValidInt(minutesText, 0, 59, minutes);\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\n event.preventDefault();\n }\n }, [minutesText, minutes, timeSpec, updateTimeSpec]);\n\n const handleSecondsOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (event.key === SpecialKey.ArrowDown) {\n const newSeconds = seconds === 0 ? 59 : seconds - 1;\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\n event.preventDefault();\n } else if (event.key === SpecialKey.ArrowUp) {\n const newSeconds = seconds === 59 ? 0 : seconds + 1;\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\n event.preventDefault();\n } else if (event.key === SpecialKey.Home || event.key === SpecialKey.End) {\n const newSeconds = event.key === SpecialKey.Home ? 0 : 59;\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\n event.preventDefault();\n } else if (event.key === SpecialKey.Enter) {\n const newSeconds = getValidInt(secondsText, 0, 59, seconds);\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\n event.preventDefault();\n }\n }, [seconds, secondsText, timeSpec, updateTimeSpec]);\n\n const handleDayPeriodOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n let newPeriodText: string | undefined;\n // istanbul ignore else\n if (event.key === SpecialKey.ArrowDown || event.key === SpecialKey.Home || event.key === \"a\" || event.key === \"A\") {\n newPeriodText = amLabelRef.current;\n event.preventDefault();\n } else if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.End || event.key === \"p\" || event.key === \"P\") {\n newPeriodText = pmLabelRef.current;\n event.preventDefault();\n } else if (event.key === SpecialKey.Enter) {\n if (dayPeriodText === \"AM\" || dayPeriodText === \"am\" || dayPeriodText === amLabelRef.current)\n newPeriodText = amLabelRef.current;\n else if (dayPeriodText === \"PM\" || dayPeriodText === \"pm\" || dayPeriodText === pmLabelRef.current)\n newPeriodText = pmLabelRef.current;\n event.preventDefault();\n }\n // istanbul ignore else\n if (undefined !== newPeriodText) {\n setDayPeriodText(newPeriodText);\n /* istanbul ignore else */\n if (newPeriodText === amLabelRef.current && hours > 12) {\n updateTimeSpec({ ...timeSpec, hours: hours - 12 });\n } else if (newPeriodText === pmLabelRef.current && hours <= 11) {\n updateTimeSpec({ ...timeSpec, hours: hours + 12 });\n }\n }\n }, [dayPeriodText, hours, timeSpec, updateTimeSpec]);\n\n const showSeconds = -1 !== (timeDisplay as string).search(\":ss\");\n\n return <div data-testid=\"components-time-input\" className=\"components-time\">\n <Input className=\"components-time-input\" onKeyDown={handleHoursOnKeyDown} onBlur={handleHoursOnBlur} onChange={handleHoursChange} value={hoursText} disabled={readOnly} size=\"small\" />\n <span className=\"component-time-separator\">:</span>\n <Input className=\"components-time-input\" onKeyDown={handleMinutesOnKeyDown} onBlur={handleMinutesOnBlur} onChange={handleMinutesChange} value={minutesText} disabled={readOnly} size=\"small\" />\n {showSeconds &&\n <>\n <span className=\"component-time-separator\">:</span>\n <Input className=\"components-time-input\" onKeyDown={handleSecondsOnKeyDown} onBlur={handleSecondsOnBlur} onChange={handleSecondsChange} value={secondsText} disabled={readOnly} size=\"small\" />\n </>\n }\n {dayPeriodText &&\n <Input className=\"components-time-period-input\" onKeyDown={handleDayPeriodOnKeyDown} onBlur={handleDayPeriodOnBlur} onChange={handleDayPeriodChange} value={dayPeriodText} disabled={readOnly} size=\"small\" />\n }\n </div>;\n}\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;AAC7C,0DAAgE;AAChE,kDAA+C;AAC/C,4BAA0B;AAsB1B,SAAS,WAAW,CAAC,OAAe,EAAE,G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AK,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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Date\n */\n\nimport * as React from \"react\";\nimport { Input } from \"@itwin/itwinui-react\";\nimport { SpecialKey, TimeDisplay } from \"@itwin/appui-abstract\";\nimport { UiComponents } from \"../UiComponents\";\nimport \"./TimeField.scss\";\n\n/** Interface used to hold 24 hour time in\n * hours, minutes, and seconds.\n * @internal\n */\nexport interface TimeSpec {\n hours: number;\n minutes: number;\n seconds: number;\n}\n\n/** Interface for props used by [[TimeField]] component.\n * @internal\n */\nexport interface TimeFieldProps {\n time: TimeSpec;\n timeDisplay: TimeDisplay;\n onTimeChange?: (time: TimeSpec) => void;\n readOnly?: boolean;\n}\n\nfunction getValidInt(intText: string, min: number, max: number, defaultValue: number) {\n try {\n const newValue = parseInt(intText, 10);\n if (newValue >= min && newValue <= max)\n return newValue;\n } catch (_e) {\n // istanbul ignore next\n return defaultValue;\n }\n return defaultValue;\n}\n\nfunction isSameTime(a: TimeSpec, b: TimeSpec) {\n return a.hours === b.hours && a.minutes === b.minutes && a.seconds === b.seconds;\n}\n\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\n * change the time.\n * @internal\n */\nexport function TimeField({ time, timeDisplay, readOnly, onTimeChange }: TimeFieldProps) {\n const initialDateRef = React.useRef(time);\n const amLabelRef = React.useRef(UiComponents.translate(\"timepicker.day-period-am\"));\n const pmLabelRef = React.useRef(UiComponents.translate(\"timepicker.day-period-pm\"));\n const [timeSpec, setTimeSpec] = React.useState(time);\n const { hours, minutes, seconds } = timeSpec;\n const showDayPeriod = -1 !== (timeDisplay as string).search(\"aa\");\n\n const getDisplayHours = React.useCallback((timeHours: number) => {\n if (!showDayPeriod) {\n return timeHours;\n }\n const outHours = (0 === timeHours) ? 12 : timeHours > 12 ? timeHours - 12 : timeHours;\n return outHours;\n }, [showDayPeriod]);\n\n // See if new initialDate props have changed since component mounted\n React.useEffect(() => {\n if (!isSameTime(time, initialDateRef.current)) {\n setTimeSpec(time);\n initialDateRef.current = time;\n }\n }, [time]);\n\n const displayHour = getDisplayHours(hours);\n const [dayPeriodText, setDayPeriodText] = React.useState(showDayPeriod ? (hours >= 12 ? pmLabelRef.current : amLabelRef.current) : undefined);\n const [hoursText, setHoursText] = React.useState(displayHour.toString().padStart(2, \"0\"));\n const [minutesText, setMinutesText] = React.useState(minutes.toString().padStart(2, \"0\"));\n const [secondsText, setSecondsText] = React.useState(seconds.toString().padStart(2, \"0\"));\n\n const updateTimeSpec = React.useCallback((newTime: TimeSpec) => {\n if (newTime.hours !== timeSpec.hours || newTime.minutes !== timeSpec.minutes || newTime.seconds !== timeSpec.seconds) {\n setTimeSpec(newTime);\n onTimeChange && onTimeChange(newTime);\n }\n }, [onTimeChange, timeSpec.hours, timeSpec.minutes, timeSpec.seconds]);\n\n const handleHoursChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n setHoursText(event.currentTarget.value);\n }, []);\n\n const handleMinutesChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n setMinutesText(event.currentTarget.value);\n }, []);\n const handleSecondsChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n setSecondsText(event.currentTarget.value);\n }, []);\n const handleDayPeriodChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n setDayPeriodText(event.currentTarget.value);\n }, []);\n\n const handleHoursOnBlur = React.useCallback(() => {\n const newHours = getValidInt(hoursText, 0, 24, hours);\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, hours: newHours });\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\n }, [getDisplayHours, hours, hoursText, showDayPeriod, timeSpec, updateTimeSpec]);\n const handleMinutesOnBlur = React.useCallback(() => {\n const newMinutes = getValidInt(minutesText, 0, 59, minutes);\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\n }, [minutes, minutesText, timeSpec, updateTimeSpec]);\n const handleSecondsOnBlur = React.useCallback(() => {\n const newSeconds = getValidInt(secondsText, 0, 59, seconds);\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\n }, [seconds, secondsText, timeSpec, updateTimeSpec]);\n const handleDayPeriodOnBlur = React.useCallback(() => {\n let newPeriodText: string | undefined;\n // istanbul ignore else\n if (dayPeriodText === \"AM\" || dayPeriodText === \"am\" || dayPeriodText === amLabelRef.current)\n newPeriodText = amLabelRef.current;\n else if (dayPeriodText === \"PM\" || dayPeriodText === \"pm\" || dayPeriodText === pmLabelRef.current)\n newPeriodText = pmLabelRef.current;\n\n // istanbul ignore else\n if (undefined !== newPeriodText) {\n setDayPeriodText(newPeriodText);\n if (newPeriodText === amLabelRef.current && hours > 12) {\n updateTimeSpec({ ...timeSpec, hours: hours - 12 });\n } else if (newPeriodText === pmLabelRef.current && hours <= 11) {\n updateTimeSpec({ ...timeSpec, hours: hours + 12 });\n }\n }\n\n }, [dayPeriodText, hours, timeSpec, updateTimeSpec]);\n\n const handleHoursOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (event.key === SpecialKey.ArrowDown || event.key === SpecialKey.ArrowUp) {\n let newHours = hours + (event.key === SpecialKey.ArrowDown ? -1 : 1);\n if (newHours < 0) newHours = 24;\n if (newHours > 24 || (newHours > 23 && ((minutes + seconds) > 0))) newHours = 0;\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, hours: newHours });\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\n event.preventDefault();\n } else if (event.key === SpecialKey.Enter) {\n const newHours = getValidInt(hoursText, 0, 24, hours);\n setHoursText(getDisplayHours(newHours).toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, hours: newHours });\n showDayPeriod && setDayPeriodText(newHours >= 12 ? pmLabelRef.current : amLabelRef.current);\n event.preventDefault();\n }\n }, [getDisplayHours, hours, hoursText, minutes, seconds, showDayPeriod, timeSpec, updateTimeSpec]);\n\n const handleMinutesOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === SpecialKey.ArrowDown) {\n const newMinutes = minutes === 0 ? 59 : minutes - 1;\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\n event.preventDefault();\n } else if (event.key === SpecialKey.ArrowUp) {\n const newMinutes = minutes === 59 ? 0 : minutes + 1;\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\n event.preventDefault();\n } else if (event.key === SpecialKey.Home || event.key === SpecialKey.End) {\n const newMinutes = event.key === SpecialKey.Home ? 0 : 59;\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\n event.preventDefault();\n } else /* istanbul ignore next */ if (event.key === SpecialKey.Enter) {\n const newMinutes = getValidInt(minutesText, 0, 59, minutes);\n setMinutesText(newMinutes.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, minutes: newMinutes });\n event.preventDefault();\n }\n }, [minutesText, minutes, timeSpec, updateTimeSpec]);\n\n const handleSecondsOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (event.key === SpecialKey.ArrowDown) {\n const newSeconds = seconds === 0 ? 59 : seconds - 1;\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\n event.preventDefault();\n } else if (event.key === SpecialKey.ArrowUp) {\n const newSeconds = seconds === 59 ? 0 : seconds + 1;\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\n event.preventDefault();\n } else if (event.key === SpecialKey.Home || event.key === SpecialKey.End) {\n const newSeconds = event.key === SpecialKey.Home ? 0 : 59;\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\n event.preventDefault();\n } else if (event.key === SpecialKey.Enter) {\n const newSeconds = getValidInt(secondsText, 0, 59, seconds);\n setSecondsText(newSeconds.toString().padStart(2, \"0\"));\n updateTimeSpec({ ...timeSpec, seconds: newSeconds });\n event.preventDefault();\n }\n }, [seconds, secondsText, timeSpec, updateTimeSpec]);\n\n const handleDayPeriodOnKeyDown = React.useCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n let newPeriodText: string | undefined;\n // istanbul ignore else\n if (event.key === SpecialKey.ArrowDown || event.key === SpecialKey.Home || event.key === \"a\" || event.key === \"A\") {\n newPeriodText = amLabelRef.current;\n event.preventDefault();\n } else if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.End || event.key === \"p\" || event.key === \"P\") {\n newPeriodText = pmLabelRef.current;\n event.preventDefault();\n } else if (event.key === SpecialKey.Enter) {\n if (dayPeriodText === \"AM\" || dayPeriodText === \"am\" || dayPeriodText === amLabelRef.current)\n newPeriodText = amLabelRef.current;\n else if (dayPeriodText === \"PM\" || dayPeriodText === \"pm\" || dayPeriodText === pmLabelRef.current)\n newPeriodText = pmLabelRef.current;\n event.preventDefault();\n }\n // istanbul ignore else\n if (undefined !== newPeriodText) {\n setDayPeriodText(newPeriodText);\n /* istanbul ignore else */\n if (newPeriodText === amLabelRef.current && hours > 12) {\n updateTimeSpec({ ...timeSpec, hours: hours - 12 });\n } else if (newPeriodText === pmLabelRef.current && hours <= 11) {\n updateTimeSpec({ ...timeSpec, hours: hours + 12 });\n }\n }\n }, [dayPeriodText, hours, timeSpec, updateTimeSpec]);\n\n const showSeconds = -1 !== (timeDisplay as string).search(\":ss\");\n\n return <div data-testid=\"components-time-input\" className=\"components-time\">\n <Input className=\"components-time-input\" onKeyDown={handleHoursOnKeyDown} onBlur={handleHoursOnBlur} onChange={handleHoursChange} value={hoursText} disabled={readOnly} size=\"small\" />\n <span className=\"component-time-separator\">:</span>\n <Input className=\"components-time-input\" onKeyDown={handleMinutesOnKeyDown} onBlur={handleMinutesOnBlur} onChange={handleMinutesChange} value={minutesText} disabled={readOnly} size=\"small\" />\n {showSeconds &&\n <>\n <span className=\"component-time-separator\">:</span>\n <Input className=\"components-time-input\" onKeyDown={handleSecondsOnKeyDown} onBlur={handleSecondsOnBlur} onChange={handleSecondsChange} value={secondsText} disabled={readOnly} size=\"small\" />\n </>\n }\n {dayPeriodText &&\n <Input className=\"components-time-period-input\" onKeyDown={handleDayPeriodOnKeyDown} onBlur={handleDayPeriodOnBlur} onChange={handleDayPeriodChange} value={dayPeriodText} disabled={readOnly} size=\"small\" />\n }\n </div>;\n}\n"]}
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
align-items: center;
|
|
12
12
|
justify-content: flex-start;
|
|
13
13
|
background-color: $buic-background-control;
|
|
14
|
-
border: 1px solid
|
|
14
|
+
border: 1px solid var(--iui-color-border-foreground);
|
|
15
15
|
border-radius: var(--iui-border-radius-1);
|
|
16
16
|
box-shadow: var(--buic-inputs-boxshadow) 0px 1px 1px inset;
|
|
17
17
|
box-sizing: border-box;
|
|
18
18
|
|
|
19
19
|
&.has-error {
|
|
20
|
-
color:
|
|
20
|
+
color: var(--iui-color-text-negative);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.components-time-input {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
&:focus {
|
|
37
37
|
outline: 0px;
|
|
38
|
-
border: 1px solid
|
|
38
|
+
border: 1px solid var(--iui-color-border-foreground);
|
|
39
39
|
border-radius: var(--iui-border-radius-1);
|
|
40
40
|
border-color: var(--buic-foreground-focus-border);
|
|
41
41
|
box-shadow: var(--buic-focus-boxshadow-gradient1) 0px 1px 1px,
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
&:focus {
|
|
59
59
|
outline: 0px;
|
|
60
|
-
border: 1px solid
|
|
60
|
+
border: 1px solid var(--iui-color-border-foreground);
|
|
61
61
|
border-radius: var(--iui-border-radius-1);
|
|
62
62
|
border-color: var(--buic-foreground-focus-border);
|
|
63
63
|
box-shadow: var(--buic-focus-boxshadow-gradient1) 0px 1px 1px,
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanEditor.js","sourceRoot":"","sources":["../../../../src/components-react/editors/BooleanEditor.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG
|
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,qBAAqB,CAAC,CAAC;AACpF,6CAAqB,CAAC,cAAc,CAAC,kCAAiB,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyEditors\n */\n\nimport \"./BooleanEditor.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { PropertyValue, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\nimport { Checkbox } from \"@itwin/itwinui-react\";\nimport { PropertyEditorProps, TypeEditor } from \"./EditorContainer\";\nimport { PropertyEditorBase, PropertyEditorManager } from \"./PropertyEditorManager\";\n\n/** @internal */\ninterface BooleanEditorState {\n checkboxValue: boolean;\n isDisabled?: boolean;\n}\n\n/** BooleanEditor React component that is a property editor with checkbox input\n * @public\n */\nexport class BooleanEditor extends React.PureComponent<PropertyEditorProps, BooleanEditorState> implements TypeEditor {\n private _isMounted = false;\n private _inputElement = React.createRef<HTMLInputElement>();\n\n /** @internal */\n public override readonly state: Readonly<BooleanEditorState> = {\n checkboxValue: false,\n isDisabled: false,\n };\n\n public async getPropertyValue(): Promise<PropertyValue | undefined> {\n return this.getPropertyValueSync();\n }\n\n private getPropertyValueSync(): PropertyValue | undefined {\n const record = this.props.propertyRecord;\n let propertyValue: PropertyValue | undefined;\n\n // istanbul ignore else\n if (record && record.value.valueFormat === PropertyValueFormat.Primitive) {\n propertyValue = {\n valueFormat: PropertyValueFormat.Primitive,\n value: this.state.checkboxValue,\n displayValue: \"\",\n };\n }\n\n return propertyValue;\n }\n\n public get htmlElement(): HTMLElement | null {\n return this._inputElement.current;\n }\n\n public get hasFocus(): boolean {\n return document.activeElement === this._inputElement.current;\n }\n\n private _updateCheckboxValue = (e: React.ChangeEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (this._isMounted) {\n const checkboxValue = !!e.target.checked;\n\n this.setState({\n checkboxValue,\n }, () => {\n // istanbul ignore else\n if (this.props.propertyRecord && this.props.onCommit) {\n const propertyValue = this.getPropertyValueSync();\n // istanbul ignore else\n if (propertyValue !== undefined) {\n this.props.onCommit({ propertyRecord: this.props.propertyRecord, newValue: propertyValue });\n }\n }\n });\n }\n };\n\n /** @internal */\n public override componentDidMount() {\n this._isMounted = true;\n this.setStateFromProps();\n }\n\n /** @internal */\n public override componentWillUnmount() {\n this._isMounted = false;\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: PropertyEditorProps) {\n if (this.props.propertyRecord !== prevProps.propertyRecord) {\n this.setStateFromProps();\n }\n }\n\n private setStateFromProps() {\n const { propertyRecord } = this.props;\n let checkboxValue = false;\n let isDisabled = false;\n\n // istanbul ignore else\n if (propertyRecord && propertyRecord.value.valueFormat === PropertyValueFormat.Primitive) {\n const primitiveValue = propertyRecord.value.value;\n checkboxValue = primitiveValue as boolean;\n }\n\n // istanbul ignore else\n if (propertyRecord && propertyRecord.isDisabled)\n isDisabled = propertyRecord.isDisabled;\n\n // istanbul ignore else\n if (this._isMounted)\n this.setState({ checkboxValue, isDisabled });\n }\n\n /** @internal */\n public override render() {\n const className = classnames(\"components-cell-editor\", \"components-boolean-editor\", this.props.className);\n const checked = this.state.checkboxValue;\n const isDisabled = !!this.state.isDisabled;\n\n return (\n <Checkbox\n ref={this._inputElement}\n onBlur={this.props.onBlur}\n className={className}\n style={this.props.style}\n checked={checked}\n onChange={this._updateCheckboxValue}\n setFocus={this.props.setFocus}\n disabled={isDisabled}\n data-testid=\"components-checkbox-editor\">\n </Checkbox>\n );\n }\n}\n\n/** Boolean Property Editor registered for the \"bool\" and \"boolean\" type names.\n * It uses the [[BooleanEditor]] React component.\n * @public\n */\nexport class BooleanPropertyEditor extends PropertyEditorBase {\n // istanbul ignore next\n public override get containerHandlesBlur(): boolean {\n return false;\n }\n\n public get reactNode(): React.ReactNode {\n return <BooleanEditor />;\n }\n}\n\nPropertyEditorManager.registerEditor(StandardTypeNames.Bool, BooleanPropertyEditor);\nPropertyEditorManager.registerEditor(StandardTypeNames.Boolean, BooleanPropertyEditor);\n"]}
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -56,10 +60,9 @@ class CustomNumberEditor extends React.PureComponent {
|
|
|
56
60
|
this._applyUpdatedValue(e.target.value);
|
|
57
61
|
};
|
|
58
62
|
this._onKeyPress = (e) => {
|
|
59
|
-
var _a;
|
|
60
63
|
// istanbul ignore else
|
|
61
64
|
if (e.key === appui_abstract_1.SpecialKey.Escape) {
|
|
62
|
-
const initialDisplayValue = (
|
|
65
|
+
const initialDisplayValue = (this._lastValidValue && this._lastValidValue.displayValue) ?? ( /* istanbul ignore next */this._getInitialDisplayValue());
|
|
63
66
|
if (initialDisplayValue !== this.state.inputValue) {
|
|
64
67
|
e.preventDefault();
|
|
65
68
|
e.stopPropagation();
|
|
@@ -237,8 +240,7 @@ class CustomNumberEditor extends React.PureComponent {
|
|
|
237
240
|
this.setState({ inputValue: initialDisplayValue, size, maxLength, iconSpec });
|
|
238
241
|
}
|
|
239
242
|
_resetToLastValidDisplayValue() {
|
|
240
|
-
|
|
241
|
-
const initialDisplayValue = (_a = (this._lastValidValue && this._lastValidValue.displayValue)) !== null && _a !== void 0 ? _a : ( /* istanbul ignore next */this._getInitialDisplayValue());
|
|
243
|
+
const initialDisplayValue = (this._lastValidValue && this._lastValidValue.displayValue) ?? ( /* istanbul ignore next */this._getInitialDisplayValue());
|
|
242
244
|
this.setState({ inputValue: initialDisplayValue });
|
|
243
245
|
}
|
|
244
246
|
/** @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,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC,CAAC;QAqGM,gBAAW,GAAG,CAAC,CAAwC,EAAE,EAAE;;YACjE,uBAAuB;YACvB,IAAI,CAAC,CAAC,GAAG,KAAK,2BAAU,CAAC,MAAM,EAAE;gBAC/B,MAAM,mBAAmB,GAAG,MAAA,CAAC,IAAI,CAAC,eAAe,IAAK,IAAI,CAAC,eAAkC,CAAC,YAAY,CAAC,mCAAI,EAAC,0BAA2B,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;gBAC3K,IAAI,mBAAmB,KAAK,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;oBACjD,CAAC,C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,IAAI,CAAC,WAAW;SAC5B,CAAC;QAEF,IAAI,SAA0B,CAAC;QAC/B,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACvB,MAAM,IAAI,GAAG,oBAAC,iBAAI,IAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAI,CAAC;YACrD,SAAS,GAAG,CACV,oBAAC,sBAAS,OACJ,UAAU,EACd,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,IAAI,EAAE,IAAI,iBACE,gCAAgC,GAC5C,CACH,CAAC;SACH;aAAM;YACL,uFAAuF;YACvF,SAAS,GAAG,CACV,oBAAC,qBAAK,OACA,UAAU,EACd,GAAG,EAAE,IAAI,CAAC,aAAa,iBACX,gCAAgC,EAC5C,IAAI,EAAC,OAAO,GACZ,CACH,CAAC;SACH;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AArRD,gDAqRC;AAED;;;GAGG;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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyEditors\n */\n\n// cSpell:ignore customnumber testid\n\nimport \"./CustomNumberEditor.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport {\n CustomFormattedNumberParams, IconEditorParams, InputEditorSizeParams, MessageSeverity, PrimitiveValue, PropertyEditorParams, PropertyEditorParamTypes,\n PropertyRecord, PropertyValue, PropertyValueFormat, SpecialKey, StandardEditorNames, StandardTypeNames, UiAdmin,\n} from \"@itwin/appui-abstract\";\nimport { Icon, IconInput } from \"@itwin/core-react\";\nimport { Input, InputProps } from \"@itwin/itwinui-react\";\n\nimport { UiComponents } from \"../UiComponents\";\nimport { PropertyEditorProps, TypeEditor } from \"./EditorContainer\";\nimport { PropertyEditorBase, PropertyEditorManager } from \"./PropertyEditorManager\";\n\n/** @internal */\ninterface CustomNumberEditorState {\n inputValue: string;\n size?: number;\n maxLength?: number;\n iconSpec?: string;\n}\n\n/** CustomNumberEditor is a React component that is a property editor for numbers that specify custom formatting and parsing functions.\n * @alpha\n */\nexport class CustomNumberEditor extends React.PureComponent<PropertyEditorProps, CustomNumberEditorState> implements TypeEditor {\n private _isMounted = false;\n private _formatParams: CustomFormattedNumberParams | undefined;\n private _inputElement = React.createRef<HTMLInputElement>();\n private _lastValidValue: PropertyValue | undefined;\n\n /** @internal */\n public override readonly state: Readonly<CustomNumberEditorState> = {\n inputValue: \"\",\n };\n\n public async getPropertyValue(): Promise<PropertyValue | undefined> {\n const record = this.props.propertyRecord as PropertyRecord;\n let propertyValue: PropertyValue | undefined;\n\n if (record.isReadonly) {\n return {\n valueFormat: PropertyValueFormat.Primitive,\n value: (record.value as PrimitiveValue).value,\n displayValue: (record.value as PrimitiveValue).displayValue,\n };\n }\n\n // istanbul ignore else\n if (record && record.value.valueFormat === PropertyValueFormat.Primitive) {\n const parseResults = (this._formatParams as CustomFormattedNumberParams).parseFunction(this.state.inputValue);\n if (!parseResults.parseError && undefined !== parseResults.value) {\n const newDisplayValue = (this._formatParams as CustomFormattedNumberParams).formatFunction(parseResults.value as number);\n propertyValue = {\n valueFormat: PropertyValueFormat.Primitive,\n value: parseResults.value,\n displayValue: newDisplayValue,\n };\n this._lastValidValue = { ...propertyValue };\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\"\n // istanbul ignore else\n if (newDisplayValue !== this.state.inputValue) {\n this.setState({ inputValue: newDisplayValue });\n }\n } else {\n // istanbul ignore else\n if (this.htmlElement) {\n UiAdmin.messagePresenter.displayInputFieldMessage(this.htmlElement, MessageSeverity.Error, parseResults.parseError ? parseResults.parseError : /* istanbul ignore next */ UiComponents.translate(\"errors.unable-to-parse-quantity\"));\n this.htmlElement.focus();\n } else {\n UiAdmin.messagePresenter.displayMessage(MessageSeverity.Error, parseResults.parseError ? parseResults.parseError : /* istanbul ignore next */ UiComponents.translate(\"errors.unable-to-parse-quantity\"));\n }\n\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);\n propertyValue = this._lastValidValue ? { ...this._lastValidValue } : /* istanbul ignore next */ {\n valueFormat: PropertyValueFormat.Primitive,\n value: record.value.value,\n displayValue,\n };\n }\n }\n\n return propertyValue;\n }\n\n public get htmlElement(): HTMLElement | null {\n return this._inputElement.current;\n }\n\n public get hasFocus(): boolean {\n return document.activeElement === this._inputElement.current;\n }\n\n private shouldSetFocus(): boolean {\n if (!this.props.setFocus)\n return false;\n\n const record = this.props.propertyRecord as PropertyRecord;\n const disabled = (record && !record.isDisabled) ? false : true;\n const readonly = (record && !record.isReadonly) ? false : true;\n\n return (!disabled && !readonly);\n }\n\n private _applyUpdatedValue(userInput: string) {\n const record = this.props.propertyRecord as PropertyRecord;\n const readonly = (record && !record.isReadonly) ? false : true;\n const disabled = (record && !record.isDisabled) ? false : true;\n\n if (readonly || disabled)\n return;\n\n // istanbul ignore else\n if (this._isMounted)\n this.setState({\n inputValue: userInput,\n });\n }\n\n private _updateInputValue = (e: React.ChangeEvent<HTMLInputElement>) => {\n this._applyUpdatedValue(e.target.value);\n };\n\n /** @internal */\n public override componentDidMount() {\n this._isMounted = true;\n this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n\n /** @internal */\n public override componentWillUnmount() {\n this._isMounted = false;\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: PropertyEditorProps) {\n if (this.props.propertyRecord !== prevProps.propertyRecord) {\n this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n }\n\n private _getInitialDisplayValue(): string {\n const record = this.props.propertyRecord;\n let initialDisplayValue = \"\";\n let numberValue = 0;\n // istanbul ignore else\n if (record) {\n // istanbul ignore else\n if (record.value.valueFormat === PropertyValueFormat.Primitive) {\n const primitiveValue = record.value;\n numberValue = (undefined !== primitiveValue.value) ? primitiveValue.value as number : /* istanbul ignore next */ 0;\n // istanbul ignore else\n if (primitiveValue.displayValue)\n initialDisplayValue = primitiveValue.displayValue;\n else\n initialDisplayValue = (this._formatParams as CustomFormattedNumberParams).formatFunction(numberValue);\n }\n }\n\n return initialDisplayValue;\n }\n\n private async setStateFromProps() {\n const record = this.props.propertyRecord;\n // istanbul ignore next\n if (!record || !record.property) {\n Logger.logError(UiComponents.loggerCategory(this), \"PropertyRecord must be defined to use CustomNumberPropertyEditor\");\n // eslint-disable-next-line no-console\n // console.log(\"PropertyRecord must be defined to use CustomNumberPropertyEditor\");\n return;\n }\n // istanbul ignore else\n if (record.property && record.property.editor && record.property.editor.params) {\n this._formatParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.CustomFormattedNumber) as CustomFormattedNumberParams;\n }\n\n if (!this._formatParams) {\n Logger.logError(UiComponents.loggerCategory(this), `CustomFormattedNumberParams must be defined for property ${record.property.name}`);\n // eslint-disable-next-line no-console\n // console.log(`CustomFormattedNumberParams must be defined for property ${record!.property!.name}`);\n return;\n }\n\n const initialDisplayValue = this._getInitialDisplayValue();\n this._lastValidValue = {\n valueFormat: PropertyValueFormat.Primitive,\n value: (record.value as PrimitiveValue).value,\n displayValue: initialDisplayValue,\n };\n let size: number | undefined;\n let maxLength: number | undefined;\n let iconSpec: string | undefined;\n\n // istanbul ignore else\n if (record.property && record.property.editor && record.property.editor.params) {\n const editorSizeParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.InputEditorSize) as InputEditorSizeParams;\n // istanbul ignore else\n if (editorSizeParams) {\n // istanbul ignore else\n if (editorSizeParams.size)\n size = editorSizeParams.size;\n // istanbul ignore else\n if (editorSizeParams.maxLength)\n maxLength = editorSizeParams.maxLength;\n }\n\n const iconParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.Icon) as IconEditorParams;\n if (iconParams) {\n iconSpec = iconParams.definition.iconSpec;\n }\n }\n\n // istanbul ignore else\n if (this._isMounted)\n this.setState({ inputValue: initialDisplayValue, size, maxLength, iconSpec });\n }\n\n private _resetToLastValidDisplayValue() {\n const initialDisplayValue = (this._lastValidValue && (this._lastValidValue as PrimitiveValue).displayValue) ?? (/* istanbul ignore next */ this._getInitialDisplayValue());\n this.setState({ inputValue: initialDisplayValue });\n }\n\n private _onKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (e.key === SpecialKey.Escape) {\n const initialDisplayValue = (this._lastValidValue && (this._lastValidValue as PrimitiveValue).displayValue) ?? (/* istanbul ignore next */ this._getInitialDisplayValue());\n if (initialDisplayValue !== this.state.inputValue) {\n e.preventDefault();\n e.stopPropagation();\n this._resetToLastValidDisplayValue();\n } else {\n // istanbul ignore else\n if (this.props.onCancel)\n this.props.onCancel();\n }\n }\n\n // istanbul ignore else\n if (e.key !== SpecialKey.Enter) {\n UiAdmin.messagePresenter.closeInputFieldMessage();\n }\n };\n\n // istanbul ignore next\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n e.target.select();\n };\n\n /** @internal */\n public override render(): React.ReactNode {\n const minSize = this.state.size ? this.state.size : 8;\n const minWidthStyle: React.CSSProperties = {\n minWidth: `${minSize * 0.75}em`,\n };\n const record = this.props.propertyRecord as PropertyRecord;\n if (!record || !this._formatParams)\n return null;\n\n const readOnly = !record.isReadonly ? false : true;\n const disabled = !record.isDisabled ? false : true;\n\n const className = classnames(\"components-cell-editor\", \"components-customnumber-editor\", this.props.className);\n\n const inputProps: Omit<InputProps, \"size\"> = { // eslint-disable-line deprecation/deprecation\n className,\n style: this.props.style ? this.props.style : minWidthStyle,\n readOnly,\n disabled,\n maxLength: this.state.maxLength,\n value: this.state.inputValue,\n onChange: this._updateInputValue,\n onBlur: this.props.onBlur,\n onFocus: this._onFocus,\n setFocus: this.shouldSetFocus(),\n onKeyDown: this._onKeyPress,\n };\n\n let reactNode: React.ReactNode;\n if (this.state.iconSpec) {\n const icon = <Icon iconSpec={this.state.iconSpec} />;\n reactNode = (\n <IconInput\n {...inputProps}\n ref={this._inputElement}\n icon={icon}\n data-testid=\"components-customnumber-editor\"\n />\n );\n } else {\n // NEEDSWORK: still using core-react Input component because of `nativeKeyHandler` prop\n reactNode = (\n <Input\n {...inputProps}\n ref={this._inputElement}\n data-testid=\"components-customnumber-editor\"\n size=\"small\"\n />\n );\n }\n\n return reactNode;\n }\n}\n\n/** Custom Property Editor registered for the \"number\" type name and the \"number-custom\" editor name.\n * It uses the [[CustomNumberEditor]] React component.\n * @alpha\n */\nexport class CustomNumberPropertyEditor extends PropertyEditorBase {\n public get reactNode(): React.ReactNode {\n return <CustomNumberEditor />;\n }\n public override get containerHandlesEscape(): boolean {\n return false;\n }\n}\nPropertyEditorManager.registerEditor(StandardTypeNames.Number, CustomNumberPropertyEditor, StandardEditorNames.NumberCustom);\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;AAC7C,0DAG+B;AAC/B,kDAAoD;AACpD,wDAAyD;AAEzD,kDAA+C;AAE/C,mEAAoF;AAUpF;;GAEG;AACH,MAAa,kBAAmB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AArRD,gDAqRC;AAED;;;GAGG;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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyEditors\n */\n\n// cSpell:ignore customnumber testid\n\nimport \"./CustomNumberEditor.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport {\n CustomFormattedNumberParams, IconEditorParams, InputEditorSizeParams, MessageSeverity, PrimitiveValue, PropertyEditorParams, PropertyEditorParamTypes,\n PropertyRecord, PropertyValue, PropertyValueFormat, SpecialKey, StandardEditorNames, StandardTypeNames, UiAdmin,\n} from \"@itwin/appui-abstract\";\nimport { Icon, IconInput } from \"@itwin/core-react\";\nimport { Input, InputProps } from \"@itwin/itwinui-react\";\n\nimport { UiComponents } from \"../UiComponents\";\nimport { PropertyEditorProps, TypeEditor } from \"./EditorContainer\";\nimport { PropertyEditorBase, PropertyEditorManager } from \"./PropertyEditorManager\";\n\n/** @internal */\ninterface CustomNumberEditorState {\n inputValue: string;\n size?: number;\n maxLength?: number;\n iconSpec?: string;\n}\n\n/** CustomNumberEditor is a React component that is a property editor for numbers that specify custom formatting and parsing functions.\n * @alpha\n */\nexport class CustomNumberEditor extends React.PureComponent<PropertyEditorProps, CustomNumberEditorState> implements TypeEditor {\n private _isMounted = false;\n private _formatParams: CustomFormattedNumberParams | undefined;\n private _inputElement = React.createRef<HTMLInputElement>();\n private _lastValidValue: PropertyValue | undefined;\n\n /** @internal */\n public override readonly state: Readonly<CustomNumberEditorState> = {\n inputValue: \"\",\n };\n\n public async getPropertyValue(): Promise<PropertyValue | undefined> {\n const record = this.props.propertyRecord as PropertyRecord;\n let propertyValue: PropertyValue | undefined;\n\n if (record.isReadonly) {\n return {\n valueFormat: PropertyValueFormat.Primitive,\n value: (record.value as PrimitiveValue).value,\n displayValue: (record.value as PrimitiveValue).displayValue,\n };\n }\n\n // istanbul ignore else\n if (record && record.value.valueFormat === PropertyValueFormat.Primitive) {\n const parseResults = (this._formatParams as CustomFormattedNumberParams).parseFunction(this.state.inputValue);\n if (!parseResults.parseError && undefined !== parseResults.value) {\n const newDisplayValue = (this._formatParams as CustomFormattedNumberParams).formatFunction(parseResults.value as number);\n propertyValue = {\n valueFormat: PropertyValueFormat.Primitive,\n value: parseResults.value,\n displayValue: newDisplayValue,\n };\n this._lastValidValue = { ...propertyValue };\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\"\n // istanbul ignore else\n if (newDisplayValue !== this.state.inputValue) {\n this.setState({ inputValue: newDisplayValue });\n }\n } else {\n // istanbul ignore else\n if (this.htmlElement) {\n UiAdmin.messagePresenter.displayInputFieldMessage(this.htmlElement, MessageSeverity.Error, parseResults.parseError ? parseResults.parseError : /* istanbul ignore next */ UiComponents.translate(\"errors.unable-to-parse-quantity\"));\n this.htmlElement.focus();\n } else {\n UiAdmin.messagePresenter.displayMessage(MessageSeverity.Error, parseResults.parseError ? parseResults.parseError : /* istanbul ignore next */ UiComponents.translate(\"errors.unable-to-parse-quantity\"));\n }\n\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);\n propertyValue = this._lastValidValue ? { ...this._lastValidValue } : /* istanbul ignore next */ {\n valueFormat: PropertyValueFormat.Primitive,\n value: record.value.value,\n displayValue,\n };\n }\n }\n\n return propertyValue;\n }\n\n public get htmlElement(): HTMLElement | null {\n return this._inputElement.current;\n }\n\n public get hasFocus(): boolean {\n return document.activeElement === this._inputElement.current;\n }\n\n private shouldSetFocus(): boolean {\n if (!this.props.setFocus)\n return false;\n\n const record = this.props.propertyRecord as PropertyRecord;\n const disabled = (record && !record.isDisabled) ? false : true;\n const readonly = (record && !record.isReadonly) ? false : true;\n\n return (!disabled && !readonly);\n }\n\n private _applyUpdatedValue(userInput: string) {\n const record = this.props.propertyRecord as PropertyRecord;\n const readonly = (record && !record.isReadonly) ? false : true;\n const disabled = (record && !record.isDisabled) ? false : true;\n\n if (readonly || disabled)\n return;\n\n // istanbul ignore else\n if (this._isMounted)\n this.setState({\n inputValue: userInput,\n });\n }\n\n private _updateInputValue = (e: React.ChangeEvent<HTMLInputElement>) => {\n this._applyUpdatedValue(e.target.value);\n };\n\n /** @internal */\n public override componentDidMount() {\n this._isMounted = true;\n this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n\n /** @internal */\n public override componentWillUnmount() {\n this._isMounted = false;\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: PropertyEditorProps) {\n if (this.props.propertyRecord !== prevProps.propertyRecord) {\n this.setStateFromProps(); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n }\n\n private _getInitialDisplayValue(): string {\n const record = this.props.propertyRecord;\n let initialDisplayValue = \"\";\n let numberValue = 0;\n // istanbul ignore else\n if (record) {\n // istanbul ignore else\n if (record.value.valueFormat === PropertyValueFormat.Primitive) {\n const primitiveValue = record.value;\n numberValue = (undefined !== primitiveValue.value) ? primitiveValue.value as number : /* istanbul ignore next */ 0;\n // istanbul ignore else\n if (primitiveValue.displayValue)\n initialDisplayValue = primitiveValue.displayValue;\n else\n initialDisplayValue = (this._formatParams as CustomFormattedNumberParams).formatFunction(numberValue);\n }\n }\n\n return initialDisplayValue;\n }\n\n private async setStateFromProps() {\n const record = this.props.propertyRecord;\n // istanbul ignore next\n if (!record || !record.property) {\n Logger.logError(UiComponents.loggerCategory(this), \"PropertyRecord must be defined to use CustomNumberPropertyEditor\");\n // eslint-disable-next-line no-console\n // console.log(\"PropertyRecord must be defined to use CustomNumberPropertyEditor\");\n return;\n }\n // istanbul ignore else\n if (record.property && record.property.editor && record.property.editor.params) {\n this._formatParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.CustomFormattedNumber) as CustomFormattedNumberParams;\n }\n\n if (!this._formatParams) {\n Logger.logError(UiComponents.loggerCategory(this), `CustomFormattedNumberParams must be defined for property ${record.property.name}`);\n // eslint-disable-next-line no-console\n // console.log(`CustomFormattedNumberParams must be defined for property ${record!.property!.name}`);\n return;\n }\n\n const initialDisplayValue = this._getInitialDisplayValue();\n this._lastValidValue = {\n valueFormat: PropertyValueFormat.Primitive,\n value: (record.value as PrimitiveValue).value,\n displayValue: initialDisplayValue,\n };\n let size: number | undefined;\n let maxLength: number | undefined;\n let iconSpec: string | undefined;\n\n // istanbul ignore else\n if (record.property && record.property.editor && record.property.editor.params) {\n const editorSizeParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.InputEditorSize) as InputEditorSizeParams;\n // istanbul ignore else\n if (editorSizeParams) {\n // istanbul ignore else\n if (editorSizeParams.size)\n size = editorSizeParams.size;\n // istanbul ignore else\n if (editorSizeParams.maxLength)\n maxLength = editorSizeParams.maxLength;\n }\n\n const iconParams = record.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.Icon) as IconEditorParams;\n if (iconParams) {\n iconSpec = iconParams.definition.iconSpec;\n }\n }\n\n // istanbul ignore else\n if (this._isMounted)\n this.setState({ inputValue: initialDisplayValue, size, maxLength, iconSpec });\n }\n\n private _resetToLastValidDisplayValue() {\n const initialDisplayValue = (this._lastValidValue && (this._lastValidValue as PrimitiveValue).displayValue) ?? (/* istanbul ignore next */ this._getInitialDisplayValue());\n this.setState({ inputValue: initialDisplayValue });\n }\n\n private _onKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {\n // istanbul ignore else\n if (e.key === SpecialKey.Escape) {\n const initialDisplayValue = (this._lastValidValue && (this._lastValidValue as PrimitiveValue).displayValue) ?? (/* istanbul ignore next */ this._getInitialDisplayValue());\n if (initialDisplayValue !== this.state.inputValue) {\n e.preventDefault();\n e.stopPropagation();\n this._resetToLastValidDisplayValue();\n } else {\n // istanbul ignore else\n if (this.props.onCancel)\n this.props.onCancel();\n }\n }\n\n // istanbul ignore else\n if (e.key !== SpecialKey.Enter) {\n UiAdmin.messagePresenter.closeInputFieldMessage();\n }\n };\n\n // istanbul ignore next\n private _onFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n e.target.select();\n };\n\n /** @internal */\n public override render(): React.ReactNode {\n const minSize = this.state.size ? this.state.size : 8;\n const minWidthStyle: React.CSSProperties = {\n minWidth: `${minSize * 0.75}em`,\n };\n const record = this.props.propertyRecord as PropertyRecord;\n if (!record || !this._formatParams)\n return null;\n\n const readOnly = !record.isReadonly ? false : true;\n const disabled = !record.isDisabled ? false : true;\n\n const className = classnames(\"components-cell-editor\", \"components-customnumber-editor\", this.props.className);\n\n const inputProps: Omit<InputProps, \"size\"> = { // eslint-disable-line deprecation/deprecation\n className,\n style: this.props.style ? this.props.style : minWidthStyle,\n readOnly,\n disabled,\n maxLength: this.state.maxLength,\n value: this.state.inputValue,\n onChange: this._updateInputValue,\n onBlur: this.props.onBlur,\n onFocus: this._onFocus,\n setFocus: this.shouldSetFocus(),\n onKeyDown: this._onKeyPress,\n };\n\n let reactNode: React.ReactNode;\n if (this.state.iconSpec) {\n const icon = <Icon iconSpec={this.state.iconSpec} />;\n reactNode = (\n <IconInput\n {...inputProps}\n ref={this._inputElement}\n icon={icon}\n data-testid=\"components-customnumber-editor\"\n />\n );\n } else {\n // NEEDSWORK: still using core-react Input component because of `nativeKeyHandler` prop\n reactNode = (\n <Input\n {...inputProps}\n ref={this._inputElement}\n data-testid=\"components-customnumber-editor\"\n size=\"small\"\n />\n );\n }\n\n return reactNode;\n }\n}\n\n/** Custom Property Editor registered for the \"number\" type name and the \"number-custom\" editor name.\n * It uses the [[CustomNumberEditor]] React component.\n * @alpha\n */\nexport class CustomNumberPropertyEditor extends PropertyEditorBase {\n public get reactNode(): React.ReactNode {\n return <CustomNumberEditor />;\n }\n public override get containerHandlesEscape(): boolean {\n return false;\n }\n}\nPropertyEditorManager.registerEditor(StandardTypeNames.Number, CustomNumberPropertyEditor, StandardEditorNames.NumberCustom);\n"]}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/core-react/lib/cjs/core-react/style/variables";
|
|
6
5
|
@import "./variables";
|
|
7
6
|
|
|
8
7
|
.components-customnumber-editor {
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
.components-smallEditor-host {
|
|
15
14
|
.components-customnumber-editor {
|
|
16
15
|
&.iui-input {
|
|
17
|
-
min-height: $
|
|
16
|
+
min-height: $editor-component-height-small !important;
|
|
18
17
|
padding-top: 1px !important;
|
|
19
18
|
padding-bottom: 1px !important;
|
|
20
19
|
}
|