amis-ui 2.2.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/404.js +1 -1
- package/esm/components/Alert.js +1 -1
- package/esm/components/Alert2.js +1 -1
- package/esm/components/AnchorNav.js +2 -2
- package/esm/components/ArrayInput.js +1 -1
- package/esm/components/AsideNav.d.ts +11 -11
- package/esm/components/AsideNav.js +1 -1
- package/esm/components/AssociatedSelection.d.ts +40 -40
- package/esm/components/AssociatedSelection.js +3 -3
- package/esm/components/Avatar.js +1 -1
- package/esm/components/Badge.js +1 -1
- package/esm/components/BaiduMapPicker.js +1 -1
- package/esm/components/BarCode.js +1 -1
- package/esm/components/Breadcrumb.js +1 -1
- package/esm/components/Button.js +4 -5
- package/esm/components/CalendarMobile.js +1 -1
- package/esm/components/Card.js +1 -1
- package/esm/components/Cascader.js +1 -1
- package/esm/components/ChainedSelection.d.ts +40 -40
- package/esm/components/ChainedSelection.js +7 -5
- package/esm/components/Checkbox.js +1 -1
- package/esm/components/CityArea.js +1 -1
- package/esm/components/CityDB.js +1 -1
- package/esm/components/CodeMirror.js +1 -1
- package/esm/components/Collapse.js +1 -1
- package/esm/components/CollapseGroup.js +1 -1
- package/esm/components/ColorPicker.js +1 -1
- package/esm/components/ContextMenu.js +1 -1
- package/esm/components/DatePicker.js +1 -1
- package/esm/components/DateRangePicker.js +4 -2
- package/esm/components/Drawer.js +1 -1
- package/esm/components/Editor.js +1 -1
- package/esm/components/Form.js +1 -1
- package/esm/components/FormField.js +1 -1
- package/esm/components/GridNav.js +1 -1
- package/esm/components/GroupedSelection.d.ts +41 -41
- package/esm/components/GroupedSelection.js +12 -5
- package/esm/components/Html.js +1 -1
- package/esm/components/ImageGallery.d.ts +10 -3
- package/esm/components/ImageGallery.js +18 -6
- package/esm/components/Input.js +1 -1
- package/esm/components/InputBox.js +1 -1
- package/esm/components/InputBoxWithSuggestion.js +1 -1
- package/esm/components/Layout.js +1 -1
- package/esm/components/Link.js +1 -1
- package/esm/components/ListGroup.js +1 -1
- package/esm/components/ListMenu.js +1 -1
- package/esm/components/LocationPicker.js +1 -1
- package/esm/components/Markdown.js +1 -1
- package/esm/components/Modal.d.ts +18 -18
- package/esm/components/Modal.js +1 -1
- package/esm/components/ModalManager.js +1 -1
- package/esm/components/NumberInput.d.ts +19 -10
- package/esm/components/NumberInput.js +38 -9
- package/esm/components/Pagination.js +2 -2
- package/esm/components/Picker.js +1 -1
- package/esm/components/PickerColumn.js +1 -1
- package/esm/components/PickerContainer.js +1 -1
- package/esm/components/PopOverContainer.js +1 -1
- package/esm/components/PopUp.js +1 -1
- package/esm/components/Progress.js +1 -1
- package/esm/components/PullRefresh.js +1 -1
- package/esm/components/Radios.js +1 -1
- package/esm/components/Range.js +5 -3
- package/esm/components/Rating.js +1 -1
- package/esm/components/ResultBox.js +1 -1
- package/esm/components/ResultList.d.ts +45 -42
- package/esm/components/ResultList.js +10 -8
- package/esm/components/ResultTableList.d.ts +41 -40
- package/esm/components/ResultTableList.js +3 -3
- package/esm/components/ResultTreeList.d.ts +41 -40
- package/esm/components/ResultTreeList.js +4 -4
- package/esm/components/RichText.js +1 -1
- package/esm/components/SearchBox.js +1 -1
- package/esm/components/Select.d.ts +193 -193
- package/esm/components/Select.js +1 -1
- package/esm/components/Selection.d.ts +42 -40
- package/esm/components/Selection.js +6 -3
- package/esm/components/SparkLine.js +1 -1
- package/esm/components/Spinner.d.ts +23 -1
- package/esm/components/Spinner.js +122 -23
- package/esm/components/Steps.js +1 -1
- package/esm/components/Switch.js +1 -1
- package/esm/components/TableSelection.d.ts +40 -40
- package/esm/components/TableSelection.js +1 -1
- package/esm/components/Tabs.js +1 -1
- package/esm/components/TabsTransfer.js +1 -1
- package/esm/components/TabsTransferPicker.js +1 -1
- package/esm/components/Tag.js +1 -1
- package/esm/components/Textarea.js +2 -2
- package/esm/components/Timeline.js +1 -1
- package/esm/components/TimelineItem.js +1 -1
- package/esm/components/Tinymce.js +2 -2
- package/esm/components/TitleBar.js +1 -1
- package/esm/components/Toast.js +1 -1
- package/esm/components/Tooltip.js +1 -1
- package/esm/components/TooltipWrapper.js +1 -1
- package/esm/components/Transfer.d.ts +50 -50
- package/esm/components/Transfer.js +12 -12
- package/esm/components/TransferDropDown.d.ts +40 -40
- package/esm/components/TransferDropDown.js +1 -1
- package/esm/components/TransferPicker.js +1 -1
- package/esm/components/TransferSearch.d.ts +40 -42
- package/esm/components/TransferSearch.js +2 -8
- package/esm/components/Tree.js +3 -2
- package/esm/components/TreeSelection.d.ts +40 -40
- package/esm/components/TreeSelection.js +1 -1
- package/esm/components/UserSelect.d.ts +5 -1
- package/esm/components/UserSelect.js +87 -28
- package/esm/components/UserTabSelect.d.ts +4 -3
- package/esm/components/UserTabSelect.js +64 -18
- package/esm/components/WithRemoteConfig.js +1 -1
- package/esm/components/WithStore.js +1 -1
- package/esm/components/calendar/Calendar.js +1 -1
- package/esm/components/calendar/CalendarContainer.js +1 -1
- package/esm/components/calendar/DaysView.js +1 -1
- package/esm/components/calendar/MonthsView.js +1 -1
- package/esm/components/calendar/QuartersView.js +1 -1
- package/esm/components/calendar/TimeView.js +1 -1
- package/esm/components/calendar/YearsView.js +1 -1
- package/esm/components/condition-builder/Expression.d.ts +1 -0
- package/esm/components/condition-builder/Expression.js +3 -3
- package/esm/components/condition-builder/Field.d.ts +2 -1
- package/esm/components/condition-builder/Field.js +9 -5
- package/esm/components/condition-builder/Formula.js +1 -1
- package/esm/components/condition-builder/Func.js +1 -1
- package/esm/components/condition-builder/Group.d.ts +1 -0
- package/esm/components/condition-builder/Group.js +3 -3
- package/esm/components/condition-builder/GroupOrItem.d.ts +1 -0
- package/esm/components/condition-builder/GroupOrItem.js +3 -3
- package/esm/components/condition-builder/InputSwitch.js +1 -1
- package/esm/components/condition-builder/Item.d.ts +1 -0
- package/esm/components/condition-builder/Item.js +3 -3
- package/esm/components/condition-builder/Value.js +1 -1
- package/esm/components/condition-builder/config.js +1 -1
- package/esm/components/condition-builder/index.d.ts +1 -0
- package/esm/components/condition-builder/index.js +3 -3
- package/esm/components/formula/Editor.d.ts +2 -0
- package/esm/components/formula/Editor.js +17 -6
- package/esm/components/formula/FuncList.js +1 -1
- package/esm/components/formula/Picker.d.ts +65 -54
- package/esm/components/formula/Picker.js +22 -9
- package/esm/components/formula/VariableList.js +1 -1
- package/esm/components/formula/plugin.d.ts +1 -1
- package/esm/components/formula/plugin.js +6 -4
- package/esm/components/icons.js +1 -1
- package/esm/components/json-schema/Array.js +1 -1
- package/esm/components/json-schema/Item.js +1 -1
- package/esm/components/json-schema/Object.js +1 -1
- package/esm/components/json-schema/index.js +1 -1
- package/esm/components/schema-editor/Array.js +1 -1
- package/esm/components/schema-editor/Common.js +1 -1
- package/esm/components/schema-editor/Item.js +1 -1
- package/esm/components/schema-editor/Object.js +1 -1
- package/esm/components/schema-editor/SchemaVariableList.js +1 -1
- package/esm/components/schema-editor/SchemaVariableListPicker.js +1 -1
- package/esm/components/schema-editor/index.js +1 -1
- package/esm/components/table/Cell.js +1 -1
- package/esm/components/table/HeadCellDropDown.js +1 -1
- package/esm/components/table/HeadCellFilter.js +1 -1
- package/esm/components/table/HeadCellSelect.js +1 -1
- package/esm/components/table/HeadCellSort.js +1 -1
- package/esm/components/table/ItemActionsWrapper.js +1 -1
- package/esm/components/table/index.d.ts +49 -43
- package/esm/components/table/index.js +98 -51
- package/esm/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/esm/components/virtual-list/constants.js +1 -1
- package/esm/components/virtual-list/index.js +1 -1
- package/esm/hooks/use-set-state.js +1 -1
- package/esm/hooks/use-touch.js +1 -1
- package/esm/hooks/use-update-effect.js +1 -1
- package/esm/hooks/use-validation-resolver.js +1 -1
- package/esm/icons/alert-danger.svg.js +1 -1
- package/esm/icons/alert-info.svg.js +1 -1
- package/esm/icons/alert-success.svg.js +1 -1
- package/esm/icons/alert-warning.svg.js +1 -1
- package/esm/icons/back.svg.js +1 -1
- package/esm/icons/calendar.svg.js +1 -1
- package/esm/icons/caret.svg.js +1 -1
- package/esm/icons/check-circle.svg.js +1 -1
- package/esm/icons/check.svg.js +1 -1
- package/esm/icons/clock.svg.js +1 -1
- package/esm/icons/close-small.svg.js +1 -1
- package/esm/icons/close.svg.js +1 -1
- package/esm/icons/cloud-upload.svg.js +1 -1
- package/esm/icons/column-filter.svg.js +1 -1
- package/esm/icons/columns.svg.js +1 -1
- package/esm/icons/compress-alt.svg.js +1 -1
- package/esm/icons/copy.svg.js +1 -1
- package/esm/icons/date.svg.js +1 -1
- package/esm/icons/department.svg.js +1 -1
- package/esm/icons/desk-empty.svg.js +1 -1
- package/esm/icons/dot.svg.js +1 -1
- package/esm/icons/down-arrow-bold.svg.js +1 -1
- package/esm/icons/down.svg.js +1 -1
- package/esm/icons/download.svg.js +1 -1
- package/esm/icons/drag-bar.svg.js +1 -1
- package/esm/icons/drag.svg.js +1 -1
- package/esm/icons/edit.svg.js +1 -1
- package/esm/icons/ellipsis-v.svg.js +1 -1
- package/esm/icons/enter.svg.js +1 -1
- package/esm/icons/exchange.svg.js +1 -1
- package/esm/icons/expand-alt.svg.js +1 -1
- package/esm/icons/fail.svg.js +1 -1
- package/esm/icons/file.svg.js +1 -1
- package/esm/icons/filter.svg.js +1 -1
- package/esm/icons/folder.svg.js +1 -1
- package/esm/icons/function.svg.js +1 -1
- package/esm/icons/home.svg.js +1 -1
- package/esm/icons/image.svg.js +1 -1
- package/esm/icons/info-circle.svg.js +1 -1
- package/esm/icons/info.svg.js +1 -1
- package/esm/icons/input-clear.svg.js +1 -1
- package/esm/icons/invisible.svg.js +1 -1
- package/esm/icons/left-arrow.svg.js +1 -1
- package/esm/icons/loading-outline.svg.js +1 -1
- package/esm/icons/location.svg.js +1 -1
- package/esm/icons/menu.svg.js +1 -1
- package/esm/icons/minus.svg.js +1 -1
- package/esm/icons/move.svg.js +1 -1
- package/esm/icons/mute.svg.js +1 -1
- package/esm/icons/new-edit.svg.js +1 -1
- package/esm/icons/pause.svg.js +1 -1
- package/esm/icons/pencil.svg.js +1 -1
- package/esm/icons/play.svg.js +1 -1
- package/esm/icons/plus-cicle.svg.js +1 -1
- package/esm/icons/plus-fine.svg.js +1 -1
- package/esm/icons/plus.svg.js +1 -1
- package/esm/icons/post.svg.js +1 -1
- package/esm/icons/question-mark.svg.js +1 -1
- package/esm/icons/question.svg.js +1 -1
- package/esm/icons/redo.svg.js +1 -1
- package/esm/icons/refresh.svg.js +1 -1
- package/esm/icons/reload.svg.js +1 -1
- package/esm/icons/remove.svg.js +1 -1
- package/esm/icons/retry.svg.js +1 -1
- package/esm/icons/right-arrow-bold.svg.js +1 -1
- package/esm/icons/right-arrow.svg.js +1 -1
- package/esm/icons/right-double-arrow.svg.js +1 -1
- package/esm/icons/role.svg.js +1 -1
- package/esm/icons/rotate-left.svg.js +1 -1
- package/esm/icons/rotate-right.svg.js +1 -1
- package/esm/icons/scale-origin.svg.js +1 -1
- package/esm/icons/schedule.svg.js +1 -1
- package/esm/icons/search.svg.js +1 -1
- package/esm/icons/setting.svg.js +1 -1
- package/esm/icons/slider-handle-icon.svg.js +1 -1
- package/esm/icons/sort-asc.svg.js +1 -1
- package/esm/icons/sort-default.svg.js +1 -1
- package/esm/icons/sort-desc.svg.js +1 -1
- package/esm/icons/star.svg.js +1 -1
- package/esm/icons/status-close.svg.js +1 -1
- package/esm/icons/status-fail.svg.js +1 -1
- package/esm/icons/status-info.svg.js +1 -1
- package/esm/icons/status-success.svg.js +1 -1
- package/esm/icons/status-warning.svg.js +1 -1
- package/esm/icons/steps-finsh.svg.js +1 -1
- package/esm/icons/success.svg.js +1 -1
- package/esm/icons/transparent.svg.js +1 -1
- package/esm/icons/trash.svg.js +1 -1
- package/esm/icons/tree-down.svg.js +1 -1
- package/esm/icons/undo.svg.js +1 -1
- package/esm/icons/upload.svg.js +1 -1
- package/esm/icons/user-remove.svg.js +1 -1
- package/esm/icons/view.svg.js +1 -1
- package/esm/icons/volume.svg.js +1 -1
- package/esm/icons/warning-mark.svg.js +1 -1
- package/esm/icons/warning.svg.js +1 -1
- package/esm/icons/window-restore.svg.js +1 -1
- package/esm/icons/zoom-in.svg.js +1 -1
- package/esm/icons/zoom-out.svg.js +1 -1
- package/esm/index.js +1 -1
- package/esm/locale/de-DE.js +8 -2
- package/esm/locale/en-US.js +8 -3
- package/esm/locale/zh-CN.js +8 -3
- package/esm/themes/ang.js +1 -1
- package/esm/themes/antd.js +1 -1
- package/esm/themes/cxd.js +1 -1
- package/esm/themes/dark.js +1 -1
- package/lib/components/404.js +1 -1
- package/lib/components/Alert.js +1 -1
- package/lib/components/Alert2.js +1 -1
- package/lib/components/AnchorNav.js +2 -2
- package/lib/components/ArrayInput.js +1 -1
- package/lib/components/AsideNav.d.ts +11 -11
- package/lib/components/AsideNav.js +1 -1
- package/lib/components/AssociatedSelection.d.ts +40 -40
- package/lib/components/AssociatedSelection.js +3 -3
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Badge.js +1 -1
- package/lib/components/BaiduMapPicker.js +1 -1
- package/lib/components/BarCode.js +1 -1
- package/lib/components/Breadcrumb.js +1 -1
- package/lib/components/Button.js +4 -5
- package/lib/components/CalendarMobile.js +1 -1
- package/lib/components/Card.js +1 -1
- package/lib/components/Cascader.js +1 -1
- package/lib/components/ChainedSelection.d.ts +40 -40
- package/lib/components/ChainedSelection.js +7 -5
- package/lib/components/Checkbox.js +1 -1
- package/lib/components/CityArea.js +1 -1
- package/lib/components/CityDB.js +1 -1
- package/lib/components/CodeMirror.js +1 -1
- package/lib/components/Collapse.js +1 -1
- package/lib/components/CollapseGroup.js +1 -1
- package/lib/components/ColorPicker.js +1 -1
- package/lib/components/ContextMenu.js +1 -1
- package/lib/components/DatePicker.js +1 -1
- package/lib/components/DateRangePicker.js +4 -2
- package/lib/components/Drawer.js +1 -1
- package/lib/components/Editor.js +1 -1
- package/lib/components/Form.js +1 -1
- package/lib/components/FormField.js +1 -1
- package/lib/components/GridNav.js +1 -1
- package/lib/components/GroupedSelection.d.ts +41 -41
- package/lib/components/GroupedSelection.js +12 -5
- package/lib/components/Html.js +1 -1
- package/lib/components/ImageGallery.d.ts +10 -3
- package/lib/components/ImageGallery.js +18 -6
- package/lib/components/Input.js +1 -1
- package/lib/components/InputBox.js +1 -1
- package/lib/components/InputBoxWithSuggestion.js +1 -1
- package/lib/components/Layout.js +1 -1
- package/lib/components/Link.js +1 -1
- package/lib/components/ListGroup.js +1 -1
- package/lib/components/ListMenu.js +1 -1
- package/lib/components/LocationPicker.js +1 -1
- package/lib/components/Markdown.js +1 -1
- package/lib/components/Modal.d.ts +18 -18
- package/lib/components/Modal.js +1 -1
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/NumberInput.d.ts +19 -10
- package/lib/components/NumberInput.js +38 -9
- package/lib/components/Pagination.js +2 -2
- package/lib/components/Picker.js +1 -1
- package/lib/components/PickerColumn.js +1 -1
- package/lib/components/PickerContainer.js +1 -1
- package/lib/components/PopOverContainer.js +1 -1
- package/lib/components/PopUp.js +1 -1
- package/lib/components/Progress.js +1 -1
- package/lib/components/PullRefresh.js +1 -1
- package/lib/components/Radios.js +1 -1
- package/lib/components/Range.js +5 -3
- package/lib/components/Rating.js +1 -1
- package/lib/components/ResultBox.js +1 -1
- package/lib/components/ResultList.d.ts +45 -42
- package/lib/components/ResultList.js +10 -8
- package/lib/components/ResultTableList.d.ts +41 -40
- package/lib/components/ResultTableList.js +3 -3
- package/lib/components/ResultTreeList.d.ts +41 -40
- package/lib/components/ResultTreeList.js +4 -4
- package/lib/components/RichText.js +1 -1
- package/lib/components/SearchBox.js +1 -1
- package/lib/components/Select.d.ts +193 -193
- package/lib/components/Select.js +1 -1
- package/lib/components/Selection.d.ts +42 -40
- package/lib/components/Selection.js +6 -3
- package/lib/components/SparkLine.js +1 -1
- package/lib/components/Spinner.d.ts +23 -1
- package/lib/components/Spinner.js +122 -23
- package/lib/components/Steps.js +1 -1
- package/lib/components/Switch.js +1 -1
- package/lib/components/TableSelection.d.ts +40 -40
- package/lib/components/TableSelection.js +1 -1
- package/lib/components/Tabs.js +1 -1
- package/lib/components/TabsTransfer.js +1 -1
- package/lib/components/TabsTransferPicker.js +1 -1
- package/lib/components/Tag.js +1 -1
- package/lib/components/Textarea.js +2 -2
- package/lib/components/Timeline.js +1 -1
- package/lib/components/TimelineItem.js +1 -1
- package/lib/components/Tinymce.js +2 -2
- package/lib/components/TitleBar.js +1 -1
- package/lib/components/Toast.js +1 -1
- package/lib/components/Tooltip.js +1 -1
- package/lib/components/TooltipWrapper.js +1 -1
- package/lib/components/Transfer.d.ts +50 -50
- package/lib/components/Transfer.js +12 -12
- package/lib/components/TransferDropDown.d.ts +40 -40
- package/lib/components/TransferDropDown.js +1 -1
- package/lib/components/TransferPicker.js +1 -1
- package/lib/components/TransferSearch.d.ts +40 -42
- package/lib/components/TransferSearch.js +2 -8
- package/lib/components/Tree.js +3 -2
- package/lib/components/TreeSelection.d.ts +40 -40
- package/lib/components/TreeSelection.js +1 -1
- package/lib/components/UserSelect.d.ts +5 -1
- package/lib/components/UserSelect.js +86 -27
- package/lib/components/UserTabSelect.d.ts +4 -3
- package/lib/components/UserTabSelect.js +64 -18
- package/lib/components/WithRemoteConfig.js +1 -1
- package/lib/components/WithStore.js +1 -1
- package/lib/components/calendar/Calendar.js +1 -1
- package/lib/components/calendar/CalendarContainer.js +1 -1
- package/lib/components/calendar/DaysView.js +1 -1
- package/lib/components/calendar/MonthsView.js +1 -1
- package/lib/components/calendar/QuartersView.js +1 -1
- package/lib/components/calendar/TimeView.js +1 -1
- package/lib/components/calendar/YearsView.js +1 -1
- package/lib/components/condition-builder/Expression.d.ts +1 -0
- package/lib/components/condition-builder/Expression.js +3 -3
- package/lib/components/condition-builder/Field.d.ts +2 -1
- package/lib/components/condition-builder/Field.js +9 -5
- package/lib/components/condition-builder/Formula.js +1 -1
- package/lib/components/condition-builder/Func.js +1 -1
- package/lib/components/condition-builder/Group.d.ts +1 -0
- package/lib/components/condition-builder/Group.js +3 -3
- package/lib/components/condition-builder/GroupOrItem.d.ts +1 -0
- package/lib/components/condition-builder/GroupOrItem.js +3 -3
- package/lib/components/condition-builder/InputSwitch.js +1 -1
- package/lib/components/condition-builder/Item.d.ts +1 -0
- package/lib/components/condition-builder/Item.js +3 -3
- package/lib/components/condition-builder/Value.js +1 -1
- package/lib/components/condition-builder/config.js +1 -1
- package/lib/components/condition-builder/index.d.ts +1 -0
- package/lib/components/condition-builder/index.js +3 -3
- package/lib/components/formula/Editor.d.ts +2 -0
- package/lib/components/formula/Editor.js +17 -6
- package/lib/components/formula/FuncList.js +1 -1
- package/lib/components/formula/Picker.d.ts +65 -54
- package/lib/components/formula/Picker.js +22 -9
- package/lib/components/formula/VariableList.js +1 -1
- package/lib/components/formula/plugin.d.ts +1 -1
- package/lib/components/formula/plugin.js +6 -4
- package/lib/components/icons.js +1 -1
- package/lib/components/json-schema/Array.js +1 -1
- package/lib/components/json-schema/Item.js +1 -1
- package/lib/components/json-schema/Object.js +1 -1
- package/lib/components/json-schema/index.js +1 -1
- package/lib/components/schema-editor/Array.js +1 -1
- package/lib/components/schema-editor/Common.js +1 -1
- package/lib/components/schema-editor/Item.js +1 -1
- package/lib/components/schema-editor/Object.js +1 -1
- package/lib/components/schema-editor/SchemaVariableList.js +1 -1
- package/lib/components/schema-editor/SchemaVariableListPicker.js +1 -1
- package/lib/components/schema-editor/index.js +1 -1
- package/lib/components/table/Cell.js +1 -1
- package/lib/components/table/HeadCellDropDown.js +1 -1
- package/lib/components/table/HeadCellFilter.js +1 -1
- package/lib/components/table/HeadCellSelect.js +1 -1
- package/lib/components/table/HeadCellSort.js +1 -1
- package/lib/components/table/ItemActionsWrapper.js +1 -1
- package/lib/components/table/index.d.ts +49 -43
- package/lib/components/table/index.js +98 -51
- package/lib/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/lib/components/virtual-list/constants.js +1 -1
- package/lib/components/virtual-list/index.js +1 -1
- package/lib/helper.css +8335 -38
- package/lib/hooks/use-set-state.js +1 -1
- package/lib/hooks/use-touch.js +1 -1
- package/lib/hooks/use-update-effect.js +1 -1
- package/lib/hooks/use-validation-resolver.js +1 -1
- package/lib/icons/alert-danger.svg.js +1 -1
- package/lib/icons/alert-info.svg.js +1 -1
- package/lib/icons/alert-success.svg.js +1 -1
- package/lib/icons/alert-warning.svg.js +1 -1
- package/lib/icons/back.svg.js +1 -1
- package/lib/icons/calendar.svg.js +1 -1
- package/lib/icons/caret.svg.js +1 -1
- package/lib/icons/check-circle.svg.js +1 -1
- package/lib/icons/check.svg.js +1 -1
- package/lib/icons/clock.svg.js +1 -1
- package/lib/icons/close-small.svg.js +1 -1
- package/lib/icons/close.svg.js +1 -1
- package/lib/icons/cloud-upload.svg.js +1 -1
- package/lib/icons/column-filter.svg.js +1 -1
- package/lib/icons/columns.svg.js +1 -1
- package/lib/icons/compress-alt.svg.js +1 -1
- package/lib/icons/copy.svg.js +1 -1
- package/lib/icons/date.svg.js +1 -1
- package/lib/icons/department.svg.js +1 -1
- package/lib/icons/desk-empty.svg.js +1 -1
- package/lib/icons/dot.svg.js +1 -1
- package/lib/icons/down-arrow-bold.svg.js +1 -1
- package/lib/icons/down.svg.js +1 -1
- package/lib/icons/download.svg.js +1 -1
- package/lib/icons/drag-bar.svg.js +1 -1
- package/lib/icons/drag.svg.js +1 -1
- package/lib/icons/edit.svg.js +1 -1
- package/lib/icons/ellipsis-v.svg.js +1 -1
- package/lib/icons/enter.svg.js +1 -1
- package/lib/icons/exchange.svg.js +1 -1
- package/lib/icons/expand-alt.svg.js +1 -1
- package/lib/icons/fail.svg.js +1 -1
- package/lib/icons/file.svg.js +1 -1
- package/lib/icons/filter.svg.js +1 -1
- package/lib/icons/folder.svg.js +1 -1
- package/lib/icons/function.svg.js +1 -1
- package/lib/icons/home.svg.js +1 -1
- package/lib/icons/image.svg.js +1 -1
- package/lib/icons/info-circle.svg.js +1 -1
- package/lib/icons/info.svg.js +1 -1
- package/lib/icons/input-clear.svg.js +1 -1
- package/lib/icons/invisible.svg.js +1 -1
- package/lib/icons/left-arrow.svg.js +1 -1
- package/lib/icons/loading-outline.svg.js +1 -1
- package/lib/icons/location.svg.js +1 -1
- package/lib/icons/menu.svg.js +1 -1
- package/lib/icons/minus.svg.js +1 -1
- package/lib/icons/move.svg.js +1 -1
- package/lib/icons/mute.svg.js +1 -1
- package/lib/icons/new-edit.svg.js +1 -1
- package/lib/icons/pause.svg.js +1 -1
- package/lib/icons/pencil.svg.js +1 -1
- package/lib/icons/play.svg.js +1 -1
- package/lib/icons/plus-cicle.svg.js +1 -1
- package/lib/icons/plus-fine.svg.js +1 -1
- package/lib/icons/plus.svg.js +1 -1
- package/lib/icons/post.svg.js +1 -1
- package/lib/icons/question-mark.svg.js +1 -1
- package/lib/icons/question.svg.js +1 -1
- package/lib/icons/redo.svg.js +1 -1
- package/lib/icons/refresh.svg.js +1 -1
- package/lib/icons/reload.svg.js +1 -1
- package/lib/icons/remove.svg.js +1 -1
- package/lib/icons/retry.svg.js +1 -1
- package/lib/icons/right-arrow-bold.svg.js +1 -1
- package/lib/icons/right-arrow.svg.js +1 -1
- package/lib/icons/right-double-arrow.svg.js +1 -1
- package/lib/icons/role.svg.js +1 -1
- package/lib/icons/rotate-left.svg.js +1 -1
- package/lib/icons/rotate-right.svg.js +1 -1
- package/lib/icons/scale-origin.svg.js +1 -1
- package/lib/icons/schedule.svg.js +1 -1
- package/lib/icons/search.svg.js +1 -1
- package/lib/icons/setting.svg.js +1 -1
- package/lib/icons/slider-handle-icon.svg.js +1 -1
- package/lib/icons/sort-asc.svg.js +1 -1
- package/lib/icons/sort-default.svg.js +1 -1
- package/lib/icons/sort-desc.svg.js +1 -1
- package/lib/icons/star.svg.js +1 -1
- package/lib/icons/status-close.svg.js +1 -1
- package/lib/icons/status-fail.svg.js +1 -1
- package/lib/icons/status-info.svg.js +1 -1
- package/lib/icons/status-success.svg.js +1 -1
- package/lib/icons/status-warning.svg.js +1 -1
- package/lib/icons/steps-finsh.svg.js +1 -1
- package/lib/icons/success.svg.js +1 -1
- package/lib/icons/transparent.svg.js +1 -1
- package/lib/icons/trash.svg.js +1 -1
- package/lib/icons/tree-down.svg.js +1 -1
- package/lib/icons/undo.svg.js +1 -1
- package/lib/icons/upload.svg.js +1 -1
- package/lib/icons/user-remove.svg.js +1 -1
- package/lib/icons/view.svg.js +1 -1
- package/lib/icons/volume.svg.js +1 -1
- package/lib/icons/warning-mark.svg.js +1 -1
- package/lib/icons/warning.svg.js +1 -1
- package/lib/icons/window-restore.svg.js +1 -1
- package/lib/icons/zoom-in.svg.js +1 -1
- package/lib/icons/zoom-out.svg.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/de-DE.js +8 -2
- package/lib/locale/en-US.js +8 -3
- package/lib/locale/zh-CN.js +8 -3
- package/lib/scss/helper.scss.js +1 -1
- package/lib/scss/themes/ang.scss.js +1 -1
- package/lib/scss/themes/antd.scss.js +1 -1
- package/lib/scss/themes/cxd.scss.js +1 -1
- package/lib/scss/themes/dark.scss.js +1 -1
- package/lib/scss/themes/default.scss.js +1 -1
- package/lib/themes/ang.css +8847 -5617
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +8955 -5731
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +8855 -5630
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +8940 -5709
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +8855 -5630
- package/package.json +22 -22
- package/scss/_mixins.scss +10 -0
- package/scss/_thirds.scss +6 -6
- package/scss/components/_anchor-nav.scss +9 -2
- package/scss/components/_collapse.scss +4 -4
- package/scss/components/_spinner.scss +6 -0
- package/scss/components/_table.scss +1 -1
- package/scss/components/form/_fieldset.scss +20 -0
- package/scss/components/form/_input-group.scss +5 -0
- package/scss/components/form/_selection.scss +6 -1
- package/scss/components/form/_textarea.scss +4 -2
- package/scss/components/form/_user-select.scss +35 -2
- package/scss/themes/_antd-variables.scss +4 -2
- package/scss/themes/_cxd-variables.scss +5 -1
- package/scss/themes/_dark-variables.scss +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.
|
|
2
|
+
* amis-ui v2.3.1
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -32,7 +32,9 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
32
32
|
index: -1,
|
|
33
33
|
items: [],
|
|
34
34
|
scale: 1,
|
|
35
|
-
rotate: 0
|
|
35
|
+
rotate: 0,
|
|
36
|
+
showToolbar: false,
|
|
37
|
+
actions: ImageGallery.defaultProps.actions
|
|
36
38
|
};
|
|
37
39
|
_this.handleToolbarAction = debounce(function (action) {
|
|
38
40
|
if (action.disabled) {
|
|
@@ -66,10 +68,20 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
66
68
|
return _this;
|
|
67
69
|
}
|
|
68
70
|
ImageGallery.prototype.handleImageEnlarge = function (info) {
|
|
71
|
+
var actions = this.props.actions;
|
|
72
|
+
var validActionKeys = Object.values(ImageActionKey);
|
|
69
73
|
this.setState({
|
|
70
74
|
isOpened: true,
|
|
71
75
|
items: info.list ? info.list : [info],
|
|
72
|
-
index: info.index || 0
|
|
76
|
+
index: info.index || 0,
|
|
77
|
+
/* children组件可以控制工具栏的展示 */
|
|
78
|
+
showToolbar: !!info.showToolbar,
|
|
79
|
+
/** 外部传入合法key值的actions才会生效 */
|
|
80
|
+
actions: Array.isArray(info.toolbarActions)
|
|
81
|
+
? info.toolbarActions.filter(function (action) {
|
|
82
|
+
return validActionKeys.includes(action === null || action === void 0 ? void 0 : action.key);
|
|
83
|
+
})
|
|
84
|
+
: actions
|
|
73
85
|
});
|
|
74
86
|
};
|
|
75
87
|
ImageGallery.prototype.resetImageAction = function () {
|
|
@@ -110,8 +122,8 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
110
122
|
};
|
|
111
123
|
ImageGallery.prototype.render = function () {
|
|
112
124
|
var _this = this;
|
|
113
|
-
var _a = this.props, children = _a.children, cx = _a.classnames, modalContainer = _a.modalContainer
|
|
114
|
-
var _b = this.state, index = _b.index, items = _b.items, rotate = _b.rotate, scale = _b.scale;
|
|
125
|
+
var _a = this.props, children = _a.children, cx = _a.classnames, modalContainer = _a.modalContainer;
|
|
126
|
+
var _b = this.state, index = _b.index, items = _b.items, rotate = _b.rotate, scale = _b.scale, showToolbar = _b.showToolbar, actions = _b.actions;
|
|
115
127
|
var __ = this.props.translate;
|
|
116
128
|
return (React__default.createElement(React__default.Fragment, null,
|
|
117
129
|
React__default.cloneElement(children, {
|
|
@@ -124,7 +136,7 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
124
136
|
React__default.createElement("div", { className: cx('ImageGallery-title') }, items[index].title),
|
|
125
137
|
React__default.createElement("div", { className: cx('ImageGallery-main') },
|
|
126
138
|
React__default.createElement("img", { src: items[index].originalSrc, style: { transform: "scale(".concat(scale, ") rotate(").concat(rotate, "deg)") } }),
|
|
127
|
-
Array.isArray(actions) && actions.length > 0
|
|
139
|
+
showToolbar && Array.isArray(actions) && actions.length > 0
|
|
128
140
|
? this.renderToolbar(actions)
|
|
129
141
|
: null,
|
|
130
142
|
items.length > 1 ? (React__default.createElement(React__default.Fragment, null,
|
package/esm/components/Input.js
CHANGED
package/esm/components/Layout.js
CHANGED
package/esm/components/Link.js
CHANGED
|
@@ -275,21 +275,21 @@ export declare class Modal extends React.Component<ModalProps, ModalState> {
|
|
|
275
275
|
};
|
|
276
276
|
displayName: string;
|
|
277
277
|
contextType: React.Context<string>;
|
|
278
|
-
ComposedComponent: React.ComponentType<({ classnames, className, showCloseButton, onClose, children, classPrefix, translate, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
278
|
+
ComposedComponent: React.ComponentType<({ classnames: cx, className, showCloseButton, onClose, children, classPrefix, translate: __, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
279
279
|
className?: string | undefined;
|
|
280
280
|
showCloseButton?: boolean | undefined;
|
|
281
281
|
onClose?: (() => void) | undefined;
|
|
282
282
|
children?: React.ReactNode;
|
|
283
283
|
forwardedRef?: any;
|
|
284
284
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element>;
|
|
285
|
-
} & import("hoist-non-react-statics").NonReactStatics<({ classnames, className, showCloseButton, onClose, children, classPrefix, translate, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
285
|
+
} & import("hoist-non-react-statics").NonReactStatics<({ classnames: cx, className, showCloseButton, onClose, children, classPrefix, translate: __, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
286
286
|
className?: string | undefined;
|
|
287
287
|
showCloseButton?: boolean | undefined;
|
|
288
288
|
onClose?: (() => void) | undefined;
|
|
289
289
|
children?: React.ReactNode;
|
|
290
290
|
forwardedRef?: any;
|
|
291
291
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element, {}> & {
|
|
292
|
-
ComposedComponent: ({ classnames, className, showCloseButton, onClose, children, classPrefix, translate, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
292
|
+
ComposedComponent: ({ classnames: cx, className, showCloseButton, onClose, children, classPrefix, translate: __, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
293
293
|
className?: string | undefined;
|
|
294
294
|
showCloseButton?: boolean | undefined;
|
|
295
295
|
onClose?: (() => void) | undefined;
|
|
@@ -418,21 +418,21 @@ export declare class Modal extends React.Component<ModalProps, ModalState> {
|
|
|
418
418
|
};
|
|
419
419
|
displayName: string;
|
|
420
420
|
contextType: React.Context<string>;
|
|
421
|
-
ComposedComponent: React.ComponentType<({ classnames, className, showCloseButton, onClose, children, classPrefix, translate, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
421
|
+
ComposedComponent: React.ComponentType<({ classnames: cx, className, showCloseButton, onClose, children, classPrefix, translate: __, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
422
422
|
className?: string | undefined;
|
|
423
423
|
showCloseButton?: boolean | undefined;
|
|
424
424
|
onClose?: (() => void) | undefined;
|
|
425
425
|
children?: React.ReactNode;
|
|
426
426
|
forwardedRef?: any;
|
|
427
427
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element>;
|
|
428
|
-
} & import("hoist-non-react-statics").NonReactStatics<({ classnames, className, showCloseButton, onClose, children, classPrefix, translate, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
428
|
+
} & import("hoist-non-react-statics").NonReactStatics<({ classnames: cx, className, showCloseButton, onClose, children, classPrefix, translate: __, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
429
429
|
className?: string | undefined;
|
|
430
430
|
showCloseButton?: boolean | undefined;
|
|
431
431
|
onClose?: (() => void) | undefined;
|
|
432
432
|
children?: React.ReactNode;
|
|
433
433
|
forwardedRef?: any;
|
|
434
434
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element, {}> & {
|
|
435
|
-
ComposedComponent: ({ classnames, className, showCloseButton, onClose, children, classPrefix, translate, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
435
|
+
ComposedComponent: ({ classnames: cx, className, showCloseButton, onClose, children, classPrefix, translate: __, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
436
436
|
className?: string | undefined;
|
|
437
437
|
showCloseButton?: boolean | undefined;
|
|
438
438
|
onClose?: (() => void) | undefined;
|
|
@@ -561,21 +561,21 @@ export declare class Modal extends React.Component<ModalProps, ModalState> {
|
|
|
561
561
|
};
|
|
562
562
|
displayName: string;
|
|
563
563
|
contextType: React.Context<string>;
|
|
564
|
-
ComposedComponent: React.ComponentType<({ classnames, className, showCloseButton, onClose, children, classPrefix, translate, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
564
|
+
ComposedComponent: React.ComponentType<({ classnames: cx, className, showCloseButton, onClose, children, classPrefix, translate: __, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
565
565
|
className?: string | undefined;
|
|
566
566
|
showCloseButton?: boolean | undefined;
|
|
567
567
|
onClose?: (() => void) | undefined;
|
|
568
568
|
children?: React.ReactNode;
|
|
569
569
|
forwardedRef?: any;
|
|
570
570
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element>;
|
|
571
|
-
} & import("hoist-non-react-statics").NonReactStatics<({ classnames, className, showCloseButton, onClose, children, classPrefix, translate, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
571
|
+
} & import("hoist-non-react-statics").NonReactStatics<({ classnames: cx, className, showCloseButton, onClose, children, classPrefix, translate: __, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
572
572
|
className?: string | undefined;
|
|
573
573
|
showCloseButton?: boolean | undefined;
|
|
574
574
|
onClose?: (() => void) | undefined;
|
|
575
575
|
children?: React.ReactNode;
|
|
576
576
|
forwardedRef?: any;
|
|
577
577
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element, {}> & {
|
|
578
|
-
ComposedComponent: ({ classnames, className, showCloseButton, onClose, children, classPrefix, translate, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
578
|
+
ComposedComponent: ({ classnames: cx, className, showCloseButton, onClose, children, classPrefix, translate: __, forwardedRef, ...rest }: ThemeProps & LocaleProps & {
|
|
579
579
|
className?: string | undefined;
|
|
580
580
|
showCloseButton?: boolean | undefined;
|
|
581
581
|
onClose?: (() => void) | undefined;
|
|
@@ -655,17 +655,17 @@ export declare class Modal extends React.Component<ModalProps, ModalState> {
|
|
|
655
655
|
};
|
|
656
656
|
displayName: string;
|
|
657
657
|
contextType: React.Context<string>;
|
|
658
|
-
ComposedComponent: React.ComponentType<({ classnames, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
658
|
+
ComposedComponent: React.ComponentType<({ classnames: cx, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
659
659
|
className?: string | undefined;
|
|
660
660
|
children?: React.ReactNode;
|
|
661
661
|
forwardedRef?: any;
|
|
662
662
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element>;
|
|
663
|
-
} & import("hoist-non-react-statics").NonReactStatics<({ classnames, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
663
|
+
} & import("hoist-non-react-statics").NonReactStatics<({ classnames: cx, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
664
664
|
className?: string | undefined;
|
|
665
665
|
children?: React.ReactNode;
|
|
666
666
|
forwardedRef?: any;
|
|
667
667
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element, {}> & {
|
|
668
|
-
ComposedComponent: ({ classnames, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
668
|
+
ComposedComponent: ({ classnames: cx, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
669
669
|
className?: string | undefined;
|
|
670
670
|
children?: React.ReactNode;
|
|
671
671
|
forwardedRef?: any;
|
|
@@ -742,17 +742,17 @@ export declare class Modal extends React.Component<ModalProps, ModalState> {
|
|
|
742
742
|
};
|
|
743
743
|
displayName: string;
|
|
744
744
|
contextType: React.Context<string>;
|
|
745
|
-
ComposedComponent: React.ComponentType<({ classnames, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
745
|
+
ComposedComponent: React.ComponentType<({ classnames: cx, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
746
746
|
className?: string | undefined;
|
|
747
747
|
children?: React.ReactNode;
|
|
748
748
|
forwardedRef?: any;
|
|
749
749
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element>;
|
|
750
|
-
} & import("hoist-non-react-statics").NonReactStatics<({ classnames, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
750
|
+
} & import("hoist-non-react-statics").NonReactStatics<({ classnames: cx, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
751
751
|
className?: string | undefined;
|
|
752
752
|
children?: React.ReactNode;
|
|
753
753
|
forwardedRef?: any;
|
|
754
754
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element, {}> & {
|
|
755
|
-
ComposedComponent: ({ classnames, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
755
|
+
ComposedComponent: ({ classnames: cx, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
756
756
|
className?: string | undefined;
|
|
757
757
|
children?: React.ReactNode;
|
|
758
758
|
forwardedRef?: any;
|
|
@@ -829,17 +829,17 @@ export declare class Modal extends React.Component<ModalProps, ModalState> {
|
|
|
829
829
|
};
|
|
830
830
|
displayName: string;
|
|
831
831
|
contextType: React.Context<string>;
|
|
832
|
-
ComposedComponent: React.ComponentType<({ classnames, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
832
|
+
ComposedComponent: React.ComponentType<({ classnames: cx, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
833
833
|
className?: string | undefined;
|
|
834
834
|
children?: React.ReactNode;
|
|
835
835
|
forwardedRef?: any;
|
|
836
836
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element>;
|
|
837
|
-
} & import("hoist-non-react-statics").NonReactStatics<({ classnames, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
837
|
+
} & import("hoist-non-react-statics").NonReactStatics<({ classnames: cx, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
838
838
|
className?: string | undefined;
|
|
839
839
|
children?: React.ReactNode;
|
|
840
840
|
forwardedRef?: any;
|
|
841
841
|
} & React.HTMLAttributes<HTMLDivElement>) => JSX.Element, {}> & {
|
|
842
|
-
ComposedComponent: ({ classnames, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
842
|
+
ComposedComponent: ({ classnames: cx, className, children, classPrefix, forwardedRef, ...rest }: ThemeProps & {
|
|
843
843
|
className?: string | undefined;
|
|
844
844
|
children?: React.ReactNode;
|
|
845
845
|
forwardedRef?: any;
|
package/esm/components/Modal.js
CHANGED
|
@@ -41,9 +41,18 @@ export interface NumberProps extends ThemeProps {
|
|
|
41
41
|
*/
|
|
42
42
|
displayMode?: 'base' | 'enhance';
|
|
43
43
|
keyboard?: Boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 是否是大数
|
|
46
|
+
*/
|
|
47
|
+
big?: boolean;
|
|
44
48
|
}
|
|
45
49
|
export declare class NumberInput extends React.Component<NumberProps, any> {
|
|
46
50
|
static defaultProps: Pick<NumberProps, 'step' | 'readOnly' | 'borderMode'>;
|
|
51
|
+
/**
|
|
52
|
+
* 是否是 bigNumber,如果输入的内容是字符串就自动开启
|
|
53
|
+
*/
|
|
54
|
+
isBig: boolean;
|
|
55
|
+
constructor(props: NumberProps);
|
|
47
56
|
handleChange(value: any): void;
|
|
48
57
|
handleFocus(e: React.SyntheticEvent<HTMLElement>): void;
|
|
49
58
|
handleBlur(e: React.SyntheticEvent<HTMLElement>): void;
|
|
@@ -52,15 +61,15 @@ export declare class NumberInput extends React.Component<NumberProps, any> {
|
|
|
52
61
|
render(): JSX.Element;
|
|
53
62
|
}
|
|
54
63
|
declare const _default: {
|
|
55
|
-
new (props: Pick<Omit<NumberProps, keyof ThemeProps>, "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps): {
|
|
64
|
+
new (props: Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps): {
|
|
56
65
|
ref: any;
|
|
57
66
|
childRef(ref: any): void;
|
|
58
67
|
getWrappedInstance(): any;
|
|
59
68
|
render(): JSX.Element;
|
|
60
69
|
context: any;
|
|
61
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
70
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
62
71
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
63
|
-
readonly props: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps> & Readonly<{
|
|
72
|
+
readonly props: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps> & Readonly<{
|
|
64
73
|
children?: React.ReactNode;
|
|
65
74
|
}>;
|
|
66
75
|
state: Readonly<{}>;
|
|
@@ -68,17 +77,17 @@ declare const _default: {
|
|
|
68
77
|
[key: string]: React.ReactInstance;
|
|
69
78
|
};
|
|
70
79
|
componentDidMount?(): void;
|
|
71
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
80
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
72
81
|
componentWillUnmount?(): void;
|
|
73
82
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
74
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
|
75
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
83
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
|
84
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
76
85
|
componentWillMount?(): void;
|
|
77
86
|
UNSAFE_componentWillMount?(): void;
|
|
78
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
79
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
80
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
81
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
87
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
88
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
89
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
90
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<NumberProps, keyof ThemeProps>, "big" | "disabled" | "value" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "max" | "min" | "inputRef" | "showSteps" | "precision" | "formatter" | "parser" | "displayMode" | "keyboard"> & Partial<Pick<Omit<NumberProps, keyof ThemeProps>, "step" | "readOnly" | "borderMode">> & Partial<Pick<Pick<NumberProps, "step" | "readOnly" | "borderMode">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
82
91
|
};
|
|
83
92
|
displayName: string;
|
|
84
93
|
contextType: React.Context<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.
|
|
2
|
+
* amis-ui v2.3.1
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -13,8 +13,17 @@ import { ucFirst, autobind, themeable } from 'amis-core';
|
|
|
13
13
|
|
|
14
14
|
var NumberInput = /** @class */ (function (_super) {
|
|
15
15
|
__extends(NumberInput, _super);
|
|
16
|
-
function NumberInput() {
|
|
17
|
-
|
|
16
|
+
function NumberInput(props) {
|
|
17
|
+
var _this = _super.call(this, props) || this;
|
|
18
|
+
/**
|
|
19
|
+
* 是否是 bigNumber,如果输入的内容是字符串就自动开启
|
|
20
|
+
*/
|
|
21
|
+
_this.isBig = false;
|
|
22
|
+
var value = props.value;
|
|
23
|
+
if (typeof value === 'string' || props.big) {
|
|
24
|
+
_this.isBig = true;
|
|
25
|
+
}
|
|
26
|
+
return _this;
|
|
18
27
|
}
|
|
19
28
|
NumberInput.prototype.handleChange = function (value) {
|
|
20
29
|
var _a = this.props, min = _a.min, max = _a.max, onChange = _a.onChange;
|
|
@@ -26,6 +35,21 @@ var NumberInput = /** @class */ (function (_super) {
|
|
|
26
35
|
value = Math.min(value, max);
|
|
27
36
|
}
|
|
28
37
|
}
|
|
38
|
+
if (typeof value === 'string') {
|
|
39
|
+
var val = getMiniDecimal(value);
|
|
40
|
+
if (typeof min !== 'undefined') {
|
|
41
|
+
var minValue = getMiniDecimal(min);
|
|
42
|
+
if (val.lessEquals(minValue)) {
|
|
43
|
+
value = min;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (typeof max !== 'undefined') {
|
|
47
|
+
var maxValue = getMiniDecimal(max);
|
|
48
|
+
if (maxValue.lessEquals(val)) {
|
|
49
|
+
value = max;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
29
53
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
30
54
|
};
|
|
31
55
|
NumberInput.prototype.handleFocus = function (e) {
|
|
@@ -37,16 +61,16 @@ var NumberInput = /** @class */ (function (_super) {
|
|
|
37
61
|
onBlur && onBlur(e);
|
|
38
62
|
};
|
|
39
63
|
NumberInput.prototype.handleEnhanceModeChange = function (action) {
|
|
40
|
-
var _a = this.props, value = _a.value,
|
|
64
|
+
var _a = this.props, value = _a.value, _b = _a.step, step = _b === void 0 ? 1 : _b, disabled = _a.disabled, readOnly = _a.readOnly, precision = _a.precision;
|
|
41
65
|
// value为undefined会导致溢出错误
|
|
42
|
-
var val =
|
|
66
|
+
var val = value || 0;
|
|
43
67
|
if (disabled || readOnly) {
|
|
44
68
|
return;
|
|
45
69
|
}
|
|
46
70
|
if (isNaN(Number(step)) || !Number(step)) {
|
|
47
71
|
return;
|
|
48
72
|
}
|
|
49
|
-
var stepDecimal = getMiniDecimal(
|
|
73
|
+
var stepDecimal = getMiniDecimal(step);
|
|
50
74
|
if (action !== 'add') {
|
|
51
75
|
stepDecimal = stepDecimal.negate();
|
|
52
76
|
}
|
|
@@ -67,8 +91,13 @@ var NumberInput = /** @class */ (function (_super) {
|
|
|
67
91
|
return updateValue;
|
|
68
92
|
};
|
|
69
93
|
var updatedValue = triggerValueUpdate(target);
|
|
70
|
-
|
|
71
|
-
|
|
94
|
+
if (this.isBig) {
|
|
95
|
+
this.handleChange(updatedValue.toString());
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
val = Number(updatedValue.toString());
|
|
99
|
+
this.handleChange(val);
|
|
100
|
+
}
|
|
72
101
|
};
|
|
73
102
|
NumberInput.prototype.renderBase = function () {
|
|
74
103
|
var _a;
|
|
@@ -79,7 +108,7 @@ var NumberInput = /** @class */ (function (_super) {
|
|
|
79
108
|
}
|
|
80
109
|
return (React__default.createElement(InputNumber, __assign({ className: cx(className, showSteps === false ? 'no-steps' : '', displayMode === 'enhance' ? 'Number--enhance-input' : '', (_a = {},
|
|
81
110
|
_a["Number--border".concat(ucFirst(borderMode))] = borderMode,
|
|
82
|
-
_a)), ref: inputRef, readOnly: readOnly, prefixCls: "".concat(ns, "Number"), value: value, step: step, max: max, min: min, formatter: formatter, parser: parser, onChange: this.handleChange, disabled: disabled, placeholder: placeholder, onFocus: this.handleFocus, onBlur: this.handleBlur, keyboard: keyboard }, precisionProps)));
|
|
111
|
+
_a)), ref: inputRef, readOnly: readOnly, prefixCls: "".concat(ns, "Number"), value: value, step: step, max: max, min: min, formatter: formatter, parser: parser, onChange: this.handleChange, disabled: disabled, placeholder: placeholder, onFocus: this.handleFocus, onBlur: this.handleBlur, stringMode: this.isBig ? true : false, keyboard: keyboard }, precisionProps)));
|
|
83
112
|
};
|
|
84
113
|
NumberInput.prototype.render = function () {
|
|
85
114
|
var _a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.
|
|
2
|
+
* amis-ui v2.3.1
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -231,7 +231,7 @@ var Pagination = /** @class */ (function (_super) {
|
|
|
231
231
|
var selection = perPageAvailable
|
|
232
232
|
.filter(function (v) { return !!v; })
|
|
233
233
|
.map(function (v) { return ({ label: __('Pagination.select', { count: v }), value: v }); });
|
|
234
|
-
var perPageEle = (React__default.createElement(EnhancedSelect, { key: "perpage", className: cx('Pagination-perpage', 'Pagination-item'),
|
|
234
|
+
var perPageEle = (React__default.createElement(EnhancedSelect, { key: "perpage", className: cx('Pagination-perpage', 'Pagination-item'), clearable: false, disabled: disabled, value: perPage, options: selection, popOverContainerSelector: popOverContainerSelector, onChange: function (p) {
|
|
235
235
|
_this.setState({
|
|
236
236
|
perPage: p.value,
|
|
237
237
|
pageNum: ''
|
package/esm/components/Picker.js
CHANGED
package/esm/components/PopUp.js
CHANGED
package/esm/components/Radios.js
CHANGED
package/esm/components/Range.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.
|
|
2
|
+
* amis-ui v2.3.1
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -78,7 +78,8 @@ var HandleItem = /** @class */ (function (_super) {
|
|
|
78
78
|
this.setState({
|
|
79
79
|
isDrag: false
|
|
80
80
|
});
|
|
81
|
-
this.props.onAfterChange
|
|
81
|
+
var onAfterChange = this.props.onAfterChange;
|
|
82
|
+
onAfterChange && onAfterChange();
|
|
82
83
|
window.removeEventListener('mousemove', this.onMouseMove);
|
|
83
84
|
window.removeEventListener('mouseup', this.onMouseUp);
|
|
84
85
|
};
|
|
@@ -200,7 +201,8 @@ var Range = /** @class */ (function (_super) {
|
|
|
200
201
|
* @param value
|
|
201
202
|
*/
|
|
202
203
|
Range.prototype.updateValue = function (value) {
|
|
203
|
-
this.props.
|
|
204
|
+
var onChange = this.props.onChange;
|
|
205
|
+
onChange && onChange(value);
|
|
204
206
|
};
|
|
205
207
|
/**
|
|
206
208
|
* 获取 坐标、宽高
|
package/esm/components/Rating.js
CHANGED