amis-ui 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/404.js +1 -1
- package/esm/components/Alert.js +1 -1
- package/esm/components/Alert2.js +2 -2
- package/esm/components/AnchorNav.d.ts +9 -2
- package/esm/components/AnchorNav.js +25 -6
- package/esm/components/ArrayInput.js +1 -1
- 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 +1 -1
- package/esm/components/BarCode2.js +1 -1
- 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 +1 -1
- package/esm/components/ChainedSelection.js +1 -1
- package/esm/components/Checkbox.js +1 -1
- package/esm/components/CityArea.js +1 -1
- package/esm/components/CityDB.js +1 -1
- package/esm/components/CityDB2.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/ColorPicker2.js +1 -1
- 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 +135 -82
- package/esm/components/DateRangePicker.js +115 -57
- package/esm/components/Drawer.d.ts +10 -10
- package/esm/components/Drawer.js +1 -1
- package/esm/components/Editor.d.ts +40 -40
- 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.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 +1 -1
- package/esm/components/Markdown2.js +1 -1
- package/esm/components/Modal.d.ts +42 -40
- package/esm/components/Modal.js +3 -3
- package/esm/components/ModalManager.js +1 -1
- package/esm/components/MonthRangePicker.d.ts +41 -40
- package/esm/components/NumberInput.js +1 -1
- package/esm/components/Pagination.d.ts +49 -66
- package/esm/components/Pagination.js +3 -3
- 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 +8 -4
- package/esm/components/PullRefresh.js +1 -1
- package/esm/components/Radios.js +1 -1
- package/esm/components/Range.js +1 -1
- 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 +1 -1
- package/esm/components/RichText2.js +1 -1
- package/esm/components/SearchBox.d.ts +127 -42
- package/esm/components/SearchBox.js +183 -20
- package/esm/components/Select.d.ts +389 -194
- package/esm/components/Select.js +17 -22
- 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.js +1 -3
- package/esm/components/TabsTransfer.js +1 -1
- package/esm/components/TabsTransferPicker.js +1 -1
- package/esm/components/Tag.d.ts +12 -10
- package/esm/components/Tag.js +16 -5
- package/esm/components/Textarea.js +4 -2
- package/esm/components/Timeline.js +1 -1
- package/esm/components/TimelineItem.js +3 -3
- package/esm/components/Tinymce.d.ts +1 -3
- package/esm/components/Tinymce.js +1 -1
- package/esm/components/Tinymce2.js +29 -12
- 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 +9 -2
- package/esm/components/TransferDropDown.js +2 -3
- 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 +1 -1
- 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.js +4 -2
- package/esm/components/calendar/CalendarContainer.js +1 -1
- package/esm/components/calendar/DaysView.js +14 -7
- 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.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 +1 -1
- 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.js +1 -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 +20 -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.js +1 -1
- 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 +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 +7 -1
- package/esm/locale/en-US.js +7 -1
- package/esm/locale/zh-CN.js +9 -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.d.ts +10 -10
- package/lib/components/Alert2.js +2 -2
- package/lib/components/AnchorNav.d.ts +19 -12
- package/lib/components/AnchorNav.js +25 -6
- package/lib/components/ArrayInput.d.ts +40 -40
- package/lib/components/ArrayInput.js +1 -1
- package/lib/components/AsideNav.js +1 -1
- package/lib/components/AssociatedSelection.d.ts +40 -40
- package/lib/components/AssociatedSelection.js +1 -1
- package/lib/components/Avatar.d.ts +10 -10
- 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 +1 -1
- package/lib/components/BarCode2.js +1 -1
- package/lib/components/Breadcrumb.js +2 -2
- package/lib/components/Button.d.ts +10 -10
- package/lib/components/Button.js +1 -1
- package/lib/components/CalendarMobile.d.ts +40 -40
- package/lib/components/CalendarMobile.js +1 -1
- package/lib/components/Card.d.ts +10 -10
- 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 +1 -1
- package/lib/components/Checkbox.d.ts +10 -10
- package/lib/components/Checkbox.js +1 -1
- package/lib/components/CityArea.js +1 -1
- package/lib/components/CityDB.js +1 -1
- package/lib/components/CityDB2.js +1 -1
- package/lib/components/CodeMirror.js +1 -1
- package/lib/components/Collapse.d.ts +10 -10
- package/lib/components/Collapse.js +1 -1
- package/lib/components/CollapseGroup.js +1 -1
- package/lib/components/ColorPicker.d.ts +40 -40
- package/lib/components/ColorPicker.js +1 -1
- package/lib/components/ColorPicker2.js +1 -1
- 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 +135 -82
- package/lib/components/DateRangePicker.js +114 -56
- package/lib/components/Drawer.d.ts +10 -10
- package/lib/components/Drawer.js +1 -1
- package/lib/components/Editor.d.ts +40 -40
- 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 +40 -40
- 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.d.ts +10 -10
- 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.d.ts +40 -40
- package/lib/components/ListMenu.js +1 -1
- package/lib/components/LocationPicker.d.ts +40 -40
- package/lib/components/LocationPicker.js +1 -1
- package/lib/components/Markdown.js +1 -1
- package/lib/components/Markdown2.js +1 -1
- package/lib/components/Modal.d.ts +42 -40
- package/lib/components/Modal.js +3 -3
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/MonthRangePicker.d.ts +41 -40
- package/lib/components/NumberInput.d.ts +10 -10
- package/lib/components/NumberInput.js +1 -1
- package/lib/components/Pagination.d.ts +49 -66
- package/lib/components/Pagination.js +3 -3
- 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.d.ts +10 -10
- package/lib/components/Progress.js +8 -4
- package/lib/components/PullRefresh.js +1 -1
- package/lib/components/Radios.d.ts +10 -10
- package/lib/components/Radios.js +1 -1
- package/lib/components/Range.js +1 -1
- package/lib/components/Rating.d.ts +10 -10
- package/lib/components/Rating.js +1 -1
- package/lib/components/ResultBox.d.ts +40 -40
- package/lib/components/ResultBox.js +7 -3
- package/lib/components/ResultList.d.ts +40 -40
- package/lib/components/ResultList.js +3 -3
- package/lib/components/ResultTableList.d.ts +40 -40
- package/lib/components/ResultTableList.js +1 -1
- package/lib/components/ResultTreeList.d.ts +40 -40
- package/lib/components/ResultTreeList.js +8 -8
- package/lib/components/RichText.js +1 -1
- package/lib/components/RichText2.js +1 -1
- package/lib/components/SearchBox.d.ts +127 -42
- package/lib/components/SearchBox.js +185 -19
- package/lib/components/Select.d.ts +389 -194
- package/lib/components/Select.js +17 -22
- package/lib/components/Selection.d.ts +40 -40
- 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.d.ts +10 -10
- package/lib/components/Spinner.js +1 -1
- package/lib/components/Steps.js +1 -1
- package/lib/components/Switch.d.ts +10 -10
- 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.d.ts +10 -10
- package/lib/components/Tabs.js +1 -3
- package/lib/components/TabsTransfer.js +1 -1
- package/lib/components/TabsTransferPicker.js +1 -1
- package/lib/components/Tag.d.ts +12 -10
- package/lib/components/Tag.js +16 -5
- package/lib/components/Textarea.d.ts +40 -40
- package/lib/components/Textarea.js +4 -2
- package/lib/components/Timeline.js +1 -1
- package/lib/components/TimelineItem.js +3 -3
- package/lib/components/Tinymce.d.ts +1 -3
- package/lib/components/Tinymce.js +1 -1
- package/lib/components/Tinymce2.js +29 -12
- 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 +40 -40
- package/lib/components/Transfer.js +15 -8
- package/lib/components/TransferDropDown.d.ts +40 -40
- package/lib/components/TransferDropDown.js +2 -3
- package/lib/components/TransferPicker.js +1 -1
- package/lib/components/TransferSearch.js +3 -3
- package/lib/components/Tree.d.ts +40 -40
- package/lib/components/Tree.js +34 -33
- package/lib/components/TreeSelection.d.ts +40 -40
- package/lib/components/TreeSelection.js +1 -1
- package/lib/components/UserSelect.d.ts +40 -40
- package/lib/components/UserSelect.js +1 -1
- package/lib/components/UserTabSelect.d.ts +40 -40
- 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.js +4 -2
- package/lib/components/calendar/CalendarContainer.js +1 -1
- package/lib/components/calendar/DaysView.js +14 -7
- 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.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 +1 -1
- 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.d.ts +40 -40
- package/lib/components/formula/Editor.js +1 -1
- package/lib/components/formula/FuncList.js +1 -1
- package/lib/components/formula/Picker.d.ts +40 -40
- package/lib/components/formula/Picker.js +1 -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 +20 -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.d.ts +40 -40
- package/lib/components/schema-editor/index.js +1 -1
- package/lib/components/table/Cell.d.ts +40 -40
- 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 +40 -40
- package/lib/components/table/index.js +1 -1
- 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/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 +7 -1
- package/lib/locale/en-US.js +7 -1
- package/lib/locale/zh-CN.js +9 -3
- package/lib/scss/helper.scss.js +1 -1
- package/lib/scss/helper.scss2.js +1 -1
- package/lib/scss/themes/ang.scss.js +1 -1
- package/lib/scss/themes/ang.scss2.js +1 -1
- package/lib/scss/themes/antd.scss.js +1 -1
- package/lib/scss/themes/antd.scss2.js +1 -1
- package/lib/scss/themes/cxd.scss.js +1 -1
- package/lib/scss/themes/cxd.scss2.js +1 -1
- package/lib/scss/themes/dark.scss.js +1 -1
- package/lib/scss/themes/dark.scss2.js +1 -1
- package/lib/scss/themes/default.scss.js +1 -1
- package/lib/scss/themes/default.scss2.js +1 -1
- package/lib/themes/ang.css +1111 -441
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +1111 -441
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +1135 -468
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +1116 -443
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +1135 -468
- package/package.json +10 -10
- package/scss/_properties.scss +101 -22
- 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/_calendar.scss +32 -14
- 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/_crud.scss +10 -2
- package/scss/components/_crud2.scss +10 -2
- package/scss/components/_image-gallery.scss +62 -0
- package/scss/components/_input-box.scss +1 -0
- package/scss/components/_log.scss +44 -16
- package/scss/components/_modal.scss +14 -12
- package/scss/components/_pagination.scss +4 -3
- package/scss/components/_progress.scss +2 -1
- package/scss/components/_result-box.scss +6 -8
- package/scss/components/_search-box.scss +120 -10
- package/scss/components/_steps.scss +23 -12
- package/scss/components/_table.scss +96 -11
- package/scss/components/_tabs.scss +46 -4
- package/scss/components/_tag.scss +12 -3
- package/scss/components/_timeline.scss +15 -1
- package/scss/components/form/_checks.scss +13 -2
- package/scss/components/form/_date-range.scss +26 -11
- package/scss/components/form/_date.scss +97 -33
- package/scss/components/form/_form.scss +13 -1
- 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 -1
- 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 +2 -5
- package/scss/components/form/_tree.scss +31 -4
- package/scss/components/react-datetime.scss +6 -1
- package/scss/themes/_cxd-variables.scss +9 -8
- package/scss/themes/_dark-variables.scss +5 -2
- package/scss/themes/cxd.scss +2 -8
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.
|
|
2
|
+
* amis-ui v2.1.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
9
|
import { findDOMNode } from 'react-dom';
|
|
@@ -352,7 +352,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
352
352
|
var _this = _super.call(this, props) || this;
|
|
353
353
|
// 是否是第一次点击,如果是第一次点击就可以点任意地址
|
|
354
354
|
_this.isFirstClick = true;
|
|
355
|
-
_this.nextMonth = moment().add(1, 'months');
|
|
355
|
+
_this.nextMonth = moment().add(1, 'months').startOf('day');
|
|
356
|
+
_this.currentMonth = moment().startOf('day');
|
|
356
357
|
_this.startInputRef = React__default.createRef();
|
|
357
358
|
_this.endInputRef = React__default.createRef();
|
|
358
359
|
_this.calendarRef = React__default.createRef();
|
|
@@ -364,7 +365,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
364
365
|
_this.endInputChange = _this.endInputChange.bind(_this);
|
|
365
366
|
_this.handleDateChange = _this.handleDateChange.bind(_this);
|
|
366
367
|
_this.handleStartDateChange = _this.handleStartDateChange.bind(_this);
|
|
367
|
-
_this.
|
|
368
|
+
_this.handelEndDateChange = _this.handelEndDateChange.bind(_this);
|
|
368
369
|
_this.handleTimeStartChange = _this.handleTimeStartChange.bind(_this);
|
|
369
370
|
_this.handleTimeEndChange = _this.handleTimeEndChange.bind(_this);
|
|
370
371
|
_this.handleFocus = _this.handleFocus.bind(_this);
|
|
@@ -391,8 +392,11 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
391
392
|
editState: 'start',
|
|
392
393
|
startDate: startDate,
|
|
393
394
|
endDate: endDate,
|
|
395
|
+
oldStartDate: startDate,
|
|
396
|
+
oldEndDate: endDate,
|
|
394
397
|
startInputValue: startDate === null || startDate === void 0 ? void 0 : startDate.format(inputFormat),
|
|
395
|
-
endInputValue: endDate === null || endDate === void 0 ? void 0 : endDate.format(inputFormat)
|
|
398
|
+
endInputValue: endDate === null || endDate === void 0 ? void 0 : endDate.format(inputFormat),
|
|
399
|
+
endDateOpenedFirst: false
|
|
396
400
|
};
|
|
397
401
|
return _this;
|
|
398
402
|
}
|
|
@@ -506,13 +510,32 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
506
510
|
}
|
|
507
511
|
this.setState({
|
|
508
512
|
isOpened: true,
|
|
509
|
-
editState: 'end'
|
|
513
|
+
editState: 'end',
|
|
514
|
+
endDateOpenedFirst: true
|
|
510
515
|
});
|
|
511
516
|
};
|
|
512
|
-
DateRangePicker.prototype.close = function () {
|
|
517
|
+
DateRangePicker.prototype.close = function (isConfirm) {
|
|
518
|
+
if (isConfirm === void 0) { isConfirm = false; }
|
|
519
|
+
if (!isConfirm) {
|
|
520
|
+
var _a = this.state, oldEndDate = _a.oldEndDate, oldStartDate = _a.oldStartDate;
|
|
521
|
+
var inputFormat = this.props.inputFormat;
|
|
522
|
+
this.setState({
|
|
523
|
+
endDate: oldEndDate,
|
|
524
|
+
endInputValue: oldEndDate ? oldEndDate.format(inputFormat) : '',
|
|
525
|
+
startDate: oldStartDate,
|
|
526
|
+
startInputValue: oldStartDate ? oldStartDate.format(inputFormat) : ''
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
this.setState({
|
|
531
|
+
oldStartDate: this.state.startDate,
|
|
532
|
+
oldEndDate: this.state.endDate
|
|
533
|
+
});
|
|
534
|
+
}
|
|
513
535
|
this.setState({
|
|
514
536
|
isOpened: false,
|
|
515
|
-
editState: undefined
|
|
537
|
+
editState: undefined,
|
|
538
|
+
endDateOpenedFirst: false
|
|
516
539
|
}, this.blur);
|
|
517
540
|
};
|
|
518
541
|
DateRangePicker.prototype.handleClick = function () {
|
|
@@ -533,7 +556,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
533
556
|
if (!this.state.startDate && !this.state.endDate) {
|
|
534
557
|
return;
|
|
535
558
|
}
|
|
536
|
-
else if (
|
|
559
|
+
else if (this.state.endDate &&
|
|
560
|
+
((_a = this.state.startDate) === null || _a === void 0 ? void 0 : _a.isAfter(this.state.endDate))) {
|
|
537
561
|
return;
|
|
538
562
|
}
|
|
539
563
|
this.props.onChange(DateRangePicker.formatValue({
|
|
@@ -541,10 +565,10 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
541
565
|
endDate: this.state.endDate
|
|
542
566
|
}, this.props.format, this.props.joinValues, this.props.delimiter, this.props.utc));
|
|
543
567
|
if (this.state.startDate && !this.state.endDate) {
|
|
544
|
-
this.setState({ editState: 'end' });
|
|
568
|
+
this.setState({ editState: 'end', endDateOpenedFirst: false });
|
|
545
569
|
}
|
|
546
570
|
else {
|
|
547
|
-
this.close();
|
|
571
|
+
this.close(true);
|
|
548
572
|
}
|
|
549
573
|
};
|
|
550
574
|
DateRangePicker.prototype.filterDate = function (date, originValue, timeFormat, type) {
|
|
@@ -577,12 +601,12 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
577
601
|
this.handleStartDateChange(newValue);
|
|
578
602
|
}
|
|
579
603
|
else if (editState === 'end') {
|
|
580
|
-
this.
|
|
604
|
+
this.handelEndDateChange(newValue);
|
|
581
605
|
}
|
|
582
606
|
};
|
|
583
607
|
DateRangePicker.prototype.handleStartDateChange = function (newValue) {
|
|
584
608
|
var _a = this.props, timeFormat = _a.timeFormat, minDate = _a.minDate, inputFormat = _a.inputFormat, type = _a.type;
|
|
585
|
-
var
|
|
609
|
+
var _b = this.state, startDate = _b.startDate, endDateOpenedFirst = _b.endDateOpenedFirst;
|
|
586
610
|
if (minDate && newValue.isBefore(minDate)) {
|
|
587
611
|
newValue = minDate;
|
|
588
612
|
}
|
|
@@ -592,26 +616,21 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
592
616
|
startInputValue: date.format(inputFormat)
|
|
593
617
|
};
|
|
594
618
|
// 这些没有时间的选择点第一次后第二次就是选结束时间
|
|
595
|
-
if (
|
|
596
|
-
type === 'input-
|
|
597
|
-
|
|
598
|
-
|
|
619
|
+
if (!endDateOpenedFirst &&
|
|
620
|
+
(type === 'input-date-range' ||
|
|
621
|
+
type === 'input-year-range' ||
|
|
622
|
+
type === 'input-quarter-range' ||
|
|
623
|
+
type === 'input-month-range')) {
|
|
599
624
|
newState.editState = 'end';
|
|
600
625
|
}
|
|
601
626
|
this.setState(newState);
|
|
602
627
|
};
|
|
603
|
-
DateRangePicker.prototype.
|
|
628
|
+
DateRangePicker.prototype.handelEndDateChange = function (newValue) {
|
|
604
629
|
var _this = this;
|
|
605
|
-
var _a = this.props, embed = _a.embed, timeFormat = _a.timeFormat, inputFormat = _a.inputFormat;
|
|
606
|
-
var _b = this.state
|
|
630
|
+
var _a = this.props, embed = _a.embed, timeFormat = _a.timeFormat, inputFormat = _a.inputFormat, type = _a.type;
|
|
631
|
+
var _b = this.state; _b.startDate; var endDate = _b.endDate, endDateOpenedFirst = _b.endDateOpenedFirst;
|
|
607
632
|
newValue = this.getEndDateByDuration(newValue);
|
|
608
|
-
|
|
609
|
-
if (newValue.isBefore(startDate)) {
|
|
610
|
-
this.setState({
|
|
611
|
-
startDate: undefined,
|
|
612
|
-
startInputValue: ''
|
|
613
|
-
});
|
|
614
|
-
}
|
|
633
|
+
var editState = endDateOpenedFirst ? 'start' : 'end';
|
|
615
634
|
var date = this.filterDate(newValue, endDate, timeFormat, 'end');
|
|
616
635
|
this.setState({
|
|
617
636
|
endDate: date,
|
|
@@ -619,6 +638,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
619
638
|
}, function () {
|
|
620
639
|
embed && _this.confirm();
|
|
621
640
|
});
|
|
641
|
+
if (type !== 'input-datetime-range') {
|
|
642
|
+
this.setState({ editState: editState });
|
|
643
|
+
}
|
|
622
644
|
};
|
|
623
645
|
// 手动控制输入时间
|
|
624
646
|
DateRangePicker.prototype.startInputChange = function (e) {
|
|
@@ -732,12 +754,12 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
732
754
|
}
|
|
733
755
|
if (startDate &&
|
|
734
756
|
minDuration &&
|
|
735
|
-
newValue.
|
|
757
|
+
newValue.isBefore(startDate.clone().add(minDuration))) {
|
|
736
758
|
newValue = startDate.clone().add(minDuration);
|
|
737
759
|
}
|
|
738
760
|
if (startDate &&
|
|
739
761
|
maxDuration &&
|
|
740
|
-
newValue.
|
|
762
|
+
newValue.isAfter(startDate.clone().add(maxDuration))) {
|
|
741
763
|
newValue = startDate.clone().add(maxDuration);
|
|
742
764
|
}
|
|
743
765
|
this.setState({
|
|
@@ -899,13 +921,21 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
899
921
|
return true;
|
|
900
922
|
};
|
|
901
923
|
DateRangePicker.prototype.renderDay = function (props, currentDate) {
|
|
902
|
-
var _a = this.state, startDate = _a.startDate, endDate = _a.endDate;
|
|
924
|
+
var _a = this.state, startDate = _a.startDate, endDate = _a.endDate; _a.endDateOpenedFirst; _a.editState;
|
|
903
925
|
if (startDate &&
|
|
904
926
|
endDate &&
|
|
905
927
|
currentDate.isBetween(startDate, endDate, 'day', '[]')) {
|
|
906
928
|
props.className += ' rdtBetween';
|
|
907
929
|
}
|
|
908
|
-
|
|
930
|
+
if (startDate && currentDate.isSame(startDate, 'day')) {
|
|
931
|
+
props.className += ' rdtActive rdtStartDay';
|
|
932
|
+
}
|
|
933
|
+
if (endDate && currentDate.isSame(endDate, 'day')) {
|
|
934
|
+
props.className += ' rdtActive rdtEndDay';
|
|
935
|
+
}
|
|
936
|
+
var _b = this.getDisabledElementProps(currentDate), className = _b.className, others = __rest(_b, ["className"]);
|
|
937
|
+
props.className += className;
|
|
938
|
+
return (React__default.createElement("td", __assign({}, props, others),
|
|
909
939
|
React__default.createElement("span", null, currentDate.date())));
|
|
910
940
|
};
|
|
911
941
|
DateRangePicker.prototype.renderMonth = function (props, month, year, date) {
|
|
@@ -920,7 +950,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
920
950
|
currentDate.isBetween(startDate, endDate, 'month', '[]')) {
|
|
921
951
|
props.className += ' rdtBetween';
|
|
922
952
|
}
|
|
923
|
-
|
|
953
|
+
var _b = this.getDisabledElementProps(currentDate), className = _b.className, others = __rest(_b, ["className"]);
|
|
954
|
+
props.className += className;
|
|
955
|
+
return (React__default.createElement("td", __assign({}, props, others),
|
|
924
956
|
React__default.createElement("span", null, monthStrFixedLength)));
|
|
925
957
|
};
|
|
926
958
|
DateRangePicker.prototype.renderQuarter = function (props, quarter, year) {
|
|
@@ -931,7 +963,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
931
963
|
currentDate.isBetween(startDate, endDate, 'quarter', '[]')) {
|
|
932
964
|
props.className += ' rdtBetween';
|
|
933
965
|
}
|
|
934
|
-
|
|
966
|
+
var _b = this.getDisabledElementProps(currentDate), className = _b.className, others = __rest(_b, ["className"]);
|
|
967
|
+
props.className += className;
|
|
968
|
+
return (React__default.createElement("td", __assign({}, props, others),
|
|
935
969
|
React__default.createElement("span", null,
|
|
936
970
|
"Q",
|
|
937
971
|
quarter)));
|
|
@@ -944,45 +978,67 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
944
978
|
currentDate.isBetween(startDate, endDate, 'year', '[]')) {
|
|
945
979
|
props.className += ' rdtBetween';
|
|
946
980
|
}
|
|
947
|
-
|
|
981
|
+
var _b = this.getDisabledElementProps(currentDate), className = _b.className, others = __rest(_b, ["className"]);
|
|
982
|
+
props.className += className;
|
|
983
|
+
return (React__default.createElement("td", __assign({}, props, others),
|
|
948
984
|
React__default.createElement("span", null, year)));
|
|
949
985
|
};
|
|
950
986
|
DateRangePicker.prototype.renderCalendar = function () {
|
|
987
|
+
var _this = this;
|
|
951
988
|
var _a;
|
|
952
|
-
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;
|
|
989
|
+
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;
|
|
953
990
|
var __ = this.props.translate;
|
|
954
991
|
var _d = this.state, startDate = _d.startDate, endDate = _d.endDate, editState = _d.editState;
|
|
992
|
+
var isDateTimeRange = type === 'input-datetime-range';
|
|
955
993
|
// timeRange需要单独选择范围
|
|
956
|
-
var isTimeRange =
|
|
957
|
-
return (React__default.createElement("div", { className: "".concat(ns, "DateRangePicker-wrap"), ref: this.calendarRef },
|
|
994
|
+
var isTimeRange = isDateTimeRange || viewMode === 'time';
|
|
995
|
+
return (React__default.createElement("div", { className: cx("".concat(ns, "DateRangePicker-wrap")), ref: this.calendarRef },
|
|
958
996
|
this.renderRanges(ranges),
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
997
|
+
React__default.createElement("div", { className: cx("".concat(ns, "DateRangePicker-picker-wrap")) },
|
|
998
|
+
(!isTimeRange || (editState === 'start' && !embed)) && (React__default.createElement(Calendar, { className: "".concat(ns, "DateRangePicker-start"), value: startDate,
|
|
999
|
+
// 区分的原因是 time-range 左侧就只能选起始时间,而其它都能在左侧同时同时选择起始和结束
|
|
1000
|
+
// TODO: 后续得把 time-range 代码拆分出来
|
|
1001
|
+
onChange: isDateTimeRange
|
|
1002
|
+
? this.handleStartDateChange
|
|
1003
|
+
: viewMode === 'time'
|
|
1004
|
+
? this.handleTimeStartChange
|
|
1005
|
+
: 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" })),
|
|
1006
|
+
(!isTimeRange || (editState === 'end' && !embed)) && (React__default.createElement(Calendar, { className: "".concat(ns, "DateRangePicker-end"), value: endDate, onChange: isDateTimeRange
|
|
1007
|
+
? this.handelEndDateChange
|
|
1008
|
+
: viewMode === 'time'
|
|
1009
|
+
? this.handleTimeEndChange
|
|
1010
|
+
: this.handleDateChange, requiredConfirm: false, dateFormat: dateFormat, inputFormat: inputFormat, timeFormat: timeFormat, viewDate: isDateTimeRange ? this.currentMonth : this.nextMonth,
|
|
1011
|
+
// isEndDate
|
|
1012
|
+
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" }))),
|
|
972
1013
|
embed ? null : (React__default.createElement("div", { key: "button", className: "".concat(ns, "DateRangePicker-actions") },
|
|
973
|
-
React__default.createElement("a", { className: cx('Button', 'Button--default'), onClick:
|
|
1014
|
+
React__default.createElement("a", { className: cx('Button', 'Button--default'), onClick: function () { return _this.close(); } }, __('cancel')),
|
|
974
1015
|
React__default.createElement("a", { className: cx('Button', 'Button--primary', 'm-l-sm', {
|
|
975
1016
|
'is-disabled': (!this.state.startDate &&
|
|
976
1017
|
isTimeRange &&
|
|
977
1018
|
editState === 'start') ||
|
|
978
1019
|
(!this.state.endDate && isTimeRange && editState === 'end') ||
|
|
979
|
-
(
|
|
1020
|
+
(this.state.startDate &&
|
|
1021
|
+
((_a = this.state.endDate) === null || _a === void 0 ? void 0 : _a.isBefore(this.state.startDate)))
|
|
980
1022
|
}), onClick: this.confirm }, __('confirm'))))));
|
|
981
1023
|
};
|
|
1024
|
+
DateRangePicker.prototype.getDisabledElementProps = function (currentDate) {
|
|
1025
|
+
var _a = this.state; _a.endDateOpenedFirst; var endDate = _a.endDate, startDate = _a.startDate, editState = _a.editState;
|
|
1026
|
+
var afterEndDate = editState === 'start' && currentDate > endDate;
|
|
1027
|
+
var beforeStartDate = editState === 'end' && currentDate < startDate;
|
|
1028
|
+
if (afterEndDate || beforeStartDate) {
|
|
1029
|
+
return {
|
|
1030
|
+
className: ' is-disabled',
|
|
1031
|
+
onClick: undefined
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1034
|
+
return {
|
|
1035
|
+
className: ''
|
|
1036
|
+
};
|
|
1037
|
+
};
|
|
982
1038
|
DateRangePicker.prototype.render = function () {
|
|
983
1039
|
var _a;
|
|
984
1040
|
var _this = this;
|
|
985
|
-
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;
|
|
1041
|
+
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;
|
|
986
1042
|
var useCalendarMobile = useMobileUI &&
|
|
987
1043
|
isMobile() &&
|
|
988
1044
|
['days', 'months', 'quarters'].indexOf(viewMode) > -1;
|
|
@@ -994,7 +1050,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
994
1050
|
'is-disabled': disabled
|
|
995
1051
|
}, className) }, useCalendarMobile ? calendarMobile : this.renderCalendar()));
|
|
996
1052
|
}
|
|
997
|
-
var CalendarMobileTitle = (React__default.createElement("div", { className: "".concat(ns, "CalendarMobile-title") }, __('Calendar.datepicker')));
|
|
1053
|
+
var CalendarMobileTitle = (React__default.createElement("div", { className: "".concat(ns, "CalendarMobile-title") }, label && typeof label === 'string' ? label : __('Calendar.datepicker')));
|
|
998
1054
|
return (React__default.createElement("div", { tabIndex: 0, onKeyPress: this.handleKeyPress, onFocus: this.handleFocus, onBlur: this.handleBlur, className: cx("".concat(ns, "DateRangePicker"), (_a = {
|
|
999
1055
|
'is-disabled': disabled,
|
|
1000
1056
|
'is-focused': isFocused
|
|
@@ -1005,7 +1061,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1005
1061
|
React__default.createElement(Input, { className: cx('DateRangePicker-input', {
|
|
1006
1062
|
isActive: this.state.editState === 'start' && isOpened
|
|
1007
1063
|
}), onChange: this.startInputChange, onClick: this.openStart, ref: this.startInputRef, placeholder: __(startPlaceholder), autoComplete: "off", value: this.state.startInputValue || '', disabled: disabled }),
|
|
1008
|
-
React__default.createElement("span", { className: cx('DateRangePicker-input-separator') },
|
|
1064
|
+
React__default.createElement("span", { className: cx('DateRangePicker-input-separator') },
|
|
1065
|
+
React__default.createElement("span", { className: cx('DateRangePicker-input-separator-line') })),
|
|
1009
1066
|
React__default.createElement(Input, { className: cx('DateRangePicker-input', {
|
|
1010
1067
|
isActive: this.state.editState === 'end' && isOpened
|
|
1011
1068
|
}), onChange: this.endInputChange, onClick: this.openEnd, ref: this.endInputRef, placeholder: __(endPlaceholder), autoComplete: "off", value: this.state.endInputValue || '', disabled: disabled }),
|
|
@@ -1013,7 +1070,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1013
1070
|
React__default.createElement(Icon, { icon: "input-clear", className: "icon" }))) : null,
|
|
1014
1071
|
React__default.createElement("a", { className: "".concat(ns, "DateRangePicker-toggler") },
|
|
1015
1072
|
React__default.createElement(Icon, { icon: viewMode === 'time' ? 'clock' : 'date', className: "icon" })),
|
|
1016
|
-
isOpened ? (useMobileUI && isMobile() ? (React__default.createElement(PopUp, { isShow: isOpened, container: popOverContainer, className: cx("".concat(ns, "CalendarMobile-pop")), onHide: this.close, header: CalendarMobileTitle }, useCalendarMobile ? calendarMobile : this.renderCalendar())) : (React__default.createElement(Overlay, { target: function () { return _this.dom.current; }, onHide: this.close, container: popOverContainer || (function () { return findDOMNode(_this); }), rootClose: false, placement: overlayPlacement, show: true },
|
|
1073
|
+
isOpened ? (useMobileUI && isMobile() ? (React__default.createElement(PopUp, { isShow: isOpened, container: popOverContainer, className: cx("".concat(ns, "CalendarMobile-pop"), "".concat(ns, "CalendarMobile-pop--").concat(viewMode)), onHide: this.close, header: CalendarMobileTitle }, useCalendarMobile ? calendarMobile : this.renderCalendar())) : (React__default.createElement(Overlay, { target: function () { return _this.dom.current; }, onHide: this.close, container: popOverContainer || (function () { return findDOMNode(_this); }), rootClose: false, placement: overlayPlacement, show: true },
|
|
1017
1074
|
React__default.createElement(PopOver, { classPrefix: ns, className: cx("".concat(ns, "DateRangePicker-popover"), popoverClassName), onHide: this.close, onClick: this.handlePopOverClick }, this.renderCalendar())))) : null));
|
|
1018
1075
|
};
|
|
1019
1076
|
DateRangePicker.defaultProps = {
|
|
@@ -1027,7 +1084,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1027
1084
|
ranges: 'yesterday,7daysago,prevweek,thismonth,prevmonth,prevquarter',
|
|
1028
1085
|
resetValue: '',
|
|
1029
1086
|
closeOnSelect: true,
|
|
1030
|
-
overlayPlacement: 'auto'
|
|
1087
|
+
overlayPlacement: 'auto',
|
|
1088
|
+
endDateOpenedFirst: false
|
|
1031
1089
|
};
|
|
1032
1090
|
return DateRangePicker;
|
|
1033
1091
|
}(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