amis-ui 2.0.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/components/404.js +1 -1
- package/esm/components/Alert.js +1 -1
- package/esm/components/Alert2.js +2 -2
- package/esm/components/AnchorNav.js +8 -8
- package/esm/components/ArrayInput.js +1 -1
- package/esm/components/AsideNav.d.ts +11 -11
- package/esm/components/AsideNav.js +1 -1
- package/esm/components/AssociatedSelection.js +1 -1
- package/esm/components/Avatar.js +1 -1
- package/esm/components/Badge.d.ts +1 -1
- package/esm/components/Badge.js +2 -4
- package/esm/components/BaiduMapPicker.js +3 -3
- package/esm/components/BarCode.js +38 -2
- package/esm/components/Breadcrumb.js +2 -2
- package/esm/components/Button.js +1 -1
- package/esm/components/CalendarMobile.js +1 -1
- package/esm/components/Card.js +1 -1
- package/esm/components/Cascader.js +3 -9
- package/esm/components/ChainedSelection.js +1 -1
- package/esm/components/Checkbox.js +1 -1
- package/esm/components/CityArea.js +2 -2
- package/esm/components/CityDB.js +4097 -2
- package/esm/components/CodeMirror.js +1 -1
- package/esm/components/Collapse.js +1 -1
- package/esm/components/CollapseGroup.js +1 -1
- package/esm/components/ColorPicker.js +198 -2
- package/esm/components/ContextMenu.js +1 -1
- package/esm/components/DatePicker.d.ts +43 -40
- package/esm/components/DatePicker.js +11 -4
- package/esm/components/DateRangePicker.d.ts +144 -81
- package/esm/components/DateRangePicker.js +191 -80
- package/esm/components/Drawer.d.ts +10 -10
- package/esm/components/Drawer.js +1 -1
- package/esm/components/Editor.d.ts +47 -41
- package/esm/components/Editor.js +9 -8
- package/esm/components/Form.js +1 -1
- package/esm/components/FormField.js +1 -1
- package/esm/components/GridNav.js +1 -1
- package/esm/components/GroupedSelection.js +1 -1
- package/esm/components/Html.js +1 -1
- package/esm/components/ImageGallery.d.ts +70 -40
- package/esm/components/ImageGallery.js +97 -15
- package/esm/components/Input.js +1 -1
- package/esm/components/InputBox.js +1 -1
- package/esm/components/InputBoxWithSuggestion.js +1 -1
- package/esm/components/Layout.js +1 -1
- package/esm/components/Link.js +1 -1
- package/esm/components/ListGroup.d.ts +10 -10
- package/esm/components/ListGroup.js +1 -1
- package/esm/components/ListMenu.js +1 -1
- package/esm/components/LocationPicker.js +1 -1
- package/esm/components/Markdown.js +56 -2
- package/esm/components/Modal.d.ts +60 -58
- package/esm/components/Modal.js +9 -4
- package/esm/components/ModalManager.js +1 -1
- package/esm/components/NumberInput.js +2 -2
- package/esm/components/Pagination.d.ts +49 -66
- package/esm/components/Pagination.js +4 -4
- package/esm/components/Picker.js +1 -1
- package/esm/components/PickerColumn.js +1 -1
- package/esm/components/PickerContainer.js +1 -1
- package/esm/components/PopOverContainer.d.ts +1 -0
- package/esm/components/PopOverContainer.js +3 -3
- package/esm/components/PopUp.js +1 -1
- package/esm/components/Progress.d.ts +16 -10
- package/esm/components/Progress.js +27 -5
- package/esm/components/PullRefresh.js +1 -1
- package/esm/components/Radios.js +1 -1
- package/esm/components/Range.js +3 -2
- package/esm/components/Rating.js +1 -1
- package/esm/components/ResultBox.js +7 -3
- package/esm/components/ResultList.js +1 -1
- package/esm/components/ResultTableList.js +1 -1
- package/esm/components/ResultTreeList.js +1 -1
- package/esm/components/RichText.js +258 -2
- package/esm/components/SearchBox.js +1 -1
- package/esm/components/Select.d.ts +194 -193
- package/esm/components/Select.js +9 -5
- package/esm/components/Selection.js +1 -1
- package/esm/components/SparkLine.d.ts +40 -40
- package/esm/components/SparkLine.js +1 -1
- package/esm/components/Spinner.js +1 -1
- package/esm/components/Steps.js +1 -1
- package/esm/components/Switch.js +1 -1
- package/esm/components/TableSelection.js +1 -1
- package/esm/components/Tabs.d.ts +149 -13
- package/esm/components/Tabs.js +39 -11
- package/esm/components/TabsTransfer.js +1 -1
- package/esm/components/TabsTransferPicker.js +1 -1
- package/esm/components/Tag.js +1 -1
- package/esm/components/Textarea.js +4 -2
- package/esm/components/Timeline.js +1 -1
- package/esm/components/TimelineItem.js +4 -4
- package/esm/components/Tinymce.d.ts +1 -3
- package/esm/components/Tinymce.js +561 -2
- package/esm/components/TitleBar.js +1 -1
- package/esm/components/Toast.js +1 -1
- package/esm/components/Tooltip.js +1 -1
- package/esm/components/TooltipWrapper.js +1 -1
- package/esm/components/Transfer.js +11 -4
- package/esm/components/TransferDropDown.js +4 -5
- package/esm/components/TransferPicker.js +1 -1
- package/esm/components/TransferSearch.js +1 -1
- package/esm/components/Tree.js +34 -33
- package/esm/components/TreeSelection.js +1 -1
- package/esm/components/UserSelect.js +5 -3
- package/esm/components/UserTabSelect.js +1 -1
- package/esm/components/WithRemoteConfig.js +1 -1
- package/esm/components/WithStore.js +1 -1
- package/esm/components/calendar/Calendar.d.ts +1 -0
- package/esm/components/calendar/Calendar.js +7 -2
- package/esm/components/calendar/CalendarContainer.js +1 -1
- package/esm/components/calendar/DaysView.d.ts +1 -1
- package/esm/components/calendar/DaysView.js +65 -29
- package/esm/components/calendar/MonthsView.js +1 -1
- package/esm/components/calendar/QuartersView.js +1 -1
- package/esm/components/calendar/TimeView.d.ts +0 -1
- package/esm/components/calendar/TimeView.js +5 -6
- package/esm/components/calendar/YearsView.js +1 -1
- package/esm/components/condition-builder/Expression.js +1 -1
- package/esm/components/condition-builder/Field.js +1 -1
- package/esm/components/condition-builder/Formula.js +1 -1
- package/esm/components/condition-builder/Func.js +1 -1
- package/esm/components/condition-builder/Group.js +1 -1
- package/esm/components/condition-builder/GroupOrItem.js +4 -4
- package/esm/components/condition-builder/InputSwitch.js +1 -1
- package/esm/components/condition-builder/Item.js +1 -1
- package/esm/components/condition-builder/Value.js +1 -1
- package/esm/components/condition-builder/config.js +1 -1
- package/esm/components/condition-builder/index.js +1 -1
- package/esm/components/formula/Editor.js +1 -1
- package/esm/components/formula/FuncList.js +1 -1
- package/esm/components/formula/Picker.d.ts +1 -0
- package/esm/components/formula/Picker.js +10 -1
- package/esm/components/formula/VariableList.js +1 -1
- package/esm/components/formula/plugin.d.ts +1 -0
- package/esm/components/formula/plugin.js +11 -4
- package/esm/components/icons.d.ts +2 -1
- package/esm/components/icons.js +18 -1
- package/esm/components/json-schema/Array.js +1 -1
- package/esm/components/json-schema/Item.js +1 -1
- package/esm/components/json-schema/Object.js +1 -1
- package/esm/components/json-schema/index.js +1 -1
- package/esm/components/schema-editor/Array.js +1 -1
- package/esm/components/schema-editor/Common.js +1 -1
- package/esm/components/schema-editor/Item.js +1 -1
- package/esm/components/schema-editor/Object.js +1 -1
- package/esm/components/schema-editor/SchemaVariableList.js +1 -1
- package/esm/components/schema-editor/SchemaVariableListPicker.js +1 -1
- package/esm/components/schema-editor/index.js +1 -1
- package/esm/components/table/Cell.d.ts +2 -1
- package/esm/components/table/Cell.js +1 -1
- package/esm/components/table/HeadCellDropDown.d.ts +3 -1
- package/esm/components/table/HeadCellDropDown.js +1 -1
- package/esm/components/table/HeadCellFilter.d.ts +3 -2
- package/esm/components/table/HeadCellFilter.js +4 -4
- package/esm/components/table/HeadCellSelect.d.ts +3 -2
- package/esm/components/table/HeadCellSelect.js +4 -2
- package/esm/components/table/HeadCellSort.d.ts +4 -3
- package/esm/components/table/HeadCellSort.js +6 -6
- package/esm/components/table/ItemActionsWrapper.js +1 -1
- package/esm/components/table/index.d.ts +3 -4
- package/esm/components/table/index.js +9 -9
- package/esm/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/esm/components/virtual-list/constants.js +1 -1
- package/esm/components/virtual-list/index.d.ts +3 -3
- package/esm/components/virtual-list/index.js +1 -1
- package/esm/hooks/use-set-state.js +1 -1
- package/esm/hooks/use-touch.js +1 -1
- package/esm/hooks/use-update-effect.js +1 -1
- package/esm/hooks/use-validation-resolver.js +1 -1
- package/esm/icons/alert-danger.svg.js +2 -2
- package/esm/icons/alert-info.svg.js +1 -1
- package/esm/icons/alert-success.svg.js +2 -2
- package/esm/icons/alert-warning.svg.js +2 -2
- package/esm/icons/back.svg.js +1 -1
- package/esm/icons/calendar.svg.js +1 -1
- package/esm/icons/caret.svg.js +1 -1
- package/esm/icons/check-circle.svg.js +36 -0
- package/esm/icons/check.svg.js +1 -1
- package/esm/icons/clock.svg.js +1 -1
- package/esm/icons/close-small.svg.js +1 -1
- package/esm/icons/close.svg.js +1 -1
- package/esm/icons/cloud-upload.svg.js +1 -1
- package/esm/icons/column-filter.svg.js +1 -1
- package/esm/icons/columns.svg.js +1 -1
- package/esm/icons/compress-alt.svg.js +1 -1
- package/esm/icons/copy.svg.js +1 -1
- package/esm/icons/date.svg.js +1 -1
- package/esm/icons/department.svg.js +1 -1
- package/esm/icons/desk-empty.svg.js +1 -1
- package/esm/icons/dot.svg.js +1 -1
- package/esm/icons/down-arrow-bold.svg.js +2 -2
- package/esm/icons/down.svg.js +31 -0
- package/esm/icons/download.svg.js +1 -1
- package/esm/icons/drag-bar.svg.js +1 -1
- package/esm/icons/drag.svg.js +1 -1
- package/esm/icons/edit.svg.js +1 -2
- package/esm/icons/ellipsis-v.svg.js +1 -1
- package/esm/icons/enter.svg.js +1 -1
- package/esm/icons/exchange.svg.js +1 -1
- package/esm/icons/expand-alt.svg.js +1 -1
- package/esm/icons/fail.svg.js +1 -1
- package/esm/icons/file.svg.js +1 -1
- package/esm/icons/filter.svg.js +1 -1
- package/esm/icons/folder.svg.js +1 -1
- package/esm/icons/function.svg.js +1 -1
- package/esm/icons/home.svg.js +1 -1
- package/esm/icons/image.svg.js +1 -1
- package/esm/icons/info-circle.svg.js +1 -1
- package/esm/icons/info.svg.js +1 -1
- package/esm/icons/input-clear.svg.js +1 -1
- package/esm/icons/invisible.svg.js +1 -1
- package/esm/icons/left-arrow.svg.js +7 -4
- package/esm/icons/loading-outline.svg.js +1 -1
- package/esm/icons/location.svg.js +1 -1
- package/esm/icons/menu.svg.js +1 -1
- package/esm/icons/minus.svg.js +1 -1
- package/esm/icons/move.svg.js +1 -1
- package/esm/icons/mute.svg.js +1 -1
- package/esm/icons/new-edit.svg.js +24 -0
- package/esm/icons/pause.svg.js +1 -1
- package/esm/icons/pencil.svg.js +1 -1
- package/esm/icons/play.svg.js +1 -1
- package/esm/icons/plus-cicle.svg.js +1 -1
- package/esm/icons/plus-fine.svg.js +1 -1
- package/esm/icons/plus.svg.js +1 -1
- package/esm/icons/post.svg.js +1 -1
- package/esm/icons/question-mark.svg.js +1 -1
- package/esm/icons/question.svg.js +1 -1
- package/esm/icons/redo.svg.js +1 -1
- package/esm/icons/refresh.svg.js +1 -1
- package/esm/icons/reload.svg.js +1 -1
- package/esm/icons/remove.svg.js +1 -1
- package/esm/icons/retry.svg.js +1 -1
- package/esm/icons/right-arrow-bold.svg.js +1 -1
- package/esm/icons/right-arrow.svg.js +7 -4
- package/esm/icons/right-double-arrow.svg.js +24 -0
- package/esm/icons/role.svg.js +1 -1
- package/esm/icons/rotate-left.svg.js +24 -0
- package/esm/icons/rotate-right.svg.js +24 -0
- package/esm/icons/scale-origin.svg.js +26 -0
- package/esm/icons/schedule.svg.js +1 -1
- package/esm/icons/search.svg.js +1 -1
- package/esm/icons/setting.svg.js +1 -1
- package/esm/icons/slider-handle-icon.svg.js +1 -1
- package/esm/icons/sort-asc.svg.js +1 -1
- package/esm/icons/sort-default.svg.js +1 -1
- package/esm/icons/sort-desc.svg.js +1 -1
- package/esm/icons/star.svg.js +2 -2
- package/esm/icons/status-close.svg.js +1 -1
- package/esm/icons/status-fail.svg.js +1 -1
- package/esm/icons/status-info.svg.js +1 -1
- package/esm/icons/status-success.svg.js +1 -1
- package/esm/icons/status-warning.svg.js +1 -1
- package/esm/icons/steps-finsh.svg.js +24 -0
- package/esm/icons/success.svg.js +1 -1
- package/esm/icons/transparent.svg.js +1 -1
- package/esm/icons/trash.svg.js +1 -1
- package/esm/icons/tree-down.svg.js +1 -1
- package/esm/icons/undo.svg.js +1 -1
- package/esm/icons/upload.svg.js +1 -1
- package/esm/icons/user-remove.svg.js +1 -1
- package/esm/icons/view.svg.js +1 -1
- package/esm/icons/volume.svg.js +1 -1
- package/esm/icons/warning-mark.svg.js +1 -1
- package/esm/icons/warning.svg.js +1 -1
- package/esm/icons/window-restore.svg.js +1 -1
- package/esm/icons/zoom-in.svg.js +1 -1
- package/esm/icons/zoom-out.svg.js +1 -1
- package/esm/index.js +2 -1
- package/esm/locale/de-DE.js +25 -5
- package/esm/locale/en-US.js +21 -1
- package/esm/locale/zh-CN.js +25 -7
- package/esm/themes/ang.js +1 -1
- package/esm/themes/antd.js +1 -1
- package/esm/themes/cxd.js +1 -1
- package/esm/themes/dark.js +1 -1
- package/lib/components/404.js +1 -1
- package/lib/components/Alert.js +1 -1
- package/lib/components/Alert2.js +2 -2
- package/lib/components/AnchorNav.js +8 -8
- package/lib/components/ArrayInput.js +1 -1
- package/lib/components/AsideNav.d.ts +11 -11
- package/lib/components/AsideNav.js +1 -1
- package/lib/components/AssociatedSelection.js +1 -1
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Badge.d.ts +1 -1
- package/lib/components/Badge.js +2 -4
- package/lib/components/BaiduMapPicker.js +3 -3
- package/lib/components/BarCode.js +41 -4
- package/lib/components/Breadcrumb.js +2 -2
- package/lib/components/Button.js +1 -1
- package/lib/components/CalendarMobile.js +1 -1
- package/lib/components/Card.js +1 -1
- package/lib/components/Cascader.js +3 -9
- package/lib/components/ChainedSelection.js +1 -1
- package/lib/components/Checkbox.js +1 -1
- package/lib/components/CityArea.js +2 -2
- package/lib/components/CityDB.js +4099 -8
- package/lib/components/CodeMirror.js +1 -1
- package/lib/components/Collapse.js +1 -1
- package/lib/components/CollapseGroup.js +1 -1
- package/lib/components/ColorPicker.js +200 -4
- package/lib/components/ContextMenu.js +1 -1
- package/lib/components/DatePicker.d.ts +43 -40
- package/lib/components/DatePicker.js +11 -4
- package/lib/components/DateRangePicker.d.ts +144 -81
- package/lib/components/DateRangePicker.js +191 -78
- package/lib/components/Drawer.d.ts +10 -10
- package/lib/components/Drawer.js +1 -1
- package/lib/components/Editor.d.ts +47 -41
- package/lib/components/Editor.js +9 -9
- package/lib/components/Form.js +1 -1
- package/lib/components/FormField.js +1 -1
- package/lib/components/GridNav.js +1 -1
- package/lib/components/GroupedSelection.js +1 -1
- package/lib/components/Html.js +1 -1
- package/lib/components/ImageGallery.d.ts +70 -40
- package/lib/components/ImageGallery.js +97 -14
- package/lib/components/Input.js +1 -1
- package/lib/components/InputBox.js +1 -1
- package/lib/components/InputBoxWithSuggestion.js +1 -1
- package/lib/components/Layout.js +1 -1
- package/lib/components/Link.js +1 -1
- package/lib/components/ListGroup.d.ts +10 -10
- package/lib/components/ListGroup.js +1 -1
- package/lib/components/ListMenu.js +1 -1
- package/lib/components/LocationPicker.js +1 -1
- package/lib/components/Markdown.js +59 -4
- package/lib/components/Modal.d.ts +60 -58
- package/lib/components/Modal.js +9 -4
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/NumberInput.js +2 -2
- package/lib/components/Pagination.d.ts +49 -66
- package/lib/components/Pagination.js +4 -4
- package/lib/components/Picker.js +1 -1
- package/lib/components/PickerColumn.js +1 -1
- package/lib/components/PickerContainer.js +1 -1
- package/lib/components/PopOverContainer.d.ts +1 -0
- package/lib/components/PopOverContainer.js +3 -3
- package/lib/components/PopUp.js +1 -1
- package/lib/components/Progress.d.ts +16 -10
- package/lib/components/Progress.js +27 -5
- package/lib/components/PullRefresh.js +1 -1
- package/lib/components/Radios.js +1 -1
- package/lib/components/Range.js +3 -2
- package/lib/components/Rating.js +1 -1
- package/lib/components/ResultBox.js +7 -3
- package/lib/components/ResultList.js +1 -1
- package/lib/components/ResultTableList.js +1 -1
- package/lib/components/ResultTreeList.js +1 -1
- package/lib/components/RichText.js +261 -3
- package/lib/components/SearchBox.js +1 -1
- package/lib/components/Select.d.ts +194 -193
- package/lib/components/Select.js +8 -4
- package/lib/components/Selection.js +1 -1
- package/lib/components/SparkLine.d.ts +40 -40
- package/lib/components/SparkLine.js +1 -1
- package/lib/components/Spinner.js +1 -1
- package/lib/components/Steps.js +1 -1
- package/lib/components/Switch.js +1 -1
- package/lib/components/TableSelection.js +1 -1
- package/lib/components/Tabs.d.ts +149 -13
- package/lib/components/Tabs.js +39 -11
- package/lib/components/TabsTransfer.js +1 -1
- package/lib/components/TabsTransferPicker.js +1 -1
- package/lib/components/Tag.js +1 -1
- package/lib/components/Textarea.js +4 -2
- package/lib/components/Timeline.js +1 -1
- package/lib/components/TimelineItem.js +4 -4
- package/lib/components/Tinymce.d.ts +1 -3
- package/lib/components/Tinymce.js +563 -3
- package/lib/components/TitleBar.js +1 -1
- package/lib/components/Toast.js +1 -1
- package/lib/components/Tooltip.js +1 -1
- package/lib/components/TooltipWrapper.js +1 -1
- package/lib/components/Transfer.js +11 -4
- package/lib/components/TransferDropDown.js +4 -5
- package/lib/components/TransferPicker.js +1 -1
- package/lib/components/TransferSearch.js +1 -1
- package/lib/components/Tree.js +34 -33
- package/lib/components/TreeSelection.js +1 -1
- package/lib/components/UserSelect.js +5 -3
- package/lib/components/UserTabSelect.js +1 -1
- package/lib/components/WithRemoteConfig.js +1 -1
- package/lib/components/WithStore.js +1 -1
- package/lib/components/calendar/Calendar.d.ts +1 -0
- package/lib/components/calendar/Calendar.js +7 -2
- package/lib/components/calendar/CalendarContainer.js +1 -1
- package/lib/components/calendar/DaysView.d.ts +1 -1
- package/lib/components/calendar/DaysView.js +69 -29
- package/lib/components/calendar/MonthsView.js +1 -1
- package/lib/components/calendar/QuartersView.js +1 -1
- package/lib/components/calendar/TimeView.d.ts +0 -1
- package/lib/components/calendar/TimeView.js +5 -6
- package/lib/components/calendar/YearsView.js +1 -1
- package/lib/components/condition-builder/Expression.js +1 -1
- package/lib/components/condition-builder/Field.js +1 -1
- package/lib/components/condition-builder/Formula.js +1 -1
- package/lib/components/condition-builder/Func.js +1 -1
- package/lib/components/condition-builder/Group.js +1 -1
- package/lib/components/condition-builder/GroupOrItem.js +4 -4
- package/lib/components/condition-builder/InputSwitch.js +1 -1
- package/lib/components/condition-builder/Item.js +1 -1
- package/lib/components/condition-builder/Value.js +1 -1
- package/lib/components/condition-builder/config.js +1 -1
- package/lib/components/condition-builder/index.js +1 -1
- package/lib/components/formula/Editor.js +1 -1
- package/lib/components/formula/FuncList.js +1 -1
- package/lib/components/formula/Picker.d.ts +1 -0
- package/lib/components/formula/Picker.js +10 -1
- package/lib/components/formula/VariableList.js +1 -1
- package/lib/components/formula/plugin.d.ts +1 -0
- package/lib/components/formula/plugin.js +11 -4
- package/lib/components/icons.d.ts +2 -1
- package/lib/components/icons.js +18 -1
- package/lib/components/json-schema/Array.js +1 -1
- package/lib/components/json-schema/Item.js +1 -1
- package/lib/components/json-schema/Object.js +1 -1
- package/lib/components/json-schema/index.js +1 -1
- package/lib/components/schema-editor/Array.js +1 -1
- package/lib/components/schema-editor/Common.js +1 -1
- package/lib/components/schema-editor/Item.js +1 -1
- package/lib/components/schema-editor/Object.js +1 -1
- package/lib/components/schema-editor/SchemaVariableList.js +1 -1
- package/lib/components/schema-editor/SchemaVariableListPicker.js +1 -1
- package/lib/components/schema-editor/index.js +1 -1
- package/lib/components/table/Cell.d.ts +2 -1
- package/lib/components/table/Cell.js +1 -1
- package/lib/components/table/HeadCellDropDown.d.ts +3 -1
- package/lib/components/table/HeadCellDropDown.js +1 -1
- package/lib/components/table/HeadCellFilter.d.ts +3 -2
- package/lib/components/table/HeadCellFilter.js +4 -4
- package/lib/components/table/HeadCellSelect.d.ts +3 -2
- package/lib/components/table/HeadCellSelect.js +4 -2
- package/lib/components/table/HeadCellSort.d.ts +4 -3
- package/lib/components/table/HeadCellSort.js +6 -6
- package/lib/components/table/ItemActionsWrapper.js +1 -1
- package/lib/components/table/index.d.ts +3 -4
- package/lib/components/table/index.js +9 -9
- package/lib/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/lib/components/virtual-list/constants.js +1 -1
- package/lib/components/virtual-list/index.d.ts +3 -3
- package/lib/components/virtual-list/index.js +1 -1
- package/lib/helper.css +0 -8335
- package/lib/hooks/use-set-state.js +1 -1
- package/lib/hooks/use-touch.js +1 -1
- package/lib/hooks/use-update-effect.js +1 -1
- package/lib/hooks/use-validation-resolver.js +1 -1
- package/lib/icons/alert-danger.svg.js +2 -2
- package/lib/icons/alert-info.svg.js +1 -1
- package/lib/icons/alert-success.svg.js +2 -2
- package/lib/icons/alert-warning.svg.js +2 -2
- package/lib/icons/back.svg.js +1 -1
- package/lib/icons/calendar.svg.js +1 -1
- package/lib/icons/caret.svg.js +1 -1
- package/lib/icons/check-circle.svg.js +60 -0
- package/lib/icons/check.svg.js +1 -1
- package/lib/icons/clock.svg.js +1 -1
- package/lib/icons/close-small.svg.js +1 -1
- package/lib/icons/close.svg.js +1 -1
- package/lib/icons/cloud-upload.svg.js +1 -1
- package/lib/icons/column-filter.svg.js +1 -1
- package/lib/icons/columns.svg.js +1 -1
- package/lib/icons/compress-alt.svg.js +1 -1
- package/lib/icons/copy.svg.js +1 -1
- package/lib/icons/date.svg.js +1 -1
- package/lib/icons/department.svg.js +1 -1
- package/lib/icons/desk-empty.svg.js +1 -1
- package/lib/icons/dot.svg.js +1 -1
- package/lib/icons/down-arrow-bold.svg.js +2 -2
- package/lib/icons/down.svg.js +55 -0
- package/lib/icons/download.svg.js +1 -1
- package/lib/icons/drag-bar.svg.js +1 -1
- package/lib/icons/drag.svg.js +1 -1
- package/lib/icons/edit.svg.js +1 -2
- package/lib/icons/ellipsis-v.svg.js +1 -1
- package/lib/icons/enter.svg.js +1 -1
- package/lib/icons/exchange.svg.js +1 -1
- package/lib/icons/expand-alt.svg.js +1 -1
- package/lib/icons/fail.svg.js +1 -1
- package/lib/icons/file.svg.js +1 -1
- package/lib/icons/filter.svg.js +1 -1
- package/lib/icons/folder.svg.js +1 -1
- package/lib/icons/function.svg.js +1 -1
- package/lib/icons/home.svg.js +1 -1
- package/lib/icons/image.svg.js +1 -1
- package/lib/icons/info-circle.svg.js +1 -1
- package/lib/icons/info.svg.js +1 -1
- package/lib/icons/input-clear.svg.js +1 -1
- package/lib/icons/invisible.svg.js +1 -1
- package/lib/icons/left-arrow.svg.js +7 -4
- package/lib/icons/loading-outline.svg.js +1 -1
- package/lib/icons/location.svg.js +1 -1
- package/lib/icons/menu.svg.js +1 -1
- package/lib/icons/minus.svg.js +1 -1
- package/lib/icons/move.svg.js +1 -1
- package/lib/icons/mute.svg.js +1 -1
- package/lib/icons/new-edit.svg.js +48 -0
- package/lib/icons/pause.svg.js +1 -1
- package/lib/icons/pencil.svg.js +1 -1
- package/lib/icons/play.svg.js +1 -1
- package/lib/icons/plus-cicle.svg.js +1 -1
- package/lib/icons/plus-fine.svg.js +1 -1
- package/lib/icons/plus.svg.js +1 -1
- package/lib/icons/post.svg.js +1 -1
- package/lib/icons/question-mark.svg.js +1 -1
- package/lib/icons/question.svg.js +1 -1
- package/lib/icons/redo.svg.js +1 -1
- package/lib/icons/refresh.svg.js +1 -1
- package/lib/icons/reload.svg.js +1 -1
- package/lib/icons/remove.svg.js +1 -1
- package/lib/icons/retry.svg.js +1 -1
- package/lib/icons/right-arrow-bold.svg.js +1 -1
- package/lib/icons/right-arrow.svg.js +7 -4
- package/lib/icons/right-double-arrow.svg.js +48 -0
- package/lib/icons/role.svg.js +1 -1
- package/lib/icons/rotate-left.svg.js +48 -0
- package/lib/icons/rotate-right.svg.js +48 -0
- package/lib/icons/scale-origin.svg.js +50 -0
- package/lib/icons/schedule.svg.js +1 -1
- package/lib/icons/search.svg.js +1 -1
- package/lib/icons/setting.svg.js +1 -1
- package/lib/icons/slider-handle-icon.svg.js +1 -1
- package/lib/icons/sort-asc.svg.js +1 -1
- package/lib/icons/sort-default.svg.js +1 -1
- package/lib/icons/sort-desc.svg.js +1 -1
- package/lib/icons/star.svg.js +2 -2
- package/lib/icons/status-close.svg.js +1 -1
- package/lib/icons/status-fail.svg.js +1 -1
- package/lib/icons/status-info.svg.js +1 -1
- package/lib/icons/status-success.svg.js +1 -1
- package/lib/icons/status-warning.svg.js +1 -1
- package/lib/icons/steps-finsh.svg.js +48 -0
- package/lib/icons/success.svg.js +1 -1
- package/lib/icons/transparent.svg.js +1 -1
- package/lib/icons/trash.svg.js +1 -1
- package/lib/icons/tree-down.svg.js +1 -1
- package/lib/icons/undo.svg.js +1 -1
- package/lib/icons/upload.svg.js +1 -1
- package/lib/icons/user-remove.svg.js +1 -1
- package/lib/icons/view.svg.js +1 -1
- package/lib/icons/volume.svg.js +1 -1
- package/lib/icons/warning-mark.svg.js +1 -1
- package/lib/icons/warning.svg.js +1 -1
- package/lib/icons/window-restore.svg.js +1 -1
- package/lib/icons/zoom-in.svg.js +1 -1
- package/lib/icons/zoom-out.svg.js +1 -1
- package/lib/index.js +3 -1
- package/lib/locale/de-DE.js +25 -5
- package/lib/locale/en-US.js +21 -1
- package/lib/locale/zh-CN.js +25 -7
- package/lib/scss/helper.scss.js +3 -5
- package/lib/scss/themes/ang.scss.js +3 -5
- package/lib/scss/themes/antd.scss.js +3 -5
- package/lib/scss/themes/cxd.scss.js +3 -5
- package/lib/scss/themes/dark.scss.js +3 -5
- package/lib/scss/themes/default.scss.js +3 -5
- package/lib/themes/ang.css +1751 -913
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +1751 -913
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +1800 -961
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +1755 -917
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +1800 -961
- package/package.json +14 -12
- package/scss/_properties.scss +100 -23
- package/scss/base/_typography.scss +4 -0
- package/scss/components/_alert.scss +15 -0
- package/scss/components/_anchor-nav.scss +22 -7
- package/scss/components/_badge.scss +1 -0
- package/scss/components/_breadcrumb.scss +12 -1
- package/scss/components/_card.scss +4 -0
- package/scss/components/_collapse-group.scss +13 -1
- package/scss/components/_collapse.scss +2 -1
- package/scss/components/_column-toggler.scss +7 -1
- package/scss/components/_crud.scss +10 -2
- package/scss/components/_crud2.scss +10 -2
- package/scss/components/_drawer.scss +58 -5
- package/scss/components/_dropdown.scss +1 -0
- package/scss/components/_image-gallery.scss +62 -0
- package/scss/components/_input-box.scss +1 -0
- package/scss/components/_modal.scss +7 -10
- package/scss/components/_page.scss +1 -1
- package/scss/components/_pagination.scss +4 -3
- package/scss/components/_progress.scss +15 -1
- package/scss/components/_result-box.scss +5 -6
- package/scss/components/_search-box.scss +4 -0
- package/scss/components/_steps.scss +23 -12
- package/scss/components/_table.scss +124 -12
- package/scss/components/{_table-v2.scss → _table2.scss} +1 -1
- package/scss/components/_tabs.scss +91 -5
- package/scss/components/_timeline.scss +15 -1
- package/scss/components/form/_checks.scss +13 -2
- package/scss/components/form/_date-range.scss +40 -11
- package/scss/components/form/_date.scss +99 -33
- package/scss/components/form/_editor.scss +11 -0
- package/scss/components/form/_form.scss +14 -3
- package/scss/components/form/_nested-select.scss +6 -0
- package/scss/components/form/_number.scss +18 -13
- package/scss/components/form/_picker.scss +8 -0
- package/scss/components/form/_rating.scss +2 -2
- package/scss/components/form/_select.scss +34 -3
- package/scss/components/form/_selection.scss +1 -0
- package/scss/components/form/_text.scss +6 -0
- package/scss/components/form/_textarea.scss +15 -11
- package/scss/components/form/_transfer.scss +33 -11
- package/scss/components/form/_tree.scss +33 -7
- package/scss/components/react-datetime.scss +6 -1
- package/scss/themes/_common.scss +1 -1
- package/scss/themes/_cxd-variables.scss +9 -8
- package/scss/themes/cxd.scss +6 -8
- package/esm/components/BarCode2.js +0 -42
- package/esm/components/CityDB2.js +0 -4101
- package/esm/components/ColorPicker2.js +0 -202
- package/esm/components/Markdown2.js +0 -60
- package/esm/components/RichText2.js +0 -262
- package/esm/components/Tinymce2.js +0 -548
- package/lib/components/BarCode2.js +0 -52
- package/lib/components/CityDB2.js +0 -4108
- package/lib/components/ColorPicker2.js +0 -211
- package/lib/components/Markdown2.js +0 -70
- package/lib/components/RichText2.js +0 -272
- package/lib/components/Tinymce2.js +0 -557
- package/lib/scss/helper.scss2.js +0 -12
- package/lib/scss/themes/ang.scss2.js +0 -12
- package/lib/scss/themes/antd.scss2.js +0 -12
- package/lib/scss/themes/cxd.scss2.js +0 -12
- package/lib/scss/themes/dark.scss2.js +0 -12
- package/lib/scss/themes/default.scss2.js +0 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.0
|
|
2
|
+
* amis-ui v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -231,18 +231,25 @@ var Transfer = /** @class */ (function (_super) {
|
|
|
231
231
|
var resultColumns = searchResultColumns || columns;
|
|
232
232
|
return mode === 'table' ? (React__default["default"].createElement(TableSelection["default"], { placeholder: noResultsText, className: cx('Transfer-selection'), columns: resultColumns, options: options, value: value, disabled: disabled, onChange: onChange, option2value: option2value, cellRender: cellRender, itemRender: optionItemRender, multiple: multiple })) : mode === 'tree' ? (React__default["default"].createElement(Tree["default"], { onRef: this.domRef, placeholder: noResultsText, className: cx('Transfer-selection'), options: options, value: value, disabled: disabled, onChange: function (value) {
|
|
233
233
|
return _this.handleSearchTreeChange(value, options);
|
|
234
|
-
}, joinValues: false, showIcon: false, multiple:
|
|
234
|
+
}, joinValues: false, showIcon: false, multiple: multiple, cascade: true, onlyChildren: !isTreeDeferLoad, itemRender: optionItemRender })) : mode === 'chained' ? (React__default["default"].createElement(ChainedSelection["default"], { placeholder: noResultsText, className: cx('Transfer-selection'), options: options, value: value, disabled: disabled, onChange: onChange, option2value: option2value, itemRender: optionItemRender, multiple: multiple })) : (React__default["default"].createElement(GroupedSelection["default"], { placeholder: noResultsText, className: cx('Transfer-selection'), options: options, value: value, disabled: disabled, onChange: onChange, option2value: option2value, itemRender: optionItemRender, multiple: multiple }));
|
|
235
235
|
};
|
|
236
236
|
Transfer.prototype.renderOptions = function (props) {
|
|
237
237
|
var selectMode = props.selectMode, columns = props.columns, options = props.options, value = props.value, disabled = props.disabled, onChange = props.onChange, option2value = props.option2value, cx = props.classnames, onDeferLoad = props.onDeferLoad, leftOptions = props.leftOptions, leftMode = props.leftMode, rightMode = props.rightMode, cellRender = props.cellRender, leftDefaultValue = props.leftDefaultValue, optionItemRender = props.optionItemRender, multiple = props.multiple, noResultsText = props.noResultsText;
|
|
238
|
-
return selectMode === 'table' ? (React__default["default"].createElement(TableSelection["default"], { className: cx('Transfer-selection'), columns: columns, options: options || [], value: value, disabled: disabled, onChange: onChange, option2value: option2value, onDeferLoad: onDeferLoad, cellRender: cellRender, multiple: multiple })) : selectMode === 'tree' ? (React__default["default"].createElement(Tree["default"], { onRef: this.domRef, placeholder: noResultsText, className: cx('Transfer-selection'), options: options, value: value, onChange: onChange, onlyChildren: !this.state.isTreeDeferLoad, itemRender: optionItemRender, onDeferLoad: onDeferLoad, joinValues: false, showIcon: false, multiple:
|
|
238
|
+
return selectMode === 'table' ? (React__default["default"].createElement(TableSelection["default"], { className: cx('Transfer-selection'), columns: columns, options: options || [], value: value, disabled: disabled, onChange: onChange, option2value: option2value, onDeferLoad: onDeferLoad, cellRender: cellRender, multiple: multiple })) : selectMode === 'tree' ? (React__default["default"].createElement(Tree["default"], { onRef: this.domRef, placeholder: noResultsText, className: cx('Transfer-selection'), options: options, value: value, onChange: onChange, onlyChildren: !this.state.isTreeDeferLoad, itemRender: optionItemRender, onDeferLoad: onDeferLoad, joinValues: false, showIcon: false, multiple: multiple, cascade: true })) : selectMode === 'chained' ? (React__default["default"].createElement(ChainedSelection["default"], { className: cx('Transfer-selection'), options: options || [], value: value, disabled: disabled, onChange: onChange, option2value: option2value, onDeferLoad: onDeferLoad, itemRender: optionItemRender, multiple: multiple })) : selectMode === 'associated' ? (React__default["default"].createElement(AssociatedSelection["default"], { className: cx('Transfer-selection'), options: options || [], value: value, disabled: disabled, onChange: onChange, option2value: option2value, onDeferLoad: onDeferLoad, columns: columns, leftOptions: leftOptions || [], leftMode: leftMode, rightMode: rightMode, leftDefaultValue: leftDefaultValue, itemRender: optionItemRender, multiple: multiple })) : (React__default["default"].createElement(GroupedSelection["default"], { className: cx('Transfer-selection'), options: options || [], value: value, disabled: disabled, onChange: onChange, option2value: option2value, onDeferLoad: onDeferLoad, itemRender: optionItemRender, multiple: multiple }));
|
|
239
239
|
};
|
|
240
240
|
Transfer.prototype.renderResult = function () {
|
|
241
241
|
var _a = this.props, columns = _a.columns, options = _a.options, disabled = _a.disabled, option2value = _a.option2value, cx = _a.classnames, cellRender = _a.cellRender, onChange = _a.onChange, value = _a.value, resultItemRender = _a.resultItemRender, resultSearchable = _a.resultSearchable, resultSearchPlaceholder = _a.resultSearchPlaceholder, onResultSearch = _a.onResultSearch, sortable = _a.sortable, __ = _a.translate;
|
|
242
242
|
var _b = this.state, resultSelectMode = _b.resultSelectMode, isTreeDeferLoad = _b.isTreeDeferLoad;
|
|
243
243
|
var searchable = !isTreeDeferLoad && resultSearchable;
|
|
244
244
|
var placeholder = resultSearchPlaceholder || __('Transfer.selectFromLeft');
|
|
245
|
-
|
|
245
|
+
switch (resultSelectMode) {
|
|
246
|
+
case 'table':
|
|
247
|
+
return (React__default["default"].createElement(ResultTableList["default"], { classnames: cx, columns: columns, options: options || [], value: value, disabled: disabled, option2value: option2value, cellRender: cellRender, onChange: onChange, multiple: false, searchable: searchable, placeholder: placeholder, onSearch: onResultSearch }));
|
|
248
|
+
case 'tree':
|
|
249
|
+
return (React__default["default"].createElement(ResultTreeList["default"], { classnames: cx, className: cx('Transfer-value'), options: options, valueField: 'value', value: value || [], onChange: onChange, itemRender: resultItemRender, searchable: searchable, placeholder: placeholder, onSearch: onResultSearch }));
|
|
250
|
+
default:
|
|
251
|
+
return (React__default["default"].createElement(ResultList["default"], { className: cx('Transfer-value'), sortable: sortable, disabled: disabled, value: value, onChange: onChange, placeholder: placeholder, itemRender: resultItemRender, searchable: searchable, onSearch: onResultSearch }));
|
|
252
|
+
}
|
|
246
253
|
};
|
|
247
254
|
Transfer.prototype.render = function () {
|
|
248
255
|
var _a = this.props, inline = _a.inline, cx = _a.classnames, className = _a.className, value = _a.value, resultTitle = _a.resultTitle, options = _a.options, option2value = _a.option2value, disabled = _a.disabled, statistics = _a.statistics, showArrow = _a.showArrow, resultListModeFollowSelect = _a.resultListModeFollowSelect, _b = _a.selectMode, selectMode = _b === void 0 ? 'list' : _b, __ = _a.translate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.0
|
|
2
|
+
* amis-ui v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -27,7 +27,7 @@ var TransferDropDown = /** @class */ (function (_super) {
|
|
|
27
27
|
}
|
|
28
28
|
TransferDropDown.prototype.render = function () {
|
|
29
29
|
var _this = this;
|
|
30
|
-
var _a = this.props, cx = _a.classnames, value = _a.value, itemRender = _a.itemRender, __ = _a.translate, disabled = _a.disabled, clearable = _a.clearable, className = _a.className, onChange = _a.onChange, onSearch = _a.onSearch, multiple = _a.multiple, borderMode = _a.borderMode, useMobileUI = _a.useMobileUI, popOverContainer = _a.popOverContainer, maxTagCount = _a.maxTagCount, overflowTagPopover = _a.overflowTagPopover;
|
|
30
|
+
var _a = this.props, cx = _a.classnames, value = _a.value, itemRender = _a.itemRender, __ = _a.translate, disabled = _a.disabled, clearable = _a.clearable, className = _a.className, onChange = _a.onChange, onSearch = _a.onSearch, multiple = _a.multiple, borderMode = _a.borderMode, useMobileUI = _a.useMobileUI, popOverContainer = _a.popOverContainer, placeholder = _a.placeholder, maxTagCount = _a.maxTagCount, overflowTagPopover = _a.overflowTagPopover;
|
|
31
31
|
var _b = this.state, inputValue = _b.inputValue, searchResult = _b.searchResult;
|
|
32
32
|
var mobileUI = useMobileUI && amisCore.isMobile();
|
|
33
33
|
return (React__default["default"].createElement(PopOverContainer.PopOverContainer, { useMobileUI: useMobileUI, popOverContainer: popOverContainer, popOverClassName: cx('TransferDropDown-popover'), popOverRender: function (_a) {
|
|
@@ -36,7 +36,7 @@ var TransferDropDown = /** @class */ (function (_super) {
|
|
|
36
36
|
'is-mobile': mobileUI
|
|
37
37
|
}) },
|
|
38
38
|
onSearch ? (React__default["default"].createElement("div", { className: cx('Transfer-search') },
|
|
39
|
-
React__default["default"].createElement(InputBox["default"], { value: inputValue, onChange: _this.handleSearch, placeholder: __('Transfer.searchKeyword'), clearable: false, onKeyDown: _this.handleSearchKeyDown }, searchResult !== null ? (React__default["default"].createElement("a", { onClick: _this.handleSeachCancel },
|
|
39
|
+
React__default["default"].createElement(InputBox["default"], { value: inputValue, onChange: _this.handleSearch, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : __('Transfer.searchKeyword'), clearable: false, onKeyDown: _this.handleSearchKeyDown }, searchResult !== null ? (React__default["default"].createElement("a", { onClick: _this.handleSeachCancel },
|
|
40
40
|
React__default["default"].createElement(icons.Icon, { icon: "close", className: "icon" }))) : (React__default["default"].createElement(icons.Icon, { icon: "search", className: "icon" }))))) : null,
|
|
41
41
|
searchResult !== null
|
|
42
42
|
? _this.renderSearchResult(tslib.__assign(tslib.__assign({}, _this.props), { value: value, onChange: multiple
|
|
@@ -53,8 +53,7 @@ var TransferDropDown = /** @class */ (function (_super) {
|
|
|
53
53
|
}, multiple: multiple }))));
|
|
54
54
|
} }, function (_a) {
|
|
55
55
|
var onClick = _a.onClick, isOpened = _a.isOpened, ref = _a.ref;
|
|
56
|
-
return (React__default["default"].createElement(ResultBox["default"], { className: cx('TransferDropDown', className, isOpened ? 'is-
|
|
57
|
-
React__default["default"].createElement(icons.Icon, { icon: "right-arrow-bold", className: "icon" }))) : (React__default["default"].createElement(React__default["default"].Fragment, null))));
|
|
56
|
+
return (React__default["default"].createElement(ResultBox["default"], { className: cx('TransferDropDown', className, isOpened ? 'is-opened' : ''), borderMode: borderMode, allowInput: false, result: multiple ? value : (value === null || value === void 0 ? void 0 : value[0]) ? value === null || value === void 0 ? void 0 : value[0] : null, onResultChange: onChange, onResultClick: onClick, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : __('Select.placeholder'), disabled: disabled, clearable: clearable, maxTagCount: maxTagCount, overflowTagPopover: overflowTagPopover, ref: ref, itemRender: itemRender, useMobileUI: useMobileUI, hasDropDownArrow: !mobileUI }));
|
|
58
57
|
}));
|
|
59
58
|
};
|
|
60
59
|
return TransferDropDown;
|
package/lib/components/Tree.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.0
|
|
2
|
+
* amis-ui v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -546,38 +546,39 @@ var TreeSelector = /** @class */ (function (_super) {
|
|
|
546
546
|
}) },
|
|
547
547
|
React__default["default"].createElement(icons.Icon, { icon: "down-arrow-bold", className: "icon" }))) : (React__default["default"].createElement("span", { className: cx('Tree-itemArrowPlaceholder') })),
|
|
548
548
|
checkbox,
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
!
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
React__default["default"].createElement(
|
|
577
|
-
|
|
578
|
-
React__default["default"].createElement(
|
|
579
|
-
|
|
580
|
-
React__default["default"].createElement(
|
|
549
|
+
React__default["default"].createElement("div", { className: cx('Tree-itemLabel-item') },
|
|
550
|
+
showIcon ? (React__default["default"].createElement("i", { className: cx("Tree-itemIcon ".concat(childrenItems ? 'Tree-folderIcon' : 'Tree-leafIcon')), onClick: function () {
|
|
551
|
+
return !nodeDisabled &&
|
|
552
|
+
(multiple
|
|
553
|
+
? _this.handleCheck(item, !selfChecked)
|
|
554
|
+
: _this.handleSelect(item));
|
|
555
|
+
} }, icons.getIcon(iconValue) ? (React__default["default"].createElement(icons.Icon, { icon: iconValue, className: "icon" })) : React__default["default"].isValidElement(iconValue) ? (iconValue) : (React__default["default"].createElement("i", { className: iconValue })))) : null,
|
|
556
|
+
React__default["default"].createElement("span", { className: cx('Tree-itemText'), onClick: function () {
|
|
557
|
+
return !nodeDisabled &&
|
|
558
|
+
(multiple
|
|
559
|
+
? _this.handleCheck(item, !selfChecked)
|
|
560
|
+
: _this.handleSelect(item));
|
|
561
|
+
}, title: item[labelField] }, highlightTxt
|
|
562
|
+
? amisCore.highlight("".concat(item[labelField]), highlightTxt)
|
|
563
|
+
: itemRender
|
|
564
|
+
? itemRender(item, {
|
|
565
|
+
index: key,
|
|
566
|
+
multiple: multiple,
|
|
567
|
+
checked: checked,
|
|
568
|
+
onChange: function () { return _this.handleCheck(item, !selfChecked); },
|
|
569
|
+
disabled: disabled || item.disabled
|
|
570
|
+
})
|
|
571
|
+
: "".concat(item[labelField])),
|
|
572
|
+
!nodeDisabled &&
|
|
573
|
+
!isAdding &&
|
|
574
|
+
!isEditing &&
|
|
575
|
+
!(item.defer && !item.loaded) ? (React__default["default"].createElement("div", { className: cx('Tree-item-icons') },
|
|
576
|
+
creatable && amisCore.hasAbility(item, 'creatable') ? (React__default["default"].createElement("a", { onClick: _this.handleAdd.bind(_this, item), "data-tooltip": __(createTip), "data-position": "left" },
|
|
577
|
+
React__default["default"].createElement(icons.Icon, { icon: "plus", className: "icon" }))) : null,
|
|
578
|
+
removable && amisCore.hasAbility(item, 'removable') ? (React__default["default"].createElement("a", { onClick: _this.handleRemove.bind(_this, item), "data-tooltip": __(removeTip), "data-position": "left" },
|
|
579
|
+
React__default["default"].createElement(icons.Icon, { icon: "minus", className: "icon" }))) : null,
|
|
580
|
+
editable && amisCore.hasAbility(item, 'editable') ? (React__default["default"].createElement("a", { onClick: _this.handleEdit.bind(_this, item), "data-tooltip": __(editTip), "data-position": "left" },
|
|
581
|
+
React__default["default"].createElement(icons.Icon, { icon: "new-edit", className: "icon" }))) : null)) : null))),
|
|
581
582
|
(childrenItems && _this.isUnfolded(item)) ||
|
|
582
583
|
(isAdding && addingParent === item) ? (React__default["default"].createElement("ul", { className: cx('Tree-sublist') },
|
|
583
584
|
isAdding && addingParent === item ? (React__default["default"].createElement("li", { className: cx('Tree-item') }, _this.renderInput(checkbox
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.0
|
|
2
|
+
* amis-ui v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -165,7 +165,8 @@ var UserSelect = /** @class */ (function (_super) {
|
|
|
165
165
|
}
|
|
166
166
|
UserSelect.prototype.componentDidMount = function () { };
|
|
167
167
|
UserSelect.prototype.componentDidUpdate = function (prevProps) {
|
|
168
|
-
var _a
|
|
168
|
+
var _a;
|
|
169
|
+
var _b = this.props, options = _b.options, value = _b.value;
|
|
169
170
|
if (prevProps.options !== options) {
|
|
170
171
|
if (options &&
|
|
171
172
|
options.length === 1 &&
|
|
@@ -184,7 +185,8 @@ var UserSelect = /** @class */ (function (_super) {
|
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
if (JSON.stringify(value) !== JSON.stringify(prevProps.value) ||
|
|
187
|
-
JSON.stringify(options) !== JSON.stringify(prevProps.options)
|
|
188
|
+
(JSON.stringify(options) !== JSON.stringify(prevProps.options) &&
|
|
189
|
+
((_a = prevProps.options) === null || _a === void 0 ? void 0 : _a.length))) {
|
|
188
190
|
var selection = Select.value2array(value, this.props);
|
|
189
191
|
this.setState({
|
|
190
192
|
selection: selection
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.0
|
|
2
|
+
* amis-ui v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -439,6 +439,7 @@ var BaseDatePicker = /** @class */ (function (_super) {
|
|
|
439
439
|
'maxDate',
|
|
440
440
|
'schedules',
|
|
441
441
|
'largeMode',
|
|
442
|
+
'todayActiveStyle',
|
|
442
443
|
'onScheduleClick',
|
|
443
444
|
'hideHeader',
|
|
444
445
|
'updateOn',
|
|
@@ -489,7 +490,11 @@ var BaseDatePicker = /** @class */ (function (_super) {
|
|
|
489
490
|
? 'rdtPickerTime'
|
|
490
491
|
: dateFormat && !timeFormat
|
|
491
492
|
? 'rdtPickerDate'
|
|
492
|
-
: ''
|
|
493
|
+
: '', viewMode === 'months' ||
|
|
494
|
+
viewMode === 'years' ||
|
|
495
|
+
viewMode === 'quarters'
|
|
496
|
+
? 'rdtPickerNotDays'
|
|
497
|
+
: '') },
|
|
493
498
|
React__default["default"].createElement(Component, { view: this.state.currentView, viewProps: viewProps, timeRangeHeader: timeRangeHeader }))));
|
|
494
499
|
};
|
|
495
500
|
return BaseDatePicker;
|
|
@@ -40,6 +40,7 @@ interface CustomDaysViewProps extends LocaleProps {
|
|
|
40
40
|
className?: string;
|
|
41
41
|
}>;
|
|
42
42
|
largeMode?: boolean;
|
|
43
|
+
todayActiveStyle?: React.CSSProperties;
|
|
43
44
|
onScheduleClick?: (scheduleData: any) => void;
|
|
44
45
|
hideHeader?: boolean;
|
|
45
46
|
getColumns: (types: DateType[], dateBoundary: void) => any;
|
|
@@ -81,7 +82,6 @@ export declare class CustomDaysView extends React.Component<CustomDaysViewProps>
|
|
|
81
82
|
alwaysValidDate(): number;
|
|
82
83
|
renderDays(): React.DetailedReactHTMLElement<React.HTMLAttributes<HTMLElement>, HTMLElement>[];
|
|
83
84
|
constructor(props: any);
|
|
84
|
-
componentWillMount(): void;
|
|
85
85
|
componentDidMount(): void;
|
|
86
86
|
updateSelectedDate: (event: React.MouseEvent<any>) => void;
|
|
87
87
|
showTime: () => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.0
|
|
2
|
+
* amis-ui v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -12,9 +12,14 @@ var moment = require('moment');
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
var Downshift = require('downshift');
|
|
14
14
|
var findIndex = require('lodash/findIndex');
|
|
15
|
+
var extend = require('lodash/extend');
|
|
15
16
|
var merge = require('lodash/merge');
|
|
17
|
+
var omit = require('lodash/omit');
|
|
18
|
+
var each = require('lodash/each');
|
|
19
|
+
var kebabCase = require('lodash/kebabCase');
|
|
16
20
|
var amisCore = require('amis-core');
|
|
17
21
|
var Picker = require('../Picker.js');
|
|
22
|
+
var icons = require('../icons.js');
|
|
18
23
|
|
|
19
24
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
25
|
|
|
@@ -22,7 +27,11 @@ var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
|
22
27
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
28
|
var Downshift__default = /*#__PURE__*/_interopDefaultLegacy(Downshift);
|
|
24
29
|
var findIndex__default = /*#__PURE__*/_interopDefaultLegacy(findIndex);
|
|
30
|
+
var extend__default = /*#__PURE__*/_interopDefaultLegacy(extend);
|
|
25
31
|
var merge__default = /*#__PURE__*/_interopDefaultLegacy(merge);
|
|
32
|
+
var omit__default = /*#__PURE__*/_interopDefaultLegacy(omit);
|
|
33
|
+
var each__default = /*#__PURE__*/_interopDefaultLegacy(each);
|
|
34
|
+
var kebabCase__default = /*#__PURE__*/_interopDefaultLegacy(kebabCase);
|
|
26
35
|
|
|
27
36
|
// 最早基于 react-datetime 2.16.2 版本,后来大部分都自己写了
|
|
28
37
|
var CustomDaysView = /** @class */ (function (_super) {
|
|
@@ -122,17 +131,35 @@ var CustomDaysView = /** @class */ (function (_super) {
|
|
|
122
131
|
_this.props.onClose && _this.props.onClose();
|
|
123
132
|
};
|
|
124
133
|
_this.renderDay = function (props, currentDate) {
|
|
134
|
+
var todayActiveStyle = props.todayActiveStyle; /** 只有today才会传入这个属性 */
|
|
135
|
+
var _a = _this.props, cx = _a.classnames, __ = _a.translate;
|
|
136
|
+
var injectedProps = omit__default["default"](props, ['todayActiveStyle']);
|
|
137
|
+
/** 某些情况下需要用inline style覆盖动态class,需要hack important的样式 */
|
|
138
|
+
var todayDomRef = function (node) {
|
|
139
|
+
if (todayActiveStyle && node) {
|
|
140
|
+
each__default["default"](todayActiveStyle, function (value, key) {
|
|
141
|
+
var _a, _b;
|
|
142
|
+
if (typeof value === 'string' && !!~value.indexOf('!important')) {
|
|
143
|
+
(_b = (_a = node === null || node === void 0 ? void 0 : node.style) === null || _a === void 0 ? void 0 : _a.setProperty) === null || _b === void 0 ? void 0 : _b.call(_a, kebabCase__default["default"](key), String(value)
|
|
144
|
+
.replace(/\!important/, '')
|
|
145
|
+
.trim(), 'important');
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
};
|
|
125
150
|
if (_this.props.schedules) {
|
|
126
151
|
var schedule_1 = [];
|
|
127
152
|
_this.props.schedules.forEach(function (item) {
|
|
128
|
-
|
|
129
|
-
|
|
153
|
+
/** 时间全部统一到当天的00:00:00再做比较 */
|
|
154
|
+
var currentDateBegin = currentDate.startOf('day');
|
|
155
|
+
var startTime = moment__default["default"](item.startTime).startOf('day');
|
|
156
|
+
var endTime = moment__default["default"](item.endTime).startOf('day');
|
|
157
|
+
if (currentDateBegin.isSameOrAfter(startTime) &&
|
|
158
|
+
currentDateBegin.isSameOrBefore(endTime)) {
|
|
130
159
|
schedule_1.push(item);
|
|
131
160
|
}
|
|
132
161
|
});
|
|
133
162
|
if (schedule_1.length > 0) {
|
|
134
|
-
var cx_1 = _this.props.classnames;
|
|
135
|
-
var __ = _this.props.translate;
|
|
136
163
|
// 日程数据
|
|
137
164
|
var scheduleData_1 = {
|
|
138
165
|
scheduleData: schedule_1.map(function (item) {
|
|
@@ -186,44 +213,52 @@ var CustomDaysView = /** @class */ (function (_super) {
|
|
|
186
213
|
// 最多展示3个
|
|
187
214
|
showSchedule_1 = showSchedule_1.slice(0, 3);
|
|
188
215
|
var scheduleDiv = showSchedule_1.map(function (item, index) {
|
|
216
|
+
var diffDays = moment__default["default"](item.endTime).diff(moment__default["default"](item.startTime), 'days');
|
|
217
|
+
/* 存在天数跨度小于1,但是横跨2天的case */
|
|
218
|
+
if (diffDays <= 0) {
|
|
219
|
+
diffDays = moment__default["default"](item.endTime)
|
|
220
|
+
.endOf('day')
|
|
221
|
+
.diff(moment__default["default"](item.startTime).startOf('day'), 'days');
|
|
222
|
+
}
|
|
223
|
+
/* 前面的计算结果是闭区间,所以最终结果要补足1 */
|
|
224
|
+
diffDays += 1;
|
|
189
225
|
var width = item.width ||
|
|
190
|
-
Math.min(
|
|
191
|
-
return (React__default["default"].createElement("div", { key:
|
|
226
|
+
Math.min(diffDays, 7 - moment__default["default"](item.startTime).weekday());
|
|
227
|
+
return (React__default["default"].createElement("div", { key: injectedProps.key + 'content' + index, className: cx('ScheduleCalendar-large-schedule-content', item.className), style: { width: width + '00%' }, onClick: function () {
|
|
192
228
|
return _this.props.onScheduleClick &&
|
|
193
229
|
_this.props.onScheduleClick(scheduleData_1);
|
|
194
230
|
} },
|
|
195
|
-
React__default["default"].createElement("div", { className:
|
|
231
|
+
React__default["default"].createElement("div", { className: cx('ScheduleCalendar-text-overflow') }, item.content)));
|
|
196
232
|
});
|
|
197
|
-
return (React__default["default"].createElement("td", tslib.__assign({},
|
|
198
|
-
React__default["default"].createElement("div", { className:
|
|
199
|
-
React__default["default"].createElement("div", { className:
|
|
233
|
+
return (React__default["default"].createElement("td", tslib.__assign({}, injectedProps),
|
|
234
|
+
React__default["default"].createElement("div", { className: cx('ScheduleCalendar-large-day-wrap') },
|
|
235
|
+
React__default["default"].createElement("div", { className: cx('ScheduleCalendar-large-schedule-header') },
|
|
200
236
|
React__default["default"].createElement("span", null, currentDate.date())),
|
|
201
237
|
scheduleDiv,
|
|
202
|
-
schedule_1.length > 3 && (React__default["default"].createElement("div", { className:
|
|
238
|
+
schedule_1.length > 3 && (React__default["default"].createElement("div", { className: cx('ScheduleCalendar-large-schedule-footer') },
|
|
203
239
|
schedule_1.length - 3,
|
|
204
240
|
" ",
|
|
205
241
|
__('more'))))));
|
|
206
242
|
}
|
|
207
243
|
// 正常模式
|
|
208
|
-
var ScheduleIcon = (React__default["default"].createElement("span", { className:
|
|
244
|
+
var ScheduleIcon = (React__default["default"].createElement("span", { className: cx('ScheduleCalendar-icon', schedule_1[0].className), onClick: function () {
|
|
209
245
|
return _this.props.onScheduleClick &&
|
|
210
246
|
_this.props.onScheduleClick(scheduleData_1);
|
|
211
247
|
} }));
|
|
212
|
-
return (React__default["default"].createElement("td", tslib.__assign({},
|
|
213
|
-
React__default["default"].createElement("span",
|
|
248
|
+
return (React__default["default"].createElement("td", tslib.__assign({}, injectedProps),
|
|
249
|
+
React__default["default"].createElement("span", { style: todayActiveStyle, ref: todayDomRef },
|
|
214
250
|
currentDate.date(),
|
|
215
251
|
ScheduleIcon)));
|
|
216
252
|
}
|
|
217
253
|
}
|
|
218
|
-
return (React__default["default"].createElement("td", tslib.__assign({},
|
|
219
|
-
React__default["default"].createElement("span",
|
|
254
|
+
return (React__default["default"].createElement("td", tslib.__assign({}, injectedProps),
|
|
255
|
+
React__default["default"].createElement("span", { style: todayActiveStyle, ref: todayDomRef }, currentDate.date())));
|
|
220
256
|
};
|
|
221
257
|
_this.renderTimes = function () {
|
|
222
258
|
var _a = _this.props, timeFormat = _a.timeFormat, selectedDate = _a.selectedDate, viewDate = _a.viewDate, isEndDate = _a.isEndDate, cx = _a.classnames;
|
|
223
259
|
var date = selectedDate || (isEndDate ? viewDate.endOf('day') : viewDate);
|
|
224
260
|
var inputs = [];
|
|
225
261
|
var timeConstraints = _this.timeConstraints;
|
|
226
|
-
inputs.push(_this.showTime());
|
|
227
262
|
timeFormat.split(':').forEach(function (format, i) {
|
|
228
263
|
var type = /h/i.test(format)
|
|
229
264
|
? 'hours'
|
|
@@ -269,7 +304,9 @@ var CustomDaysView = /** @class */ (function (_super) {
|
|
|
269
304
|
}
|
|
270
305
|
});
|
|
271
306
|
inputs.length && inputs.pop();
|
|
272
|
-
return React__default["default"].createElement("div",
|
|
307
|
+
return (React__default["default"].createElement("div", { className: cx('CalendarTimesWrapper') },
|
|
308
|
+
_this.showTime(),
|
|
309
|
+
React__default["default"].createElement("div", { className: cx('CalendarInputsWrapper') }, inputs)));
|
|
273
310
|
};
|
|
274
311
|
_this.renderFooter = function () {
|
|
275
312
|
if (!_this.props.requiredConfirm) {
|
|
@@ -323,7 +360,7 @@ var CustomDaysView = /** @class */ (function (_super) {
|
|
|
323
360
|
columns: columns,
|
|
324
361
|
types: types,
|
|
325
362
|
pickerValue: currentDate.toArray(),
|
|
326
|
-
uniqueTag:
|
|
363
|
+
uniqueTag: new Date().valueOf()
|
|
327
364
|
};
|
|
328
365
|
if (_this.props.timeConstraints) {
|
|
329
366
|
_this.timeConstraints = merge__default["default"](_this.timeConstraints, props.timeConstraints);
|
|
@@ -342,6 +379,7 @@ var CustomDaysView = /** @class */ (function (_super) {
|
|
|
342
379
|
};
|
|
343
380
|
CustomDaysView.prototype.renderDays = function () {
|
|
344
381
|
var date = this.props.viewDate, selected = this.props.selectedDate && this.props.selectedDate.clone(), prevMonth = date.clone().subtract(1, 'months'), currentYear = date.year(), currentMonth = date.month(), weeks = [], days = [], renderer = this.props.renderDay || this.renderDay, isValid = this.props.isValidDate || this.alwaysValidDate, classes, isDisabled, dayProps, currentDate;
|
|
382
|
+
var _a = this.props.todayActiveStyle, todayActiveStyle = _a === void 0 ? {} : _a;
|
|
345
383
|
// Go to the last week of the previous month
|
|
346
384
|
prevMonth.date(prevMonth.daysInMonth()).startOf('week');
|
|
347
385
|
var lastDay = prevMonth.clone().add(42, 'd');
|
|
@@ -363,11 +401,11 @@ var CustomDaysView = /** @class */ (function (_super) {
|
|
|
363
401
|
isDisabled = !isValid(currentDate, selected);
|
|
364
402
|
if (isDisabled)
|
|
365
403
|
classes += ' rdtDisabled';
|
|
366
|
-
dayProps = {
|
|
404
|
+
dayProps = extend__default["default"]({
|
|
367
405
|
'key': prevMonth.format('M_D'),
|
|
368
406
|
'data-value': prevMonth.date(),
|
|
369
407
|
'className': classes
|
|
370
|
-
};
|
|
408
|
+
}, classes.includes('rdtToday') ? { todayActiveStyle: todayActiveStyle } : {});
|
|
371
409
|
if (!isDisabled)
|
|
372
410
|
dayProps.onClick = this.updateSelectedDate;
|
|
373
411
|
days.push(renderer(dayProps, currentDate, selected));
|
|
@@ -379,9 +417,6 @@ var CustomDaysView = /** @class */ (function (_super) {
|
|
|
379
417
|
}
|
|
380
418
|
return weeks;
|
|
381
419
|
};
|
|
382
|
-
CustomDaysView.prototype.componentWillMount = function () {
|
|
383
|
-
this.setState({ uniqueTag: new Date().valueOf() });
|
|
384
|
-
};
|
|
385
420
|
CustomDaysView.prototype.componentDidMount = function () {
|
|
386
421
|
var _this = this;
|
|
387
422
|
var _a = this.props, timeFormat = _a.timeFormat, selectedDate = _a.selectedDate, viewDate = _a.viewDate, isEndDate = _a.isEndDate;
|
|
@@ -427,13 +462,18 @@ var CustomDaysView = /** @class */ (function (_super) {
|
|
|
427
462
|
React__default["default"].createElement("tr", null,
|
|
428
463
|
React__default["default"].createElement("th", { colSpan: 7 },
|
|
429
464
|
React__default["default"].createElement("div", { className: "rdtHeader" },
|
|
430
|
-
React__default["default"].createElement("a", { className: "rdtPrev", onClick: this.props.subtractTime(1, 'years') },
|
|
431
|
-
|
|
465
|
+
React__default["default"].createElement("a", { className: "rdtPrev", onClick: this.props.subtractTime(1, 'years') },
|
|
466
|
+
React__default["default"].createElement(icons.Icon, { icon: "right-double-arrow", className: "icon date-icon-arrow-left" })),
|
|
467
|
+
React__default["default"].createElement("a", { className: "rdtPrev", onClick: this.props.subtractTime(1, 'months') },
|
|
468
|
+
React__default["default"].createElement(icons.Icon, { icon: "right-arrow", className: "icon date-icon-arrow-left" })),
|
|
432
469
|
React__default["default"].createElement("div", { className: "rdtCenter" },
|
|
433
470
|
React__default["default"].createElement("a", { className: "rdtSwitch", onClick: this.props.showView('years') }, date.format(__('dateformat.year'))),
|
|
434
471
|
React__default["default"].createElement("a", { className: "rdtSwitch", onClick: this.props.showView('months') }, date.format(__('MMM')))),
|
|
435
|
-
React__default["default"].createElement("a", { className: "rdtNext", onClick: this.props.addTime(1, 'months') },
|
|
436
|
-
|
|
472
|
+
React__default["default"].createElement("a", { className: "rdtNext", onClick: this.props.addTime(1, 'months') },
|
|
473
|
+
React__default["default"].createElement(icons.Icon, { icon: "right-arrow", className: "icon date-icon-arrow" })),
|
|
474
|
+
React__default["default"].createElement("a", { className: "rdtNext", onClick: this.props.addTime(1, 'years') },
|
|
475
|
+
React__default["default"].createElement(icons.Icon, { icon: "right-double-arrow", className: "icon date-icon-arrow" }))),
|
|
476
|
+
React__default["default"].createElement("div", { className: "header-line" }))),
|
|
437
477
|
React__default["default"].createElement("tr", null, this.getDaysOfWeek(locale).map(function (day, index) { return (React__default["default"].createElement("th", { key: day + index, className: "dow" }, day)); })))),
|
|
438
478
|
React__default["default"].createElement("tbody", { key: "tb" }, this.renderDays())
|
|
439
479
|
];
|
|
@@ -69,7 +69,6 @@ export declare class CustomTimeView extends React.Component<CustomTimeViewProps
|
|
|
69
69
|
timer?: any;
|
|
70
70
|
increaseTimer?: any;
|
|
71
71
|
constructor(props: any);
|
|
72
|
-
componentWillMount(): void;
|
|
73
72
|
componentDidMount(): void;
|
|
74
73
|
updateSelectedDate: (event: React.MouseEvent<any>) => void;
|
|
75
74
|
componentDidUpdate(preProps: CustomTimeViewProps): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.0
|
|
2
|
+
* amis-ui v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -242,15 +242,12 @@ var CustomTimeView = /** @class */ (function (_super) {
|
|
|
242
242
|
_this.cancel = function () {
|
|
243
243
|
_this.props.onClose && _this.props.onClose();
|
|
244
244
|
};
|
|
245
|
-
_this.state = tslib.__assign(tslib.__assign({}, _this.calculateState(_this.props)), { uniqueTag:
|
|
245
|
+
_this.state = tslib.__assign(tslib.__assign({}, _this.calculateState(_this.props)), { uniqueTag: new Date().valueOf() });
|
|
246
246
|
if (_this.props.timeConstraints) {
|
|
247
247
|
_this.timeConstraints = merge__default["default"](_this.timeConstraints, _this.props.timeConstraints);
|
|
248
248
|
}
|
|
249
249
|
return _this;
|
|
250
250
|
}
|
|
251
|
-
CustomTimeView.prototype.componentWillMount = function () {
|
|
252
|
-
this.setState({ uniqueTag: new Date().valueOf() });
|
|
253
|
-
};
|
|
254
251
|
CustomTimeView.prototype.componentDidMount = function () {
|
|
255
252
|
var _this = this;
|
|
256
253
|
var _a = this.props, timeFormat = _a.timeFormat, selectedDate = _a.selectedDate, viewDate = _a.viewDate, isEndDate = _a.isEndDate;
|
|
@@ -455,7 +452,9 @@ var CustomTimeView = /** @class */ (function (_super) {
|
|
|
455
452
|
}
|
|
456
453
|
});
|
|
457
454
|
inputs.length && inputs.pop();
|
|
458
|
-
var quickLists = [
|
|
455
|
+
var quickLists = [
|
|
456
|
+
React__default["default"].createElement("a", { key: "select-now", onClick: this.selectNowTime }, __('TimeNow'))
|
|
457
|
+
];
|
|
459
458
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
460
459
|
React__default["default"].createElement("div", { className: cx(timeRangeHeader ? 'TimeRangeHeaderWrapper' : null) }, timeRangeHeader),
|
|
461
460
|
React__default["default"].createElement("div", { className: cx('TimeContentWrapper') }, inputs),
|