amis-ui 2.0.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/404.js +1 -1
- package/esm/components/Alert.js +1 -1
- package/esm/components/Alert2.js +2 -2
- package/esm/components/AnchorNav.js +8 -8
- 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.js +1 -1
- package/esm/components/Avatar.js +1 -1
- package/esm/components/Badge.d.ts +1 -1
- package/esm/components/Badge.js +2 -4
- package/esm/components/BaiduMapPicker.js +3 -3
- package/esm/components/BarCode.js +38 -2
- package/esm/components/Breadcrumb.js +2 -2
- package/esm/components/Button.js +1 -1
- package/esm/components/CalendarMobile.js +1 -1
- package/esm/components/Card.js +1 -1
- package/esm/components/Cascader.js +3 -9
- package/esm/components/ChainedSelection.js +1 -1
- package/esm/components/Checkbox.js +1 -1
- package/esm/components/CityArea.js +2 -2
- package/esm/components/CityDB.js +4097 -2
- 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 +198 -2
- package/esm/components/ContextMenu.js +1 -1
- package/esm/components/DatePicker.d.ts +43 -40
- package/esm/components/DatePicker.js +11 -4
- package/esm/components/DateRangePicker.d.ts +144 -81
- package/esm/components/DateRangePicker.js +191 -80
- package/esm/components/Drawer.d.ts +10 -10
- package/esm/components/Drawer.js +1 -1
- package/esm/components/Editor.d.ts +47 -41
- package/esm/components/Editor.js +9 -8
- 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.js +1 -1
- package/esm/components/Html.js +1 -1
- package/esm/components/ImageGallery.d.ts +70 -40
- package/esm/components/ImageGallery.js +97 -15
- 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.d.ts +10 -10
- 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 +56 -2
- package/esm/components/Modal.d.ts +60 -58
- package/esm/components/Modal.js +9 -4
- package/esm/components/ModalManager.js +1 -1
- package/esm/components/NumberInput.js +2 -2
- package/esm/components/Pagination.d.ts +49 -66
- package/esm/components/Pagination.js +4 -4
- 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.d.ts +1 -0
- package/esm/components/PopOverContainer.js +3 -3
- package/esm/components/PopUp.js +1 -1
- package/esm/components/Progress.d.ts +16 -10
- package/esm/components/Progress.js +27 -5
- package/esm/components/PullRefresh.js +1 -1
- package/esm/components/Radios.js +1 -1
- package/esm/components/Range.js +3 -2
- package/esm/components/Rating.js +1 -1
- package/esm/components/ResultBox.js +7 -3
- package/esm/components/ResultList.js +1 -1
- package/esm/components/ResultTableList.js +1 -1
- package/esm/components/ResultTreeList.js +1 -1
- package/esm/components/RichText.js +258 -2
- package/esm/components/SearchBox.js +1 -1
- package/esm/components/Select.d.ts +194 -193
- package/esm/components/Select.js +9 -5
- package/esm/components/Selection.js +1 -1
- package/esm/components/SparkLine.d.ts +40 -40
- package/esm/components/SparkLine.js +1 -1
- package/esm/components/Spinner.js +1 -1
- package/esm/components/Steps.js +1 -1
- package/esm/components/Switch.js +1 -1
- package/esm/components/TableSelection.js +1 -1
- package/esm/components/Tabs.d.ts +149 -13
- package/esm/components/Tabs.js +39 -11
- 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 +4 -2
- package/esm/components/Timeline.js +1 -1
- package/esm/components/TimelineItem.js +4 -4
- package/esm/components/Tinymce.d.ts +1 -3
- package/esm/components/Tinymce.js +561 -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.js +11 -4
- package/esm/components/TransferDropDown.js +4 -5
- package/esm/components/TransferPicker.js +1 -1
- package/esm/components/TransferSearch.js +1 -1
- package/esm/components/Tree.js +34 -33
- package/esm/components/TreeSelection.js +1 -1
- package/esm/components/UserSelect.js +5 -3
- package/esm/components/UserTabSelect.js +1 -1
- package/esm/components/WithRemoteConfig.js +1 -1
- package/esm/components/WithStore.js +1 -1
- package/esm/components/calendar/Calendar.d.ts +1 -0
- package/esm/components/calendar/Calendar.js +7 -2
- package/esm/components/calendar/CalendarContainer.js +1 -1
- package/esm/components/calendar/DaysView.d.ts +1 -1
- package/esm/components/calendar/DaysView.js +65 -29
- package/esm/components/calendar/MonthsView.js +1 -1
- package/esm/components/calendar/QuartersView.js +1 -1
- package/esm/components/calendar/TimeView.d.ts +0 -1
- package/esm/components/calendar/TimeView.js +5 -6
- package/esm/components/calendar/YearsView.js +1 -1
- package/esm/components/condition-builder/Expression.js +1 -1
- package/esm/components/condition-builder/Field.js +1 -1
- package/esm/components/condition-builder/Formula.js +1 -1
- package/esm/components/condition-builder/Func.js +1 -1
- package/esm/components/condition-builder/Group.js +1 -1
- package/esm/components/condition-builder/GroupOrItem.js +4 -4
- package/esm/components/condition-builder/InputSwitch.js +1 -1
- package/esm/components/condition-builder/Item.js +1 -1
- package/esm/components/condition-builder/Value.js +1 -1
- package/esm/components/condition-builder/config.js +1 -1
- package/esm/components/condition-builder/index.js +1 -1
- package/esm/components/formula/Editor.js +1 -1
- package/esm/components/formula/FuncList.js +1 -1
- package/esm/components/formula/Picker.d.ts +1 -0
- package/esm/components/formula/Picker.js +10 -1
- package/esm/components/formula/VariableList.js +1 -1
- package/esm/components/formula/plugin.d.ts +1 -0
- package/esm/components/formula/plugin.js +11 -4
- package/esm/components/icons.d.ts +2 -1
- package/esm/components/icons.js +18 -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.d.ts +2 -1
- package/esm/components/table/Cell.js +1 -1
- package/esm/components/table/HeadCellDropDown.d.ts +3 -1
- package/esm/components/table/HeadCellDropDown.js +1 -1
- package/esm/components/table/HeadCellFilter.d.ts +3 -2
- package/esm/components/table/HeadCellFilter.js +4 -4
- package/esm/components/table/HeadCellSelect.d.ts +3 -2
- package/esm/components/table/HeadCellSelect.js +4 -2
- package/esm/components/table/HeadCellSort.d.ts +4 -3
- package/esm/components/table/HeadCellSort.js +6 -6
- package/esm/components/table/ItemActionsWrapper.js +1 -1
- package/esm/components/table/index.d.ts +3 -4
- package/esm/components/table/index.js +9 -9
- package/esm/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/esm/components/virtual-list/constants.js +1 -1
- package/esm/components/virtual-list/index.d.ts +3 -3
- 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 +2 -2
- package/esm/icons/alert-info.svg.js +1 -1
- package/esm/icons/alert-success.svg.js +2 -2
- package/esm/icons/alert-warning.svg.js +2 -2
- 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 +36 -0
- 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 +2 -2
- package/esm/icons/down.svg.js +31 -0
- 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 -2
- 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 +7 -4
- 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 +24 -0
- 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 +7 -4
- package/esm/icons/right-double-arrow.svg.js +24 -0
- package/esm/icons/role.svg.js +1 -1
- package/esm/icons/rotate-left.svg.js +24 -0
- package/esm/icons/rotate-right.svg.js +24 -0
- package/esm/icons/scale-origin.svg.js +26 -0
- 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 +2 -2
- 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 +24 -0
- 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 +2 -1
- package/esm/locale/de-DE.js +25 -5
- package/esm/locale/en-US.js +21 -1
- package/esm/locale/zh-CN.js +25 -7
- 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 +2 -2
- package/lib/components/AnchorNav.js +8 -8
- 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.js +1 -1
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Badge.d.ts +1 -1
- package/lib/components/Badge.js +2 -4
- package/lib/components/BaiduMapPicker.js +3 -3
- package/lib/components/BarCode.js +41 -4
- package/lib/components/Breadcrumb.js +2 -2
- package/lib/components/Button.js +1 -1
- package/lib/components/CalendarMobile.js +1 -1
- package/lib/components/Card.js +1 -1
- package/lib/components/Cascader.js +3 -9
- package/lib/components/ChainedSelection.js +1 -1
- package/lib/components/Checkbox.js +1 -1
- package/lib/components/CityArea.js +2 -2
- package/lib/components/CityDB.js +4099 -8
- 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 +200 -4
- package/lib/components/ContextMenu.js +1 -1
- package/lib/components/DatePicker.d.ts +43 -40
- package/lib/components/DatePicker.js +11 -4
- package/lib/components/DateRangePicker.d.ts +144 -81
- package/lib/components/DateRangePicker.js +191 -78
- package/lib/components/Drawer.d.ts +10 -10
- package/lib/components/Drawer.js +1 -1
- package/lib/components/Editor.d.ts +47 -41
- package/lib/components/Editor.js +9 -9
- 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.js +1 -1
- package/lib/components/Html.js +1 -1
- package/lib/components/ImageGallery.d.ts +70 -40
- package/lib/components/ImageGallery.js +97 -14
- 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.d.ts +10 -10
- 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 +59 -4
- package/lib/components/Modal.d.ts +60 -58
- package/lib/components/Modal.js +9 -4
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/NumberInput.js +2 -2
- package/lib/components/Pagination.d.ts +49 -66
- package/lib/components/Pagination.js +4 -4
- 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.d.ts +1 -0
- package/lib/components/PopOverContainer.js +3 -3
- package/lib/components/PopUp.js +1 -1
- package/lib/components/Progress.d.ts +16 -10
- package/lib/components/Progress.js +27 -5
- package/lib/components/PullRefresh.js +1 -1
- package/lib/components/Radios.js +1 -1
- package/lib/components/Range.js +3 -2
- package/lib/components/Rating.js +1 -1
- package/lib/components/ResultBox.js +7 -3
- package/lib/components/ResultList.js +1 -1
- package/lib/components/ResultTableList.js +1 -1
- package/lib/components/ResultTreeList.js +1 -1
- package/lib/components/RichText.js +261 -3
- package/lib/components/SearchBox.js +1 -1
- package/lib/components/Select.d.ts +194 -193
- package/lib/components/Select.js +8 -4
- package/lib/components/Selection.js +1 -1
- package/lib/components/SparkLine.d.ts +40 -40
- package/lib/components/SparkLine.js +1 -1
- package/lib/components/Spinner.js +1 -1
- package/lib/components/Steps.js +1 -1
- package/lib/components/Switch.js +1 -1
- package/lib/components/TableSelection.js +1 -1
- package/lib/components/Tabs.d.ts +149 -13
- package/lib/components/Tabs.js +39 -11
- 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 +4 -2
- package/lib/components/Timeline.js +1 -1
- package/lib/components/TimelineItem.js +4 -4
- package/lib/components/Tinymce.d.ts +1 -3
- package/lib/components/Tinymce.js +563 -3
- 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.js +11 -4
- package/lib/components/TransferDropDown.js +4 -5
- package/lib/components/TransferPicker.js +1 -1
- package/lib/components/TransferSearch.js +1 -1
- package/lib/components/Tree.js +34 -33
- package/lib/components/TreeSelection.js +1 -1
- package/lib/components/UserSelect.js +5 -3
- package/lib/components/UserTabSelect.js +1 -1
- package/lib/components/WithRemoteConfig.js +1 -1
- package/lib/components/WithStore.js +1 -1
- package/lib/components/calendar/Calendar.d.ts +1 -0
- package/lib/components/calendar/Calendar.js +7 -2
- package/lib/components/calendar/CalendarContainer.js +1 -1
- package/lib/components/calendar/DaysView.d.ts +1 -1
- package/lib/components/calendar/DaysView.js +69 -29
- package/lib/components/calendar/MonthsView.js +1 -1
- package/lib/components/calendar/QuartersView.js +1 -1
- package/lib/components/calendar/TimeView.d.ts +0 -1
- package/lib/components/calendar/TimeView.js +5 -6
- package/lib/components/calendar/YearsView.js +1 -1
- package/lib/components/condition-builder/Expression.js +1 -1
- package/lib/components/condition-builder/Field.js +1 -1
- package/lib/components/condition-builder/Formula.js +1 -1
- package/lib/components/condition-builder/Func.js +1 -1
- package/lib/components/condition-builder/Group.js +1 -1
- package/lib/components/condition-builder/GroupOrItem.js +4 -4
- package/lib/components/condition-builder/InputSwitch.js +1 -1
- package/lib/components/condition-builder/Item.js +1 -1
- package/lib/components/condition-builder/Value.js +1 -1
- package/lib/components/condition-builder/config.js +1 -1
- package/lib/components/condition-builder/index.js +1 -1
- package/lib/components/formula/Editor.js +1 -1
- package/lib/components/formula/FuncList.js +1 -1
- package/lib/components/formula/Picker.d.ts +1 -0
- package/lib/components/formula/Picker.js +10 -1
- package/lib/components/formula/VariableList.js +1 -1
- package/lib/components/formula/plugin.d.ts +1 -0
- package/lib/components/formula/plugin.js +11 -4
- package/lib/components/icons.d.ts +2 -1
- package/lib/components/icons.js +18 -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.d.ts +2 -1
- package/lib/components/table/Cell.js +1 -1
- package/lib/components/table/HeadCellDropDown.d.ts +3 -1
- package/lib/components/table/HeadCellDropDown.js +1 -1
- package/lib/components/table/HeadCellFilter.d.ts +3 -2
- package/lib/components/table/HeadCellFilter.js +4 -4
- package/lib/components/table/HeadCellSelect.d.ts +3 -2
- package/lib/components/table/HeadCellSelect.js +4 -2
- package/lib/components/table/HeadCellSort.d.ts +4 -3
- package/lib/components/table/HeadCellSort.js +6 -6
- package/lib/components/table/ItemActionsWrapper.js +1 -1
- package/lib/components/table/index.d.ts +3 -4
- package/lib/components/table/index.js +9 -9
- package/lib/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/lib/components/virtual-list/constants.js +1 -1
- package/lib/components/virtual-list/index.d.ts +3 -3
- package/lib/components/virtual-list/index.js +1 -1
- package/lib/helper.css +0 -8335
- 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 +2 -2
- package/lib/icons/alert-info.svg.js +1 -1
- package/lib/icons/alert-success.svg.js +2 -2
- package/lib/icons/alert-warning.svg.js +2 -2
- 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 +60 -0
- 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 +2 -2
- package/lib/icons/down.svg.js +55 -0
- 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 -2
- 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 +7 -4
- 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 +48 -0
- 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 +7 -4
- package/lib/icons/right-double-arrow.svg.js +48 -0
- package/lib/icons/role.svg.js +1 -1
- package/lib/icons/rotate-left.svg.js +48 -0
- package/lib/icons/rotate-right.svg.js +48 -0
- package/lib/icons/scale-origin.svg.js +50 -0
- 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 +2 -2
- 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 +48 -0
- 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 +3 -1
- package/lib/locale/de-DE.js +25 -5
- package/lib/locale/en-US.js +21 -1
- package/lib/locale/zh-CN.js +25 -7
- package/lib/scss/helper.scss.js +3 -5
- package/lib/scss/themes/ang.scss.js +3 -5
- package/lib/scss/themes/antd.scss.js +3 -5
- package/lib/scss/themes/cxd.scss.js +3 -5
- package/lib/scss/themes/dark.scss.js +3 -5
- package/lib/scss/themes/default.scss.js +3 -5
- package/lib/themes/ang.css +1751 -913
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +1751 -913
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +1800 -961
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +1755 -917
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +1800 -961
- package/package.json +14 -12
- package/scss/_properties.scss +100 -23
- package/scss/base/_typography.scss +4 -0
- package/scss/components/_alert.scss +15 -0
- package/scss/components/_anchor-nav.scss +22 -7
- package/scss/components/_badge.scss +1 -0
- package/scss/components/_breadcrumb.scss +12 -1
- package/scss/components/_card.scss +4 -0
- package/scss/components/_collapse-group.scss +13 -1
- package/scss/components/_collapse.scss +2 -1
- package/scss/components/_column-toggler.scss +7 -1
- package/scss/components/_crud.scss +10 -2
- package/scss/components/_crud2.scss +10 -2
- package/scss/components/_drawer.scss +58 -5
- package/scss/components/_dropdown.scss +1 -0
- package/scss/components/_image-gallery.scss +62 -0
- package/scss/components/_input-box.scss +1 -0
- package/scss/components/_modal.scss +7 -10
- package/scss/components/_page.scss +1 -1
- package/scss/components/_pagination.scss +4 -3
- package/scss/components/_progress.scss +15 -1
- package/scss/components/_result-box.scss +5 -6
- package/scss/components/_search-box.scss +4 -0
- package/scss/components/_steps.scss +23 -12
- package/scss/components/_table.scss +124 -12
- package/scss/components/{_table-v2.scss → _table2.scss} +1 -1
- package/scss/components/_tabs.scss +91 -5
- package/scss/components/_timeline.scss +15 -1
- package/scss/components/form/_checks.scss +13 -2
- package/scss/components/form/_date-range.scss +40 -11
- package/scss/components/form/_date.scss +99 -33
- package/scss/components/form/_editor.scss +11 -0
- package/scss/components/form/_form.scss +14 -3
- package/scss/components/form/_nested-select.scss +6 -0
- package/scss/components/form/_number.scss +18 -13
- package/scss/components/form/_picker.scss +8 -0
- package/scss/components/form/_rating.scss +2 -2
- package/scss/components/form/_select.scss +34 -3
- package/scss/components/form/_selection.scss +1 -0
- package/scss/components/form/_text.scss +6 -0
- package/scss/components/form/_textarea.scss +15 -11
- package/scss/components/form/_transfer.scss +33 -11
- package/scss/components/form/_tree.scss +33 -7
- package/scss/components/react-datetime.scss +6 -1
- package/scss/themes/_common.scss +1 -1
- package/scss/themes/_cxd-variables.scss +9 -8
- package/scss/themes/cxd.scss +6 -8
- package/esm/components/BarCode2.js +0 -42
- package/esm/components/CityDB2.js +0 -4101
- package/esm/components/ColorPicker2.js +0 -202
- package/esm/components/Markdown2.js +0 -60
- package/esm/components/RichText2.js +0 -262
- package/esm/components/Tinymce2.js +0 -548
- package/lib/components/BarCode2.js +0 -52
- package/lib/components/CityDB2.js +0 -4108
- package/lib/components/ColorPicker2.js +0 -211
- package/lib/components/Markdown2.js +0 -70
- package/lib/components/RichText2.js +0 -272
- package/lib/components/Tinymce2.js +0 -557
- package/lib/scss/helper.scss2.js +0 -12
- package/lib/scss/themes/ang.scss2.js +0 -12
- package/lib/scss/themes/antd.scss2.js +0 -12
- package/lib/scss/themes/cxd.scss2.js +0 -12
- package/lib/scss/themes/dark.scss2.js +0 -12
- package/lib/scss/themes/default.scss2.js +0 -12
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.0
|
|
2
|
+
* amis-ui v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { __extends, __spreadArray, __assign } from 'tslib';
|
|
6
|
+
import { __extends, __spreadArray, __assign, __rest } from 'tslib';
|
|
7
7
|
import React__default from 'react';
|
|
8
8
|
import moment from 'moment';
|
|
9
|
+
import omit from 'lodash/omit';
|
|
10
|
+
import kebabCase from 'lodash/kebabCase';
|
|
9
11
|
import { findDOMNode } from 'react-dom';
|
|
10
12
|
import { Icon } from './icons.js';
|
|
11
|
-
import { noop, isMobile, ucFirst, Overlay, PopOver, themeable, localeable } from 'amis-core';
|
|
13
|
+
import { noop, getComputedStyle, isMobile, ucFirst, Overlay, PopOver, themeable, localeable } from 'amis-core';
|
|
12
14
|
import Calendar from './calendar/Calendar.js';
|
|
13
15
|
import PopUp from './PopUp.js';
|
|
14
16
|
import CalendarMobile from './CalendarMobile.js';
|
|
@@ -352,9 +354,11 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
352
354
|
var _this = _super.call(this, props) || this;
|
|
353
355
|
// 是否是第一次点击,如果是第一次点击就可以点任意地址
|
|
354
356
|
_this.isFirstClick = true;
|
|
355
|
-
_this.nextMonth = moment().add(1, 'months');
|
|
357
|
+
_this.nextMonth = moment().add(1, 'months').startOf('day');
|
|
358
|
+
_this.currentMonth = moment().startOf('day');
|
|
356
359
|
_this.startInputRef = React__default.createRef();
|
|
357
360
|
_this.endInputRef = React__default.createRef();
|
|
361
|
+
_this.separatorRef = React__default.createRef();
|
|
358
362
|
_this.calendarRef = React__default.createRef();
|
|
359
363
|
_this.open = _this.open.bind(_this);
|
|
360
364
|
_this.openStart = _this.openStart.bind(_this);
|
|
@@ -364,7 +368,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
364
368
|
_this.endInputChange = _this.endInputChange.bind(_this);
|
|
365
369
|
_this.handleDateChange = _this.handleDateChange.bind(_this);
|
|
366
370
|
_this.handleStartDateChange = _this.handleStartDateChange.bind(_this);
|
|
367
|
-
_this.
|
|
371
|
+
_this.handelEndDateChange = _this.handelEndDateChange.bind(_this);
|
|
368
372
|
_this.handleTimeStartChange = _this.handleTimeStartChange.bind(_this);
|
|
369
373
|
_this.handleTimeEndChange = _this.handleTimeEndChange.bind(_this);
|
|
370
374
|
_this.handleFocus = _this.handleFocus.bind(_this);
|
|
@@ -394,7 +398,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
394
398
|
oldStartDate: startDate,
|
|
395
399
|
oldEndDate: endDate,
|
|
396
400
|
startInputValue: startDate === null || startDate === void 0 ? void 0 : startDate.format(inputFormat),
|
|
397
|
-
endInputValue: endDate === null || endDate === void 0 ? void 0 : endDate.format(inputFormat)
|
|
401
|
+
endInputValue: endDate === null || endDate === void 0 ? void 0 : endDate.format(inputFormat),
|
|
402
|
+
endDateOpenedFirst: false
|
|
398
403
|
};
|
|
399
404
|
return _this;
|
|
400
405
|
}
|
|
@@ -410,6 +415,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
410
415
|
}
|
|
411
416
|
return newValue;
|
|
412
417
|
};
|
|
418
|
+
/* 将日期时间转化为momemnt格式,如果输入的内容不合法则返回undefined */
|
|
413
419
|
DateRangePicker.unFormatValue = function (value, format, joinValues, delimiter) {
|
|
414
420
|
if (!value) {
|
|
415
421
|
return {
|
|
@@ -420,9 +426,16 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
420
426
|
if (joinValues && typeof value === 'string') {
|
|
421
427
|
value = value.split(delimiter);
|
|
422
428
|
}
|
|
429
|
+
var startDate = moment(value === null || value === void 0 ? void 0 : value[0], format);
|
|
430
|
+
var endDate = moment(value === null || value === void 0 ? void 0 : value[1], format);
|
|
431
|
+
/**
|
|
432
|
+
* 不合法的value输入都丢弃
|
|
433
|
+
* 注意undefined被moment认为是合法的输入,moment会转化为now,所以需要结合在一起判断
|
|
434
|
+
* @reference https://github.com/moment/moment/issues/1639
|
|
435
|
+
*/
|
|
423
436
|
return {
|
|
424
|
-
startDate: value[0]
|
|
425
|
-
endDate: value[1]
|
|
437
|
+
startDate: value[0] && startDate.isValid() ? startDate : undefined,
|
|
438
|
+
endDate: value[1] && endDate.isValid() ? endDate : undefined
|
|
426
439
|
};
|
|
427
440
|
};
|
|
428
441
|
DateRangePicker.prototype.componentDidMount = function () {
|
|
@@ -454,8 +467,10 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
454
467
|
this.setState({
|
|
455
468
|
startDate: startDate,
|
|
456
469
|
endDate: endDate,
|
|
457
|
-
startInputValue: startDate === null || startDate === void 0 ? void 0 : startDate.
|
|
458
|
-
|
|
470
|
+
startInputValue: startDate && (startDate === null || startDate === void 0 ? void 0 : startDate.isValid())
|
|
471
|
+
? startDate === null || startDate === void 0 ? void 0 : startDate.format(inputFormat)
|
|
472
|
+
: '',
|
|
473
|
+
endInputValue: endDate && (endDate === null || endDate === void 0 ? void 0 : endDate.isValid()) ? endDate === null || endDate === void 0 ? void 0 : endDate.format(inputFormat) : ''
|
|
459
474
|
});
|
|
460
475
|
}
|
|
461
476
|
};
|
|
@@ -508,24 +523,39 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
508
523
|
}
|
|
509
524
|
this.setState({
|
|
510
525
|
isOpened: true,
|
|
511
|
-
editState: 'end'
|
|
526
|
+
editState: 'end',
|
|
527
|
+
endDateOpenedFirst: true
|
|
512
528
|
});
|
|
513
529
|
};
|
|
514
530
|
DateRangePicker.prototype.close = function (isConfirm) {
|
|
515
531
|
if (isConfirm === void 0) { isConfirm = false; }
|
|
516
532
|
if (!isConfirm) {
|
|
517
|
-
|
|
518
|
-
var
|
|
533
|
+
/** 未点击确认关闭时,将日期恢复至未做任何选择的状态 */
|
|
534
|
+
var _a = this.props, value = _a.value, format = _a.format, joinValues = _a.joinValues, delimiter = _a.delimiter, inputFormat = _a.inputFormat;
|
|
535
|
+
var _b = DateRangePicker.unFormatValue(value, format, joinValues, delimiter), startDate = _b.startDate, endDate = _b.endDate;
|
|
536
|
+
this.setState({
|
|
537
|
+
startDate: startDate,
|
|
538
|
+
endDate: endDate,
|
|
539
|
+
oldStartDate: startDate,
|
|
540
|
+
oldEndDate: endDate,
|
|
541
|
+
startInputValue: startDate && moment(startDate).isValid()
|
|
542
|
+
? startDate.format(inputFormat)
|
|
543
|
+
: '',
|
|
544
|
+
endInputValue: endDate && moment(endDate).isValid()
|
|
545
|
+
? endDate.format(inputFormat)
|
|
546
|
+
: ''
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
519
550
|
this.setState({
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
startDate: oldStartDate,
|
|
523
|
-
startInputValue: oldStartDate ? oldStartDate.format(inputFormat) : ''
|
|
551
|
+
oldStartDate: this.state.startDate,
|
|
552
|
+
oldEndDate: this.state.endDate
|
|
524
553
|
});
|
|
525
554
|
}
|
|
526
555
|
this.setState({
|
|
527
556
|
isOpened: false,
|
|
528
|
-
editState: undefined
|
|
557
|
+
editState: undefined,
|
|
558
|
+
endDateOpenedFirst: false
|
|
529
559
|
}, this.blur);
|
|
530
560
|
};
|
|
531
561
|
DateRangePicker.prototype.handleClick = function () {
|
|
@@ -542,19 +572,17 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
542
572
|
}
|
|
543
573
|
};
|
|
544
574
|
DateRangePicker.prototype.confirm = function () {
|
|
545
|
-
var _a;
|
|
546
|
-
|
|
575
|
+
var _a = this.props, format = _a.format, joinValues = _a.joinValues, delimiter = _a.delimiter, utc = _a.utc;
|
|
576
|
+
var _b = this.state, startDate = _b.startDate, endDate = _b.endDate;
|
|
577
|
+
if (!startDate && !endDate) {
|
|
547
578
|
return;
|
|
548
579
|
}
|
|
549
|
-
else if (
|
|
580
|
+
else if (endDate && (startDate === null || startDate === void 0 ? void 0 : startDate.isAfter(this.state.endDate))) {
|
|
550
581
|
return;
|
|
551
582
|
}
|
|
552
|
-
this.props.onChange(DateRangePicker.formatValue({
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}, this.props.format, this.props.joinValues, this.props.delimiter, this.props.utc));
|
|
556
|
-
if (this.state.startDate && !this.state.endDate) {
|
|
557
|
-
this.setState({ editState: 'end' });
|
|
583
|
+
this.props.onChange(DateRangePicker.formatValue({ startDate: startDate, endDate: endDate }, format, joinValues, delimiter, utc));
|
|
584
|
+
if (startDate && !endDate) {
|
|
585
|
+
this.setState({ editState: 'end', endDateOpenedFirst: false });
|
|
558
586
|
}
|
|
559
587
|
else {
|
|
560
588
|
this.close(true);
|
|
@@ -590,51 +618,46 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
590
618
|
this.handleStartDateChange(newValue);
|
|
591
619
|
}
|
|
592
620
|
else if (editState === 'end') {
|
|
593
|
-
this.
|
|
621
|
+
this.handelEndDateChange(newValue);
|
|
594
622
|
}
|
|
595
623
|
};
|
|
596
624
|
DateRangePicker.prototype.handleStartDateChange = function (newValue) {
|
|
597
625
|
var _a = this.props, timeFormat = _a.timeFormat, minDate = _a.minDate, inputFormat = _a.inputFormat, type = _a.type;
|
|
598
|
-
var
|
|
626
|
+
var _b = this.state, startDate = _b.startDate, endDateOpenedFirst = _b.endDateOpenedFirst;
|
|
599
627
|
if (minDate && newValue.isBefore(minDate)) {
|
|
600
628
|
newValue = minDate;
|
|
601
629
|
}
|
|
602
630
|
var date = this.filterDate(newValue, startDate || minDate, timeFormat, 'start');
|
|
603
631
|
var newState = {
|
|
604
632
|
startDate: date,
|
|
605
|
-
oldStartDate: startDate,
|
|
606
633
|
startInputValue: date.format(inputFormat)
|
|
607
634
|
};
|
|
608
635
|
// 这些没有时间的选择点第一次后第二次就是选结束时间
|
|
609
|
-
if (
|
|
610
|
-
type === 'input-
|
|
611
|
-
|
|
612
|
-
|
|
636
|
+
if (!endDateOpenedFirst &&
|
|
637
|
+
(type === 'input-date-range' ||
|
|
638
|
+
type === 'input-year-range' ||
|
|
639
|
+
type === 'input-quarter-range' ||
|
|
640
|
+
type === 'input-month-range')) {
|
|
613
641
|
newState.editState = 'end';
|
|
614
642
|
}
|
|
615
643
|
this.setState(newState);
|
|
616
644
|
};
|
|
617
|
-
DateRangePicker.prototype.
|
|
645
|
+
DateRangePicker.prototype.handelEndDateChange = function (newValue) {
|
|
618
646
|
var _this = this;
|
|
619
|
-
var _a = this.props, embed = _a.embed, timeFormat = _a.timeFormat, inputFormat = _a.inputFormat;
|
|
620
|
-
var _b = this.state
|
|
647
|
+
var _a = this.props, embed = _a.embed, timeFormat = _a.timeFormat, inputFormat = _a.inputFormat, type = _a.type;
|
|
648
|
+
var _b = this.state; _b.startDate; var endDate = _b.endDate, endDateOpenedFirst = _b.endDateOpenedFirst;
|
|
621
649
|
newValue = this.getEndDateByDuration(newValue);
|
|
622
|
-
|
|
623
|
-
if (newValue.isBefore(startDate)) {
|
|
624
|
-
this.setState({
|
|
625
|
-
startDate: undefined,
|
|
626
|
-
oldStartDate: startDate,
|
|
627
|
-
startInputValue: ''
|
|
628
|
-
});
|
|
629
|
-
}
|
|
650
|
+
var editState = endDateOpenedFirst ? 'start' : 'end';
|
|
630
651
|
var date = this.filterDate(newValue, endDate, timeFormat, 'end');
|
|
631
652
|
this.setState({
|
|
632
653
|
endDate: date,
|
|
633
|
-
oldEndDate: endDate,
|
|
634
654
|
endInputValue: date.format(inputFormat)
|
|
635
655
|
}, function () {
|
|
636
656
|
embed && _this.confirm();
|
|
637
657
|
});
|
|
658
|
+
if (type !== 'input-datetime-range') {
|
|
659
|
+
this.setState({ editState: editState });
|
|
660
|
+
}
|
|
638
661
|
};
|
|
639
662
|
// 手动控制输入时间
|
|
640
663
|
DateRangePicker.prototype.startInputChange = function (e) {
|
|
@@ -865,7 +888,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
865
888
|
? maxDate.isBefore(endDate)
|
|
866
889
|
? maxDate
|
|
867
890
|
: endDate
|
|
868
|
-
:
|
|
891
|
+
: maxDate || endDate;
|
|
869
892
|
if (minDate && currentDate.isBefore(minDate, precision)) {
|
|
870
893
|
return false;
|
|
871
894
|
}
|
|
@@ -895,7 +918,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
895
918
|
? minDate.isAfter(startDate)
|
|
896
919
|
? minDate
|
|
897
920
|
: startDate
|
|
898
|
-
:
|
|
921
|
+
: minDate || startDate;
|
|
899
922
|
if (minDate && currentDate.isBefore(minDate, precision)) {
|
|
900
923
|
return false;
|
|
901
924
|
}
|
|
@@ -916,12 +939,23 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
916
939
|
};
|
|
917
940
|
DateRangePicker.prototype.renderDay = function (props, currentDate) {
|
|
918
941
|
var _a = this.state, startDate = _a.startDate, endDate = _a.endDate;
|
|
942
|
+
// 剔除掉 DaysView 中传递的参数
|
|
943
|
+
props = omit(props, ['todayActiveStyle']);
|
|
944
|
+
props.className = props.className.replace('rdtActive', '');
|
|
919
945
|
if (startDate &&
|
|
920
946
|
endDate &&
|
|
921
947
|
currentDate.isBetween(startDate, endDate, 'day', '[]')) {
|
|
922
948
|
props.className += ' rdtBetween';
|
|
923
949
|
}
|
|
924
|
-
|
|
950
|
+
if (startDate && currentDate.isSame(startDate, 'day')) {
|
|
951
|
+
props.className += ' rdtActive rdtStartDay';
|
|
952
|
+
}
|
|
953
|
+
if (endDate && currentDate.isSame(endDate, 'day')) {
|
|
954
|
+
props.className += ' rdtActive rdtEndDay';
|
|
955
|
+
}
|
|
956
|
+
var _b = this.getDisabledElementProps(currentDate), className = _b.className, others = __rest(_b, ["className"]);
|
|
957
|
+
props.className += className;
|
|
958
|
+
return (React__default.createElement("td", __assign({}, props, others),
|
|
925
959
|
React__default.createElement("span", null, currentDate.date())));
|
|
926
960
|
};
|
|
927
961
|
DateRangePicker.prototype.renderMonth = function (props, month, year, date) {
|
|
@@ -936,7 +970,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
936
970
|
currentDate.isBetween(startDate, endDate, 'month', '[]')) {
|
|
937
971
|
props.className += ' rdtBetween';
|
|
938
972
|
}
|
|
939
|
-
|
|
973
|
+
var _b = this.getDisabledElementProps(currentDate), className = _b.className, others = __rest(_b, ["className"]);
|
|
974
|
+
props.className += className;
|
|
975
|
+
return (React__default.createElement("td", __assign({}, props, others),
|
|
940
976
|
React__default.createElement("span", null, monthStrFixedLength)));
|
|
941
977
|
};
|
|
942
978
|
DateRangePicker.prototype.renderQuarter = function (props, quarter, year) {
|
|
@@ -947,7 +983,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
947
983
|
currentDate.isBetween(startDate, endDate, 'quarter', '[]')) {
|
|
948
984
|
props.className += ' rdtBetween';
|
|
949
985
|
}
|
|
950
|
-
|
|
986
|
+
var _b = this.getDisabledElementProps(currentDate), className = _b.className, others = __rest(_b, ["className"]);
|
|
987
|
+
props.className += className;
|
|
988
|
+
return (React__default.createElement("td", __assign({}, props, others),
|
|
951
989
|
React__default.createElement("span", null,
|
|
952
990
|
"Q",
|
|
953
991
|
quarter)));
|
|
@@ -960,46 +998,114 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
960
998
|
currentDate.isBetween(startDate, endDate, 'year', '[]')) {
|
|
961
999
|
props.className += ' rdtBetween';
|
|
962
1000
|
}
|
|
963
|
-
|
|
1001
|
+
var _b = this.getDisabledElementProps(currentDate), className = _b.className, others = __rest(_b, ["className"]);
|
|
1002
|
+
props.className += className;
|
|
1003
|
+
return (React__default.createElement("td", __assign({}, props, others),
|
|
964
1004
|
React__default.createElement("span", null, year)));
|
|
965
1005
|
};
|
|
966
1006
|
DateRangePicker.prototype.renderCalendar = function () {
|
|
967
1007
|
var _this = this;
|
|
968
|
-
var _a;
|
|
969
|
-
var _b = this.props, ns = _b.classPrefix, cx = _b.classnames, dateFormat = _b.dateFormat, timeFormat = _b.timeFormat, inputFormat = _b.inputFormat, ranges = _b.ranges, locale = _b.locale, embed = _b.embed, type = _b.type, _c = _b.viewMode, viewMode = _c === void 0 ? 'days' : _c; _b.useMobileUI;
|
|
1008
|
+
var _a = this.props, ns = _a.classPrefix, cx = _a.classnames, dateFormat = _a.dateFormat, timeFormat = _a.timeFormat, inputFormat = _a.inputFormat, ranges = _a.ranges, locale = _a.locale, embed = _a.embed, type = _a.type, _b = _a.viewMode, viewMode = _b === void 0 ? 'days' : _b;
|
|
970
1009
|
var __ = this.props.translate;
|
|
971
|
-
var
|
|
1010
|
+
var _c = this.state, startDate = _c.startDate, endDate = _c.endDate, editState = _c.editState;
|
|
1011
|
+
var isDateTimeRange = type === 'input-datetime-range';
|
|
1012
|
+
var isDateRange = type === 'input-date-range';
|
|
972
1013
|
// timeRange需要单独选择范围
|
|
973
|
-
var isTimeRange =
|
|
1014
|
+
var isTimeRange = isDateTimeRange || viewMode === 'time';
|
|
1015
|
+
var isConfirmBtnDisbaled = (isTimeRange && editState === 'start' && !startDate) ||
|
|
1016
|
+
(isTimeRange && editState === 'end' && !endDate) ||
|
|
1017
|
+
(startDate && (endDate === null || endDate === void 0 ? void 0 : endDate.isBefore(this.state.startDate))) ||
|
|
1018
|
+
/** 日期范围选择之后会立即切换面板,所以开始/结束日期任意一个不合法就不允许更新数据 */
|
|
1019
|
+
(isDateRange &&
|
|
1020
|
+
(!startDate ||
|
|
1021
|
+
!endDate ||
|
|
1022
|
+
!(startDate === null || startDate === void 0 ? void 0 : startDate.isValid()) ||
|
|
1023
|
+
!(endDate === null || endDate === void 0 ? void 0 : endDate.isValid())));
|
|
974
1024
|
return (React__default.createElement("div", { className: cx("".concat(ns, "DateRangePicker-wrap")), ref: this.calendarRef },
|
|
975
1025
|
this.renderRanges(ranges),
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
1026
|
+
React__default.createElement("div", { className: cx("".concat(ns, "DateRangePicker-picker-wrap")) },
|
|
1027
|
+
(!isTimeRange || (editState === 'start' && !embed)) && (React__default.createElement(Calendar, { className: "".concat(ns, "DateRangePicker-start"), value: startDate,
|
|
1028
|
+
// 区分的原因是 time-range 左侧就只能选起始时间,而其它都能在左侧同时同时选择起始和结束
|
|
1029
|
+
// TODO: 后续得把 time-range 代码拆分出来
|
|
1030
|
+
onChange: isDateTimeRange
|
|
1031
|
+
? this.handleStartDateChange
|
|
1032
|
+
: viewMode === 'time'
|
|
1033
|
+
? this.handleTimeStartChange
|
|
1034
|
+
: this.handleDateChange, requiredConfirm: false, dateFormat: dateFormat, inputFormat: inputFormat, timeFormat: timeFormat, isValidDate: this.checkStartIsValidDate, viewMode: viewMode, input: false, onClose: this.close, renderDay: this.renderDay, renderMonth: this.renderMonth, renderQuarter: this.renderQuarter, renderYear: this.renderYear, locale: locale, timeRangeHeader: "\u5F00\u59CB\u65F6\u95F4" })),
|
|
1035
|
+
(!isTimeRange || (editState === 'end' && !embed)) && (React__default.createElement(Calendar, { className: "".concat(ns, "DateRangePicker-end"), value: endDate, onChange: isDateTimeRange
|
|
1036
|
+
? this.handelEndDateChange
|
|
1037
|
+
: viewMode === 'time'
|
|
1038
|
+
? this.handleTimeEndChange
|
|
1039
|
+
: this.handleDateChange, requiredConfirm: false, dateFormat: dateFormat, inputFormat: inputFormat, timeFormat: timeFormat, viewDate: isDateTimeRange ? this.currentMonth : this.nextMonth,
|
|
1040
|
+
// isEndDate
|
|
1041
|
+
isValidDate: this.checkEndIsValidDate, viewMode: viewMode, input: false, onClose: this.close, renderDay: this.renderDay, renderMonth: this.renderMonth, renderQuarter: this.renderQuarter, renderYear: this.renderYear, locale: locale, timeRangeHeader: "\u7ED3\u675F\u65F6\u95F4" }))),
|
|
989
1042
|
embed ? null : (React__default.createElement("div", { key: "button", className: "".concat(ns, "DateRangePicker-actions") },
|
|
990
|
-
React__default.createElement("a", { className: cx('Button', 'Button--default'), onClick: function () { return _this.close; } }, __('cancel')),
|
|
1043
|
+
React__default.createElement("a", { className: cx('Button', 'Button--default'), onClick: function () { return _this.close(); } }, __('cancel')),
|
|
991
1044
|
React__default.createElement("a", { className: cx('Button', 'Button--primary', 'm-l-sm', {
|
|
992
|
-
'is-disabled':
|
|
993
|
-
isTimeRange &&
|
|
994
|
-
editState === 'start') ||
|
|
995
|
-
(!this.state.endDate && isTimeRange && editState === 'end') ||
|
|
996
|
-
((_a = this.state.endDate) === null || _a === void 0 ? void 0 : _a.isBefore(this.state.startDate))
|
|
1045
|
+
'is-disabled': isConfirmBtnDisbaled
|
|
997
1046
|
}), onClick: this.confirm }, __('confirm'))))));
|
|
998
1047
|
};
|
|
1048
|
+
DateRangePicker.prototype.getDisabledElementProps = function (currentDate) {
|
|
1049
|
+
var _a = this.state; _a.endDateOpenedFirst; var endDate = _a.endDate, startDate = _a.startDate, editState = _a.editState;
|
|
1050
|
+
var afterEndDate = editState === 'start' && currentDate > endDate;
|
|
1051
|
+
var beforeStartDate = editState === 'end' && currentDate < startDate;
|
|
1052
|
+
if (afterEndDate || beforeStartDate) {
|
|
1053
|
+
return {
|
|
1054
|
+
className: ' is-disabled',
|
|
1055
|
+
onClick: undefined
|
|
1056
|
+
};
|
|
1057
|
+
}
|
|
1058
|
+
return {
|
|
1059
|
+
className: ''
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
1062
|
+
/** 获取宽度类型变量的值 */
|
|
1063
|
+
DateRangePicker.prototype.getValidWidthValue = function (element, propsName) {
|
|
1064
|
+
if (!element || !propsName) {
|
|
1065
|
+
return 0;
|
|
1066
|
+
}
|
|
1067
|
+
var propsValue = parseInt(getComputedStyle(element, kebabCase(propsName)), 10);
|
|
1068
|
+
return isNaN(propsValue) ? 0 : propsValue;
|
|
1069
|
+
};
|
|
1070
|
+
DateRangePicker.prototype.renderActiveCursor = function () {
|
|
1071
|
+
var _a, _b, _c, _d;
|
|
1072
|
+
var cx = this.props.classnames;
|
|
1073
|
+
var _e = this.state, editState = _e.editState, isFocused = _e.isFocused;
|
|
1074
|
+
var cursorWidth = 0;
|
|
1075
|
+
var cursorLeft = 0;
|
|
1076
|
+
var parentNode = (_a = this === null || this === void 0 ? void 0 : this.dom) === null || _a === void 0 ? void 0 : _a.current;
|
|
1077
|
+
var startInputNode = (_b = this === null || this === void 0 ? void 0 : this.startInputRef) === null || _b === void 0 ? void 0 : _b.current;
|
|
1078
|
+
var endInputNode = (_c = this === null || this === void 0 ? void 0 : this.endInputRef) === null || _c === void 0 ? void 0 : _c.current;
|
|
1079
|
+
var separatorNode = (_d = this === null || this === void 0 ? void 0 : this.separatorRef) === null || _d === void 0 ? void 0 : _d.current;
|
|
1080
|
+
if (parentNode && startInputNode && endInputNode && separatorNode) {
|
|
1081
|
+
if (editState === 'start') {
|
|
1082
|
+
var paddingWidth = this.getValidWidthValue(parentNode, 'paddingLeft');
|
|
1083
|
+
cursorLeft = paddingWidth;
|
|
1084
|
+
cursorWidth = startInputNode.offsetWidth;
|
|
1085
|
+
}
|
|
1086
|
+
else if (editState === 'end') {
|
|
1087
|
+
var separatorWidth = separatorNode.offsetWidth +
|
|
1088
|
+
this.getValidWidthValue(parentNode, 'paddingLeft') +
|
|
1089
|
+
this.getValidWidthValue(parentNode, 'marginLeft') +
|
|
1090
|
+
this.getValidWidthValue(parentNode, 'paddingRight') +
|
|
1091
|
+
this.getValidWidthValue(parentNode, 'marginRight');
|
|
1092
|
+
cursorLeft = startInputNode.offsetWidth + separatorWidth;
|
|
1093
|
+
cursorWidth = endInputNode.offsetWidth;
|
|
1094
|
+
}
|
|
1095
|
+
else {
|
|
1096
|
+
cursorWidth = 0;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
return (React__default.createElement("div", { className: cx('DateRangePicker-activeCursor', { isFocused: isFocused }), style: {
|
|
1100
|
+
position: 'absolute',
|
|
1101
|
+
left: cursorLeft,
|
|
1102
|
+
width: cursorWidth
|
|
1103
|
+
} }));
|
|
1104
|
+
};
|
|
999
1105
|
DateRangePicker.prototype.render = function () {
|
|
1000
1106
|
var _a;
|
|
1001
1107
|
var _this = this;
|
|
1002
|
-
var _b = this.props, className = _b.className, popoverClassName = _b.popoverClassName, ns = _b.classPrefix, cx = _b.classnames, value = _b.value, startPlaceholder = _b.startPlaceholder, endPlaceholder = _b.endPlaceholder, popOverContainer = _b.popOverContainer, inputFormat = _b.inputFormat; _b.format; _b.joinValues; _b.delimiter; var clearable = _b.clearable, disabled = _b.disabled, embed = _b.embed, overlayPlacement = _b.overlayPlacement, borderMode = _b.borderMode, useMobileUI = _b.useMobileUI, timeFormat = _b.timeFormat, minDate = _b.minDate, maxDate = _b.maxDate, minDuration = _b.minDuration, maxDuration = _b.maxDuration, dateFormat = _b.dateFormat, _c = _b.viewMode, viewMode = _c === void 0 ? 'days' : _c, ranges = _b.ranges, label = _b.label;
|
|
1108
|
+
var _b = this.props, className = _b.className, popoverClassName = _b.popoverClassName, ns = _b.classPrefix, cx = _b.classnames, value = _b.value, startPlaceholder = _b.startPlaceholder, endPlaceholder = _b.endPlaceholder, popOverContainer = _b.popOverContainer, inputFormat = _b.inputFormat; _b.format; _b.joinValues; _b.delimiter; var clearable = _b.clearable, disabled = _b.disabled, embed = _b.embed, overlayPlacement = _b.overlayPlacement, borderMode = _b.borderMode, useMobileUI = _b.useMobileUI, timeFormat = _b.timeFormat, minDate = _b.minDate, maxDate = _b.maxDate, minDuration = _b.minDuration, maxDuration = _b.maxDuration, dateFormat = _b.dateFormat, _c = _b.viewMode, viewMode = _c === void 0 ? 'days' : _c, ranges = _b.ranges, label = _b.label, animation = _b.animation;
|
|
1003
1109
|
var useCalendarMobile = useMobileUI &&
|
|
1004
1110
|
isMobile() &&
|
|
1005
1111
|
['days', 'months', 'quarters'].indexOf(viewMode) > -1;
|
|
@@ -1012,6 +1118,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1012
1118
|
}, className) }, useCalendarMobile ? calendarMobile : this.renderCalendar()));
|
|
1013
1119
|
}
|
|
1014
1120
|
var CalendarMobileTitle = (React__default.createElement("div", { className: "".concat(ns, "CalendarMobile-title") }, label && typeof label === 'string' ? label : __('Calendar.datepicker')));
|
|
1121
|
+
/** 是否启用游标动画 */
|
|
1122
|
+
var useAnimation = animation !== false;
|
|
1015
1123
|
return (React__default.createElement("div", { tabIndex: 0, onKeyPress: this.handleKeyPress, onFocus: this.handleFocus, onBlur: this.handleBlur, className: cx("".concat(ns, "DateRangePicker"), (_a = {
|
|
1016
1124
|
'is-disabled': disabled,
|
|
1017
1125
|
'is-focused': isFocused
|
|
@@ -1020,12 +1128,14 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1020
1128
|
_a['is-mobile'] = useMobileUI && isMobile(),
|
|
1021
1129
|
_a), className), ref: this.dom },
|
|
1022
1130
|
React__default.createElement(Input, { className: cx('DateRangePicker-input', {
|
|
1023
|
-
isActive: this.state.editState === 'start' && isOpened
|
|
1131
|
+
isActive: !useAnimation && this.state.editState === 'start' && isOpened
|
|
1024
1132
|
}), onChange: this.startInputChange, onClick: this.openStart, ref: this.startInputRef, placeholder: __(startPlaceholder), autoComplete: "off", value: this.state.startInputValue || '', disabled: disabled }),
|
|
1025
|
-
React__default.createElement("span", { className: cx('DateRangePicker-input-separator') },
|
|
1133
|
+
React__default.createElement("span", { className: cx('DateRangePicker-input-separator'), ref: this.separatorRef },
|
|
1134
|
+
React__default.createElement("span", { className: cx('DateRangePicker-input-separator-line') })),
|
|
1026
1135
|
React__default.createElement(Input, { className: cx('DateRangePicker-input', {
|
|
1027
|
-
isActive: this.state.editState === 'end' && isOpened
|
|
1136
|
+
isActive: !useAnimation && this.state.editState === 'end' && isOpened
|
|
1028
1137
|
}), onChange: this.endInputChange, onClick: this.openEnd, ref: this.endInputRef, placeholder: __(endPlaceholder), autoComplete: "off", value: this.state.endInputValue || '', disabled: disabled }),
|
|
1138
|
+
useAnimation ? this.renderActiveCursor() : null,
|
|
1029
1139
|
clearable && !disabled && value ? (React__default.createElement("a", { className: "".concat(ns, "DateRangePicker-clear"), onClick: this.clearValue },
|
|
1030
1140
|
React__default.createElement(Icon, { icon: "input-clear", className: "icon" }))) : null,
|
|
1031
1141
|
React__default.createElement("a", { className: "".concat(ns, "DateRangePicker-toggler") },
|
|
@@ -1044,7 +1154,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1044
1154
|
ranges: 'yesterday,7daysago,prevweek,thismonth,prevmonth,prevquarter',
|
|
1045
1155
|
resetValue: '',
|
|
1046
1156
|
closeOnSelect: true,
|
|
1047
|
-
overlayPlacement: 'auto'
|
|
1157
|
+
overlayPlacement: 'auto',
|
|
1158
|
+
endDateOpenedFirst: false
|
|
1048
1159
|
};
|
|
1049
1160
|
return DateRangePicker;
|
|
1050
1161
|
}(React__default.Component));
|
|
@@ -58,15 +58,15 @@ export declare class Drawer extends React.Component<DrawerProps, DrawerState> {
|
|
|
58
58
|
render(): JSX.Element;
|
|
59
59
|
}
|
|
60
60
|
declare const _default: {
|
|
61
|
-
new (props: Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "
|
|
61
|
+
new (props: Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "width" | "height" | "closeOnOutside" | "show" | "onExited" | "onEntered" | "bodyClassName" | "resizable"> & Partial<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "showCloseButton" | "size" | "overlay" | "container" | "position">> & Partial<Pick<Pick<DrawerProps, "showCloseButton" | "size" | "overlay" | "container" | "position">, never>> & import("amis-core/lib/theme").ThemeOutterProps): {
|
|
62
62
|
ref: any;
|
|
63
63
|
childRef(ref: any): void;
|
|
64
64
|
getWrappedInstance(): any;
|
|
65
65
|
render(): JSX.Element;
|
|
66
66
|
context: any;
|
|
67
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "
|
|
67
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "width" | "height" | "closeOnOutside" | "show" | "onExited" | "onEntered" | "bodyClassName" | "resizable"> & Partial<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "showCloseButton" | "size" | "overlay" | "container" | "position">> & Partial<Pick<Pick<DrawerProps, "showCloseButton" | "size" | "overlay" | "container" | "position">, never>> & import("amis-core/lib/theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
68
68
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
69
|
-
readonly props: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "
|
|
69
|
+
readonly props: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "width" | "height" | "closeOnOutside" | "show" | "onExited" | "onEntered" | "bodyClassName" | "resizable"> & Partial<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "showCloseButton" | "size" | "overlay" | "container" | "position">> & Partial<Pick<Pick<DrawerProps, "showCloseButton" | "size" | "overlay" | "container" | "position">, never>> & import("amis-core/lib/theme").ThemeOutterProps> & Readonly<{
|
|
70
70
|
children?: React.ReactNode;
|
|
71
71
|
}>;
|
|
72
72
|
state: Readonly<{}>;
|
|
@@ -74,17 +74,17 @@ declare const _default: {
|
|
|
74
74
|
[key: string]: React.ReactInstance;
|
|
75
75
|
};
|
|
76
76
|
componentDidMount?(): void;
|
|
77
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "
|
|
77
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "width" | "height" | "closeOnOutside" | "show" | "onExited" | "onEntered" | "bodyClassName" | "resizable"> & Partial<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "showCloseButton" | "size" | "overlay" | "container" | "position">> & Partial<Pick<Pick<DrawerProps, "showCloseButton" | "size" | "overlay" | "container" | "position">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
78
78
|
componentWillUnmount?(): void;
|
|
79
79
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
80
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "
|
|
81
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "
|
|
80
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "width" | "height" | "closeOnOutside" | "show" | "onExited" | "onEntered" | "bodyClassName" | "resizable"> & Partial<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "showCloseButton" | "size" | "overlay" | "container" | "position">> & Partial<Pick<Pick<DrawerProps, "showCloseButton" | "size" | "overlay" | "container" | "position">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
|
81
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "width" | "height" | "closeOnOutside" | "show" | "onExited" | "onEntered" | "bodyClassName" | "resizable"> & Partial<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "showCloseButton" | "size" | "overlay" | "container" | "position">> & Partial<Pick<Pick<DrawerProps, "showCloseButton" | "size" | "overlay" | "container" | "position">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
82
82
|
componentWillMount?(): void;
|
|
83
83
|
UNSAFE_componentWillMount?(): void;
|
|
84
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "
|
|
85
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "
|
|
86
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "
|
|
87
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "
|
|
84
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "width" | "height" | "closeOnOutside" | "show" | "onExited" | "onEntered" | "bodyClassName" | "resizable"> & Partial<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "showCloseButton" | "size" | "overlay" | "container" | "position">> & Partial<Pick<Pick<DrawerProps, "showCloseButton" | "size" | "overlay" | "container" | "position">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
85
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "width" | "height" | "closeOnOutside" | "show" | "onExited" | "onEntered" | "bodyClassName" | "resizable"> & Partial<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "showCloseButton" | "size" | "overlay" | "container" | "position">> & Partial<Pick<Pick<DrawerProps, "showCloseButton" | "size" | "overlay" | "container" | "position">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
86
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "width" | "height" | "closeOnOutside" | "show" | "onExited" | "onEntered" | "bodyClassName" | "resizable"> & Partial<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "showCloseButton" | "size" | "overlay" | "container" | "position">> & Partial<Pick<Pick<DrawerProps, "showCloseButton" | "size" | "overlay" | "container" | "position">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
87
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "disabled" | "onHide" | "closeOnEsc" | "width" | "height" | "closeOnOutside" | "show" | "onExited" | "onEntered" | "bodyClassName" | "resizable"> & Partial<Pick<Omit<DrawerProps, keyof import("amis-core").ThemeProps>, "showCloseButton" | "size" | "overlay" | "container" | "position">> & Partial<Pick<Pick<DrawerProps, "showCloseButton" | "size" | "overlay" | "container" | "position">, never>> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
88
88
|
};
|
|
89
89
|
displayName: string;
|
|
90
90
|
contextType: React.Context<string>;
|
package/esm/components/Drawer.js
CHANGED