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,10 +1,32 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
/// <reference types="hoist-non-react-statics" />
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { ThemeProps } from 'amis-core';
|
|
4
5
|
import { LocaleProps } from 'amis-core';
|
|
6
|
+
export declare enum ImageActionKey {
|
|
7
|
+
/** 右旋转 */
|
|
8
|
+
ROTATE_RIGHT = "rotateRight",
|
|
9
|
+
/** 左旋转 */
|
|
10
|
+
ROTATE_LEFT = "rotateLeft",
|
|
11
|
+
/** 等比例放大 */
|
|
12
|
+
ZOOM_IN = "zoomIn",
|
|
13
|
+
/** 等比例缩小 */
|
|
14
|
+
ZOOM_OUT = "zoomOut",
|
|
15
|
+
/** 恢复原图缩放比例尺 */
|
|
16
|
+
SCALE_ORIGIN = "scaleOrigin"
|
|
17
|
+
}
|
|
18
|
+
export interface ImageAction {
|
|
19
|
+
key: ImageActionKey;
|
|
20
|
+
label?: string;
|
|
21
|
+
icon?: string | React.ReactNode;
|
|
22
|
+
iconClassName?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
onClick?: (context: ImageGallery) => void;
|
|
25
|
+
}
|
|
5
26
|
export interface ImageGalleryProps extends ThemeProps, LocaleProps {
|
|
6
27
|
children: React.ReactNode;
|
|
7
28
|
modalContainer?: () => HTMLElement;
|
|
29
|
+
actions?: ImageAction[];
|
|
8
30
|
}
|
|
9
31
|
export interface ImageGalleryState {
|
|
10
32
|
isOpened: boolean;
|
|
@@ -15,8 +37,13 @@ export interface ImageGalleryState {
|
|
|
15
37
|
title?: string;
|
|
16
38
|
caption?: string;
|
|
17
39
|
}>;
|
|
40
|
+
/** 图片缩放比例尺 */
|
|
41
|
+
scale: number;
|
|
42
|
+
/** 图片旋转角度 */
|
|
43
|
+
rotate: number;
|
|
18
44
|
}
|
|
19
45
|
export declare class ImageGallery extends React.Component<ImageGalleryProps, ImageGalleryState> {
|
|
46
|
+
static defaultProps: Pick<ImageGalleryProps, 'actions'>;
|
|
20
47
|
state: ImageGalleryState;
|
|
21
48
|
handleImageEnlarge(info: {
|
|
22
49
|
src: string;
|
|
@@ -31,14 +58,17 @@ export declare class ImageGallery extends React.Component<ImageGalleryProps, Ima
|
|
|
31
58
|
caption?: string;
|
|
32
59
|
index?: number;
|
|
33
60
|
}): void;
|
|
61
|
+
resetImageAction(): void;
|
|
34
62
|
close(): void;
|
|
35
63
|
prev(): void;
|
|
36
64
|
next(): void;
|
|
37
65
|
handleItemClick(e: React.MouseEvent<HTMLDivElement>): void;
|
|
66
|
+
handleToolbarAction: import("lodash").DebouncedFuncLeading<(action: ImageAction) => void>;
|
|
67
|
+
renderToolbar(actions: ImageAction[]): JSX.Element;
|
|
38
68
|
render(): JSX.Element;
|
|
39
69
|
}
|
|
40
70
|
declare const _default: {
|
|
41
|
-
new (props: Omit<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
71
|
+
new (props: Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
42
72
|
locale?: string | undefined;
|
|
43
73
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
44
74
|
}, keyof ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps): {
|
|
@@ -47,12 +77,12 @@ declare const _default: {
|
|
|
47
77
|
getWrappedInstance(): any;
|
|
48
78
|
render(): JSX.Element;
|
|
49
79
|
context: any;
|
|
50
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
80
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
51
81
|
locale?: string | undefined;
|
|
52
82
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
53
83
|
}, keyof ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
54
84
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
55
|
-
readonly props: Readonly<Omit<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
85
|
+
readonly props: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
56
86
|
locale?: string | undefined;
|
|
57
87
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
58
88
|
}, keyof ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps> & Readonly<{
|
|
@@ -63,35 +93,35 @@ declare const _default: {
|
|
|
63
93
|
[key: string]: React.ReactInstance;
|
|
64
94
|
};
|
|
65
95
|
componentDidMount?(): void;
|
|
66
|
-
shouldComponentUpdate?(nextProps: Readonly<Omit<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
96
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
67
97
|
locale?: string | undefined;
|
|
68
98
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
69
99
|
}, keyof ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
70
100
|
componentWillUnmount?(): void;
|
|
71
101
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
72
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
102
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
73
103
|
locale?: string | undefined;
|
|
74
104
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
75
105
|
}, keyof ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
|
|
76
|
-
componentDidUpdate?(prevProps: Readonly<Omit<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
106
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
77
107
|
locale?: string | undefined;
|
|
78
108
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
79
109
|
}, keyof ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
80
110
|
componentWillMount?(): void;
|
|
81
111
|
UNSAFE_componentWillMount?(): void;
|
|
82
|
-
componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
112
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
83
113
|
locale?: string | undefined;
|
|
84
114
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
85
115
|
}, keyof ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
86
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
116
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
87
117
|
locale?: string | undefined;
|
|
88
118
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
89
119
|
}, keyof ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void;
|
|
90
|
-
componentWillUpdate?(nextProps: Readonly<Omit<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
120
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
91
121
|
locale?: string | undefined;
|
|
92
122
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
93
123
|
}, keyof ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
94
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
124
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
95
125
|
locale?: string | undefined;
|
|
96
126
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
97
127
|
}, keyof ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
@@ -99,7 +129,7 @@ declare const _default: {
|
|
|
99
129
|
displayName: string;
|
|
100
130
|
contextType: React.Context<string>;
|
|
101
131
|
ComposedComponent: React.ComponentType<{
|
|
102
|
-
new (props: Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
132
|
+
new (props: Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
103
133
|
locale?: string | undefined;
|
|
104
134
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
105
135
|
}): {
|
|
@@ -108,12 +138,12 @@ declare const _default: {
|
|
|
108
138
|
getWrappedInstance(): any;
|
|
109
139
|
render(): JSX.Element;
|
|
110
140
|
context: any;
|
|
111
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
141
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
112
142
|
locale?: string | undefined;
|
|
113
143
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
114
144
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
|
115
145
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
116
|
-
readonly props: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
146
|
+
readonly props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
117
147
|
locale?: string | undefined;
|
|
118
148
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
119
149
|
}> & Readonly<{
|
|
@@ -124,35 +154,35 @@ declare const _default: {
|
|
|
124
154
|
[key: string]: React.ReactInstance;
|
|
125
155
|
};
|
|
126
156
|
componentDidMount?(): void;
|
|
127
|
-
shouldComponentUpdate?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
157
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
128
158
|
locale?: string | undefined;
|
|
129
159
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
130
160
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
131
161
|
componentWillUnmount?(): void;
|
|
132
162
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
133
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
163
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
134
164
|
locale?: string | undefined;
|
|
135
165
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
136
166
|
}>, prevState: Readonly<{}>): any;
|
|
137
|
-
componentDidUpdate?(prevProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
167
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
138
168
|
locale?: string | undefined;
|
|
139
169
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
140
170
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
141
171
|
componentWillMount?(): void;
|
|
142
172
|
UNSAFE_componentWillMount?(): void;
|
|
143
|
-
componentWillReceiveProps?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
173
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
144
174
|
locale?: string | undefined;
|
|
145
175
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
146
176
|
}>, nextContext: any): void;
|
|
147
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
177
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
148
178
|
locale?: string | undefined;
|
|
149
179
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
150
180
|
}>, nextContext: any): void;
|
|
151
|
-
componentWillUpdate?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
181
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
152
182
|
locale?: string | undefined;
|
|
153
183
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
154
184
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
155
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
185
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
156
186
|
locale?: string | undefined;
|
|
157
187
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
158
188
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
@@ -164,7 +194,7 @@ declare const _default: {
|
|
|
164
194
|
ComposedComponent: typeof ImageGallery;
|
|
165
195
|
}>;
|
|
166
196
|
} & import("hoist-non-react-statics").NonReactStatics<{
|
|
167
|
-
new (props: Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
197
|
+
new (props: Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
168
198
|
locale?: string | undefined;
|
|
169
199
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
170
200
|
}): {
|
|
@@ -173,12 +203,12 @@ declare const _default: {
|
|
|
173
203
|
getWrappedInstance(): any;
|
|
174
204
|
render(): JSX.Element;
|
|
175
205
|
context: any;
|
|
176
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
206
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
177
207
|
locale?: string | undefined;
|
|
178
208
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
179
209
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
|
180
210
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
181
|
-
readonly props: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
211
|
+
readonly props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
182
212
|
locale?: string | undefined;
|
|
183
213
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
184
214
|
}> & Readonly<{
|
|
@@ -189,35 +219,35 @@ declare const _default: {
|
|
|
189
219
|
[key: string]: React.ReactInstance;
|
|
190
220
|
};
|
|
191
221
|
componentDidMount?(): void;
|
|
192
|
-
shouldComponentUpdate?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
222
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
193
223
|
locale?: string | undefined;
|
|
194
224
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
195
225
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
196
226
|
componentWillUnmount?(): void;
|
|
197
227
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
198
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
228
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
199
229
|
locale?: string | undefined;
|
|
200
230
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
201
231
|
}>, prevState: Readonly<{}>): any;
|
|
202
|
-
componentDidUpdate?(prevProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
232
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
203
233
|
locale?: string | undefined;
|
|
204
234
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
205
235
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
206
236
|
componentWillMount?(): void;
|
|
207
237
|
UNSAFE_componentWillMount?(): void;
|
|
208
|
-
componentWillReceiveProps?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
238
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
209
239
|
locale?: string | undefined;
|
|
210
240
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
211
241
|
}>, nextContext: any): void;
|
|
212
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
242
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
213
243
|
locale?: string | undefined;
|
|
214
244
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
215
245
|
}>, nextContext: any): void;
|
|
216
|
-
componentWillUpdate?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
246
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
217
247
|
locale?: string | undefined;
|
|
218
248
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
219
249
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
220
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
250
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
221
251
|
locale?: string | undefined;
|
|
222
252
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
223
253
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
@@ -229,7 +259,7 @@ declare const _default: {
|
|
|
229
259
|
ComposedComponent: typeof ImageGallery;
|
|
230
260
|
}, {}> & {
|
|
231
261
|
ComposedComponent: {
|
|
232
|
-
new (props: Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
262
|
+
new (props: Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
233
263
|
locale?: string | undefined;
|
|
234
264
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
235
265
|
}): {
|
|
@@ -238,12 +268,12 @@ declare const _default: {
|
|
|
238
268
|
getWrappedInstance(): any;
|
|
239
269
|
render(): JSX.Element;
|
|
240
270
|
context: any;
|
|
241
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
271
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
242
272
|
locale?: string | undefined;
|
|
243
273
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
244
274
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
|
245
275
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
246
|
-
readonly props: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
276
|
+
readonly props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
247
277
|
locale?: string | undefined;
|
|
248
278
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
249
279
|
}> & Readonly<{
|
|
@@ -254,35 +284,35 @@ declare const _default: {
|
|
|
254
284
|
[key: string]: React.ReactInstance;
|
|
255
285
|
};
|
|
256
286
|
componentDidMount?(): void;
|
|
257
|
-
shouldComponentUpdate?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
287
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
258
288
|
locale?: string | undefined;
|
|
259
289
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
260
290
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
261
291
|
componentWillUnmount?(): void;
|
|
262
292
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
263
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
293
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
264
294
|
locale?: string | undefined;
|
|
265
295
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
266
296
|
}>, prevState: Readonly<{}>): any;
|
|
267
|
-
componentDidUpdate?(prevProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
297
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
268
298
|
locale?: string | undefined;
|
|
269
299
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
270
300
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
271
301
|
componentWillMount?(): void;
|
|
272
302
|
UNSAFE_componentWillMount?(): void;
|
|
273
|
-
componentWillReceiveProps?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
303
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
274
304
|
locale?: string | undefined;
|
|
275
305
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
276
306
|
}>, nextContext: any): void;
|
|
277
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
307
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
278
308
|
locale?: string | undefined;
|
|
279
309
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
280
310
|
}>, nextContext: any): void;
|
|
281
|
-
componentWillUpdate?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
311
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
282
312
|
locale?: string | undefined;
|
|
283
313
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
284
314
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
285
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<ImageGalleryProps, keyof LocaleProps> & {
|
|
315
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "classPrefix" | "classnames" | "children" | "className" | "theme" | "modalContainer"> & Partial<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "actions">> & Partial<Pick<Pick<ImageGalleryProps, "actions">, never>> & {
|
|
286
316
|
locale?: string | undefined;
|
|
287
317
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
288
318
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v2.0
|
|
2
|
+
* amis-ui v2.2.0
|
|
3
3
|
* Copyright 2018-2022 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { __extends, __decorate, __metadata } from 'tslib';
|
|
7
7
|
import React__default from 'react';
|
|
8
|
+
import debounce from 'lodash/debounce';
|
|
8
9
|
import { autobind, themeable, localeable } from 'amis-core';
|
|
9
10
|
import FinalModal from './Modal.js';
|
|
10
11
|
import { Icon } from './icons.js';
|
|
11
12
|
|
|
13
|
+
var ImageActionKey;
|
|
14
|
+
(function (ImageActionKey) {
|
|
15
|
+
/** 右旋转 */
|
|
16
|
+
ImageActionKey["ROTATE_RIGHT"] = "rotateRight";
|
|
17
|
+
/** 左旋转 */
|
|
18
|
+
ImageActionKey["ROTATE_LEFT"] = "rotateLeft";
|
|
19
|
+
/** 等比例放大 */
|
|
20
|
+
ImageActionKey["ZOOM_IN"] = "zoomIn";
|
|
21
|
+
/** 等比例缩小 */
|
|
22
|
+
ImageActionKey["ZOOM_OUT"] = "zoomOut";
|
|
23
|
+
/** 恢复原图缩放比例尺 */
|
|
24
|
+
ImageActionKey["SCALE_ORIGIN"] = "scaleOrigin";
|
|
25
|
+
})(ImageActionKey || (ImageActionKey = {}));
|
|
12
26
|
var ImageGallery = /** @class */ (function (_super) {
|
|
13
27
|
__extends(ImageGallery, _super);
|
|
14
28
|
function ImageGallery() {
|
|
@@ -16,8 +30,39 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
16
30
|
_this.state = {
|
|
17
31
|
isOpened: false,
|
|
18
32
|
index: -1,
|
|
19
|
-
items: []
|
|
33
|
+
items: [],
|
|
34
|
+
scale: 1,
|
|
35
|
+
rotate: 0
|
|
20
36
|
};
|
|
37
|
+
_this.handleToolbarAction = debounce(function (action) {
|
|
38
|
+
if (action.disabled) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
switch (action.key) {
|
|
42
|
+
case ImageActionKey.ROTATE_LEFT:
|
|
43
|
+
_this.setState(function (prevState) { return ({ rotate: prevState.rotate - 90 }); });
|
|
44
|
+
break;
|
|
45
|
+
case ImageActionKey.ROTATE_RIGHT:
|
|
46
|
+
_this.setState(function (prevState) { return ({ rotate: prevState.rotate + 90 }); });
|
|
47
|
+
break;
|
|
48
|
+
case ImageActionKey.ZOOM_IN:
|
|
49
|
+
_this.setState(function (prevState) { return ({ scale: prevState.scale + 0.5 }); });
|
|
50
|
+
break;
|
|
51
|
+
case ImageActionKey.ZOOM_OUT:
|
|
52
|
+
_this.setState(function (prevState) {
|
|
53
|
+
return prevState.scale - 0.5 > 0
|
|
54
|
+
? { scale: prevState.scale - 0.5 }
|
|
55
|
+
: null;
|
|
56
|
+
});
|
|
57
|
+
break;
|
|
58
|
+
case ImageActionKey.SCALE_ORIGIN:
|
|
59
|
+
_this.setState(function () { return ({ scale: 1 }); });
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
if (action.onClick && typeof action.onClick === 'function') {
|
|
63
|
+
action.onClick(_this);
|
|
64
|
+
}
|
|
65
|
+
}, 250, { leading: true, trailing: false });
|
|
21
66
|
return _this;
|
|
22
67
|
}
|
|
23
68
|
ImageGallery.prototype.handleImageEnlarge = function (info) {
|
|
@@ -27,33 +72,46 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
27
72
|
index: info.index || 0
|
|
28
73
|
});
|
|
29
74
|
};
|
|
75
|
+
ImageGallery.prototype.resetImageAction = function () {
|
|
76
|
+
this.setState({ scale: 1, rotate: 0 });
|
|
77
|
+
};
|
|
30
78
|
ImageGallery.prototype.close = function () {
|
|
31
79
|
this.setState({
|
|
32
80
|
isOpened: false
|
|
33
81
|
});
|
|
82
|
+
this.resetImageAction();
|
|
34
83
|
};
|
|
35
84
|
ImageGallery.prototype.prev = function () {
|
|
36
85
|
var index = this.state.index;
|
|
37
|
-
this.setState({
|
|
38
|
-
|
|
39
|
-
});
|
|
86
|
+
this.setState({ index: index - 1 });
|
|
87
|
+
this.resetImageAction();
|
|
40
88
|
};
|
|
41
89
|
ImageGallery.prototype.next = function () {
|
|
42
90
|
var index = this.state.index;
|
|
43
|
-
this.setState({
|
|
44
|
-
|
|
45
|
-
});
|
|
91
|
+
this.setState({ index: index + 1 });
|
|
92
|
+
this.resetImageAction();
|
|
46
93
|
};
|
|
47
94
|
ImageGallery.prototype.handleItemClick = function (e) {
|
|
48
95
|
var index = parseInt(e.currentTarget.getAttribute('data-index'), 10);
|
|
49
|
-
this.setState({
|
|
50
|
-
|
|
51
|
-
|
|
96
|
+
this.setState({ index: index });
|
|
97
|
+
this.resetImageAction();
|
|
98
|
+
};
|
|
99
|
+
ImageGallery.prototype.renderToolbar = function (actions) {
|
|
100
|
+
var _this = this;
|
|
101
|
+
var _a = this.props, cx = _a.classnames, __ = _a.translate, className = _a.className;
|
|
102
|
+
var scale = this.state.scale;
|
|
103
|
+
return (React__default.createElement("div", { className: cx('ImageGallery-toolbar', className) }, actions.map(function (action) { return (React__default.createElement("div", { className: cx('ImageGallery-toolbar-action', {
|
|
104
|
+
'is-disabled': action.disabled ||
|
|
105
|
+
(action.key === ImageActionKey.ZOOM_OUT && scale - 0.5 <= 0)
|
|
106
|
+
}), key: action.key, onClick: function () { return _this.handleToolbarAction(action); } },
|
|
107
|
+
React__default.createElement("a", { className: cx('ImageGallery-toolbar-action-icon'), "data-tooltip": __(action.label), "data-position": "top" }, React__default.isValidElement(action.icon) ? (React__default.cloneElement(action.icon, {
|
|
108
|
+
className: cx('icon', action.iconClassName)
|
|
109
|
+
})) : (React__default.createElement(Icon, { icon: action.icon, className: cx('icon', action.iconClassName) }))))); })));
|
|
52
110
|
};
|
|
53
111
|
ImageGallery.prototype.render = function () {
|
|
54
112
|
var _this = this;
|
|
55
|
-
var _a = this.props, children = _a.children, cx = _a.classnames, modalContainer = _a.modalContainer;
|
|
56
|
-
var _b = this.state, index = _b.index, items = _b.items;
|
|
113
|
+
var _a = this.props, children = _a.children, cx = _a.classnames, modalContainer = _a.modalContainer, actions = _a.actions;
|
|
114
|
+
var _b = this.state, index = _b.index, items = _b.items, rotate = _b.rotate, scale = _b.scale;
|
|
57
115
|
var __ = this.props.translate;
|
|
58
116
|
return (React__default.createElement(React__default.Fragment, null,
|
|
59
117
|
React__default.cloneElement(children, {
|
|
@@ -65,7 +123,10 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
65
123
|
~index && items[index] ? (React__default.createElement(React__default.Fragment, null,
|
|
66
124
|
React__default.createElement("div", { className: cx('ImageGallery-title') }, items[index].title),
|
|
67
125
|
React__default.createElement("div", { className: cx('ImageGallery-main') },
|
|
68
|
-
React__default.createElement("img", { src: items[index].originalSrc }),
|
|
126
|
+
React__default.createElement("img", { src: items[index].originalSrc, style: { transform: "scale(".concat(scale, ") rotate(").concat(rotate, "deg)") } }),
|
|
127
|
+
Array.isArray(actions) && actions.length > 0
|
|
128
|
+
? this.renderToolbar(actions)
|
|
129
|
+
: null,
|
|
69
130
|
items.length > 1 ? (React__default.createElement(React__default.Fragment, null,
|
|
70
131
|
React__default.createElement("a", { className: cx('ImageGallery-prevBtn', index <= 0 ? 'is-disabled' : ''), onClick: this.prev },
|
|
71
132
|
React__default.createElement(Icon, { icon: "prev", className: "icon" })),
|
|
@@ -80,6 +141,27 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
80
141
|
React__default.createElement("a", { className: cx('ImageGallery-nextList is-disabled') },
|
|
81
142
|
React__default.createElement(Icon, { icon: "next", className: "icon" })))) : null)));
|
|
82
143
|
};
|
|
144
|
+
ImageGallery.defaultProps = {
|
|
145
|
+
actions: [
|
|
146
|
+
{
|
|
147
|
+
key: ImageActionKey.ROTATE_LEFT,
|
|
148
|
+
icon: 'rotate-left',
|
|
149
|
+
label: 'rotate.left'
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
key: ImageActionKey.ROTATE_RIGHT,
|
|
153
|
+
icon: 'rotate-right',
|
|
154
|
+
label: 'rotate.right'
|
|
155
|
+
},
|
|
156
|
+
{ key: ImageActionKey.ZOOM_IN, icon: 'zoom-in', label: 'zoomIn' },
|
|
157
|
+
{ key: ImageActionKey.ZOOM_OUT, icon: 'zoom-out', label: 'zoomOut' },
|
|
158
|
+
{
|
|
159
|
+
key: ImageActionKey.SCALE_ORIGIN,
|
|
160
|
+
icon: 'scale-origin',
|
|
161
|
+
label: 'scale.origin'
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
};
|
|
83
165
|
__decorate([
|
|
84
166
|
autobind,
|
|
85
167
|
__metadata("design:type", Function),
|
|
@@ -114,4 +196,4 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
114
196
|
}(React__default.Component));
|
|
115
197
|
var ImageGallery$1 = themeable(localeable(ImageGallery));
|
|
116
198
|
|
|
117
|
-
export { ImageGallery, ImageGallery$1 as default };
|
|
199
|
+
export { ImageActionKey, ImageGallery, ImageGallery$1 as default };
|
package/esm/components/Input.js
CHANGED
package/esm/components/Layout.js
CHANGED
package/esm/components/Link.js
CHANGED