amis-ui 3.5.2 → 3.6.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.d.ts +11 -10
- package/esm/components/Alert2.js +3 -2
- package/esm/components/AnchorNav.js +1 -1
- package/esm/components/ArrayInput.js +1 -1
- package/esm/components/AsideNav.js +1 -1
- package/esm/components/AssociatedSelection.d.ts +40 -40
- package/esm/components/AssociatedSelection.js +7 -7
- package/esm/components/Avatar.js +1 -1
- package/esm/components/Badge.js +1 -1
- package/esm/components/BaiduMapPicker.d.ts +3 -1
- package/esm/components/BaiduMapPicker.js +37 -18
- package/esm/components/BarCode.js +1 -1
- package/esm/components/Breadcrumb.js +1 -1
- package/esm/components/Button.d.ts +10 -10
- package/esm/components/Button.js +1 -1
- package/esm/components/CalendarMobile.js +1 -1
- package/esm/components/Card.d.ts +10 -10
- package/esm/components/Card.js +1 -1
- package/esm/components/Cascader.js +1 -1
- package/esm/components/ChainedDropdownSelection.d.ts +40 -40
- package/esm/components/ChainedDropdownSelection.js +1 -1
- package/esm/components/ChainedSelection.d.ts +40 -40
- package/esm/components/ChainedSelection.js +6 -6
- package/esm/components/Checkbox.js +1 -1
- package/esm/components/CityArea.js +1 -1
- package/esm/components/CityDB.js +1 -1
- package/esm/components/CodeMirror.js +1 -1
- package/esm/components/Collapse.js +1 -1
- package/esm/components/CollapseGroup.js +1 -1
- package/esm/components/ColorPicker.js +1 -1
- package/esm/components/Combo.js +1 -1
- package/esm/components/ConfirmBox.js +1 -1
- package/esm/components/ContextMenu.js +1 -1
- package/esm/components/DatePicker.d.ts +52 -41
- package/esm/components/DatePicker.js +114 -27
- package/esm/components/DateRangePicker.d.ts +18 -10
- package/esm/components/DateRangePicker.js +39 -11
- package/esm/components/DndContainer.js +1 -1
- package/esm/components/Drawer.js +3 -2
- package/esm/components/DropDownSelection.d.ts +40 -40
- package/esm/components/DropDownSelection.js +1 -1
- package/esm/components/Editor.js +1 -1
- package/esm/components/Form.js +1 -1
- package/esm/components/FormField.js +1 -1
- package/esm/components/GaodeMapPicker.js +1 -1
- package/esm/components/GridNav.js +1 -1
- package/esm/components/GroupedSelection.d.ts +40 -40
- package/esm/components/GroupedSelection.js +1 -1
- package/esm/components/Html.js +1 -1
- package/esm/components/ImageGallery.js +1 -1
- package/esm/components/Input.js +1 -1
- package/esm/components/InputBox.d.ts +10 -10
- package/esm/components/InputBox.js +1 -1
- package/esm/components/InputBoxWithSuggestion.js +1 -1
- package/esm/components/InputTable.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.d.ts +84 -40
- package/esm/components/LocationPicker.js +7 -6
- package/esm/components/Markdown.js +11 -1
- package/esm/components/Modal.d.ts +54 -0
- package/esm/components/Modal.js +93 -7
- package/esm/components/ModalManager.js +1 -1
- package/esm/components/MultilineText.js +1 -1
- package/esm/components/NumberInput.js +1 -1
- package/esm/components/Pagination.d.ts +40 -41
- package/esm/components/Pagination.js +9 -18
- package/esm/components/Picker.js +1 -1
- package/esm/components/PickerColumn.js +1 -1
- package/esm/components/PickerContainer.js +1 -1
- package/esm/components/PopOverContainer.js +1 -1
- package/esm/components/PopUp.js +1 -1
- package/esm/components/Progress.js +1 -1
- package/esm/components/PullRefresh.js +1 -1
- package/esm/components/Radios.js +1 -1
- package/esm/components/Range.js +9 -3
- package/esm/components/Rating.js +1 -1
- package/esm/components/ResultBox.d.ts +40 -40
- package/esm/components/ResultBox.js +1 -1
- package/esm/components/ResultList.js +1 -1
- package/esm/components/ResultTableList.d.ts +40 -40
- package/esm/components/ResultTableList.js +1 -1
- package/esm/components/ResultTreeList.d.ts +40 -40
- package/esm/components/ResultTreeList.js +1 -1
- package/esm/components/RichText.js +13 -4
- package/esm/components/SearchBox.js +1 -1
- package/esm/components/Select.d.ts +4 -0
- package/esm/components/Select.js +44 -40
- package/esm/components/SelectMobile.js +1 -1
- package/esm/components/Selection.d.ts +41 -40
- package/esm/components/Selection.js +1 -1
- package/esm/components/SparkLine.d.ts +44 -42
- package/esm/components/SparkLine.js +4 -4
- package/esm/components/Spinner.d.ts +13 -0
- package/esm/components/Spinner.js +8 -6
- package/esm/components/Steps.js +1 -1
- package/esm/components/Switch.d.ts +15 -10
- package/esm/components/Switch.js +13 -5
- package/esm/components/TableSelection.d.ts +40 -40
- package/esm/components/TableSelection.js +1 -1
- package/esm/components/Tabs.d.ts +1 -0
- package/esm/components/Tabs.js +2 -2
- package/esm/components/TabsTransfer.d.ts +40 -40
- package/esm/components/TabsTransfer.js +3 -3
- package/esm/components/TabsTransferPicker.js +1 -1
- package/esm/components/Tag.js +1 -1
- package/esm/components/Textarea.js +6 -2
- package/esm/components/Timeline.js +1 -1
- package/esm/components/TimelineItem.js +1 -1
- package/esm/components/Tinymce.d.ts +2 -1
- package/esm/components/Tinymce.js +30 -15
- 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.d.ts +11 -10
- package/esm/components/TooltipWrapper.js +1 -1
- package/esm/components/Transfer.d.ts +96 -40
- package/esm/components/Transfer.js +25 -11
- package/esm/components/TransferDropDown.d.ts +40 -40
- package/esm/components/TransferDropDown.js +1 -1
- package/esm/components/TransferPicker.js +1 -1
- package/esm/components/TransferSearch.js +1 -1
- package/esm/components/Tree.d.ts +51 -3
- package/esm/components/Tree.js +12 -11
- package/esm/components/TreeSelection.d.ts +40 -40
- package/esm/components/TreeSelection.js +11 -11
- package/esm/components/UserSelect.d.ts +42 -0
- package/esm/components/UserSelect.js +5 -4
- package/esm/components/UserTabSelect.js +1 -1
- package/esm/components/WithRemoteConfig.js +14 -2
- package/esm/components/WithStore.js +1 -1
- package/esm/components/calendar/Calendar.d.ts +9 -1
- package/esm/components/calendar/Calendar.js +27 -5
- package/esm/components/calendar/CalendarContainer.js +1 -1
- package/esm/components/calendar/DaysView.d.ts +11 -0
- package/esm/components/calendar/DaysView.js +44 -8
- package/esm/components/calendar/MonthsView.d.ts +5 -0
- package/esm/components/calendar/MonthsView.js +18 -3
- 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/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 +6 -2
- package/esm/components/condition-builder/Value.js +1 -1
- package/esm/components/condition-builder/config.js +7 -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/Input.js +2 -2
- package/esm/components/formula/Picker.js +1 -1
- package/esm/components/formula/VariableList.js +1 -1
- package/esm/components/formula/plugin.js +1 -1
- package/esm/components/icons.js +23 -6
- 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/menu/MenuContext.js +1 -1
- package/esm/components/menu/MenuItem.js +1 -1
- package/esm/components/menu/SubMenu.js +1 -1
- package/esm/components/menu/index.d.ts +17 -17
- package/esm/components/menu/index.js +5 -4
- 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 +3 -455
- package/esm/components/table/Cell.js +6 -8
- package/esm/components/table/ColGroup.d.ts +8 -3
- package/esm/components/table/ColGroup.js +28 -22
- package/esm/components/table/Head.d.ts +42 -0
- package/esm/components/table/Head.js +142 -0
- package/esm/components/table/HeadCellDropDown.d.ts +1 -1
- package/esm/components/table/HeadCellDropDown.js +5 -3
- package/esm/components/table/HeadCellFilter.d.ts +41 -41
- package/esm/components/table/HeadCellFilter.js +2 -2
- package/esm/components/table/HeadCellSelect.d.ts +1 -1
- package/esm/components/table/HeadCellSelect.js +2 -2
- package/esm/components/table/HeadCellSort.d.ts +1 -1
- package/esm/components/table/HeadCellSort.js +2 -2
- package/esm/components/table/ItemActionsWrapper.d.ts +1 -1
- package/esm/components/table/ItemActionsWrapper.js +2 -2
- package/esm/components/table/Row.d.ts +60 -0
- package/esm/components/table/Row.js +183 -0
- package/esm/components/table/SummaryRow.d.ts +28 -0
- package/esm/components/table/SummaryRow.js +73 -0
- package/esm/components/table/index.d.ts +62 -67
- package/esm/components/table/index.js +347 -646
- package/esm/components/table/util.d.ts +54 -0
- package/esm/components/table/util.js +207 -0
- package/esm/components/virtual-list/AutoSizer.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-sub-form.js +1 -1
- package/esm/hooks/use-touch.js +1 -1
- package/esm/hooks/use-update-effect.js +1 -1
- package/esm/hooks/use-validation-resolver.js +1 -1
- package/esm/icons/alert-danger.svg.js +1 -1
- package/esm/icons/alert-info.svg.js +1 -1
- package/esm/icons/alert-success.svg.js +1 -1
- package/esm/icons/alert-warning.svg.js +1 -1
- package/esm/icons/back.svg.js +1 -1
- package/esm/icons/calendar.svg.js +1 -1
- package/esm/icons/caret.svg.js +1 -1
- package/esm/icons/check.svg.js +1 -1
- package/esm/icons/clock.svg.js +1 -1
- package/esm/icons/close-small.svg.js +1 -1
- package/esm/icons/close.svg.js +1 -1
- package/esm/icons/cloud-upload.svg.js +1 -1
- package/esm/icons/column-filter.svg.js +1 -1
- package/esm/icons/columns.svg.js +1 -1
- package/esm/icons/compress-alt.svg.js +1 -1
- package/esm/icons/copy.svg.js +1 -1
- package/esm/icons/date.svg.js +1 -1
- package/esm/icons/department.svg.js +1 -1
- package/esm/icons/desk-empty.svg.js +1 -1
- package/esm/icons/dot.svg.js +1 -1
- package/esm/icons/down-arrow-bold.svg.js +1 -1
- package/esm/icons/down.svg.js +1 -1
- package/esm/icons/download.svg.js +1 -1
- package/esm/icons/drag-bar.svg.js +1 -1
- package/esm/icons/drag.svg.js +1 -1
- package/esm/icons/edit.svg.js +1 -1
- package/esm/icons/ellipsis-v.svg.js +1 -1
- package/esm/icons/enter.svg.js +1 -1
- package/esm/icons/exchange.svg.js +1 -1
- package/esm/icons/expand-alt.svg.js +1 -1
- package/esm/icons/fail.svg.js +1 -1
- package/esm/icons/file.svg.js +1 -1
- package/esm/icons/filter.svg.js +1 -1
- package/esm/icons/folder.svg.js +1 -1
- package/esm/icons/function.svg.js +1 -1
- package/esm/icons/home.svg.js +1 -1
- package/esm/icons/if.svg.js +1 -1
- package/esm/icons/image.svg.js +1 -1
- package/esm/icons/info-circle.svg.js +1 -1
- package/esm/icons/info.svg.js +1 -1
- package/esm/icons/input-clear.svg.js +1 -1
- package/esm/icons/invisible.svg.js +1 -1
- package/esm/icons/left-arrow.svg.js +1 -1
- package/esm/icons/loading-outline.svg.js +1 -1
- package/esm/icons/location.svg.js +1 -1
- package/esm/icons/menu.svg.js +1 -1
- package/esm/icons/minus.svg.js +1 -1
- package/esm/icons/move.svg.js +1 -1
- package/esm/icons/mute.svg.js +1 -1
- package/esm/icons/new-edit.svg.js +1 -1
- package/esm/icons/pause.svg.js +1 -1
- package/esm/icons/pencil.svg.js +1 -1
- package/esm/icons/play.svg.js +1 -1
- package/esm/icons/plus-cicle.svg.js +1 -1
- package/esm/icons/plus-fine.svg.js +1 -1
- package/esm/icons/plus.svg.js +1 -1
- package/esm/icons/post.svg.js +1 -1
- package/esm/icons/question-mark.svg.js +1 -1
- package/esm/icons/question.svg.js +1 -1
- package/esm/icons/redo.svg.js +1 -1
- package/esm/icons/refresh.svg.js +1 -1
- package/esm/icons/reload.svg.js +1 -1
- package/esm/icons/remove.svg.js +1 -1
- package/esm/icons/retry.svg.js +1 -1
- package/esm/icons/right-arrow-bold.svg.js +1 -1
- package/esm/icons/right-arrow.svg.js +1 -1
- package/esm/icons/right-double-arrow.svg.js +1 -1
- package/esm/icons/role.svg.js +1 -1
- package/esm/icons/rotate-left.svg.js +1 -1
- package/esm/icons/rotate-right.svg.js +1 -1
- package/esm/icons/scale-origin.svg.js +1 -1
- package/esm/icons/schedule.svg.js +1 -1
- package/esm/icons/search.svg.js +1 -1
- package/esm/icons/setting.svg.js +1 -1
- package/esm/icons/slider-handle-icon.svg.js +1 -1
- package/esm/icons/sort-asc.svg.js +1 -1
- package/esm/icons/sort-default.svg.js +1 -1
- package/esm/icons/sort-desc.svg.js +1 -1
- package/esm/icons/star.svg.js +1 -1
- package/esm/icons/status-close.svg.js +1 -1
- package/esm/icons/steps-finsh.svg.js +1 -1
- package/esm/icons/success.svg.js +1 -1
- package/esm/icons/transparent.svg.js +1 -1
- package/esm/icons/trash.svg.js +1 -1
- package/esm/icons/tree-down.svg.js +1 -1
- package/esm/icons/undo.svg.js +1 -1
- package/esm/icons/upload.svg.js +1 -1
- package/esm/icons/user-remove.svg.js +1 -1
- package/esm/icons/view.svg.js +1 -1
- package/esm/icons/volume.svg.js +1 -1
- package/esm/icons/warning-mark.svg.js +1 -1
- package/esm/icons/warning.svg.js +1 -1
- package/esm/icons/window-restore.svg.js +1 -1
- package/esm/icons/zoom-in.svg.js +1 -1
- package/esm/icons/zoom-out.svg.js +1 -1
- package/esm/index.js +1 -1
- package/esm/locale/de-DE.js +4 -1
- package/esm/locale/en-US.js +4 -1
- package/esm/locale/zh-CN.js +4 -1
- 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.d.ts +120 -120
- package/lib/components/Alert.js +1 -1
- package/lib/components/Alert2.d.ts +21 -20
- package/lib/components/Alert2.js +3 -2
- package/lib/components/AnchorNav.d.ts +20 -20
- package/lib/components/AnchorNav.js +1 -1
- 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 +80 -80
- package/lib/components/AssociatedSelection.js +7 -7
- package/lib/components/Avatar.d.ts +90 -90
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Badge.js +1 -1
- package/lib/components/BaiduMapPicker.d.ts +3 -1
- package/lib/components/BaiduMapPicker.js +37 -18
- package/lib/components/BarCode.js +1 -1
- package/lib/components/Breadcrumb.js +1 -1
- package/lib/components/Button.d.ts +20 -20
- 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 +100 -100
- package/lib/components/Card.js +1 -1
- package/lib/components/Cascader.js +1 -1
- package/lib/components/ChainedDropdownSelection.d.ts +80 -80
- package/lib/components/ChainedDropdownSelection.js +1 -1
- package/lib/components/ChainedSelection.d.ts +80 -80
- package/lib/components/ChainedSelection.js +6 -6
- 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/CodeMirror.js +1 -1
- package/lib/components/Collapse.d.ts +120 -120
- package/lib/components/Collapse.js +1 -1
- package/lib/components/CollapseGroup.d.ts +20 -20
- 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/Combo.js +1 -1
- package/lib/components/ConfirmBox.d.ts +80 -80
- package/lib/components/ConfirmBox.js +1 -1
- package/lib/components/ContextMenu.js +1 -1
- package/lib/components/DatePicker.d.ts +132 -121
- package/lib/components/DatePicker.js +112 -25
- package/lib/components/DateRangePicker.d.ts +338 -330
- package/lib/components/DateRangePicker.js +39 -11
- package/lib/components/DndContainer.js +1 -1
- package/lib/components/Drawer.d.ts +30 -30
- package/lib/components/Drawer.js +3 -2
- package/lib/components/DropDownSelection.d.ts +80 -80
- package/lib/components/DropDownSelection.js +1 -1
- package/lib/components/Editor.d.ts +120 -120
- package/lib/components/Editor.js +1 -1
- package/lib/components/Form.js +1 -1
- package/lib/components/FormField.js +1 -1
- package/lib/components/GaodeMapPicker.js +1 -1
- package/lib/components/GridNav.js +1 -1
- package/lib/components/GroupedSelection.d.ts +80 -80
- package/lib/components/GroupedSelection.js +1 -1
- package/lib/components/Html.js +1 -1
- package/lib/components/ImageGallery.d.ts +40 -40
- package/lib/components/ImageGallery.js +1 -1
- 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/InputTable.js +1 -1
- package/lib/components/Layout.d.ts +10 -10
- 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 +80 -80
- package/lib/components/ListMenu.js +1 -1
- package/lib/components/LocationPicker.d.ts +84 -40
- package/lib/components/LocationPicker.js +7 -6
- package/lib/components/Markdown.js +11 -1
- package/lib/components/Modal.d.ts +134 -80
- package/lib/components/Modal.js +93 -5
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/MonthRangePicker.d.ts +160 -160
- package/lib/components/MultilineText.d.ts +40 -40
- package/lib/components/MultilineText.js +1 -1
- package/lib/components/NumberInput.d.ts +30 -30
- package/lib/components/NumberInput.js +1 -1
- package/lib/components/Pagination.d.ts +80 -81
- package/lib/components/Pagination.js +8 -17
- 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.d.ts +80 -80
- package/lib/components/PopUp.js +1 -1
- package/lib/components/Progress.d.ts +60 -60
- package/lib/components/Progress.js +1 -1
- package/lib/components/PullRefresh.js +1 -1
- package/lib/components/Radios.d.ts +40 -40
- package/lib/components/Radios.js +1 -1
- package/lib/components/Range.js +9 -3
- package/lib/components/Rating.d.ts +20 -20
- package/lib/components/Rating.js +1 -1
- package/lib/components/ResultBox.d.ts +80 -80
- package/lib/components/ResultBox.js +1 -1
- package/lib/components/ResultList.d.ts +40 -40
- package/lib/components/ResultList.js +1 -1
- package/lib/components/ResultTableList.d.ts +80 -80
- package/lib/components/ResultTableList.js +1 -1
- package/lib/components/ResultTreeList.d.ts +40 -40
- package/lib/components/ResultTreeList.js +1 -1
- package/lib/components/RichText.js +13 -4
- package/lib/components/SearchBox.d.ts +120 -120
- package/lib/components/SearchBox.js +1 -1
- package/lib/components/Select.d.ts +1741 -1738
- package/lib/components/Select.js +44 -40
- package/lib/components/SelectMobile.js +1 -1
- package/lib/components/Selection.d.ts +81 -80
- package/lib/components/Selection.js +1 -1
- package/lib/components/SparkLine.d.ts +44 -42
- package/lib/components/SparkLine.js +3 -3
- package/lib/components/Spinner.d.ts +73 -60
- package/lib/components/Spinner.js +8 -6
- package/lib/components/Steps.js +1 -1
- package/lib/components/Switch.d.ts +15 -10
- package/lib/components/Switch.js +13 -5
- package/lib/components/TableSelection.d.ts +80 -80
- package/lib/components/TableSelection.js +1 -1
- package/lib/components/Tabs.d.ts +81 -80
- package/lib/components/Tabs.js +2 -2
- package/lib/components/TabsTransfer.d.ts +40 -40
- package/lib/components/TabsTransfer.js +3 -3
- package/lib/components/TabsTransferPicker.js +1 -1
- package/lib/components/Tag.d.ts +60 -60
- package/lib/components/Tag.js +1 -1
- package/lib/components/Textarea.d.ts +40 -40
- package/lib/components/Textarea.js +6 -2
- package/lib/components/Timeline.js +1 -1
- package/lib/components/TimelineItem.js +1 -1
- package/lib/components/Tinymce.d.ts +2 -1
- package/lib/components/Tinymce.js +29 -14
- package/lib/components/TitleBar.d.ts +10 -10
- package/lib/components/TitleBar.js +1 -1
- package/lib/components/Toast.d.ts +80 -80
- package/lib/components/Toast.js +1 -1
- package/lib/components/Tooltip.js +1 -1
- package/lib/components/TooltipWrapper.d.ts +31 -30
- package/lib/components/TooltipWrapper.js +1 -1
- package/lib/components/Transfer.d.ts +225 -169
- package/lib/components/Transfer.js +25 -11
- package/lib/components/TransferDropDown.d.ts +160 -160
- package/lib/components/TransferDropDown.js +1 -1
- package/lib/components/TransferPicker.js +1 -1
- package/lib/components/TransferSearch.js +1 -1
- package/lib/components/Tree.d.ts +291 -243
- package/lib/components/Tree.js +12 -11
- package/lib/components/TreeSelection.d.ts +120 -120
- package/lib/components/TreeSelection.js +11 -11
- package/lib/components/UserSelect.d.ts +82 -40
- package/lib/components/UserSelect.js +5 -4
- package/lib/components/UserTabSelect.d.ts +40 -40
- package/lib/components/UserTabSelect.js +1 -1
- package/lib/components/WithRemoteConfig.d.ts +0 -1
- package/lib/components/WithRemoteConfig.js +14 -2
- package/lib/components/WithStore.js +1 -1
- package/lib/components/calendar/Calendar.d.ts +9 -1
- package/lib/components/calendar/Calendar.js +27 -5
- package/lib/components/calendar/CalendarContainer.js +1 -1
- package/lib/components/calendar/DaysView.d.ts +11 -0
- package/lib/components/calendar/DaysView.js +44 -8
- package/lib/components/calendar/MonthsView.d.ts +5 -0
- package/lib/components/calendar/MonthsView.js +18 -3
- 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/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 +6 -2
- package/lib/components/condition-builder/Value.js +1 -1
- package/lib/components/condition-builder/config.js +7 -1
- package/lib/components/condition-builder/index.d.ts +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/Input.js +2 -2
- 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.js +1 -1
- package/lib/components/icons.js +22 -5
- 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/menu/MenuContext.js +1 -1
- package/lib/components/menu/MenuItem.js +1 -1
- package/lib/components/menu/SubMenu.js +1 -1
- package/lib/components/menu/index.d.ts +77 -77
- package/lib/components/menu/index.js +5 -5
- 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 +3 -455
- package/lib/components/table/Cell.js +6 -9
- package/lib/components/table/ColGroup.d.ts +8 -3
- package/lib/components/table/ColGroup.js +28 -23
- package/lib/components/table/Head.d.ts +42 -0
- package/lib/components/table/Head.js +149 -0
- package/lib/components/table/HeadCellDropDown.d.ts +1 -1
- package/lib/components/table/HeadCellDropDown.js +5 -3
- package/lib/components/table/HeadCellFilter.d.ts +81 -81
- package/lib/components/table/HeadCellFilter.js +2 -2
- package/lib/components/table/HeadCellSelect.d.ts +41 -41
- package/lib/components/table/HeadCellSelect.js +2 -2
- package/lib/components/table/HeadCellSort.d.ts +1 -1
- package/lib/components/table/HeadCellSort.js +2 -2
- package/lib/components/table/ItemActionsWrapper.d.ts +1 -1
- package/lib/components/table/ItemActionsWrapper.js +2 -2
- package/lib/components/table/Row.d.ts +60 -0
- package/lib/components/table/Row.js +190 -0
- package/lib/components/table/SummaryRow.d.ts +28 -0
- package/lib/components/table/SummaryRow.js +81 -0
- package/lib/components/table/index.d.ts +62 -67
- package/lib/components/table/index.js +344 -644
- package/lib/components/table/util.d.ts +54 -0
- package/lib/components/table/util.js +227 -0
- package/lib/components/virtual-list/AutoSizer.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-sub-form.js +1 -1
- package/lib/hooks/use-touch.js +1 -1
- package/lib/hooks/use-update-effect.js +1 -1
- package/lib/hooks/use-validation-resolver.js +1 -1
- package/lib/icons/alert-danger.svg.js +1 -1
- package/lib/icons/alert-info.svg.js +1 -1
- package/lib/icons/alert-success.svg.js +1 -1
- package/lib/icons/alert-warning.svg.js +1 -1
- package/lib/icons/back.svg.js +1 -1
- package/lib/icons/calendar.svg.js +1 -1
- package/lib/icons/caret.svg.js +1 -1
- package/lib/icons/check.svg.js +1 -1
- package/lib/icons/clock.svg.js +1 -1
- package/lib/icons/close-small.svg.js +1 -1
- package/lib/icons/close.svg.js +1 -1
- package/lib/icons/cloud-upload.svg.js +1 -1
- package/lib/icons/column-filter.svg.js +1 -1
- package/lib/icons/columns.svg.js +1 -1
- package/lib/icons/compress-alt.svg.js +1 -1
- package/lib/icons/copy.svg.js +1 -1
- package/lib/icons/date.svg.js +1 -1
- package/lib/icons/department.svg.js +1 -1
- package/lib/icons/desk-empty.svg.js +1 -1
- package/lib/icons/dot.svg.js +1 -1
- package/lib/icons/down-arrow-bold.svg.js +1 -1
- package/lib/icons/down.svg.js +1 -1
- package/lib/icons/download.svg.js +1 -1
- package/lib/icons/drag-bar.svg.js +1 -1
- package/lib/icons/drag.svg.js +1 -1
- package/lib/icons/edit.svg.js +1 -1
- package/lib/icons/ellipsis-v.svg.js +1 -1
- package/lib/icons/enter.svg.js +1 -1
- package/lib/icons/exchange.svg.js +1 -1
- package/lib/icons/expand-alt.svg.js +1 -1
- package/lib/icons/fail.svg.js +1 -1
- package/lib/icons/file.svg.js +1 -1
- package/lib/icons/filter.svg.js +1 -1
- package/lib/icons/folder.svg.js +1 -1
- package/lib/icons/function.svg.js +1 -1
- package/lib/icons/home.svg.js +1 -1
- package/lib/icons/if.svg.js +1 -1
- package/lib/icons/image.svg.js +1 -1
- package/lib/icons/info-circle.svg.js +1 -1
- package/lib/icons/info.svg.js +1 -1
- package/lib/icons/input-clear.svg.js +1 -1
- package/lib/icons/invisible.svg.js +1 -1
- package/lib/icons/left-arrow.svg.js +1 -1
- package/lib/icons/loading-outline.svg.js +1 -1
- package/lib/icons/location.svg.js +1 -1
- package/lib/icons/menu.svg.js +1 -1
- package/lib/icons/minus.svg.js +1 -1
- package/lib/icons/move.svg.js +1 -1
- package/lib/icons/mute.svg.js +1 -1
- package/lib/icons/new-edit.svg.js +1 -1
- package/lib/icons/pause.svg.js +1 -1
- package/lib/icons/pencil.svg.js +1 -1
- package/lib/icons/play.svg.js +1 -1
- package/lib/icons/plus-cicle.svg.js +1 -1
- package/lib/icons/plus-fine.svg.js +1 -1
- package/lib/icons/plus.svg.js +1 -1
- package/lib/icons/post.svg.js +1 -1
- package/lib/icons/question-mark.svg.js +1 -1
- package/lib/icons/question.svg.js +1 -1
- package/lib/icons/redo.svg.js +1 -1
- package/lib/icons/refresh.svg.js +1 -1
- package/lib/icons/reload.svg.js +1 -1
- package/lib/icons/remove.svg.js +1 -1
- package/lib/icons/retry.svg.js +1 -1
- package/lib/icons/right-arrow-bold.svg.js +1 -1
- package/lib/icons/right-arrow.svg.js +1 -1
- package/lib/icons/right-double-arrow.svg.js +1 -1
- package/lib/icons/role.svg.js +1 -1
- package/lib/icons/rotate-left.svg.js +1 -1
- package/lib/icons/rotate-right.svg.js +1 -1
- package/lib/icons/scale-origin.svg.js +1 -1
- package/lib/icons/schedule.svg.js +1 -1
- package/lib/icons/search.svg.js +1 -1
- package/lib/icons/setting.svg.js +1 -1
- package/lib/icons/slider-handle-icon.svg.js +1 -1
- package/lib/icons/sort-asc.svg.js +1 -1
- package/lib/icons/sort-default.svg.js +1 -1
- package/lib/icons/sort-desc.svg.js +1 -1
- package/lib/icons/star.svg.js +1 -1
- package/lib/icons/status-close.svg.js +1 -1
- package/lib/icons/steps-finsh.svg.js +1 -1
- package/lib/icons/success.svg.js +1 -1
- package/lib/icons/transparent.svg.js +1 -1
- package/lib/icons/trash.svg.js +1 -1
- package/lib/icons/tree-down.svg.js +1 -1
- package/lib/icons/undo.svg.js +1 -1
- package/lib/icons/upload.svg.js +1 -1
- package/lib/icons/user-remove.svg.js +1 -1
- package/lib/icons/view.svg.js +1 -1
- package/lib/icons/volume.svg.js +1 -1
- package/lib/icons/warning-mark.svg.js +1 -1
- package/lib/icons/warning.svg.js +1 -1
- package/lib/icons/window-restore.svg.js +1 -1
- package/lib/icons/zoom-in.svg.js +1 -1
- package/lib/icons/zoom-out.svg.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/de-DE.js +4 -1
- package/lib/locale/en-US.js +4 -1
- package/lib/locale/zh-CN.js +4 -1
- package/lib/scss/helper.scss.js +1 -1
- package/lib/scss/themes/ang.scss.js +1 -1
- package/lib/scss/themes/antd.scss.js +1 -1
- package/lib/scss/themes/cxd.scss.js +1 -1
- package/lib/scss/themes/dark.scss.js +1 -1
- package/lib/scss/themes/default.scss.js +1 -1
- package/lib/themes/ang.css +220 -69
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +222 -71
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +220 -69
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +220 -69
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +220 -69
- package/package.json +5 -6
- package/scss/_components.scss +22 -14
- package/scss/_properties.scss +7 -11
- package/scss/base/_common.scss +8 -0
- package/scss/components/_alert.scss +4 -0
- package/scss/components/_audio.scss +1 -1
- package/scss/components/_card.scss +2 -1
- package/scss/components/_dropdown.scss +4 -2
- package/scss/components/_menu.scss +7 -2
- package/scss/components/_modal.scss +4 -0
- package/scss/components/_page.scss +6 -6
- package/scss/components/_pagination.scss +41 -44
- package/scss/components/_progress.scss +1 -1
- package/scss/components/_spinner.scss +12 -0
- package/scss/components/_steps.scss +7 -5
- package/scss/components/_table.scss +16 -2
- package/scss/components/_table2.scss +7 -0
- package/scss/components/_tabs.scss +21 -24
- package/scss/components/form/_combo.scss +6 -0
- package/scss/components/form/_date-range.scss +3 -6
- package/scss/components/form/_date.scss +3 -5
- package/scss/components/form/_excel.scss +2 -2
- package/scss/components/form/_fieldset.scss +1 -1
- package/scss/components/form/_form.scss +2 -0
- package/scss/components/form/_location.scss +19 -1
- package/scss/components/form/_nested-select.scss +20 -7
- package/scss/components/form/_picker.scss +3 -1
- package/scss/components/form/_range.scss +2 -2
- package/scss/components/form/_rating.scss +17 -3
- package/scss/components/form/_select.scss +0 -11
- package/scss/components/form/_selection.scss +2 -1
- package/scss/components/form/_switch.scss +38 -0
- package/scss/components/form/_text.scss +9 -8
- package/scss/components/form/_textarea.scss +4 -0
- package/scss/components/form/_transfer.scss +40 -0
- package/scss/themes/_ang-variables.scss +63 -61
- package/scss/themes/_antd-variables.scss +63 -61
- package/scss/themes/_cxd-variables.scss +64 -61
- package/scss/themes/_dark-variables.scss +63 -61
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.6.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { __extends, __spreadArray, __read, __assign } from 'tslib';
|
|
6
|
+
import { __extends, __spreadArray, __read, __assign, __decorate, __metadata } from 'tslib';
|
|
7
7
|
import React__default from 'react';
|
|
8
8
|
import moment from 'moment';
|
|
9
9
|
import { Icon } from './icons.js';
|
|
10
|
-
import { normalizeDate,
|
|
10
|
+
import { normalizeDate, filterDate, isExpression, FormulaExec, ucFirst, Overlay, PopOver, autobind, themeable, localeable } from 'amis-core';
|
|
11
11
|
import PopUp from './PopUp.js';
|
|
12
12
|
import Calendar from './calendar/Calendar.js';
|
|
13
13
|
import CalendarMobile from './CalendarMobile.js';
|
|
14
14
|
import Input from './Input.js';
|
|
15
|
+
import Button from './Button.js';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* @file DatePicker
|
|
@@ -270,7 +271,8 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
270
271
|
value: normalizeDate(value, valueFormat || format),
|
|
271
272
|
inputValue: ((_a = normalizeDate(value, valueFormat || format)) === null || _a === void 0 ? void 0 : _a.format(displayFormat || inputFormat)) || '',
|
|
272
273
|
curTimeFormat: curTimeFormat,
|
|
273
|
-
curDateFormat: curDateFormat
|
|
274
|
+
curDateFormat: curDateFormat,
|
|
275
|
+
isModified: false
|
|
274
276
|
};
|
|
275
277
|
return _this;
|
|
276
278
|
}
|
|
@@ -319,6 +321,12 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
319
321
|
this.setState(newState);
|
|
320
322
|
}
|
|
321
323
|
};
|
|
324
|
+
DatePicker.prototype.isConfirmMode = function () {
|
|
325
|
+
var _a = this.props, closeOnSelect = _a.closeOnSelect, embed = _a.embed, mobileUI = _a.mobileUI;
|
|
326
|
+
var curTimeFormat = this.state.curTimeFormat;
|
|
327
|
+
/** 日期时间选择器才支持confirm */
|
|
328
|
+
return closeOnSelect === false && !!curTimeFormat && !embed && !mobileUI;
|
|
329
|
+
};
|
|
322
330
|
DatePicker.prototype.focus = function () {
|
|
323
331
|
if (!this.dom) {
|
|
324
332
|
return;
|
|
@@ -363,22 +371,29 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
363
371
|
input && input.focus();
|
|
364
372
|
};
|
|
365
373
|
DatePicker.prototype.close = function () {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
374
|
+
var _a;
|
|
375
|
+
var isConfirmMode = this.isConfirmMode();
|
|
376
|
+
if (isConfirmMode) {
|
|
377
|
+
var _b = this.props, value = _b.value, valueFormat = _b.valueFormat, format = _b.format, displayFormat = _b.displayFormat, inputFormat = _b.inputFormat;
|
|
378
|
+
this.setState({
|
|
379
|
+
value: normalizeDate(value, valueFormat || format),
|
|
380
|
+
inputValue: ((_a = normalizeDate(value, valueFormat || format)) === null || _a === void 0 ? void 0 : _a.format(displayFormat || inputFormat)) || ''
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
this.setState({ isOpened: false, isModified: false });
|
|
369
384
|
};
|
|
370
385
|
DatePicker.prototype.clearValue = function (e) {
|
|
371
386
|
e.preventDefault();
|
|
372
387
|
e.stopPropagation();
|
|
373
388
|
var onChange = this.props.onChange;
|
|
374
389
|
onChange('');
|
|
375
|
-
this.setState({ inputValue: '' });
|
|
390
|
+
this.setState({ inputValue: '', isModified: false });
|
|
376
391
|
};
|
|
377
392
|
// 清空
|
|
378
393
|
DatePicker.prototype.clear = function () {
|
|
379
394
|
var onChange = this.props.onChange;
|
|
380
395
|
onChange('');
|
|
381
|
-
this.setState({ inputValue: '' });
|
|
396
|
+
this.setState({ inputValue: '', isModified: false });
|
|
382
397
|
};
|
|
383
398
|
// 重置
|
|
384
399
|
DatePicker.prototype.reset = function (resetValue) {
|
|
@@ -389,13 +404,18 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
389
404
|
var _b = this.props, format = _b.format, valueFormat = _b.valueFormat, inputFormat = _b.inputFormat, displayFormat = _b.displayFormat, onChange = _b.onChange;
|
|
390
405
|
onChange(resetValue);
|
|
391
406
|
this.setState({
|
|
392
|
-
inputValue: (_a = normalizeDate(resetValue, valueFormat || format)) === null || _a === void 0 ? void 0 : _a.format(displayFormat || inputFormat || '')
|
|
407
|
+
inputValue: (_a = normalizeDate(resetValue, valueFormat || format)) === null || _a === void 0 ? void 0 : _a.format(displayFormat || inputFormat || ''),
|
|
408
|
+
isModified: false
|
|
393
409
|
});
|
|
394
410
|
};
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
411
|
+
/**
|
|
412
|
+
* 如果为日期时间选择器,则单独处理时间选择事件,点击确认的时候才触发onChange
|
|
413
|
+
*/
|
|
414
|
+
DatePicker.prototype.handleConfirm = function () {
|
|
415
|
+
var _a = this.props, onChange = _a.onChange, format = _a.format, valueFormat = _a.valueFormat, minDate = _a.minDate, maxDate = _a.maxDate, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, utc = _a.utc;
|
|
416
|
+
var value = this.state.value;
|
|
417
|
+
var isConfirmMode = this.isConfirmMode();
|
|
418
|
+
if (!isConfirmMode || !value) {
|
|
399
419
|
return;
|
|
400
420
|
}
|
|
401
421
|
if (minDate && value && value.isBefore(minDate, 'second')) {
|
|
@@ -407,15 +427,65 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
407
427
|
onChange(utc
|
|
408
428
|
? moment.utc(value).format(valueFormat || format)
|
|
409
429
|
: value.format(valueFormat || format));
|
|
410
|
-
if (closeOnSelect && curDateFormat && !curTimeFormat) {
|
|
411
|
-
this.close();
|
|
412
|
-
}
|
|
413
430
|
this.setState({
|
|
414
431
|
inputValue: utc
|
|
415
432
|
? moment.utc(value).format(displayFormat || inputFormat)
|
|
416
|
-
: value.format(displayFormat || inputFormat)
|
|
433
|
+
: value.format(displayFormat || inputFormat),
|
|
434
|
+
isOpened: false,
|
|
435
|
+
isModified: true
|
|
417
436
|
});
|
|
418
437
|
};
|
|
438
|
+
DatePicker.prototype.handleChange = function (value, viewMode) {
|
|
439
|
+
var _a = this.props, onChange = _a.onChange, format = _a.format, valueFormat = _a.valueFormat, minDate = _a.minDate, maxDate = _a.maxDate, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, closeOnSelect = _a.closeOnSelect, utc = _a.utc, defaultValue = _a.value;
|
|
440
|
+
var _b = this.state, curDateFormat = _b.curDateFormat, curTimeFormat = _b.curTimeFormat, isModified = _b.isModified;
|
|
441
|
+
var isConfirmMode = this.isConfirmMode();
|
|
442
|
+
if (!moment.isMoment(value)) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
if (minDate && value && value.isBefore(minDate, 'second')) {
|
|
446
|
+
value = minDate;
|
|
447
|
+
}
|
|
448
|
+
else if (maxDate && value && value.isAfter(maxDate, 'second')) {
|
|
449
|
+
value = maxDate;
|
|
450
|
+
}
|
|
451
|
+
/** 首次选择且当前未绑定值,则默认使用当前时间 */
|
|
452
|
+
if (!defaultValue && !!curTimeFormat && !isModified) {
|
|
453
|
+
var now_1 = moment();
|
|
454
|
+
var timePart_1 = {
|
|
455
|
+
date: value.get('date'),
|
|
456
|
+
hour: value.get('hour'),
|
|
457
|
+
minute: value.get('minute'),
|
|
458
|
+
second: value.get('second'),
|
|
459
|
+
millisecond: value.get('millisecond')
|
|
460
|
+
};
|
|
461
|
+
Object.keys(timePart_1).forEach(function (unit) {
|
|
462
|
+
/** 首次选择时间,日期使用当前时间; 将未设置过的时间字段设置为当前值 */
|
|
463
|
+
if ((unit === 'date' && viewMode === 'time') ||
|
|
464
|
+
(unit !== 'date' && timePart_1[unit] === 0)) {
|
|
465
|
+
timePart_1[unit] = now_1.get(unit);
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
value.set(timePart_1);
|
|
469
|
+
}
|
|
470
|
+
var updatedValue = utc
|
|
471
|
+
? moment.utc(value).format(valueFormat || format)
|
|
472
|
+
: value.format(valueFormat || format);
|
|
473
|
+
var updatedInputValue = utc
|
|
474
|
+
? moment.utc(value).format(displayFormat || inputFormat)
|
|
475
|
+
: value.format(displayFormat || inputFormat);
|
|
476
|
+
if (isConfirmMode) {
|
|
477
|
+
this.setState({ value: value, inputValue: updatedInputValue });
|
|
478
|
+
this.inputValueCache = updatedInputValue;
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
onChange(updatedValue);
|
|
482
|
+
if (closeOnSelect && curDateFormat && !curTimeFormat) {
|
|
483
|
+
this.close();
|
|
484
|
+
}
|
|
485
|
+
this.setState({ inputValue: updatedInputValue });
|
|
486
|
+
}
|
|
487
|
+
this.setState({ isModified: true });
|
|
488
|
+
};
|
|
419
489
|
// 手动输入日期
|
|
420
490
|
DatePicker.prototype.inputChange = function (e) {
|
|
421
491
|
var _a = this.props, onChange = _a.onChange, inputFormat = _a.inputFormat, format = _a.format, displayFormat = _a.displayFormat, valueFormat = _a.valueFormat, utc = _a.utc, minDate = _a.minDate, maxDate = _a.maxDate;
|
|
@@ -427,9 +497,9 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
427
497
|
else {
|
|
428
498
|
// 将输入的格式转成正则匹配,比如 YYYY-MM-DD HH:mm:ss 改成 \d\d\d\d\-
|
|
429
499
|
// 只有匹配成功才更新
|
|
430
|
-
var inputCheckRegex =
|
|
431
|
-
.replace(/[ymdhs]/gi,
|
|
432
|
-
.replace(/-/gi,
|
|
500
|
+
var inputCheckRegex = new RegExp((valueFormat || inputFormat || displayFormat)
|
|
501
|
+
.replace(/[ymdhs]/gi, '\\d')
|
|
502
|
+
.replace(/-/gi, '\\-'));
|
|
433
503
|
if (inputCheckRegex.test(value)) {
|
|
434
504
|
var newDate = moment(value, displayFormat || inputFormat);
|
|
435
505
|
var dateValue = utc
|
|
@@ -546,11 +616,19 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
546
616
|
};
|
|
547
617
|
DatePicker.prototype.render = function () {
|
|
548
618
|
var _a;
|
|
549
|
-
var _b = this.props, ns = _b.classPrefix, cx = _b.classnames, className = _b.className, popoverClassName = _b.popoverClassName, value = _b.value, placeholder = _b.placeholder, disabled = _b.disabled, inputFormat = _b.inputFormat, displayFormat = _b.displayFormat; _b.dateFormat; _b.timeFormat; var viewMode = _b.viewMode, timeConstraints = _b.timeConstraints, popOverContainer = _b.popOverContainer, clearable = _b.clearable, shortcuts = _b.shortcuts; _b.utc; var isEndDate = _b.isEndDate, overlayPlacement = _b.overlayPlacement, locale = _b.locale, format = _b.format, valueFormat = _b.valueFormat, borderMode = _b.borderMode, embed = _b.embed, minDate = _b.minDate, mobileUI = _b.mobileUI, maxDate = _b.maxDate, schedules = _b.schedules, largeMode = _b.largeMode, scheduleClassNames = _b.scheduleClassNames, todayActiveStyle = _b.todayActiveStyle, onScheduleClick = _b.onScheduleClick, mobileCalendarMode = _b.mobileCalendarMode, label = _b.label, env = _b.env;
|
|
619
|
+
var _b = this.props, ns = _b.classPrefix, cx = _b.classnames, className = _b.className, popoverClassName = _b.popoverClassName, value = _b.value, placeholder = _b.placeholder, disabled = _b.disabled, inputFormat = _b.inputFormat, displayFormat = _b.displayFormat; _b.dateFormat; _b.timeFormat; var viewMode = _b.viewMode, timeConstraints = _b.timeConstraints, popOverContainer = _b.popOverContainer, clearable = _b.clearable, shortcuts = _b.shortcuts; _b.utc; var isEndDate = _b.isEndDate, overlayPlacement = _b.overlayPlacement, locale = _b.locale, format = _b.format, valueFormat = _b.valueFormat, borderMode = _b.borderMode, embed = _b.embed, minDate = _b.minDate, mobileUI = _b.mobileUI, maxDate = _b.maxDate, schedules = _b.schedules, largeMode = _b.largeMode, scheduleClassNames = _b.scheduleClassNames, todayActiveStyle = _b.todayActiveStyle, onScheduleClick = _b.onScheduleClick, mobileCalendarMode = _b.mobileCalendarMode, label = _b.label, env = _b.env, onClick = _b.onClick, onMouseEnter = _b.onMouseEnter, onMouseLeave = _b.onMouseLeave; _b.closeOnSelect;
|
|
550
620
|
var __ = this.props.translate;
|
|
551
|
-
var _c = this.state, curTimeFormat = _c.curTimeFormat, curDateFormat = _c.curDateFormat;
|
|
552
|
-
var
|
|
621
|
+
var _c = this.state, curTimeFormat = _c.curTimeFormat, curDateFormat = _c.curDateFormat, isOpened = _c.isOpened;
|
|
622
|
+
var isConfirmMode = this.isConfirmMode();
|
|
553
623
|
var date = this.state.value;
|
|
624
|
+
var isConfirmBtnDisbaled = false;
|
|
625
|
+
if (isConfirmMode) {
|
|
626
|
+
var lastModifiedValue = normalizeDate(value, valueFormat || format);
|
|
627
|
+
isConfirmBtnDisbaled =
|
|
628
|
+
date && lastModifiedValue
|
|
629
|
+
? moment(date).isSame(lastModifiedValue, 'second')
|
|
630
|
+
: date === lastModifiedValue;
|
|
631
|
+
}
|
|
554
632
|
var calendarMobile = (React__default.createElement(CalendarMobile, { isDatePicker: true, timeFormat: curTimeFormat, displayForamt: displayFormat || inputFormat, startDate: date, defaultDate: date, minDate: minDate, maxDate: maxDate, dateFormat: curDateFormat, embed: embed, viewMode: viewMode, close: this.close, confirm: this.handleChange, footerExtra: this.renderShortCuts(shortcuts), showViewMode: viewMode === 'quarters' || viewMode === 'months' ? 'years' : 'months', timeConstraints: timeConstraints, isEndDate: isEndDate }));
|
|
555
633
|
var CalendarMobileTitle = (React__default.createElement("div", { className: "".concat(ns, "CalendarMobile-title") }, label && typeof label === 'string' ? label : __('Calendar.datepicker')));
|
|
556
634
|
var useCalendarMobile = mobileUI && ['days', 'months', 'quarters'].indexOf(viewMode) > -1;
|
|
@@ -578,7 +656,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
578
656
|
}, className) },
|
|
579
657
|
React__default.createElement(Calendar, { value: date, onChange: this.handleChange, requiredConfirm: false, dateFormat: curDateFormat, timeFormat: curTimeFormat, isValidDate: this.checkIsValidDate, viewMode: viewMode, timeConstraints: timeConstraints, input: false, onClose: this.close, locale: locale, minDate: minDate, maxDate: maxDate,
|
|
580
658
|
// utc={utc}
|
|
581
|
-
schedules: schedulesData, env: env, largeMode: largeMode, todayActiveStyle: todayActiveStyle, onScheduleClick: onScheduleClick, embed: embed, mobileUI: mobileUI, isEndDate: isEndDate })));
|
|
659
|
+
schedules: schedulesData, env: env, largeMode: largeMode, todayActiveStyle: todayActiveStyle, onScheduleClick: onScheduleClick, embed: embed, mobileUI: mobileUI, isEndDate: isEndDate, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave })));
|
|
582
660
|
}
|
|
583
661
|
return (React__default.createElement("div", { tabIndex: 0, onKeyPress: this.handleKeyPress, onFocus: this.handleFocus, onBlur: this.handleBlur, className: cx("DatePicker", (_a = {
|
|
584
662
|
'is-disabled': disabled,
|
|
@@ -599,9 +677,12 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
599
677
|
!mobileUI && isOpened ? (React__default.createElement(Overlay, { target: this.getTarget, container: popOverContainer || this.getParent, rootClose: false, placement: overlayPlacement, show: true },
|
|
600
678
|
React__default.createElement(PopOver, { classPrefix: ns, className: cx("DatePicker-popover", popoverClassName), onHide: this.close, overlay: true, onClick: this.handlePopOverClick },
|
|
601
679
|
this.renderShortCuts(shortcuts),
|
|
602
|
-
React__default.createElement(Calendar, { value: date, onChange: this.handleChange, requiredConfirm: viewMode === 'time', dateFormat: curDateFormat, displayForamt: displayFormat || inputFormat, timeFormat: curTimeFormat, isValidDate: this.checkIsValidDate, viewMode: viewMode, timeConstraints: timeConstraints, input: false, onClose: this.close, locale: locale, minDate: minDate, maxDate: maxDate, mobileUI: mobileUI, isEndDate: isEndDate
|
|
680
|
+
React__default.createElement(Calendar, { value: date, onChange: this.handleChange, requiredConfirm: viewMode === 'time', dateFormat: curDateFormat, displayForamt: displayFormat || inputFormat, timeFormat: curTimeFormat, isValidDate: this.checkIsValidDate, viewMode: viewMode, timeConstraints: timeConstraints, input: false, onClose: this.close, locale: locale, minDate: minDate, maxDate: maxDate, mobileUI: mobileUI, isEndDate: isEndDate, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }),
|
|
681
|
+
isConfirmMode ? (React__default.createElement("div", { className: "".concat(ns, "DateRangePicker-actions") },
|
|
682
|
+
React__default.createElement(Button, { size: "sm", onClick: this.close }, __('cancel')),
|
|
683
|
+
React__default.createElement(Button, { level: "primary", size: "sm", disabled: isConfirmBtnDisbaled, className: cx('m-l-sm'), onClick: this.handleConfirm }, __('confirm')))) : null))) : null,
|
|
603
684
|
mobileUI ? (mobileCalendarMode === 'calendar' && useCalendarMobile ? (React__default.createElement(PopUp, { isShow: isOpened, className: cx("".concat(ns, "CalendarMobile-pop")), onHide: this.close, header: CalendarMobileTitle }, calendarMobile)) : (React__default.createElement(PopUp, { className: cx("".concat(ns, "DatePicker-popup DatePicker-mobile")), container: popOverContainer, isShow: isOpened, showClose: false, onHide: this.handleClick },
|
|
604
|
-
React__default.createElement(Calendar, { value: date, onChange: this.handleChange, requiredConfirm: false, dateFormat: curDateFormat, displayForamt: displayFormat || inputFormat, timeFormat: curTimeFormat, isValidDate: this.checkIsValidDate, viewMode: viewMode, timeConstraints: timeConstraints, input: false, onClose: this.close, locale: locale, minDate: minDate, maxDate: maxDate, mobileUI: mobileUI })))) : null));
|
|
685
|
+
React__default.createElement(Calendar, { value: date, onChange: this.handleChange, requiredConfirm: false, dateFormat: curDateFormat, displayForamt: displayFormat || inputFormat, timeFormat: curTimeFormat, isValidDate: this.checkIsValidDate, viewMode: viewMode, timeConstraints: timeConstraints, input: false, onClose: this.close, locale: locale, minDate: minDate, maxDate: maxDate, mobileUI: mobileUI, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave })))) : null));
|
|
605
686
|
};
|
|
606
687
|
DatePicker.defaultProps = {
|
|
607
688
|
viewMode: 'days',
|
|
@@ -616,6 +697,12 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
616
697
|
'bg-secondary'
|
|
617
698
|
]
|
|
618
699
|
};
|
|
700
|
+
__decorate([
|
|
701
|
+
autobind,
|
|
702
|
+
__metadata("design:type", Function),
|
|
703
|
+
__metadata("design:paramtypes", []),
|
|
704
|
+
__metadata("design:returntype", void 0)
|
|
705
|
+
], DatePicker.prototype, "handleConfirm", null);
|
|
619
706
|
return DatePicker;
|
|
620
707
|
}(React__default.Component));
|
|
621
708
|
var DatePicker$1 = themeable(localeable(DatePicker));
|
|
@@ -9,7 +9,7 @@ import moment, { unitOfTime } from 'moment';
|
|
|
9
9
|
import { ShortCuts } from './DatePicker';
|
|
10
10
|
import type { Moment } from 'moment';
|
|
11
11
|
import type { PlainObject, ThemeProps, LocaleProps } from 'amis-core';
|
|
12
|
-
import type { ViewMode } from './calendar/Calendar';
|
|
12
|
+
import type { ViewMode, ChangeEventViewMode } from './calendar/Calendar';
|
|
13
13
|
export interface DateRangePickerProps extends ThemeProps, LocaleProps {
|
|
14
14
|
className?: string;
|
|
15
15
|
popoverClassName?: string;
|
|
@@ -143,19 +143,21 @@ export declare class DateRangePicker extends React.Component<DateRangePickerProp
|
|
|
143
143
|
type: 'start' | 'end';
|
|
144
144
|
originValue?: moment.Moment;
|
|
145
145
|
timeFormat?: string;
|
|
146
|
-
subControlViewMode?:
|
|
146
|
+
subControlViewMode?: ChangeEventViewMode;
|
|
147
|
+
/** 自动初始化绑定值,用于首次选择且当前未绑定值,默认使用当前时间 */
|
|
148
|
+
autoInitDefaultValue?: boolean;
|
|
147
149
|
}): moment.Moment;
|
|
148
150
|
handleDateChange(newValue: moment.Moment): void;
|
|
149
151
|
/**
|
|
150
152
|
* @param {Moment} newValue 当前选择的日期时间值
|
|
151
153
|
* @param {ViewMode=} subControlViewMode 子选择控件的类型,可选参数('time'),用于区分datetime选择器的触发控件
|
|
152
154
|
*/
|
|
153
|
-
handleStartDateChange(newValue: moment.Moment, subControlViewMode?:
|
|
155
|
+
handleStartDateChange(newValue: moment.Moment, subControlViewMode?: ChangeEventViewMode): void;
|
|
154
156
|
/**
|
|
155
157
|
* @param {Moment} newValue 当前选择的日期时间值
|
|
156
158
|
* @param {string=} subControlViewMode 子选择控件的类型的类型,可选参数('time'),用于区分datetime选择器的触发控件
|
|
157
159
|
*/
|
|
158
|
-
handelEndDateChange(newValue: moment.Moment, subControlViewMode?:
|
|
160
|
+
handelEndDateChange(newValue: moment.Moment, subControlViewMode?: ChangeEventViewMode): void;
|
|
159
161
|
startInputChange(e: React.ChangeEvent<HTMLInputElement>): void;
|
|
160
162
|
endInputChange(e: React.ChangeEvent<HTMLInputElement>): void;
|
|
161
163
|
getEndDateByDuration(newValue: moment.Moment): moment.Moment;
|
|
@@ -417,7 +419,9 @@ declare const _default: {
|
|
|
417
419
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
418
420
|
}): {
|
|
419
421
|
ref: any;
|
|
420
|
-
childRef(ref: any): void;
|
|
422
|
+
childRef(ref: any): void; /**
|
|
423
|
+
* @deprecated 3.1.0后废弃,用shortcuts替代
|
|
424
|
+
*/
|
|
421
425
|
getWrappedInstance(): any;
|
|
422
426
|
render(): React.JSX.Element;
|
|
423
427
|
context: unknown;
|
|
@@ -464,7 +468,7 @@ declare const _default: {
|
|
|
464
468
|
refs: {
|
|
465
469
|
[key: string]: React.ReactInstance;
|
|
466
470
|
};
|
|
467
|
-
componentDidMount?(): void;
|
|
471
|
+
componentDidMount?(): void;
|
|
468
472
|
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<DateRangePickerProps, keyof LocaleProps>, "classnames" | "classPrefix" | "type" | "data" | "embed" | "label" | "style" | "className" | "theme" | "mobileUI" | "value" | "disabled" | "onFocus" | "onBlur" | "onChange" | "viewMode" | "popoverClassName" | "displayFormat" | "timeFormat" | "valueFormat" | "minDate" | "maxDate" | "minDateRaw" | "maxDateRaw" | "utc" | "dateFormat" | "popOverContainer" | "borderMode" | "onRef" | "minDuration" | "maxDuration" | "animation" | "transform"> & {
|
|
469
473
|
clearable?: boolean | undefined;
|
|
470
474
|
inputFormat?: string | undefined;
|
|
@@ -630,7 +634,9 @@ declare const _default: {
|
|
|
630
634
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
631
635
|
}): {
|
|
632
636
|
ref: any;
|
|
633
|
-
childRef(ref: any): void;
|
|
637
|
+
childRef(ref: any): void; /**
|
|
638
|
+
* @deprecated 3.1.0后废弃,用shortcuts替代
|
|
639
|
+
*/
|
|
634
640
|
getWrappedInstance(): any;
|
|
635
641
|
render(): React.JSX.Element;
|
|
636
642
|
context: unknown;
|
|
@@ -677,7 +683,7 @@ declare const _default: {
|
|
|
677
683
|
refs: {
|
|
678
684
|
[key: string]: React.ReactInstance;
|
|
679
685
|
};
|
|
680
|
-
componentDidMount?(): void;
|
|
686
|
+
componentDidMount?(): void;
|
|
681
687
|
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<DateRangePickerProps, keyof LocaleProps>, "classnames" | "classPrefix" | "type" | "data" | "embed" | "label" | "style" | "className" | "theme" | "mobileUI" | "value" | "disabled" | "onFocus" | "onBlur" | "onChange" | "viewMode" | "popoverClassName" | "displayFormat" | "timeFormat" | "valueFormat" | "minDate" | "maxDate" | "minDateRaw" | "maxDateRaw" | "utc" | "dateFormat" | "popOverContainer" | "borderMode" | "onRef" | "minDuration" | "maxDuration" | "animation" | "transform"> & {
|
|
682
688
|
clearable?: boolean | undefined;
|
|
683
689
|
inputFormat?: string | undefined;
|
|
@@ -843,7 +849,9 @@ declare const _default: {
|
|
|
843
849
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
844
850
|
}): {
|
|
845
851
|
ref: any;
|
|
846
|
-
childRef(ref: any): void;
|
|
852
|
+
childRef(ref: any): void; /**
|
|
853
|
+
* @deprecated 3.1.0后废弃,用shortcuts替代
|
|
854
|
+
*/
|
|
847
855
|
getWrappedInstance(): any;
|
|
848
856
|
render(): React.JSX.Element;
|
|
849
857
|
context: unknown;
|
|
@@ -890,7 +898,7 @@ declare const _default: {
|
|
|
890
898
|
refs: {
|
|
891
899
|
[key: string]: React.ReactInstance;
|
|
892
900
|
};
|
|
893
|
-
componentDidMount?(): void;
|
|
901
|
+
componentDidMount?(): void;
|
|
894
902
|
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<DateRangePickerProps, keyof LocaleProps>, "classnames" | "classPrefix" | "type" | "data" | "embed" | "label" | "style" | "className" | "theme" | "mobileUI" | "value" | "disabled" | "onFocus" | "onBlur" | "onChange" | "viewMode" | "popoverClassName" | "displayFormat" | "timeFormat" | "valueFormat" | "minDate" | "maxDate" | "minDateRaw" | "maxDateRaw" | "utc" | "dateFormat" | "popOverContainer" | "borderMode" | "onRef" | "minDuration" | "maxDuration" | "animation" | "transform"> & {
|
|
895
903
|
clearable?: boolean | undefined;
|
|
896
904
|
inputFormat?: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.6.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -656,16 +656,42 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
656
656
|
if (options === void 0) { options = { type: 'start' }; }
|
|
657
657
|
var _a = options || {
|
|
658
658
|
type: 'start'
|
|
659
|
-
}, type = _a.type, originValue = _a.originValue, timeFormat = _a.timeFormat, subControlViewMode = _a.subControlViewMode;
|
|
659
|
+
}, type = _a.type, originValue = _a.originValue, timeFormat = _a.timeFormat, subControlViewMode = _a.subControlViewMode, autoInitDefaultValue = _a.autoInitDefaultValue;
|
|
660
660
|
var value = date.clone();
|
|
661
661
|
var _b = this.props, transform = _b.transform, data = _b.data;
|
|
662
|
-
var
|
|
663
|
-
|
|
664
|
-
|
|
662
|
+
var _c = this.state, startDate = _c.startDate, endDate = _c.endDate;
|
|
663
|
+
/** 此时为点选后的值初始化设置,不应该被内部转化逻辑和transformFn限制 */
|
|
664
|
+
if (autoInitDefaultValue === true) {
|
|
665
|
+
var now_1 = moment();
|
|
666
|
+
/** 如果已经设置了结束时间且当前时间已经超出了结束时间,则开始时间不能超过结束时间 */
|
|
667
|
+
if (!startDate && endDate && type === 'start' && now_1.isAfter(endDate)) {
|
|
668
|
+
value = endDate.clone();
|
|
669
|
+
return value;
|
|
670
|
+
}
|
|
671
|
+
var timePart_1 = {
|
|
672
|
+
date: value.get('date'),
|
|
673
|
+
hour: value.get('hour'),
|
|
674
|
+
minute: value.get('minute'),
|
|
675
|
+
second: value.get('second'),
|
|
676
|
+
millisecond: value.get('millisecond')
|
|
677
|
+
};
|
|
678
|
+
Object.keys(timePart_1).forEach(function (unit) {
|
|
679
|
+
/** 首次选择时间,日期使用当前时间; 将未设置过的时间字段设置为当前值 */
|
|
680
|
+
if ((unit === 'date' && subControlViewMode === 'time') ||
|
|
681
|
+
(unit !== 'date' && timePart_1[unit] === 0)) {
|
|
682
|
+
timePart_1[unit] = now_1.get(unit);
|
|
683
|
+
}
|
|
684
|
+
});
|
|
685
|
+
value.set(timePart_1);
|
|
686
|
+
return value;
|
|
687
|
+
}
|
|
665
688
|
/** 日期时间选择器组件支持用户选择时间,如果用户手动选择了时间,则不需要走默认处理 */
|
|
666
689
|
if (subControlViewMode && subControlViewMode === 'time') {
|
|
667
690
|
return value;
|
|
668
691
|
}
|
|
692
|
+
var transformFn = transform && typeof transform === 'string'
|
|
693
|
+
? str2function(transform, 'value', 'config', 'props', 'data', 'moment')
|
|
694
|
+
: transform;
|
|
669
695
|
// 没有初始值
|
|
670
696
|
if (!originValue) {
|
|
671
697
|
value = value[type === 'start' ? 'startOf' : 'endOf']('day');
|
|
@@ -704,8 +730,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
704
730
|
* @param {ViewMode=} subControlViewMode 子选择控件的类型,可选参数('time'),用于区分datetime选择器的触发控件
|
|
705
731
|
*/
|
|
706
732
|
DateRangePicker.prototype.handleStartDateChange = function (newValue, subControlViewMode) {
|
|
707
|
-
var _a = this.props, minDate = _a.minDate, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, type = _a.type;
|
|
708
|
-
var _b = this.state, startDate = _b.startDate, endDateOpenedFirst = _b.endDateOpenedFirst, timeFormat = _b.curTimeFormat;
|
|
733
|
+
var _a = this.props, minDate = _a.minDate, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, type = _a.type; _a.value;
|
|
734
|
+
var _b = this.state, startDate = _b.startDate, oldStartDate = _b.oldStartDate, endDateOpenedFirst = _b.endDateOpenedFirst, timeFormat = _b.curTimeFormat;
|
|
709
735
|
if (minDate && newValue.isBefore(minDate)) {
|
|
710
736
|
newValue = minDate;
|
|
711
737
|
}
|
|
@@ -713,7 +739,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
713
739
|
type: 'start',
|
|
714
740
|
originValue: startDate || minDate,
|
|
715
741
|
timeFormat: timeFormat,
|
|
716
|
-
subControlViewMode: subControlViewMode
|
|
742
|
+
subControlViewMode: subControlViewMode,
|
|
743
|
+
autoInitDefaultValue: !!timeFormat && newValue && (!oldStartDate || !startDate)
|
|
717
744
|
});
|
|
718
745
|
var newState = {
|
|
719
746
|
startDate: date,
|
|
@@ -735,15 +762,16 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
735
762
|
*/
|
|
736
763
|
DateRangePicker.prototype.handelEndDateChange = function (newValue, subControlViewMode) {
|
|
737
764
|
var _this = this;
|
|
738
|
-
var _a = this.props, embed = _a.embed, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, type = _a.type;
|
|
739
|
-
var _b = this.state; _b.startDate; var endDate = _b.endDate, endDateOpenedFirst = _b.endDateOpenedFirst, timeFormat = _b.curTimeFormat;
|
|
765
|
+
var _a = this.props, embed = _a.embed, inputFormat = _a.inputFormat, displayFormat = _a.displayFormat, type = _a.type; _a.value;
|
|
766
|
+
var _b = this.state; _b.startDate; var endDate = _b.endDate, oldEndDate = _b.oldEndDate, endDateOpenedFirst = _b.endDateOpenedFirst, timeFormat = _b.curTimeFormat;
|
|
740
767
|
newValue = this.getEndDateByDuration(newValue);
|
|
741
768
|
var editState = endDateOpenedFirst ? 'start' : 'end';
|
|
742
769
|
var date = this.filterDate(newValue, {
|
|
743
770
|
type: 'end',
|
|
744
771
|
originValue: endDate,
|
|
745
772
|
timeFormat: timeFormat,
|
|
746
|
-
subControlViewMode: subControlViewMode
|
|
773
|
+
subControlViewMode: subControlViewMode,
|
|
774
|
+
autoInitDefaultValue: !!timeFormat && newValue && (!oldEndDate || !endDate)
|
|
747
775
|
});
|
|
748
776
|
this.setState({
|
|
749
777
|
endDate: date,
|
package/esm/components/Drawer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.6.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -11,6 +11,7 @@ import { Icon } from './icons.js';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { addModal, current, removeModal } from './ModalManager.js';
|
|
13
13
|
import { getScrollbarWidth, autobind, themeable } from 'amis-core';
|
|
14
|
+
import { getContainerWithFullscreen } from './Modal.js';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* @file Drawer
|
|
@@ -194,7 +195,7 @@ var Drawer = /** @class */ (function (_super) {
|
|
|
194
195
|
var _this = this;
|
|
195
196
|
var _a = this.props, ns = _a.classPrefix, className = _a.className, children = _a.children, container = _a.container, show = _a.show, showCloseButton = _a.showCloseButton, position = _a.position, size = _a.size, onHide = _a.onHide, disabled = _a.disabled, overlay = _a.overlay, bodyClassName = _a.bodyClassName, resizable = _a.resizable, drawerClassName = _a.drawerClassName, drawerMaskClassName = _a.drawerMaskClassName;
|
|
196
197
|
var bodyStyle = this.getDrawerStyle();
|
|
197
|
-
return (React__default.createElement(Portal, { container: container },
|
|
198
|
+
return (React__default.createElement(Portal, { container: getContainerWithFullscreen(container) },
|
|
198
199
|
React__default.createElement(Transition, { mountOnEnter: true, unmountOnExit: true, appear: true, in: show, timeout: 500, onEnter: this.handleEnter, onExited: this.handleExited, onEntered: this.handleEntered }, function (status) {
|
|
199
200
|
var _a;
|
|
200
201
|
if (status === ENTERING) {
|