amis-ui 3.4.2 → 3.5.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.d.ts +1 -0
- package/esm/components/Alert.js +4 -2
- package/esm/components/Alert2.js +1 -1
- package/esm/components/AnchorNav.js +1 -1
- package/esm/components/ArrayInput.js +1 -1
- package/esm/components/AsideNav.js +1 -1
- package/esm/components/AssociatedSelection.js +1 -1
- package/esm/components/Avatar.js +1 -1
- package/esm/components/Badge.js +1 -1
- package/esm/components/BaiduMapPicker.js +1 -1
- package/esm/components/BarCode.js +1 -1
- package/esm/components/Breadcrumb.js +1 -1
- package/esm/components/Button.js +1 -1
- package/esm/components/CalendarMobile.js +1 -1
- package/esm/components/Card.js +1 -1
- package/esm/components/Cascader.js +1 -1
- package/esm/components/ChainedDropdownSelection.js +1 -1
- package/esm/components/ChainedSelection.js +5 -3
- package/esm/components/Checkbox.js +1 -1
- package/esm/components/CityArea.js +1 -1
- package/esm/components/CityDB.js +1 -1
- package/esm/components/CodeMirror.js +1 -1
- package/esm/components/Collapse.js +2 -2
- package/esm/components/CollapseGroup.js +1 -1
- package/esm/components/ColorPicker.js +1 -1
- package/esm/components/Combo.js +1 -1
- package/esm/components/ConfirmBox.js +1 -1
- package/esm/components/ContextMenu.d.ts +1 -0
- package/esm/components/ContextMenu.js +4 -2
- package/esm/components/DatePicker.js +1 -1
- package/esm/components/DateRangePicker.js +1 -1
- package/esm/components/DndContainer.js +1 -1
- package/esm/components/Drawer.js +1 -1
- package/esm/components/DropDownSelection.js +3 -2
- package/esm/components/Editor.js +1 -1
- package/esm/components/Form.js +1 -1
- package/esm/components/FormField.js +1 -1
- package/esm/components/GaodeMapPicker.js +1 -1
- package/esm/components/GridNav.js +1 -1
- package/esm/components/GroupedSelection.js +7 -4
- package/esm/components/Html.js +1 -1
- package/esm/components/ImageGallery.d.ts +15 -3
- package/esm/components/ImageGallery.js +76 -10
- package/esm/components/Input.js +1 -1
- package/esm/components/InputBox.js +1 -1
- package/esm/components/InputBoxWithSuggestion.js +3 -2
- package/esm/components/InputTable.js +1 -1
- package/esm/components/Layout.js +1 -1
- package/esm/components/Link.js +1 -1
- package/esm/components/ListGroup.d.ts +10 -10
- package/esm/components/ListGroup.js +1 -1
- package/esm/components/ListMenu.js +1 -1
- package/esm/components/LocationPicker.js +1 -1
- package/esm/components/Markdown.js +1 -1
- package/esm/components/Modal.js +6 -11
- package/esm/components/ModalManager.js +1 -1
- package/esm/components/MultilineText.js +1 -1
- package/esm/components/NumberInput.js +1 -1
- package/esm/components/Pagination.d.ts +42 -41
- package/esm/components/Pagination.js +24 -8
- package/esm/components/Picker.js +1 -1
- package/esm/components/PickerColumn.js +1 -1
- package/esm/components/PickerContainer.js +1 -1
- package/esm/components/PopOverContainer.js +1 -1
- package/esm/components/PopUp.js +1 -1
- package/esm/components/Progress.js +1 -1
- package/esm/components/PullRefresh.js +1 -1
- package/esm/components/Radios.js +1 -1
- package/esm/components/Range.js +1 -1
- package/esm/components/Rating.js +1 -1
- package/esm/components/ResultBox.js +15 -13
- package/esm/components/ResultList.d.ts +2 -1
- package/esm/components/ResultList.js +12 -3
- package/esm/components/ResultTableList.js +1 -1
- package/esm/components/ResultTreeList.js +1 -1
- package/esm/components/RichText.js +1 -1
- package/esm/components/SearchBox.js +1 -1
- package/esm/components/Select.js +1 -1
- package/esm/components/SelectMobile.js +7 -4
- package/esm/components/Selection.d.ts +2 -1
- package/esm/components/Selection.js +11 -4
- package/esm/components/SparkLine.js +1 -1
- package/esm/components/Spinner.js +1 -1
- package/esm/components/Steps.js +8 -4
- package/esm/components/Switch.js +1 -1
- package/esm/components/TableSelection.js +1 -1
- package/esm/components/Tabs.js +1 -1
- 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 +1 -1
- package/esm/components/Timeline.js +1 -1
- package/esm/components/TimelineItem.js +1 -1
- package/esm/components/Tinymce.js +1 -1
- 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 +5 -5
- package/esm/components/TransferDropDown.js +1 -1
- package/esm/components/TransferPicker.js +1 -1
- package/esm/components/TransferSearch.js +1 -1
- package/esm/components/Tree.js +13 -8
- package/esm/components/TreeSelection.js +3 -2
- package/esm/components/UserSelect.js +1 -1
- package/esm/components/UserTabSelect.js +1 -1
- package/esm/components/WithRemoteConfig.js +1 -1
- package/esm/components/WithStore.js +1 -1
- package/esm/components/calendar/Calendar.js +1 -1
- package/esm/components/calendar/CalendarContainer.js +1 -1
- package/esm/components/calendar/DaysView.js +1 -1
- package/esm/components/calendar/MonthsView.js +1 -1
- package/esm/components/calendar/QuartersView.js +1 -1
- package/esm/components/calendar/TimeView.js +1 -1
- package/esm/components/calendar/YearsView.js +1 -1
- package/esm/components/condition-builder/Expression.js +1 -1
- package/esm/components/condition-builder/Field.js +1 -1
- package/esm/components/condition-builder/Func.js +1 -1
- package/esm/components/condition-builder/Group.js +1 -1
- package/esm/components/condition-builder/GroupOrItem.js +1 -1
- package/esm/components/condition-builder/InputSwitch.js +1 -1
- package/esm/components/condition-builder/Item.js +1 -1
- package/esm/components/condition-builder/Value.js +1 -1
- package/esm/components/condition-builder/config.js +1 -1
- package/esm/components/condition-builder/index.js +1 -1
- package/esm/components/formula/Editor.js +1 -1
- package/esm/components/formula/FuncList.js +1 -1
- package/esm/components/formula/Input.js +1 -1
- package/esm/components/formula/Picker.js +1 -1
- package/esm/components/formula/VariableList.js +7 -6
- package/esm/components/formula/plugin.js +1 -1
- package/esm/components/icons.js +17 -17
- package/esm/components/json-schema/Array.js +1 -1
- package/esm/components/json-schema/Item.js +1 -1
- package/esm/components/json-schema/Object.js +1 -1
- package/esm/components/json-schema/index.js +1 -1
- package/esm/components/menu/MenuContext.js +1 -1
- package/esm/components/menu/MenuItem.js +1 -1
- package/esm/components/menu/SubMenu.js +1 -1
- package/esm/components/menu/index.js +1 -1
- package/esm/components/schema-editor/Array.js +1 -1
- package/esm/components/schema-editor/Common.js +1 -1
- package/esm/components/schema-editor/Item.js +1 -1
- package/esm/components/schema-editor/Object.js +1 -1
- package/esm/components/schema-editor/SchemaVariableList.js +1 -1
- package/esm/components/schema-editor/SchemaVariableListPicker.js +1 -1
- package/esm/components/schema-editor/index.js +1 -1
- package/esm/components/table/Cell.js +3 -3
- package/esm/components/table/ColGroup.d.ts +19 -0
- package/esm/components/table/ColGroup.js +52 -0
- package/esm/components/table/HeadCellDropDown.js +1 -1
- package/esm/components/table/HeadCellFilter.js +1 -1
- package/esm/components/table/HeadCellSelect.js +1 -1
- package/esm/components/table/HeadCellSort.js +1 -1
- package/esm/components/table/ItemActionsWrapper.js +1 -1
- package/esm/components/table/index.d.ts +56 -3
- package/esm/components/table/index.js +149 -89
- package/esm/components/virtual-list/AutoSizer.js +1 -1
- package/esm/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/esm/components/virtual-list/constants.js +1 -1
- package/esm/components/virtual-list/index.js +1 -1
- package/esm/hooks/use-set-state.js +1 -1
- package/esm/hooks/use-sub-form.js +1 -1
- package/esm/hooks/use-touch.js +1 -1
- package/esm/hooks/use-update-effect.js +1 -1
- package/esm/hooks/use-validation-resolver.js +1 -1
- package/esm/icons/alert-danger.svg.js +1 -1
- package/esm/icons/alert-info.svg.js +1 -1
- package/esm/icons/alert-success.svg.js +1 -1
- package/esm/icons/alert-warning.svg.js +1 -1
- package/esm/icons/back.svg.js +1 -1
- package/esm/icons/calendar.svg.js +1 -1
- package/esm/icons/caret.svg.js +1 -1
- package/esm/icons/check.svg.js +1 -1
- package/esm/icons/clock.svg.js +1 -1
- package/esm/icons/close-small.svg.js +1 -1
- package/esm/icons/close.svg.js +1 -1
- package/esm/icons/cloud-upload.svg.js +1 -1
- package/esm/icons/column-filter.svg.js +1 -1
- package/esm/icons/columns.svg.js +1 -1
- package/esm/icons/compress-alt.svg.js +1 -1
- package/esm/icons/copy.svg.js +1 -1
- package/esm/icons/date.svg.js +1 -1
- package/esm/icons/department.svg.js +1 -1
- package/esm/icons/desk-empty.svg.js +1 -1
- package/esm/icons/dot.svg.js +1 -1
- package/esm/icons/down-arrow-bold.svg.js +1 -1
- package/esm/icons/down.svg.js +1 -1
- package/esm/icons/download.svg.js +1 -1
- package/esm/icons/drag-bar.svg.js +1 -1
- package/esm/icons/drag.svg.js +1 -1
- package/esm/icons/edit.svg.js +1 -1
- package/esm/icons/ellipsis-v.svg.js +1 -1
- package/esm/icons/enter.svg.js +1 -1
- package/esm/icons/exchange.svg.js +1 -1
- package/esm/icons/expand-alt.svg.js +1 -1
- package/esm/icons/fail.svg.js +1 -1
- package/esm/icons/file.svg.js +1 -1
- package/esm/icons/filter.svg.js +1 -1
- package/esm/icons/folder.svg.js +1 -1
- package/esm/icons/function.svg.js +1 -1
- package/esm/icons/home.svg.js +1 -1
- package/esm/icons/if.svg.js +1 -1
- package/esm/icons/image.svg.js +1 -1
- package/esm/icons/info-circle.svg.js +1 -1
- package/esm/icons/info.svg.js +1 -1
- package/esm/icons/input-clear.svg.js +1 -1
- package/esm/icons/invisible.svg.js +1 -1
- package/esm/icons/left-arrow.svg.js +1 -1
- package/esm/icons/loading-outline.svg.js +1 -1
- package/esm/icons/location.svg.js +1 -1
- package/esm/icons/menu.svg.js +1 -1
- package/esm/icons/minus.svg.js +1 -1
- package/esm/icons/move.svg.js +1 -1
- package/esm/icons/mute.svg.js +1 -1
- package/esm/icons/new-edit.svg.js +1 -1
- package/esm/icons/pause.svg.js +1 -1
- package/esm/icons/pencil.svg.js +1 -1
- package/esm/icons/play.svg.js +1 -1
- package/esm/icons/plus-cicle.svg.js +1 -1
- package/esm/icons/plus-fine.svg.js +1 -1
- package/esm/icons/plus.svg.js +1 -1
- package/esm/icons/post.svg.js +1 -1
- package/esm/icons/question-mark.svg.js +1 -1
- package/esm/icons/question.svg.js +1 -1
- package/esm/icons/redo.svg.js +1 -1
- package/esm/icons/refresh.svg.js +1 -1
- package/esm/icons/reload.svg.js +1 -1
- package/esm/icons/remove.svg.js +1 -1
- package/esm/icons/retry.svg.js +1 -1
- package/esm/icons/right-arrow-bold.svg.js +1 -1
- package/esm/icons/right-arrow.svg.js +1 -1
- package/esm/icons/right-double-arrow.svg.js +1 -1
- package/esm/icons/role.svg.js +1 -1
- package/esm/icons/rotate-left.svg.js +1 -1
- package/esm/icons/rotate-right.svg.js +1 -1
- package/esm/icons/scale-origin.svg.js +1 -1
- package/esm/icons/schedule.svg.js +1 -1
- package/esm/icons/search.svg.js +1 -1
- package/esm/icons/setting.svg.js +1 -1
- package/esm/icons/slider-handle-icon.svg.js +1 -1
- package/esm/icons/sort-asc.svg.js +1 -1
- package/esm/icons/sort-default.svg.js +1 -1
- package/esm/icons/sort-desc.svg.js +1 -1
- package/esm/icons/star.svg.js +1 -1
- package/esm/icons/status-close.svg.js +1 -1
- package/esm/icons/steps-finsh.svg.js +1 -1
- package/esm/icons/success.svg.js +1 -1
- package/esm/icons/transparent.svg.js +1 -1
- package/esm/icons/trash.svg.js +1 -1
- package/esm/icons/tree-down.svg.js +1 -1
- package/esm/icons/undo.svg.js +1 -1
- package/esm/icons/upload.svg.js +1 -1
- package/esm/icons/user-remove.svg.js +1 -1
- package/esm/icons/view.svg.js +1 -1
- package/esm/icons/volume.svg.js +1 -1
- package/esm/icons/warning-mark.svg.js +1 -1
- package/esm/icons/warning.svg.js +1 -1
- package/esm/icons/window-restore.svg.js +1 -1
- package/esm/icons/zoom-in.svg.js +1 -1
- package/esm/icons/zoom-out.svg.js +1 -1
- package/esm/index.js +1 -1
- package/esm/locale/de-DE.js +2 -1
- package/esm/locale/en-US.js +2 -1
- package/esm/locale/zh-CN.js +2 -1
- package/esm/themes/ang.js +1 -1
- package/esm/themes/antd.js +1 -1
- package/esm/themes/cxd.js +1 -1
- package/esm/themes/dark.js +1 -1
- package/lib/components/404.js +1 -1
- package/lib/components/Alert.d.ts +121 -120
- package/lib/components/Alert.js +4 -2
- package/lib/components/Alert2.d.ts +20 -20
- package/lib/components/Alert2.js +1 -1
- package/lib/components/AnchorNav.d.ts +20 -20
- package/lib/components/AnchorNav.js +1 -1
- package/lib/components/ArrayInput.d.ts +40 -40
- package/lib/components/ArrayInput.js +1 -1
- package/lib/components/AsideNav.js +1 -1
- package/lib/components/AssociatedSelection.d.ts +80 -80
- package/lib/components/AssociatedSelection.js +1 -1
- package/lib/components/Avatar.d.ts +90 -90
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Badge.js +1 -1
- package/lib/components/BaiduMapPicker.js +1 -1
- package/lib/components/BarCode.js +1 -1
- package/lib/components/Breadcrumb.js +1 -1
- package/lib/components/Button.d.ts +20 -20
- package/lib/components/Button.js +1 -1
- package/lib/components/CalendarMobile.d.ts +40 -40
- package/lib/components/CalendarMobile.js +1 -1
- package/lib/components/Card.d.ts +100 -100
- package/lib/components/Card.js +1 -1
- package/lib/components/Cascader.js +1 -1
- package/lib/components/ChainedDropdownSelection.d.ts +80 -80
- package/lib/components/ChainedDropdownSelection.js +1 -1
- package/lib/components/ChainedSelection.d.ts +80 -80
- package/lib/components/ChainedSelection.js +5 -3
- package/lib/components/Checkbox.d.ts +10 -10
- package/lib/components/Checkbox.js +1 -1
- package/lib/components/CityArea.js +1 -1
- package/lib/components/CityDB.js +1 -1
- package/lib/components/CodeMirror.js +1 -1
- package/lib/components/Collapse.d.ts +130 -130
- package/lib/components/Collapse.js +2 -2
- package/lib/components/CollapseGroup.d.ts +20 -20
- package/lib/components/CollapseGroup.js +1 -1
- package/lib/components/ColorPicker.d.ts +80 -80
- package/lib/components/ColorPicker.js +1 -1
- package/lib/components/Combo.js +1 -1
- package/lib/components/ConfirmBox.d.ts +80 -80
- package/lib/components/ConfirmBox.js +1 -1
- package/lib/components/ContextMenu.d.ts +1 -0
- package/lib/components/ContextMenu.js +4 -2
- package/lib/components/DatePicker.d.ts +81 -81
- package/lib/components/DatePicker.js +1 -1
- package/lib/components/DateRangePicker.d.ts +120 -120
- package/lib/components/DateRangePicker.js +1 -1
- package/lib/components/DndContainer.js +1 -1
- package/lib/components/Drawer.d.ts +40 -40
- package/lib/components/Drawer.js +1 -1
- package/lib/components/DropDownSelection.d.ts +80 -80
- package/lib/components/DropDownSelection.js +3 -2
- package/lib/components/Editor.d.ts +40 -40
- package/lib/components/Editor.js +1 -1
- package/lib/components/Form.js +1 -1
- package/lib/components/FormField.js +1 -1
- package/lib/components/GaodeMapPicker.js +1 -1
- package/lib/components/GridNav.js +1 -1
- package/lib/components/GroupedSelection.d.ts +80 -80
- package/lib/components/GroupedSelection.js +7 -4
- package/lib/components/Html.js +1 -1
- package/lib/components/ImageGallery.d.ts +55 -43
- package/lib/components/ImageGallery.js +76 -10
- package/lib/components/Input.js +1 -1
- package/lib/components/InputBox.d.ts +10 -10
- package/lib/components/InputBox.js +1 -1
- package/lib/components/InputBoxWithSuggestion.js +3 -2
- package/lib/components/InputTable.js +1 -1
- package/lib/components/Layout.d.ts +10 -10
- package/lib/components/Layout.js +1 -1
- package/lib/components/Link.js +1 -1
- package/lib/components/ListGroup.d.ts +10 -10
- package/lib/components/ListGroup.js +1 -1
- package/lib/components/ListMenu.d.ts +80 -80
- package/lib/components/ListMenu.js +1 -1
- package/lib/components/LocationPicker.d.ts +40 -40
- package/lib/components/LocationPicker.js +1 -1
- package/lib/components/Markdown.js +1 -1
- package/lib/components/Modal.d.ts +80 -80
- package/lib/components/Modal.js +6 -11
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/MonthRangePicker.d.ts +120 -120
- package/lib/components/MultilineText.d.ts +40 -40
- package/lib/components/MultilineText.js +1 -1
- package/lib/components/NumberInput.d.ts +20 -20
- package/lib/components/NumberInput.js +1 -1
- package/lib/components/Pagination.d.ts +42 -41
- package/lib/components/Pagination.js +22 -6
- package/lib/components/Picker.js +1 -1
- package/lib/components/PickerColumn.js +1 -1
- package/lib/components/PickerContainer.js +1 -1
- package/lib/components/PopOverContainer.js +1 -1
- package/lib/components/PopUp.d.ts +80 -80
- package/lib/components/PopUp.js +1 -1
- package/lib/components/Progress.d.ts +50 -50
- package/lib/components/Progress.js +1 -1
- package/lib/components/PullRefresh.js +1 -1
- package/lib/components/Radios.d.ts +20 -20
- package/lib/components/Radios.js +1 -1
- package/lib/components/Range.js +1 -1
- package/lib/components/Rating.d.ts +20 -20
- package/lib/components/Rating.js +1 -1
- package/lib/components/ResultBox.d.ts +80 -80
- package/lib/components/ResultBox.js +15 -13
- package/lib/components/ResultList.d.ts +42 -41
- package/lib/components/ResultList.js +12 -3
- package/lib/components/ResultTableList.d.ts +80 -80
- package/lib/components/ResultTableList.js +1 -1
- package/lib/components/ResultTreeList.d.ts +40 -40
- package/lib/components/ResultTreeList.js +1 -1
- package/lib/components/RichText.js +1 -1
- package/lib/components/SearchBox.d.ts +80 -80
- package/lib/components/SearchBox.js +1 -1
- package/lib/components/Select.d.ts +1551 -1552
- package/lib/components/Select.js +1 -1
- package/lib/components/SelectMobile.js +7 -4
- package/lib/components/Selection.d.ts +82 -81
- package/lib/components/Selection.js +11 -4
- package/lib/components/SparkLine.d.ts +40 -40
- package/lib/components/SparkLine.js +1 -1
- package/lib/components/Spinner.d.ts +60 -60
- package/lib/components/Spinner.js +1 -1
- package/lib/components/Steps.js +8 -4
- package/lib/components/Switch.d.ts +10 -10
- package/lib/components/Switch.js +1 -1
- package/lib/components/TableSelection.d.ts +80 -80
- package/lib/components/TableSelection.js +1 -1
- package/lib/components/Tabs.d.ts +80 -80
- package/lib/components/Tabs.js +1 -1
- package/lib/components/TabsTransfer.d.ts +40 -40
- package/lib/components/TabsTransfer.js +1 -1
- package/lib/components/TabsTransferPicker.js +1 -1
- package/lib/components/Tag.d.ts +60 -60
- package/lib/components/Tag.js +1 -1
- package/lib/components/Textarea.d.ts +40 -40
- package/lib/components/Textarea.js +1 -1
- package/lib/components/Timeline.js +1 -1
- package/lib/components/TimelineItem.js +1 -1
- package/lib/components/Tinymce.js +1 -1
- package/lib/components/TitleBar.d.ts +10 -10
- package/lib/components/TitleBar.js +1 -1
- package/lib/components/Toast.d.ts +120 -120
- package/lib/components/Toast.js +1 -1
- package/lib/components/Tooltip.js +1 -1
- package/lib/components/TooltipWrapper.d.ts +30 -30
- package/lib/components/TooltipWrapper.js +1 -1
- package/lib/components/Transfer.d.ts +169 -169
- package/lib/components/Transfer.js +5 -5
- package/lib/components/TransferDropDown.d.ts +160 -160
- package/lib/components/TransferDropDown.js +1 -1
- package/lib/components/TransferPicker.js +1 -1
- package/lib/components/TransferSearch.js +1 -1
- package/lib/components/Tree.d.ts +200 -200
- package/lib/components/Tree.js +13 -8
- package/lib/components/TreeSelection.d.ts +80 -80
- package/lib/components/TreeSelection.js +3 -2
- package/lib/components/UserSelect.d.ts +40 -40
- package/lib/components/UserSelect.js +1 -1
- package/lib/components/UserTabSelect.d.ts +40 -40
- package/lib/components/UserTabSelect.js +1 -1
- package/lib/components/WithRemoteConfig.d.ts +0 -1
- package/lib/components/WithRemoteConfig.js +1 -1
- package/lib/components/WithStore.js +1 -1
- package/lib/components/calendar/Calendar.js +1 -1
- package/lib/components/calendar/CalendarContainer.js +1 -1
- package/lib/components/calendar/DaysView.js +1 -1
- package/lib/components/calendar/MonthsView.js +1 -1
- package/lib/components/calendar/QuartersView.js +1 -1
- package/lib/components/calendar/TimeView.js +1 -1
- package/lib/components/calendar/YearsView.js +1 -1
- package/lib/components/condition-builder/Expression.js +1 -1
- package/lib/components/condition-builder/Field.js +1 -1
- package/lib/components/condition-builder/Func.js +1 -1
- package/lib/components/condition-builder/Group.js +1 -1
- package/lib/components/condition-builder/GroupOrItem.js +1 -1
- package/lib/components/condition-builder/InputSwitch.js +1 -1
- package/lib/components/condition-builder/Item.js +1 -1
- package/lib/components/condition-builder/Value.js +1 -1
- package/lib/components/condition-builder/config.js +1 -1
- package/lib/components/condition-builder/index.js +1 -1
- package/lib/components/formula/Editor.d.ts +40 -40
- package/lib/components/formula/Editor.js +1 -1
- package/lib/components/formula/FuncList.js +1 -1
- package/lib/components/formula/Input.js +1 -1
- package/lib/components/formula/Picker.d.ts +40 -40
- package/lib/components/formula/Picker.js +1 -1
- package/lib/components/formula/VariableList.js +7 -6
- package/lib/components/formula/plugin.js +1 -1
- package/lib/components/icons.js +17 -17
- package/lib/components/json-schema/Array.js +1 -1
- package/lib/components/json-schema/Item.js +1 -1
- package/lib/components/json-schema/Object.js +1 -1
- package/lib/components/json-schema/index.js +1 -1
- package/lib/components/menu/MenuContext.js +1 -1
- package/lib/components/menu/MenuItem.js +1 -1
- package/lib/components/menu/SubMenu.js +1 -1
- package/lib/components/menu/index.d.ts +50 -50
- package/lib/components/menu/index.js +1 -1
- package/lib/components/schema-editor/Array.js +1 -1
- package/lib/components/schema-editor/Common.js +1 -1
- package/lib/components/schema-editor/Item.js +1 -1
- package/lib/components/schema-editor/Object.js +1 -1
- package/lib/components/schema-editor/SchemaVariableList.js +1 -1
- package/lib/components/schema-editor/SchemaVariableListPicker.js +1 -1
- package/lib/components/schema-editor/index.d.ts +200 -200
- package/lib/components/schema-editor/index.js +1 -1
- package/lib/components/table/Cell.d.ts +40 -40
- package/lib/components/table/Cell.js +3 -3
- package/lib/components/table/ColGroup.d.ts +19 -0
- package/lib/components/table/ColGroup.js +64 -0
- package/lib/components/table/HeadCellDropDown.js +1 -1
- package/lib/components/table/HeadCellFilter.d.ts +80 -80
- package/lib/components/table/HeadCellFilter.js +1 -1
- package/lib/components/table/HeadCellSelect.d.ts +40 -40
- package/lib/components/table/HeadCellSelect.js +1 -1
- package/lib/components/table/HeadCellSort.js +1 -1
- package/lib/components/table/ItemActionsWrapper.js +1 -1
- package/lib/components/table/index.d.ts +136 -83
- package/lib/components/table/index.js +149 -88
- package/lib/components/virtual-list/AutoSizer.js +1 -1
- package/lib/components/virtual-list/SizeAndPositionManager.js +1 -1
- package/lib/components/virtual-list/constants.js +1 -1
- package/lib/components/virtual-list/index.js +1 -1
- package/lib/hooks/use-set-state.js +1 -1
- package/lib/hooks/use-sub-form.js +1 -1
- package/lib/hooks/use-touch.js +1 -1
- package/lib/hooks/use-update-effect.js +1 -1
- package/lib/hooks/use-validation-resolver.js +1 -1
- package/lib/icons/alert-danger.svg.js +1 -1
- package/lib/icons/alert-info.svg.js +1 -1
- package/lib/icons/alert-success.svg.js +1 -1
- package/lib/icons/alert-warning.svg.js +1 -1
- package/lib/icons/back.svg.js +1 -1
- package/lib/icons/calendar.svg.js +1 -1
- package/lib/icons/caret.svg.js +1 -1
- package/lib/icons/check.svg.js +1 -1
- package/lib/icons/clock.svg.js +1 -1
- package/lib/icons/close-small.svg.js +1 -1
- package/lib/icons/close.svg.js +1 -1
- package/lib/icons/cloud-upload.svg.js +1 -1
- package/lib/icons/column-filter.svg.js +1 -1
- package/lib/icons/columns.svg.js +1 -1
- package/lib/icons/compress-alt.svg.js +1 -1
- package/lib/icons/copy.svg.js +1 -1
- package/lib/icons/date.svg.js +1 -1
- package/lib/icons/department.svg.js +1 -1
- package/lib/icons/desk-empty.svg.js +1 -1
- package/lib/icons/dot.svg.js +1 -1
- package/lib/icons/down-arrow-bold.svg.js +1 -1
- package/lib/icons/down.svg.js +1 -1
- package/lib/icons/download.svg.js +1 -1
- package/lib/icons/drag-bar.svg.js +1 -1
- package/lib/icons/drag.svg.js +1 -1
- package/lib/icons/edit.svg.js +1 -1
- package/lib/icons/ellipsis-v.svg.js +1 -1
- package/lib/icons/enter.svg.js +1 -1
- package/lib/icons/exchange.svg.js +1 -1
- package/lib/icons/expand-alt.svg.js +1 -1
- package/lib/icons/fail.svg.js +1 -1
- package/lib/icons/file.svg.js +1 -1
- package/lib/icons/filter.svg.js +1 -1
- package/lib/icons/folder.svg.js +1 -1
- package/lib/icons/function.svg.js +1 -1
- package/lib/icons/home.svg.js +1 -1
- package/lib/icons/if.svg.js +1 -1
- package/lib/icons/image.svg.js +1 -1
- package/lib/icons/info-circle.svg.js +1 -1
- package/lib/icons/info.svg.js +1 -1
- package/lib/icons/input-clear.svg.js +1 -1
- package/lib/icons/invisible.svg.js +1 -1
- package/lib/icons/left-arrow.svg.js +1 -1
- package/lib/icons/loading-outline.svg.js +1 -1
- package/lib/icons/location.svg.js +1 -1
- package/lib/icons/menu.svg.js +1 -1
- package/lib/icons/minus.svg.js +1 -1
- package/lib/icons/move.svg.js +1 -1
- package/lib/icons/mute.svg.js +1 -1
- package/lib/icons/new-edit.svg.js +1 -1
- package/lib/icons/pause.svg.js +1 -1
- package/lib/icons/pencil.svg.js +1 -1
- package/lib/icons/play.svg.js +1 -1
- package/lib/icons/plus-cicle.svg.js +1 -1
- package/lib/icons/plus-fine.svg.js +1 -1
- package/lib/icons/plus.svg.js +1 -1
- package/lib/icons/post.svg.js +1 -1
- package/lib/icons/question-mark.svg.js +1 -1
- package/lib/icons/question.svg.js +1 -1
- package/lib/icons/redo.svg.js +1 -1
- package/lib/icons/refresh.svg.js +1 -1
- package/lib/icons/reload.svg.js +1 -1
- package/lib/icons/remove.svg.js +1 -1
- package/lib/icons/retry.svg.js +1 -1
- package/lib/icons/right-arrow-bold.svg.js +1 -1
- package/lib/icons/right-arrow.svg.js +1 -1
- package/lib/icons/right-double-arrow.svg.js +1 -1
- package/lib/icons/role.svg.js +1 -1
- package/lib/icons/rotate-left.svg.js +1 -1
- package/lib/icons/rotate-right.svg.js +1 -1
- package/lib/icons/scale-origin.svg.js +1 -1
- package/lib/icons/schedule.svg.js +1 -1
- package/lib/icons/search.svg.js +1 -1
- package/lib/icons/setting.svg.js +1 -1
- package/lib/icons/slider-handle-icon.svg.js +1 -1
- package/lib/icons/sort-asc.svg.js +1 -1
- package/lib/icons/sort-default.svg.js +1 -1
- package/lib/icons/sort-desc.svg.js +1 -1
- package/lib/icons/star.svg.js +1 -1
- package/lib/icons/status-close.svg.js +1 -1
- package/lib/icons/steps-finsh.svg.js +1 -1
- package/lib/icons/success.svg.js +1 -1
- package/lib/icons/transparent.svg.js +1 -1
- package/lib/icons/trash.svg.js +1 -1
- package/lib/icons/tree-down.svg.js +1 -1
- package/lib/icons/undo.svg.js +1 -1
- package/lib/icons/upload.svg.js +1 -1
- package/lib/icons/user-remove.svg.js +1 -1
- package/lib/icons/view.svg.js +1 -1
- package/lib/icons/volume.svg.js +1 -1
- package/lib/icons/warning-mark.svg.js +1 -1
- package/lib/icons/warning.svg.js +1 -1
- package/lib/icons/window-restore.svg.js +1 -1
- package/lib/icons/zoom-in.svg.js +1 -1
- package/lib/icons/zoom-out.svg.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/de-DE.js +2 -1
- package/lib/locale/en-US.js +2 -1
- package/lib/locale/zh-CN.js +2 -1
- package/lib/scss/helper.scss.js +1 -1
- package/lib/scss/themes/ang.scss.js +1 -1
- package/lib/scss/themes/antd.scss.js +1 -1
- package/lib/scss/themes/cxd.scss.js +1 -1
- package/lib/scss/themes/dark.scss.js +1 -1
- package/lib/scss/themes/default.scss.js +1 -1
- package/lib/themes/ang.css +264 -139
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +264 -139
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +264 -139
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +264 -139
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +264 -139
- package/package.json +4 -4
- package/scss/_components.scss +9 -2
- package/scss/_properties.scss +3 -0
- package/scss/components/_cards.scss +1 -0
- package/scss/components/_collapse.scss +31 -1
- package/scss/components/_divider.scss +37 -2
- package/scss/components/_formula.scss +2 -1
- package/scss/components/_image-gallery.scss +10 -0
- package/scss/components/_list.scss +1 -0
- package/scss/components/_menu.scss +6 -3
- package/scss/components/_modal.scss +5 -5
- package/scss/components/_nav.scss +26 -0
- package/scss/components/_page.scss +13 -0
- package/scss/components/_panel.scss +3 -13
- package/scss/components/_result-box.scss +8 -0
- package/scss/components/_table.scss +20 -1
- package/scss/components/_table2.scss +4 -15
- package/scss/components/form/_combo.scss +9 -2
- package/scss/components/form/_file.scss +2 -0
- package/scss/components/form/_icon-select.scss +0 -1
- package/scss/components/form/_list.scss +15 -0
- package/scss/components/form/_result-list.scss +1 -0
- package/scss/components/form/_selection.scss +7 -0
- package/scss/components/form/_textarea.scss +5 -5
- package/scss/components/form/_tree.scss +1 -1
- package/scss/layout/_layout.scss +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.5.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -45,7 +45,8 @@ var GroupedSelection = /** @class */ (function (_super) {
|
|
|
45
45
|
checked: false,
|
|
46
46
|
onChange: function () { return undefined; },
|
|
47
47
|
disabled: disabled || option.disabled,
|
|
48
|
-
labelField: labelField
|
|
48
|
+
labelField: labelField,
|
|
49
|
+
classnames: cx
|
|
49
50
|
})),
|
|
50
51
|
_J$X_("div", { className: cx('GroupedSelection-items', option.className) }, option.children.map(function (child, index) {
|
|
51
52
|
return _this.renderOption(child, index);
|
|
@@ -65,7 +66,8 @@ var GroupedSelection = /** @class */ (function (_super) {
|
|
|
65
66
|
checked: false,
|
|
66
67
|
onChange: function () { return undefined; },
|
|
67
68
|
disabled: disabled || option.disabled,
|
|
68
|
-
labelField: labelField
|
|
69
|
+
labelField: labelField,
|
|
70
|
+
classnames: cx
|
|
69
71
|
}))));
|
|
70
72
|
}
|
|
71
73
|
return hasParent ? (_J$X_("div", { key: 'group' + index, style: styles, className: cx('GroupedSelection-group', option.className) },
|
|
@@ -84,7 +86,8 @@ var GroupedSelection = /** @class */ (function (_super) {
|
|
|
84
86
|
checked: !!~valueArray.indexOf(option),
|
|
85
87
|
onChange: function () { return _this.toggleOption(option); },
|
|
86
88
|
disabled: disabled || option.disabled,
|
|
87
|
-
labelField: labelField
|
|
89
|
+
labelField: labelField,
|
|
90
|
+
classnames: cx
|
|
88
91
|
}))));
|
|
89
92
|
};
|
|
90
93
|
GroupedSelection.prototype.renderCheckAll = function () {
|
package/lib/components/Html.js
CHANGED
|
@@ -43,6 +43,14 @@ export interface ImageGalleryState {
|
|
|
43
43
|
scale: number;
|
|
44
44
|
/** 图片旋转角度 */
|
|
45
45
|
rotate: number;
|
|
46
|
+
/**
|
|
47
|
+
* 水平位移
|
|
48
|
+
*/
|
|
49
|
+
tx: number;
|
|
50
|
+
/**
|
|
51
|
+
* 垂直位移
|
|
52
|
+
*/
|
|
53
|
+
ty: number;
|
|
46
54
|
/** 是否开启操作栏 */
|
|
47
55
|
showToolbar?: boolean;
|
|
48
56
|
/** 是否显示底部图片集 */
|
|
@@ -58,6 +66,13 @@ export declare class ImageGallery extends React.Component<ImageGalleryProps, Ima
|
|
|
58
66
|
galleryMain?: HTMLDivElement;
|
|
59
67
|
galleryMainRef(ref: HTMLDivElement): void;
|
|
60
68
|
onWheelScroll(event: WheelEvent): void;
|
|
69
|
+
startX: number;
|
|
70
|
+
startY: number;
|
|
71
|
+
startTx: number;
|
|
72
|
+
startTy: number;
|
|
73
|
+
onMouseDown(event: MouseEvent): void;
|
|
74
|
+
onMouseMove(event: MouseEvent): void;
|
|
75
|
+
onMouseUp(): void;
|
|
61
76
|
handleImageEnlarge(info: {
|
|
62
77
|
src: string;
|
|
63
78
|
originalSrc: string;
|
|
@@ -85,7 +100,7 @@ export declare class ImageGallery extends React.Component<ImageGalleryProps, Ima
|
|
|
85
100
|
render(): React.JSX.Element;
|
|
86
101
|
}
|
|
87
102
|
declare const _default: {
|
|
88
|
-
new (props: Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
103
|
+
new (props: Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
89
104
|
actions?: ImageAction[] | undefined;
|
|
90
105
|
} & {} & {
|
|
91
106
|
locale?: string | undefined;
|
|
@@ -96,14 +111,14 @@ declare const _default: {
|
|
|
96
111
|
getWrappedInstance(): any;
|
|
97
112
|
render(): React.JSX.Element;
|
|
98
113
|
context: unknown;
|
|
99
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
114
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
100
115
|
actions?: ImageAction[] | undefined;
|
|
101
116
|
} & {} & {
|
|
102
117
|
locale?: string | undefined;
|
|
103
118
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
104
119
|
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
105
120
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
106
|
-
readonly props: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
121
|
+
readonly props: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
107
122
|
actions?: ImageAction[] | undefined;
|
|
108
123
|
} & {} & {
|
|
109
124
|
locale?: string | undefined;
|
|
@@ -114,7 +129,7 @@ declare const _default: {
|
|
|
114
129
|
[key: string]: React.ReactInstance;
|
|
115
130
|
};
|
|
116
131
|
componentDidMount?(): void;
|
|
117
|
-
shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
132
|
+
shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
118
133
|
actions?: ImageAction[] | undefined;
|
|
119
134
|
} & {} & {
|
|
120
135
|
locale?: string | undefined;
|
|
@@ -122,13 +137,13 @@ declare const _default: {
|
|
|
122
137
|
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
123
138
|
componentWillUnmount?(): void;
|
|
124
139
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
125
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
140
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
126
141
|
actions?: ImageAction[] | undefined;
|
|
127
142
|
} & {} & {
|
|
128
143
|
locale?: string | undefined;
|
|
129
144
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
130
145
|
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>): any;
|
|
131
|
-
componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
146
|
+
componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
132
147
|
actions?: ImageAction[] | undefined;
|
|
133
148
|
} & {} & {
|
|
134
149
|
locale?: string | undefined;
|
|
@@ -136,25 +151,25 @@ declare const _default: {
|
|
|
136
151
|
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
137
152
|
componentWillMount?(): void;
|
|
138
153
|
UNSAFE_componentWillMount?(): void;
|
|
139
|
-
componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
154
|
+
componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
140
155
|
actions?: ImageAction[] | undefined;
|
|
141
156
|
} & {} & {
|
|
142
157
|
locale?: string | undefined;
|
|
143
158
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
144
159
|
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
|
|
145
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
160
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
146
161
|
actions?: ImageAction[] | undefined;
|
|
147
162
|
} & {} & {
|
|
148
163
|
locale?: string | undefined;
|
|
149
164
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
150
165
|
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
|
|
151
|
-
componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
166
|
+
componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
152
167
|
actions?: ImageAction[] | undefined;
|
|
153
168
|
} & {} & {
|
|
154
169
|
locale?: string | undefined;
|
|
155
170
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
156
171
|
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
157
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
172
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
158
173
|
actions?: ImageAction[] | undefined;
|
|
159
174
|
} & {} & {
|
|
160
175
|
locale?: string | undefined;
|
|
@@ -164,7 +179,7 @@ declare const _default: {
|
|
|
164
179
|
displayName: string;
|
|
165
180
|
contextType: React.Context<string>;
|
|
166
181
|
ComposedComponent: React.ComponentType<{
|
|
167
|
-
new (props: Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
182
|
+
new (props: Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
168
183
|
actions?: ImageAction[] | undefined;
|
|
169
184
|
} & {} & {
|
|
170
185
|
locale?: string | undefined;
|
|
@@ -173,17 +188,16 @@ declare const _default: {
|
|
|
173
188
|
ref: any;
|
|
174
189
|
childRef(ref: any): void;
|
|
175
190
|
getWrappedInstance(): any;
|
|
176
|
-
/** 是否显示底部图片集 */
|
|
177
191
|
render(): React.JSX.Element;
|
|
178
192
|
context: unknown;
|
|
179
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
193
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
180
194
|
actions?: ImageAction[] | undefined;
|
|
181
195
|
} & {} & {
|
|
182
196
|
locale?: string | undefined;
|
|
183
197
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
184
198
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
|
185
199
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
186
|
-
readonly props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
200
|
+
readonly props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
187
201
|
actions?: ImageAction[] | undefined;
|
|
188
202
|
} & {} & {
|
|
189
203
|
locale?: string | undefined;
|
|
@@ -194,7 +208,7 @@ declare const _default: {
|
|
|
194
208
|
[key: string]: React.ReactInstance;
|
|
195
209
|
};
|
|
196
210
|
componentDidMount?(): void;
|
|
197
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
211
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
198
212
|
actions?: ImageAction[] | undefined;
|
|
199
213
|
} & {} & {
|
|
200
214
|
locale?: string | undefined;
|
|
@@ -202,13 +216,13 @@ declare const _default: {
|
|
|
202
216
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
203
217
|
componentWillUnmount?(): void;
|
|
204
218
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
205
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
219
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
206
220
|
actions?: ImageAction[] | undefined;
|
|
207
221
|
} & {} & {
|
|
208
222
|
locale?: string | undefined;
|
|
209
223
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
210
224
|
}>, prevState: Readonly<{}>): any;
|
|
211
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
225
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
212
226
|
actions?: ImageAction[] | undefined;
|
|
213
227
|
} & {} & {
|
|
214
228
|
locale?: string | undefined;
|
|
@@ -216,25 +230,25 @@ declare const _default: {
|
|
|
216
230
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
217
231
|
componentWillMount?(): void;
|
|
218
232
|
UNSAFE_componentWillMount?(): void;
|
|
219
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
233
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
220
234
|
actions?: ImageAction[] | undefined;
|
|
221
235
|
} & {} & {
|
|
222
236
|
locale?: string | undefined;
|
|
223
237
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
224
238
|
}>, nextContext: any): void;
|
|
225
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
239
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
226
240
|
actions?: ImageAction[] | undefined;
|
|
227
241
|
} & {} & {
|
|
228
242
|
locale?: string | undefined;
|
|
229
243
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
230
244
|
}>, nextContext: any): void;
|
|
231
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
245
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
232
246
|
actions?: ImageAction[] | undefined;
|
|
233
247
|
} & {} & {
|
|
234
248
|
locale?: string | undefined;
|
|
235
249
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
236
250
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
237
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
251
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
238
252
|
actions?: ImageAction[] | undefined;
|
|
239
253
|
} & {} & {
|
|
240
254
|
locale?: string | undefined;
|
|
@@ -248,7 +262,7 @@ declare const _default: {
|
|
|
248
262
|
ComposedComponent: typeof ImageGallery;
|
|
249
263
|
}>;
|
|
250
264
|
} & import("hoist-non-react-statics").NonReactStatics<{
|
|
251
|
-
new (props: Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
265
|
+
new (props: Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
252
266
|
actions?: ImageAction[] | undefined;
|
|
253
267
|
} & {} & {
|
|
254
268
|
locale?: string | undefined;
|
|
@@ -257,17 +271,16 @@ declare const _default: {
|
|
|
257
271
|
ref: any;
|
|
258
272
|
childRef(ref: any): void;
|
|
259
273
|
getWrappedInstance(): any;
|
|
260
|
-
/** 是否显示底部图片集 */
|
|
261
274
|
render(): React.JSX.Element;
|
|
262
275
|
context: unknown;
|
|
263
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
276
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
264
277
|
actions?: ImageAction[] | undefined;
|
|
265
278
|
} & {} & {
|
|
266
279
|
locale?: string | undefined;
|
|
267
280
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
268
281
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
|
269
282
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
270
|
-
readonly props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
283
|
+
readonly props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
271
284
|
actions?: ImageAction[] | undefined;
|
|
272
285
|
} & {} & {
|
|
273
286
|
locale?: string | undefined;
|
|
@@ -278,7 +291,7 @@ declare const _default: {
|
|
|
278
291
|
[key: string]: React.ReactInstance;
|
|
279
292
|
};
|
|
280
293
|
componentDidMount?(): void;
|
|
281
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
294
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
282
295
|
actions?: ImageAction[] | undefined;
|
|
283
296
|
} & {} & {
|
|
284
297
|
locale?: string | undefined;
|
|
@@ -286,13 +299,13 @@ declare const _default: {
|
|
|
286
299
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
287
300
|
componentWillUnmount?(): void;
|
|
288
301
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
289
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
302
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
290
303
|
actions?: ImageAction[] | undefined;
|
|
291
304
|
} & {} & {
|
|
292
305
|
locale?: string | undefined;
|
|
293
306
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
294
307
|
}>, prevState: Readonly<{}>): any;
|
|
295
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
308
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
296
309
|
actions?: ImageAction[] | undefined;
|
|
297
310
|
} & {} & {
|
|
298
311
|
locale?: string | undefined;
|
|
@@ -300,25 +313,25 @@ declare const _default: {
|
|
|
300
313
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
301
314
|
componentWillMount?(): void;
|
|
302
315
|
UNSAFE_componentWillMount?(): void;
|
|
303
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
316
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
304
317
|
actions?: ImageAction[] | undefined;
|
|
305
318
|
} & {} & {
|
|
306
319
|
locale?: string | undefined;
|
|
307
320
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
308
321
|
}>, nextContext: any): void;
|
|
309
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
322
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
310
323
|
actions?: ImageAction[] | undefined;
|
|
311
324
|
} & {} & {
|
|
312
325
|
locale?: string | undefined;
|
|
313
326
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
314
327
|
}>, nextContext: any): void;
|
|
315
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
328
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
316
329
|
actions?: ImageAction[] | undefined;
|
|
317
330
|
} & {} & {
|
|
318
331
|
locale?: string | undefined;
|
|
319
332
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
320
333
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
321
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
334
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
322
335
|
actions?: ImageAction[] | undefined;
|
|
323
336
|
} & {} & {
|
|
324
337
|
locale?: string | undefined;
|
|
@@ -332,7 +345,7 @@ declare const _default: {
|
|
|
332
345
|
ComposedComponent: typeof ImageGallery;
|
|
333
346
|
}, {}> & {
|
|
334
347
|
ComposedComponent: {
|
|
335
|
-
new (props: Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
348
|
+
new (props: Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
336
349
|
actions?: ImageAction[] | undefined;
|
|
337
350
|
} & {} & {
|
|
338
351
|
locale?: string | undefined;
|
|
@@ -341,17 +354,16 @@ declare const _default: {
|
|
|
341
354
|
ref: any;
|
|
342
355
|
childRef(ref: any): void;
|
|
343
356
|
getWrappedInstance(): any;
|
|
344
|
-
/** 是否显示底部图片集 */
|
|
345
357
|
render(): React.JSX.Element;
|
|
346
358
|
context: unknown;
|
|
347
|
-
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
359
|
+
setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
348
360
|
actions?: ImageAction[] | undefined;
|
|
349
361
|
} & {} & {
|
|
350
362
|
locale?: string | undefined;
|
|
351
363
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
352
364
|
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
|
|
353
365
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
354
|
-
readonly props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
366
|
+
readonly props: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
355
367
|
actions?: ImageAction[] | undefined;
|
|
356
368
|
} & {} & {
|
|
357
369
|
locale?: string | undefined;
|
|
@@ -362,7 +374,7 @@ declare const _default: {
|
|
|
362
374
|
[key: string]: React.ReactInstance;
|
|
363
375
|
};
|
|
364
376
|
componentDidMount?(): void;
|
|
365
|
-
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
377
|
+
shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
366
378
|
actions?: ImageAction[] | undefined;
|
|
367
379
|
} & {} & {
|
|
368
380
|
locale?: string | undefined;
|
|
@@ -370,13 +382,13 @@ declare const _default: {
|
|
|
370
382
|
}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
371
383
|
componentWillUnmount?(): void;
|
|
372
384
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
373
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
385
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
374
386
|
actions?: ImageAction[] | undefined;
|
|
375
387
|
} & {} & {
|
|
376
388
|
locale?: string | undefined;
|
|
377
389
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
378
390
|
}>, prevState: Readonly<{}>): any;
|
|
379
|
-
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
391
|
+
componentDidUpdate?(prevProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
380
392
|
actions?: ImageAction[] | undefined;
|
|
381
393
|
} & {} & {
|
|
382
394
|
locale?: string | undefined;
|
|
@@ -384,25 +396,25 @@ declare const _default: {
|
|
|
384
396
|
}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
385
397
|
componentWillMount?(): void;
|
|
386
398
|
UNSAFE_componentWillMount?(): void;
|
|
387
|
-
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
399
|
+
componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
388
400
|
actions?: ImageAction[] | undefined;
|
|
389
401
|
} & {} & {
|
|
390
402
|
locale?: string | undefined;
|
|
391
403
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
392
404
|
}>, nextContext: any): void;
|
|
393
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
405
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
394
406
|
actions?: ImageAction[] | undefined;
|
|
395
407
|
} & {} & {
|
|
396
408
|
locale?: string | undefined;
|
|
397
409
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
398
410
|
}>, nextContext: any): void;
|
|
399
|
-
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
411
|
+
componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
400
412
|
actions?: ImageAction[] | undefined;
|
|
401
413
|
} & {} & {
|
|
402
414
|
locale?: string | undefined;
|
|
403
415
|
translate?: ((str: string, ...args: any[]) => string) | undefined;
|
|
404
416
|
}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
405
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "
|
|
417
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<ImageGalleryProps, keyof LocaleProps>, "style" | "className" | "classnames" | "classPrefix" | "theme" | "mobileUI" | "children" | "modalContainer" | "imageGallaryClassName"> & {
|
|
406
418
|
actions?: ImageAction[] | undefined;
|
|
407
419
|
} & {} & {
|
|
408
420
|
locale?: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.
|
|
2
|
+
* amis-ui v3.5.0
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -43,35 +43,53 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
43
43
|
isOpened: false,
|
|
44
44
|
index: -1,
|
|
45
45
|
items: [],
|
|
46
|
+
tx: 0,
|
|
47
|
+
ty: 0,
|
|
46
48
|
scale: 1,
|
|
47
49
|
rotate: 0,
|
|
48
50
|
showToolbar: false,
|
|
49
51
|
imageGallaryClassName: '',
|
|
50
52
|
actions: ImageGallery.defaultProps.actions
|
|
51
53
|
};
|
|
54
|
+
_this.startX = 0;
|
|
55
|
+
_this.startY = 0;
|
|
56
|
+
_this.startTx = 0;
|
|
57
|
+
_this.startTy = 0;
|
|
52
58
|
_this.handleToolbarAction = debounce__default["default"](function (action) {
|
|
53
59
|
if (action.disabled) {
|
|
54
60
|
return;
|
|
55
61
|
}
|
|
56
62
|
switch (action.key) {
|
|
57
63
|
case exports.ImageActionKey.ROTATE_LEFT:
|
|
58
|
-
_this.setState(function (prevState) { return ({
|
|
64
|
+
_this.setState(function (prevState) { return ({
|
|
65
|
+
rotate: prevState.rotate - 90,
|
|
66
|
+
tx: 0,
|
|
67
|
+
ty: 0
|
|
68
|
+
}); });
|
|
59
69
|
break;
|
|
60
70
|
case exports.ImageActionKey.ROTATE_RIGHT:
|
|
61
|
-
_this.setState(function (prevState) { return ({
|
|
71
|
+
_this.setState(function (prevState) { return ({
|
|
72
|
+
rotate: prevState.rotate + 90,
|
|
73
|
+
tx: 0,
|
|
74
|
+
ty: 0
|
|
75
|
+
}); });
|
|
62
76
|
break;
|
|
63
77
|
case exports.ImageActionKey.ZOOM_IN:
|
|
64
|
-
_this.setState(function (prevState) { return ({
|
|
78
|
+
_this.setState(function (prevState) { return ({
|
|
79
|
+
scale: prevState.scale + 0.5,
|
|
80
|
+
tx: 0,
|
|
81
|
+
ty: 0
|
|
82
|
+
}); });
|
|
65
83
|
break;
|
|
66
84
|
case exports.ImageActionKey.ZOOM_OUT:
|
|
67
85
|
_this.setState(function (prevState) {
|
|
68
86
|
return prevState.scale - 0.5 > 0
|
|
69
|
-
? { scale: prevState.scale - 0.5 }
|
|
87
|
+
? { scale: prevState.scale - 0.5, tx: 0, ty: 0 }
|
|
70
88
|
: null;
|
|
71
89
|
});
|
|
72
90
|
break;
|
|
73
91
|
case exports.ImageActionKey.SCALE_ORIGIN:
|
|
74
|
-
_this.setState(function () { return ({ scale: 1 }); });
|
|
92
|
+
_this.setState(function () { return ({ scale: 1, tx: 0, ty: 0 }); });
|
|
75
93
|
break;
|
|
76
94
|
}
|
|
77
95
|
if (action.onClick && typeof action.onClick === 'function') {
|
|
@@ -81,14 +99,16 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
81
99
|
return _this;
|
|
82
100
|
}
|
|
83
101
|
ImageGallery.prototype.galleryMainRef = function (ref) {
|
|
84
|
-
var _a;
|
|
102
|
+
var _a, _b;
|
|
85
103
|
if (ref) {
|
|
86
104
|
ref.addEventListener('wheel', this.onWheelScroll, {
|
|
87
105
|
passive: false
|
|
88
106
|
});
|
|
107
|
+
ref.addEventListener('mousedown', this.onMouseDown);
|
|
89
108
|
}
|
|
90
109
|
else {
|
|
91
110
|
(_a = this.galleryMain) === null || _a === void 0 ? void 0 : _a.removeEventListener('wheel', this.onWheelScroll);
|
|
111
|
+
(_b = this.galleryMain) === null || _b === void 0 ? void 0 : _b.removeEventListener('mousedown', this.onMouseDown);
|
|
92
112
|
}
|
|
93
113
|
this.galleryMain = ref;
|
|
94
114
|
};
|
|
@@ -107,11 +127,37 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
107
127
|
this.handleToolbarAction({ key: 'zoomIn' });
|
|
108
128
|
}
|
|
109
129
|
};
|
|
130
|
+
ImageGallery.prototype.onMouseDown = function (event) {
|
|
131
|
+
var _a;
|
|
132
|
+
(_a = this.galleryMain) === null || _a === void 0 ? void 0 : _a.classList.add('is-dragging');
|
|
133
|
+
document.body.addEventListener('mousemove', this.onMouseMove);
|
|
134
|
+
document.body.addEventListener('mouseup', this.onMouseUp);
|
|
135
|
+
this.startX = event.clientX;
|
|
136
|
+
this.startY = event.clientY;
|
|
137
|
+
this.startTx = this.state.tx;
|
|
138
|
+
this.startTy = this.state.ty;
|
|
139
|
+
};
|
|
140
|
+
ImageGallery.prototype.onMouseMove = function (event) {
|
|
141
|
+
this.setState({
|
|
142
|
+
tx: this.startTx + event.clientX - this.startX,
|
|
143
|
+
ty: this.startTy + event.clientY - this.startY
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
ImageGallery.prototype.onMouseUp = function () {
|
|
147
|
+
var _a;
|
|
148
|
+
(_a = this.galleryMain) === null || _a === void 0 ? void 0 : _a.classList.remove('is-dragging');
|
|
149
|
+
document.body.removeEventListener('mousemove', this.onMouseMove);
|
|
150
|
+
document.body.removeEventListener('mouseup', this.onMouseUp);
|
|
151
|
+
};
|
|
110
152
|
ImageGallery.prototype.handleImageEnlarge = function (info) {
|
|
111
153
|
var actions = this.props.actions;
|
|
112
154
|
var validActionKeys = Object.values(exports.ImageActionKey);
|
|
113
155
|
this.setState({
|
|
114
156
|
isOpened: true,
|
|
157
|
+
tx: 0,
|
|
158
|
+
ty: 0,
|
|
159
|
+
rotate: 0,
|
|
160
|
+
scale: 1,
|
|
115
161
|
items: info.list ? info.list : [info],
|
|
116
162
|
index: info.index || 0,
|
|
117
163
|
/* children组件可以控制工具栏的展示 */
|
|
@@ -165,19 +211,21 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
165
211
|
ImageGallery.prototype.render = function () {
|
|
166
212
|
var _this = this;
|
|
167
213
|
var _a = this.props, children = _a.children, cx = _a.classnames, modalContainer = _a.modalContainer;
|
|
168
|
-
var _b = this.state, index = _b.index, items = _b.items, rotate = _b.rotate, scale = _b.scale, showToolbar = _b.showToolbar, enlargeWithGallary = _b.enlargeWithGallary, actions = _b.actions, imageGallaryClassName = _b.imageGallaryClassName;
|
|
214
|
+
var _b = this.state, index = _b.index, items = _b.items, rotate = _b.rotate, scale = _b.scale, tx = _b.tx, ty = _b.ty, showToolbar = _b.showToolbar, enlargeWithGallary = _b.enlargeWithGallary, actions = _b.actions, imageGallaryClassName = _b.imageGallaryClassName;
|
|
169
215
|
var __ = this.props.translate;
|
|
170
216
|
return (_J$X_(React__default["default"].Fragment, null,
|
|
171
217
|
React__default["default"].cloneElement(children, {
|
|
172
218
|
onImageEnlarge: this.handleImageEnlarge
|
|
173
219
|
}),
|
|
174
|
-
_J$X_(Modal["default"], { closeOnEsc: true, size: "full", onHide: this.close, show: this.state.isOpened, contentClassName: cx('ImageGallery', imageGallaryClassName), container: modalContainer },
|
|
220
|
+
_J$X_(Modal["default"], { closeOnEsc: true, closeOnOutside: true, size: "full", onHide: this.close, show: this.state.isOpened, contentClassName: cx('ImageGallery', imageGallaryClassName), container: modalContainer },
|
|
175
221
|
_J$X_("a", { "data-tooltip": __('Dialog.close'), "data-position": "left", className: cx('ImageGallery-close'), onClick: this.close },
|
|
176
222
|
_J$X_(icons.Icon, { icon: "close", className: "icon" })),
|
|
177
223
|
~index && items[index] ? (_J$X_(React__default["default"].Fragment, null,
|
|
178
224
|
_J$X_("div", { className: cx('ImageGallery-title') }, items[index].title),
|
|
179
225
|
_J$X_("div", { className: cx('ImageGallery-main'), ref: this.galleryMainRef },
|
|
180
|
-
_J$X_("img", { src: items[index].originalSrc, style: {
|
|
226
|
+
_J$X_("img", { draggable: false, src: items[index].originalSrc, style: {
|
|
227
|
+
transform: "translate(".concat(tx, "px, ").concat(ty, "px) scale(").concat(scale, ") rotate(").concat(rotate, "deg)")
|
|
228
|
+
} }),
|
|
181
229
|
showToolbar && Array.isArray(actions) && actions.length > 0
|
|
182
230
|
? this.renderToolbar(actions)
|
|
183
231
|
: null,
|
|
@@ -228,6 +276,24 @@ var ImageGallery = /** @class */ (function (_super) {
|
|
|
228
276
|
tslib.__metadata("design:paramtypes", [WheelEvent]),
|
|
229
277
|
tslib.__metadata("design:returntype", void 0)
|
|
230
278
|
], ImageGallery.prototype, "onWheelScroll", null);
|
|
279
|
+
tslib.__decorate([
|
|
280
|
+
amisCore.autobind,
|
|
281
|
+
tslib.__metadata("design:type", Function),
|
|
282
|
+
tslib.__metadata("design:paramtypes", [MouseEvent]),
|
|
283
|
+
tslib.__metadata("design:returntype", void 0)
|
|
284
|
+
], ImageGallery.prototype, "onMouseDown", null);
|
|
285
|
+
tslib.__decorate([
|
|
286
|
+
amisCore.autobind,
|
|
287
|
+
tslib.__metadata("design:type", Function),
|
|
288
|
+
tslib.__metadata("design:paramtypes", [MouseEvent]),
|
|
289
|
+
tslib.__metadata("design:returntype", void 0)
|
|
290
|
+
], ImageGallery.prototype, "onMouseMove", null);
|
|
291
|
+
tslib.__decorate([
|
|
292
|
+
amisCore.autobind,
|
|
293
|
+
tslib.__metadata("design:type", Function),
|
|
294
|
+
tslib.__metadata("design:paramtypes", []),
|
|
295
|
+
tslib.__metadata("design:returntype", void 0)
|
|
296
|
+
], ImageGallery.prototype, "onMouseUp", null);
|
|
231
297
|
tslib.__decorate([
|
|
232
298
|
amisCore.autobind,
|
|
233
299
|
tslib.__metadata("design:type", Function),
|
package/lib/components/Input.js
CHANGED