amis-ui 3.4.2 → 3.4.3
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.js +1 -1
- 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.js +1 -1
- 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 +1 -1
- 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 +3 -2
- 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 +1 -1
- package/esm/locale/en-US.js +1 -1
- package/esm/locale/zh-CN.js +1 -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 +41 -40
- package/lib/components/Alert.js +4 -2
- package/lib/components/Alert2.d.ts +10 -10
- 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 +70 -70
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Badge.d.ts +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 +30 -30
- 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 +120 -120
- 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 +30 -30
- 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 +40 -40
- package/lib/components/ImageGallery.js +1 -1
- package/lib/components/Input.js +1 -1
- package/lib/components/InputBox.d.ts +10 -10
- package/lib/components/InputBox.js +1 -1
- package/lib/components/InputBoxWithSuggestion.js +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 +80 -80
- package/lib/components/Pagination.js +1 -1
- 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 +120 -120
- 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 +10 -10
- package/lib/components/Radios.js +1 -1
- package/lib/components/Range.js +1 -1
- package/lib/components/Rating.d.ts +10 -10
- package/lib/components/Rating.js +1 -1
- package/lib/components/ResultBox.d.ts +80 -80
- package/lib/components/ResultBox.js +1 -1
- 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 +1160 -1160
- 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 +50 -50
- 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 +40 -40
- 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 +80 -80
- 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 +160 -160
- package/lib/components/Tree.js +3 -2
- 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.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 +60 -60
- 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 +40 -40
- package/lib/components/schema-editor/index.js +1 -1
- package/lib/components/table/Cell.d.ts +40 -40
- package/lib/components/table/Cell.js +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 +40 -40
- 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 +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/zh-CN.js +1 -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 +187 -127
- package/lib/themes/ang.js +1 -1
- package/lib/themes/antd.css +187 -127
- package/lib/themes/antd.js +1 -1
- package/lib/themes/cxd.css +187 -127
- package/lib/themes/cxd.js +1 -1
- package/lib/themes/dark.css +187 -127
- package/lib/themes/dark.js +1 -1
- package/lib/themes/default.css +187 -127
- package/package.json +4 -4
- package/scss/_components.scss +9 -2
- package/scss/components/_collapse.scss +31 -1
- package/scss/components/_divider.scss +37 -2
- package/scss/components/_formula.scss +2 -1
- package/scss/components/_menu.scss +6 -3
- package/scss/components/_modal.scss +5 -5
- package/scss/components/_table.scss +7 -1
- package/scss/components/_table2.scss +4 -15
- package/scss/components/form/_combo.scss +9 -2
- package/scss/components/form/_icon-select.scss +0 -1
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-ui v3.4.
|
|
2
|
+
* amis-ui v3.4.3
|
|
3
3
|
* Copyright 2018-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -14,6 +14,7 @@ var findLastIndex = require('lodash/findLastIndex');
|
|
|
14
14
|
var find = require('lodash/find');
|
|
15
15
|
var isEqual = require('lodash/isEqual');
|
|
16
16
|
var filter = require('lodash/filter');
|
|
17
|
+
var debounce = require('lodash/debounce');
|
|
17
18
|
var intersection = require('lodash/intersection');
|
|
18
19
|
var Sortable = require('sortablejs');
|
|
19
20
|
var amisCore = require('amis-core');
|
|
@@ -25,6 +26,7 @@ var HeadCellFilter = require('./HeadCellFilter.js');
|
|
|
25
26
|
var HeadCellSelect = require('./HeadCellSelect.js');
|
|
26
27
|
var ItemActionsWrapper = require('./ItemActionsWrapper.js');
|
|
27
28
|
var Cell = require('./Cell.js');
|
|
29
|
+
var ColGroup = require('./ColGroup.js');
|
|
28
30
|
|
|
29
31
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
30
32
|
|
|
@@ -33,6 +35,7 @@ var findLastIndex__default = /*#__PURE__*/_interopDefaultLegacy(findLastIndex);
|
|
|
33
35
|
var find__default = /*#__PURE__*/_interopDefaultLegacy(find);
|
|
34
36
|
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
|
|
35
37
|
var filter__default = /*#__PURE__*/_interopDefaultLegacy(filter);
|
|
38
|
+
var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce);
|
|
36
39
|
var intersection__default = /*#__PURE__*/_interopDefaultLegacy(intersection);
|
|
37
40
|
var Sortable__default = /*#__PURE__*/_interopDefaultLegacy(Sortable);
|
|
38
41
|
|
|
@@ -154,6 +157,11 @@ var Table = /** @class */ (function (_super) {
|
|
|
154
157
|
_this.headerDom = React__default["default"].createRef();
|
|
155
158
|
_this.tfootDom = React__default["default"].createRef();
|
|
156
159
|
_this.footDom = React__default["default"].createRef();
|
|
160
|
+
_this.toDispose = [];
|
|
161
|
+
_this.updateTableInfoLazy = debounce__default["default"](_this.updateTableInfo.bind(_this), 250, {
|
|
162
|
+
trailing: true,
|
|
163
|
+
leading: false
|
|
164
|
+
});
|
|
157
165
|
if (props.rowSelection) {
|
|
158
166
|
var selectedResult = _this.getSelectedRows(props.dataSource, (_a = props.rowSelection) === null || _a === void 0 ? void 0 : _a.selectedRowKeys);
|
|
159
167
|
_this.selectedRows = selectedResult.selectedRows;
|
|
@@ -167,7 +175,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
167
175
|
expandedRowKeys: tslib.__spreadArray(tslib.__spreadArray([], tslib.__read((props.expandable ? props.expandable.expandedRowKeys || [] : [])), false), tslib.__read((props.expandable
|
|
168
176
|
? props.expandable.defaultExpandedRowKeys || []
|
|
169
177
|
: [])), false),
|
|
170
|
-
colWidths:
|
|
178
|
+
colWidths: {},
|
|
171
179
|
hoverRow: null
|
|
172
180
|
};
|
|
173
181
|
return _this;
|
|
@@ -238,6 +246,8 @@ var Table = /** @class */ (function (_super) {
|
|
|
238
246
|
this.initDragging();
|
|
239
247
|
}
|
|
240
248
|
this.updateStickyHeader();
|
|
249
|
+
var currentNode = ReactDOM.findDOMNode(this);
|
|
250
|
+
this.toDispose.push(amisCore.resizeSensor(currentNode, this.updateTableInfoLazy, false, 'width'));
|
|
241
251
|
};
|
|
242
252
|
Table.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
243
253
|
var _this = this;
|
|
@@ -250,7 +260,6 @@ var Table = /** @class */ (function (_super) {
|
|
|
250
260
|
dataSource: tslib.__spreadArray([], tslib.__read(this.props.dataSource), false)
|
|
251
261
|
}, function () {
|
|
252
262
|
_this.updateTableFixedRows();
|
|
253
|
-
_this.syncTableWidth();
|
|
254
263
|
});
|
|
255
264
|
}
|
|
256
265
|
// 选择项发生了变化触发
|
|
@@ -303,6 +312,9 @@ var Table = /** @class */ (function (_super) {
|
|
|
303
312
|
if (prevProps.sticky !== this.props.sticky) {
|
|
304
313
|
this.updateStickyHeader();
|
|
305
314
|
}
|
|
315
|
+
if (prevProps.columns !== this.props.columns) {
|
|
316
|
+
this.updateTableFixedRows();
|
|
317
|
+
}
|
|
306
318
|
};
|
|
307
319
|
Table.prototype.componentWillUnmount = function () {
|
|
308
320
|
var _this = this;
|
|
@@ -313,6 +325,9 @@ var Table = /** @class */ (function (_super) {
|
|
|
313
325
|
ref.current.removeEventListener('wheel', _this.onWheel.bind(_this));
|
|
314
326
|
});
|
|
315
327
|
this.destroyDragging();
|
|
328
|
+
this.toDispose.forEach(function (fn) { return fn(); });
|
|
329
|
+
this.toDispose = [];
|
|
330
|
+
this.updateTableInfoLazy.cancel();
|
|
316
331
|
};
|
|
317
332
|
Table.prototype.initDragging = function () {
|
|
318
333
|
var _this = this;
|
|
@@ -390,6 +405,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
390
405
|
var children = row.children;
|
|
391
406
|
for (var i = 0; i < children.length; i++) {
|
|
392
407
|
var dom = children[i];
|
|
408
|
+
dom.style.removeProperty('left');
|
|
393
409
|
var fixed = columns[i] ? columns[i].fixed || '' : '';
|
|
394
410
|
if (isFixedLeftColumn(fixed)) {
|
|
395
411
|
dom.style.left =
|
|
@@ -401,6 +417,9 @@ var Table = /** @class */ (function (_super) {
|
|
|
401
417
|
? getAfterRightWidth(children, i, columns) + 'px'
|
|
402
418
|
: '0';
|
|
403
419
|
}
|
|
420
|
+
dom.classList.remove(cx('Table-cell-fix-left-last'));
|
|
421
|
+
dom.classList.remove(cx('Table-cell-fix-right-first'));
|
|
422
|
+
dom.classList.remove(cx('Table-cell-fix-right-first-prev'));
|
|
404
423
|
}
|
|
405
424
|
// 最后一个左fixed的添加样式
|
|
406
425
|
var leftIndex = findLastIndex__default["default"](columns, function (column) {
|
|
@@ -478,18 +497,18 @@ var Table = /** @class */ (function (_super) {
|
|
|
478
497
|
this.updateSummaryFixedRow(children, columns);
|
|
479
498
|
}
|
|
480
499
|
};
|
|
481
|
-
Table.prototype.renderColGroup = function () {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}))
|
|
500
|
+
Table.prototype.renderColGroup = function (showReal) {
|
|
501
|
+
var _a = this.props, scroll = _a.scroll, tableLayout = _a.tableLayout;
|
|
502
|
+
var isFixed = !!((scroll && scroll.x) || tableLayout === 'fixed');
|
|
503
|
+
return (_J$X_(ColGroup["default"], { columns: this.tdColumns, colWidths: this.state.colWidths, isFixed: isFixed, syncTableWidth: this.syncTableWidth, initTableWidth: this.initTableWidth, showReal: showReal }));
|
|
485
504
|
};
|
|
486
505
|
Table.prototype.onResizeMouseDown = function (event, index) {
|
|
487
506
|
// 点击记录起始坐标
|
|
488
507
|
this.resizeStart = event.clientX;
|
|
489
508
|
this.resizeTarget = event.currentTarget;
|
|
490
|
-
var
|
|
509
|
+
var column = this.tdColumns[index];
|
|
491
510
|
this.resizeIndex = index;
|
|
492
|
-
this.resizeWidth = this.state.colWidths[
|
|
511
|
+
this.resizeWidth = this.state.colWidths[column.name].width;
|
|
493
512
|
this.resizeTarget.classList.add('is-resizing');
|
|
494
513
|
document.addEventListener('mousemove', this.onResizeMouseMove);
|
|
495
514
|
document.addEventListener('mouseup', this.onResizeMouseUp);
|
|
@@ -500,18 +519,18 @@ var Table = /** @class */ (function (_super) {
|
|
|
500
519
|
if (this.resizeTarget) {
|
|
501
520
|
// 计算横向移动距离
|
|
502
521
|
var distance = event.clientX - this.resizeStart;
|
|
522
|
+
var column = this.tdColumns[this.resizeIndex];
|
|
503
523
|
var newWidth = 0;
|
|
504
524
|
if (distance > 0) {
|
|
505
525
|
newWidth = this.resizeWidth + distance;
|
|
506
526
|
}
|
|
507
527
|
else {
|
|
508
528
|
// 缩短列
|
|
509
|
-
newWidth = Math.max(this.resizeWidth + distance, DefaultCellWidth,
|
|
529
|
+
newWidth = Math.max(this.resizeWidth + distance, DefaultCellWidth, column.minWidth || 0);
|
|
510
530
|
}
|
|
511
|
-
var extraCount = this.getExtraColumnCount();
|
|
512
531
|
var colWidths = this.state.colWidths;
|
|
513
|
-
colWidths[
|
|
514
|
-
this.setState({ colWidths: tslib.
|
|
532
|
+
colWidths[column.name].width = newWidth;
|
|
533
|
+
this.setState({ colWidths: tslib.__assign({}, colWidths) });
|
|
515
534
|
}
|
|
516
535
|
event && event.stopPropagation();
|
|
517
536
|
};
|
|
@@ -658,7 +677,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
658
677
|
resizable ? (_J$X_("i", { className: cx('Table-thead-resizable'), onMouseDown: function (e) { return _this.onResizeMouseDown(e, cIndex); } })) : null)) : null;
|
|
659
678
|
return (_J$X_(Cell["default"], { wrapperComponent: "th", rowSpan: item.rowSpan, colSpan: item.colSpan, key: "cell-".concat(i), fixed: item.fixed === true ? 'left' : item.fixed, className: cx({
|
|
660
679
|
'Table-cell-last': i === maxCount - 1 && i === data.length - 1
|
|
661
|
-
}), groupId: item.groupId, depth: item.depth, col: cIndex > -1 ? cIndex.toString() : undefined
|
|
680
|
+
}), groupId: item.groupId, depth: item.depth, col: cIndex > -1 ? cIndex.toString() : undefined }, typeof item.title === 'function'
|
|
662
681
|
? item.title(children)
|
|
663
682
|
: item.title));
|
|
664
683
|
}),
|
|
@@ -693,11 +712,11 @@ var Table = /** @class */ (function (_super) {
|
|
|
693
712
|
};
|
|
694
713
|
Table.prototype.onRowMouseEnter = function (event, record, rowIndex) {
|
|
695
714
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
696
|
-
var _a,
|
|
715
|
+
var _a, onRow, itemActions, prevented, target;
|
|
697
716
|
return tslib.__generator(this, function (_b) {
|
|
698
717
|
switch (_b.label) {
|
|
699
718
|
case 0:
|
|
700
|
-
_a = this.props,
|
|
719
|
+
_a = this.props, onRow = _a.onRow, itemActions = _a.itemActions;
|
|
701
720
|
if (!(onRow && onRow.onRowMouseEnter)) return [3 /*break*/, 2];
|
|
702
721
|
return [4 /*yield*/, onRow.onRowMouseEnter(event, record, rowIndex)];
|
|
703
722
|
case 1:
|
|
@@ -707,17 +726,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
707
726
|
}
|
|
708
727
|
_b.label = 2;
|
|
709
728
|
case 2:
|
|
710
|
-
|
|
711
|
-
while (parent && parent.tagName !== 'TR') {
|
|
712
|
-
parent = parent.parentElement;
|
|
713
|
-
}
|
|
714
|
-
if (parent && !parent.classList.contains(cx('Table-row-disabled'))) {
|
|
715
|
-
for (i = 0; i < parent.children.length; i++) {
|
|
716
|
-
td = parent.children[i];
|
|
717
|
-
td.classList.add(cx('Table-cell-row-hover')); // 保证有列fixed的时候样式一致
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
if (record) {
|
|
729
|
+
if (record && itemActions) {
|
|
721
730
|
target = event.target;
|
|
722
731
|
if ((target === null || target === void 0 ? void 0 : target.tagName) !== 'TR') {
|
|
723
732
|
target = target === null || target === void 0 ? void 0 : target.closest('tr');
|
|
@@ -731,37 +740,19 @@ var Table = /** @class */ (function (_super) {
|
|
|
731
740
|
};
|
|
732
741
|
Table.prototype.onRowMouseLeave = function (event, record, rowIndex) {
|
|
733
742
|
return tslib.__awaiter(this, void 0, void 0, function () {
|
|
734
|
-
var
|
|
735
|
-
return tslib.__generator(this, function (
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
case 1:
|
|
742
|
-
prevented = _b.sent();
|
|
743
|
-
if (prevented) {
|
|
744
|
-
return [2 /*return*/];
|
|
745
|
-
}
|
|
746
|
-
_b.label = 2;
|
|
747
|
-
case 2:
|
|
748
|
-
parent = event.target;
|
|
749
|
-
while (parent && parent.tagName !== 'TR') {
|
|
750
|
-
parent = parent.parentElement;
|
|
751
|
-
}
|
|
752
|
-
if (parent) {
|
|
753
|
-
for (i = 0; i < parent.children.length; i++) {
|
|
754
|
-
td = parent.children[i];
|
|
755
|
-
td.classList.remove(cx('Table-cell-row-hover'));
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
return [2 /*return*/];
|
|
759
|
-
}
|
|
743
|
+
var onRow;
|
|
744
|
+
return tslib.__generator(this, function (_a) {
|
|
745
|
+
onRow = this.props.onRow;
|
|
746
|
+
onRow &&
|
|
747
|
+
onRow.onRowMouseLeave &&
|
|
748
|
+
onRow.onRowMouseLeave(event, record, rowIndex);
|
|
749
|
+
return [2 /*return*/];
|
|
760
750
|
});
|
|
761
751
|
});
|
|
762
752
|
};
|
|
763
753
|
Table.prototype.onMouseLeave = function () {
|
|
764
|
-
|
|
754
|
+
var itemActions = this.props.itemActions;
|
|
755
|
+
itemActions && this.setState({ hoverRow: null });
|
|
765
756
|
};
|
|
766
757
|
Table.prototype.onExpandRows = function (data) {
|
|
767
758
|
var _this = this;
|
|
@@ -908,7 +899,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
908
899
|
// 为了支持灵活合并单元格,renderers层的Table2传递的render方法,返回{children: <ReactElement>, props: {rowSpan, colSpan}}
|
|
909
900
|
// 但直接使用amis-ui的table,render方法一般直接返回ReactElement
|
|
910
901
|
var render = item.render && typeof item.render === 'function'
|
|
911
|
-
? item.render(data[item.name], data, rowIndex, i)
|
|
902
|
+
? item.render(data[item.name], data, rowIndex, i, levels)
|
|
912
903
|
: null;
|
|
913
904
|
var props = { rowSpan: 1, colSpan: 1 };
|
|
914
905
|
var children = render;
|
|
@@ -927,7 +918,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
927
918
|
: '';
|
|
928
919
|
return props.rowSpan === 0 || props.colSpan === 0 ? null : (_J$X_(Cell["default"], tslib.__assign({ key: i }, props, { fixed: item.fixed === true ? 'left' : item.fixed, column: item, groupId: item.groupId, className: cx((_a = {},
|
|
929
920
|
_a["".concat(className)] = !!className,
|
|
930
|
-
_a)) }),
|
|
921
|
+
_a)), col: i > -1 ? i.toString() : undefined }),
|
|
931
922
|
_J$X_("div", { className: cx('Table-cell-wrapper', (_b = {},
|
|
932
923
|
_b[cx('Table-cell-wrapper-prefix')] = i === 0 &&
|
|
933
924
|
(!!indentDom || (levels.length === 0 && hasChildrenRow)),
|
|
@@ -1134,19 +1125,21 @@ var Table = /** @class */ (function (_super) {
|
|
|
1134
1125
|
this.updateTableDom(target);
|
|
1135
1126
|
};
|
|
1136
1127
|
Table.prototype.renderTable = function () {
|
|
1137
|
-
var _a = this.props, scroll = _a.scroll, footSummary = _a.footSummary,
|
|
1128
|
+
var _a = this.props, scroll = _a.scroll, footSummary = _a.footSummary, showHeader = _a.showHeader, itemActions = _a.itemActions, tableLayout = _a.tableLayout, cx = _a.classnames;
|
|
1138
1129
|
var hasScrollX = scroll && scroll.x;
|
|
1139
1130
|
var hoverRow = this.state.hoverRow;
|
|
1140
|
-
var tableStyle = hasScrollX
|
|
1131
|
+
var tableStyle = hasScrollX
|
|
1132
|
+
? { width: scroll.x + 'px', tableLayout: 'fixed' }
|
|
1133
|
+
: {};
|
|
1141
1134
|
return (_J$X_("div", { ref: this.contentDom, className: cx('Table-content'), style: hasScrollX ? { overflow: 'auto hidden' } : {}, onMouseLeave: this.onMouseLeave.bind(this), onScroll: this.onTableContentScroll.bind(this) },
|
|
1142
1135
|
itemActions && hoverRow ? (_J$X_(ItemActionsWrapper["default"], { dom: hoverRow.target, classnames: cx }, typeof itemActions === 'function'
|
|
1143
1136
|
? itemActions(hoverRow.record, hoverRow.rowIndex)
|
|
1144
1137
|
: null)) : null,
|
|
1145
|
-
_J$X_("table", { style: tslib.__assign(tslib.__assign({}, tableStyle), { tableLayout: 'fixed' }), className: cx('Table-table') },
|
|
1138
|
+
_J$X_("table", { style: tslib.__assign(tslib.__assign({}, tableStyle), { tableLayout: tableLayout === 'fixed' ? 'fixed' : 'auto' }), className: cx('Table-table') },
|
|
1146
1139
|
this.renderColGroup(),
|
|
1147
1140
|
showHeader ? this.renderTHead() : null,
|
|
1148
1141
|
this.renderTBody(),
|
|
1149
|
-
|
|
1142
|
+
footSummary ? this.renderTFoot() : null)));
|
|
1150
1143
|
};
|
|
1151
1144
|
Table.prototype.renderScrollTableHeader = function () {
|
|
1152
1145
|
var _a;
|
|
@@ -1165,7 +1158,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
1165
1158
|
_a[cx('Table-sticky-holder')] = !!sticky,
|
|
1166
1159
|
_a)), style: style },
|
|
1167
1160
|
_J$X_("table", { className: cx('Table-table'), style: tslib.__assign(tslib.__assign({}, tableStyle), { tableLayout: 'fixed' }) },
|
|
1168
|
-
this.renderColGroup(),
|
|
1161
|
+
this.renderColGroup(true),
|
|
1169
1162
|
showHeader ? this.renderTHead() : null,
|
|
1170
1163
|
headSummary ? (_J$X_("tbody", null, this.renderSummaryRow(headSummary))) : null)));
|
|
1171
1164
|
};
|
|
@@ -1197,31 +1190,76 @@ var Table = /** @class */ (function (_super) {
|
|
|
1197
1190
|
_J$X_("table", { className: cx('Table-table'), style: { width: (scroll === null || scroll === void 0 ? void 0 : scroll.x) + 'px' || '100%', tableLayout: 'fixed' } }, this.renderTFoot())));
|
|
1198
1191
|
};
|
|
1199
1192
|
Table.prototype.renderScrollTable = function () {
|
|
1200
|
-
var _a = this.props, footSummary = _a.footSummary,
|
|
1193
|
+
var _a = this.props, footSummary = _a.footSummary, cx = _a.classnames;
|
|
1201
1194
|
return (_J$X_("div", { className: cx('Table-container') },
|
|
1202
1195
|
this.renderScrollTableHeader(),
|
|
1203
1196
|
this.renderScrollTableBody(),
|
|
1204
|
-
|
|
1197
|
+
footSummary ? this.renderScrollTableFoot() : null));
|
|
1205
1198
|
};
|
|
1206
1199
|
Table.prototype.syncTableWidth = function () {
|
|
1207
1200
|
var _this = this;
|
|
1208
|
-
var
|
|
1201
|
+
var tbodyDom = this.tbodyDom.current;
|
|
1202
|
+
if (!tbodyDom) {
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
var cols = [].slice.call(tbodyDom === null || tbodyDom === void 0 ? void 0 : tbodyDom.querySelectorAll(':scope>tr>td[data-col]'));
|
|
1206
|
+
var colWidths = {};
|
|
1207
|
+
cols.forEach(function (col) {
|
|
1208
|
+
var index = parseInt(col.getAttribute('data-col'), 10);
|
|
1209
|
+
var column = _this.tdColumns[index];
|
|
1210
|
+
var item = _this.state.colWidths[column.name];
|
|
1211
|
+
if (column) {
|
|
1212
|
+
colWidths[column.name] = {
|
|
1213
|
+
width: (item === null || item === void 0 ? void 0 : item.originWidth) !== (column === null || column === void 0 ? void 0 : column.width) ? column === null || column === void 0 ? void 0 : column.width : item === null || item === void 0 ? void 0 : item.width,
|
|
1214
|
+
minWidth: column === null || column === void 0 ? void 0 : column.minWidth,
|
|
1215
|
+
realWidth: col.offsetWidth,
|
|
1216
|
+
originWidth: column === null || column === void 0 ? void 0 : column.width
|
|
1217
|
+
};
|
|
1218
|
+
}
|
|
1219
|
+
});
|
|
1220
|
+
if (!isEqual__default["default"](colWidths, this.state.colWidths)) {
|
|
1221
|
+
this.setState({ colWidths: colWidths });
|
|
1222
|
+
}
|
|
1223
|
+
};
|
|
1224
|
+
Table.prototype.initTableWidth = function () {
|
|
1225
|
+
var _this = this;
|
|
1226
|
+
var _a;
|
|
1209
1227
|
var tableWrapperDom = this.contentDom.current;
|
|
1210
1228
|
if (!tableWrapperDom) {
|
|
1211
1229
|
return;
|
|
1212
1230
|
}
|
|
1231
|
+
var _b = this.props, scroll = _b.scroll, tableLayout = _b.tableLayout;
|
|
1213
1232
|
var table = tableWrapperDom.querySelector('table');
|
|
1214
|
-
var tableWidth = tableWrapperDom.offsetWidth;
|
|
1233
|
+
var tableWidth = scroll && scroll.x ? scroll.x : tableWrapperDom.offsetWidth;
|
|
1215
1234
|
var thead = (_a = this.theadDom) === null || _a === void 0 ? void 0 : _a.current;
|
|
1216
|
-
var
|
|
1235
|
+
var tbody = null;
|
|
1236
|
+
var htmls = [];
|
|
1237
|
+
var isFixed = tableLayout === 'fixed' || (scroll && scroll.x);
|
|
1238
|
+
var someSettedWidth = this.tdColumns.some(function (column) { return column.width; });
|
|
1239
|
+
var minWidths = {};
|
|
1240
|
+
// fixed 模式需要参考 auto 获得列最小宽度
|
|
1241
|
+
if (isFixed) {
|
|
1242
|
+
tbody = (table === null || table === void 0 ? void 0 : table.querySelector(':scope>tbody')) || null;
|
|
1243
|
+
htmls.push("<table style=\"table-layout:auto!important;width:0!important;min-width:0!important;\" class=\"".concat(table === null || table === void 0 ? void 0 : table.className, "\">").concat(thead === null || thead === void 0 ? void 0 : thead.outerHTML, "</table>"));
|
|
1244
|
+
}
|
|
1245
|
+
if (someSettedWidth || isFixed) {
|
|
1246
|
+
htmls.push("<table style=\"table-layout:auto!important;min-width:".concat(tableWidth, "px!important;width:").concat(tableWidth, "px!important;\" class=\"").concat(table === null || table === void 0 ? void 0 : table.className, "\">").concat(thead ? thead.outerHTML : '').concat(tbody ? "<tbody>".concat(tbody.innerHTML, "</tbody>") : '', "</table>"));
|
|
1247
|
+
}
|
|
1248
|
+
if (!htmls.length) {
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1217
1251
|
var div = document.createElement('div');
|
|
1218
1252
|
div.className = 'amis-scope'; // jssdk 里面 css 会在这一层
|
|
1219
1253
|
div.style.cssText += "visibility: hidden!important;";
|
|
1220
|
-
div.innerHTML =
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1254
|
+
div.innerHTML = htmls.join('');
|
|
1255
|
+
var ths1 = [];
|
|
1256
|
+
var ths2 = [];
|
|
1257
|
+
if (isFixed) {
|
|
1258
|
+
ths1 = [].slice.call(div.querySelectorAll(':scope>table:first-child>thead>tr>th[data-col]'));
|
|
1259
|
+
}
|
|
1260
|
+
if (someSettedWidth || isFixed) {
|
|
1261
|
+
ths2 = [].slice.call(div.querySelectorAll(':scope>table:last-child>thead>tr>th[data-col]'));
|
|
1262
|
+
}
|
|
1225
1263
|
ths1.forEach(function (th) {
|
|
1226
1264
|
th.style.cssText += 'width: 0';
|
|
1227
1265
|
});
|
|
@@ -1234,26 +1272,44 @@ var Table = /** @class */ (function (_super) {
|
|
|
1234
1272
|
: '');
|
|
1235
1273
|
});
|
|
1236
1274
|
document.body.appendChild(div);
|
|
1237
|
-
var
|
|
1275
|
+
var colWidths = {};
|
|
1238
1276
|
ths1.forEach(function (th) {
|
|
1239
|
-
|
|
1277
|
+
var index = parseInt(th.getAttribute('data-col'), 10);
|
|
1278
|
+
var column = _this.tdColumns[index];
|
|
1279
|
+
minWidths[index] = th.clientWidth;
|
|
1280
|
+
if (colWidths[index]) {
|
|
1281
|
+
colWidths[column === null || column === void 0 ? void 0 : column.name].minWidth = th.clientWidth;
|
|
1282
|
+
}
|
|
1283
|
+
else {
|
|
1284
|
+
colWidths[column === null || column === void 0 ? void 0 : column.name] = { minWidth: th.clientWidth };
|
|
1285
|
+
}
|
|
1240
1286
|
});
|
|
1241
|
-
|
|
1242
|
-
|
|
1287
|
+
ths2.forEach(function (col) {
|
|
1288
|
+
var index = parseInt(col.getAttribute('data-col'), 10);
|
|
1243
1289
|
var column = _this.tdColumns[index];
|
|
1244
|
-
|
|
1290
|
+
if (column && (column.width || isFixed)) {
|
|
1291
|
+
var width = Math.max(typeof column.width === 'number' ? column.width : col.clientWidth, minWidths[index] || 0);
|
|
1292
|
+
if (colWidths[column === null || column === void 0 ? void 0 : column.name]) {
|
|
1293
|
+
colWidths[column === null || column === void 0 ? void 0 : column.name].width = width;
|
|
1294
|
+
}
|
|
1295
|
+
else {
|
|
1296
|
+
colWidths[column === null || column === void 0 ? void 0 : column.name] = { width: width };
|
|
1297
|
+
}
|
|
1298
|
+
if (column.width) {
|
|
1299
|
+
colWidths[column === null || column === void 0 ? void 0 : column.name].originWidth = column.width;
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1245
1302
|
});
|
|
1246
|
-
|
|
1303
|
+
if (!isEqual__default["default"](colWidths, this.state.colWidths)) {
|
|
1304
|
+
this.setState({ colWidths: colWidths });
|
|
1305
|
+
}
|
|
1247
1306
|
document.body.removeChild(div);
|
|
1248
1307
|
};
|
|
1249
|
-
Table.prototype.
|
|
1250
|
-
if (!ref) {
|
|
1251
|
-
return;
|
|
1252
|
-
}
|
|
1308
|
+
Table.prototype.updateTableInfo = function () {
|
|
1253
1309
|
if (this.resizeTarget) {
|
|
1254
1310
|
return;
|
|
1255
1311
|
}
|
|
1256
|
-
this.
|
|
1312
|
+
this.initTableWidth();
|
|
1257
1313
|
};
|
|
1258
1314
|
Table.prototype.render = function () {
|
|
1259
1315
|
var _a;
|
|
@@ -1267,7 +1323,6 @@ var Table = /** @class */ (function (_super) {
|
|
|
1267
1323
|
var hasScrollY = scroll && scroll.y;
|
|
1268
1324
|
// 是否设置了横向滚动
|
|
1269
1325
|
var hasScrollX = scroll && scroll.x;
|
|
1270
|
-
var columnWidthReady = this.state.colWidths.length > 0;
|
|
1271
1326
|
return (_J$X_("div", { ref: this.tableDom, className: cx('Table2', className, (_a = {},
|
|
1272
1327
|
_a[cx('Table-scroll-horizontal')] = hasScrollX,
|
|
1273
1328
|
_a[cx("Table-".concat(size))] = size,
|
|
@@ -1276,8 +1331,7 @@ var Table = /** @class */ (function (_super) {
|
|
|
1276
1331
|
_a)) },
|
|
1277
1332
|
title ? (_J$X_("div", { className: cx('Table-title') }, typeof title === 'function' ? title() : title)) : null,
|
|
1278
1333
|
hasScrollY || sticky ? (this.renderScrollTable()) : (_J$X_("div", { className: cx('Table-container') }, this.renderTable())),
|
|
1279
|
-
footer ? (_J$X_("div", { className: cx('Table-footer') }, typeof footer === 'function' ? footer() : footer)) : null
|
|
1280
|
-
columnWidthReady ? null : _J$X_("span", { ref: this.updateTableInfoRef })));
|
|
1334
|
+
footer ? (_J$X_("div", { className: cx('Table-footer') }, typeof footer === 'function' ? footer() : footer)) : null));
|
|
1281
1335
|
};
|
|
1282
1336
|
Table.defaultProps = {
|
|
1283
1337
|
title: '',
|
|
@@ -1286,7 +1340,8 @@ var Table = /** @class */ (function (_super) {
|
|
|
1286
1340
|
columns: [],
|
|
1287
1341
|
indentSize: 15,
|
|
1288
1342
|
placeholder: '暂无数据',
|
|
1289
|
-
showHeader: true
|
|
1343
|
+
showHeader: true,
|
|
1344
|
+
tableLayout: 'auto'
|
|
1290
1345
|
};
|
|
1291
1346
|
tslib.__decorate([
|
|
1292
1347
|
amisCore.autobind,
|
|
@@ -1315,9 +1370,15 @@ var Table = /** @class */ (function (_super) {
|
|
|
1315
1370
|
tslib.__decorate([
|
|
1316
1371
|
amisCore.autobind,
|
|
1317
1372
|
tslib.__metadata("design:type", Function),
|
|
1318
|
-
tslib.__metadata("design:paramtypes", [
|
|
1373
|
+
tslib.__metadata("design:paramtypes", []),
|
|
1374
|
+
tslib.__metadata("design:returntype", void 0)
|
|
1375
|
+
], Table.prototype, "initTableWidth", null);
|
|
1376
|
+
tslib.__decorate([
|
|
1377
|
+
amisCore.autobind,
|
|
1378
|
+
tslib.__metadata("design:type", Function),
|
|
1379
|
+
tslib.__metadata("design:paramtypes", []),
|
|
1319
1380
|
tslib.__metadata("design:returntype", void 0)
|
|
1320
|
-
], Table.prototype, "
|
|
1381
|
+
], Table.prototype, "updateTableInfo", null);
|
|
1321
1382
|
return Table;
|
|
1322
1383
|
}(React__default["default"].PureComponent));
|
|
1323
1384
|
var index = amisCore.themeable(amisCore.localeable(Table));
|
package/lib/hooks/use-touch.js
CHANGED
package/lib/icons/back.svg.js
CHANGED
package/lib/icons/caret.svg.js
CHANGED
package/lib/icons/check.svg.js
CHANGED
package/lib/icons/clock.svg.js
CHANGED
package/lib/icons/close.svg.js
CHANGED