linkmore-design 1.1.27-beta.5 → 1.1.28
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/CHANGELOG.md +1237 -0
- package/dist/Affix/demos/basic.d.ts +0 -1
- package/dist/Alert/demos/basic.d.ts +0 -1
- package/dist/Alert/demos/visible.d.ts +0 -1
- package/dist/Approval/demos/basic.d.ts +0 -1
- package/dist/Avatar/demos/basic.d.ts +0 -1
- package/dist/Badge/SingleNumber.d.ts +0 -1
- package/dist/Badge/demos/basic.d.ts +0 -1
- package/dist/Breadcrumb/demos/basic.d.ts +0 -1
- package/dist/Breadcrumb/demos/basic1.d.ts +0 -1
- package/dist/Button/demos/basic.d.ts +0 -1
- package/dist/Button/demos/disabled.d.ts +0 -1
- package/dist/Button/demos/ghost.d.ts +0 -1
- package/dist/Button/demos/icon.d.ts +0 -1
- package/dist/Button/demos/type.d.ts +0 -1
- package/dist/Calendar/demos/basic.d.ts +0 -1
- package/dist/Card/demos/basic.d.ts +0 -1
- package/dist/Carousel/demos/basic.d.ts +0 -1
- package/dist/Cascader/demos/basic.d.ts +0 -1
- package/dist/Cascader/demos/formItem.d.ts +0 -1
- package/dist/Col/demos/basic.d.ts +0 -1
- package/dist/Collapse/demos/basic.d.ts +0 -1
- package/dist/Comment/demos/basic.d.ts +0 -1
- package/dist/ConfigProvider/demos/componentSize.d.ts +0 -1
- package/dist/CustomTableOption/demos/basic.d.ts +0 -1
- package/dist/DatePicker/PickerButton.d.ts +0 -1
- package/dist/DatePicker/PickerTag.d.ts +0 -1
- package/dist/DatePicker/demos/basic.d.ts +0 -1
- package/dist/Descriptions/demos/basic.d.ts +0 -1
- package/dist/Drawer/demos/basic.d.ts +0 -1
- package/dist/Drawer/demos/button.d.ts +0 -1
- package/dist/Drawer/demos/nested.d.ts +0 -1
- package/dist/Dropdown/demos/basic.d.ts +0 -1
- package/dist/Dropdown/demos/button.d.ts +0 -1
- package/dist/Dropdown/demos/icon.d.ts +0 -1
- package/dist/Dropdown/demos/local.d.ts +0 -1
- package/dist/Dropdown/demos/target.d.ts +0 -1
- package/dist/Empty/demos/basic.d.ts +0 -1
- package/dist/Empty/demos/custom.d.ts +0 -1
- package/dist/Empty/empty.d.ts +0 -1
- package/dist/Empty/simple.d.ts +0 -1
- package/dist/Form/demos/disabled.d.ts +0 -1
- package/dist/Form/demos/drawer1152-triple.d.ts +0 -1
- package/dist/Form/demos/drawer440-double.d.ts +0 -1
- package/dist/Form/demos/drawer440.d.ts +0 -1
- package/dist/Form/demos/drawer720-double.d.ts +0 -1
- package/dist/Form/demos/error-tip.d.ts +0 -1
- package/dist/Form/demos/formlist.d.ts +0 -1
- package/dist/Form/demos/horizontal.d.ts +0 -1
- package/dist/Form/demos/inline.d.ts +0 -1
- package/dist/Form/demos/modal416.d.ts +0 -1
- package/dist/Form/demos/modal552-double.d.ts +0 -1
- package/dist/Form/demos/responsive.d.ts +0 -1
- package/dist/Form/demos/ruleTime.d.ts +0 -1
- package/dist/Form/demos/vertical.d.ts +0 -1
- package/dist/FullScreen/demos/basic.d.ts +0 -1
- package/dist/FullScreen/demos/useInModal.d.ts +0 -1
- package/dist/Grid/demos/basic.d.ts +0 -1
- package/dist/IconFont/index.d.ts +0 -1
- package/dist/Image/demos/basic.d.ts +0 -1
- package/dist/ImageViewer/components/Arrows.d.ts +0 -1
- package/dist/ImageViewer/components/Carousel.d.ts +0 -1
- package/dist/ImageViewer/components/Operate.d.ts +0 -1
- package/dist/ImageViewer/components/Thumb.d.ts +0 -1
- package/dist/Input/demos/after.d.ts +0 -1
- package/dist/Input/demos/base.d.ts +0 -1
- package/dist/Input/demos/basic.d.ts +0 -1
- package/dist/Input/demos/color.d.ts +0 -1
- package/dist/Input/demos/combination.d.ts +0 -1
- package/dist/Input/demos/import.d.ts +0 -1
- package/dist/Input/demos/line.d.ts +0 -1
- package/dist/Input/demos/password.d.ts +0 -1
- package/dist/Input/demos/size.d.ts +0 -1
- package/dist/InputNumber/demos/basic.d.ts +0 -1
- package/dist/InputNumber/demos/format.d.ts +0 -1
- package/dist/InputNumber/demos/price.d.ts +0 -1
- package/dist/InputNumber/demos/status.d.ts +0 -1
- package/dist/InputNumber/demos/suffix.d.ts +0 -1
- package/dist/Layout/demos/basic.d.ts +0 -1
- package/dist/List/demos/basic.d.ts +0 -1
- package/dist/LmDrag/components/DndContainer.d.ts +0 -1
- package/dist/LmDrag/demos/basic.d.ts +0 -1
- package/dist/LmEditTable/DndContainer.d.ts +0 -1
- package/dist/LmEditTable/DragHandle.d.ts +0 -1
- package/dist/LmEditTable/demos/basic.d.ts +0 -1
- package/dist/LmEditTable/demos/colsort.d.ts +0 -1
- package/dist/LmEditTable/demos/group.d.ts +0 -1
- package/dist/LmEditTable/demos/priceTable.d.ts +0 -1
- package/dist/LmEditTable/demos/sinleEdit.d.ts +0 -1
- package/dist/LmEditTable/demos/size.d.ts +0 -1
- package/dist/LmEditTable/sortableBox.d.ts +0 -1
- package/dist/LmEditTable/sortableBoxCol.d.ts +0 -1
- package/dist/LmEditTable/sortableItem.d.ts +0 -1
- package/dist/LmEditTable/sortableItemCol.d.ts +0 -1
- package/dist/LmSelect/GhostSelect.d.ts +0 -1
- package/dist/LmSelect/demos/basic.d.ts +0 -1
- package/dist/LmSelect/demos/checkbox.d.ts +0 -1
- package/dist/LmSelect/demos/ghost.d.ts +0 -1
- package/dist/LmSelect/useCheckboxOptions.d.ts +0 -1
- package/dist/LmTable/components/DndContainer.d.ts +5 -37
- package/dist/LmTable/components/customRenderEmpty.d.ts +0 -1
- package/dist/LmTable/components/inputDataEdit.d.ts +0 -1
- package/dist/LmTable/components/{SortableBox.d.ts → sortableBoxCol.d.ts} +0 -0
- package/dist/LmTable/components/sortableItemCol.d.ts +1 -0
- package/dist/LmTable/components/tableChartsModal.d.ts +0 -1
- package/dist/LmTable/demos/{draggable.d.ts → excelGroup.d.ts} +0 -0
- package/dist/LmTable/expression.d.ts +1 -2
- package/dist/LmTable/hooks/useGroupDataSource.d.ts +2 -1
- package/dist/LmTable/util.d.ts +1 -1
- package/dist/LmUpload/UploadList/ItemPicture.d.ts +0 -1
- package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +0 -1
- package/dist/LmUpload/UploadList/ItemText.d.ts +0 -1
- package/dist/LmUpload/view/index.d.ts +0 -1
- package/dist/LmUpload/wrapper/Upload.d.ts +0 -1
- package/dist/Mentions/demos/basic.d.ts +0 -1
- package/dist/Menu/demos/basic.d.ts +0 -1
- package/dist/Modal/demos/basic.d.ts +0 -1
- package/dist/Modal/demos/info.d.ts +0 -1
- package/dist/Modal/demos/locale.d.ts +0 -1
- package/dist/PageHeader/demos/basic.d.ts +0 -1
- package/dist/Pagination/demos/basic.d.ts +0 -1
- package/dist/Popconfirm/demos/basic.d.ts +0 -1
- package/dist/Popover/demos/basic.d.ts +0 -1
- package/dist/Popover/demos/basic1.d.ts +0 -1
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Progress/demos/basic.d.ts +0 -1
- package/dist/Progress/demos/circle.d.ts +0 -1
- package/dist/Progress/demos/dynamic.d.ts +0 -1
- package/dist/Progress/demos/small.d.ts +0 -1
- package/dist/QuickMenu/demos/basic.d.ts +0 -1
- package/dist/QuickMenu/demos/useInDraw.d.ts +0 -1
- package/dist/Rate/demos/basic.d.ts +0 -1
- package/dist/Result/demos/403.d.ts +0 -1
- package/dist/Result/demos/404.d.ts +0 -1
- package/dist/Result/demos/500.d.ts +0 -1
- package/dist/Result/demos/basic.d.ts +0 -1
- package/dist/Result/demos/customicon.d.ts +0 -1
- package/dist/Result/demos/error.d.ts +0 -1
- package/dist/Result/demos/info.d.ts +0 -1
- package/dist/Result/demos/success.d.ts +0 -1
- package/dist/Result/demos/warning.d.ts +0 -1
- package/dist/Result/noFound.d.ts +0 -1
- package/dist/Result/serverError.d.ts +0 -1
- package/dist/Result/unauthorized.d.ts +0 -1
- package/dist/Row/demos/basic.d.ts +0 -1
- package/dist/Segmented/demos/basic.d.ts +0 -1
- package/dist/Select/demos/basic.d.ts +0 -1
- package/dist/Select/demos/bordered.d.ts +0 -1
- package/dist/Select/demos/formItem.d.ts +0 -1
- package/dist/Skeleton/demos/basic.d.ts +0 -1
- package/dist/Slider/demos/basic.d.ts +0 -1
- package/dist/Space/demos/auto.d.ts +0 -1
- package/dist/Space/demos/basic.d.ts +0 -1
- package/dist/Space/demos/vertical.d.ts +0 -1
- package/dist/Spin/demos/basic.d.ts +0 -1
- package/dist/Spin/demos/size.d.ts +0 -1
- package/dist/Statistic/demos/basic.d.ts +0 -1
- package/dist/Steps/demos/basic.d.ts +0 -1
- package/dist/Switch/demos/basic.d.ts +0 -1
- package/dist/Switch/demos/table.d.ts +0 -1
- package/dist/Table/demos/basic.d.ts +0 -1
- package/dist/Tabs/demos/basic.d.ts +0 -1
- package/dist/Tabs/demos/nobroder.d.ts +0 -1
- package/dist/Tag/demos/CheckableTag.d.ts +0 -1
- package/dist/Tag/demos/ExigencyTag.d.ts +0 -1
- package/dist/Tag/demos/add.d.ts +0 -1
- package/dist/Tag/demos/basic.d.ts +0 -1
- package/dist/Tag/demos/border.d.ts +0 -1
- package/dist/Tag/demos/colors.d.ts +0 -1
- package/dist/Timeline/demos/basic.d.ts +0 -1
- package/dist/Tooltip/demos/basic.d.ts +0 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Transfer/demos/basic.d.ts +0 -1
- package/dist/Tree/demos/basic.d.ts +0 -1
- package/dist/Tree/demos/controlled.d.ts +0 -1
- package/dist/Tree/demos/search.d.ts +0 -1
- package/dist/Tree/demos/sort.d.ts +0 -1
- package/dist/Tree/utils/dropIndicator.d.ts +0 -1
- package/dist/TreeSelect/demos/basic.d.ts +0 -1
- package/dist/TreeSelect/demos/formItem.d.ts +0 -1
- package/dist/Typography/demos/basic.d.ts +0 -1
- package/dist/hooks/useFullscreen/demos/basic.d.ts +0 -1
- package/dist/hooks/useFullscreen/demos/useInModal.d.ts +0 -1
- package/dist/index.umd.css +1224 -650
- package/dist/index.umd.js +205586 -135230
- package/dist/index.umd.min.css +2 -2
- package/dist/index.umd.min.js +52 -24
- package/dist/locale-provider/index.d.ts +2 -2
- package/dist/message/demos/basic.d.ts +0 -1
- package/dist/message/demos/other.d.ts +0 -1
- package/dist/notification/demos/basic.d.ts +0 -1
- package/dist/notification/demos/button.d.ts +0 -1
- package/dist/notification/demos/icon.d.ts +0 -1
- package/dist/variables.css +2 -17
- package/es/Affix/index.js +90 -37
- package/es/Affix/utils.js +13 -6
- package/es/Alert/ErrorBoundary.js +15 -5
- package/es/Alert/index.js +64 -42
- package/es/Approval/handle.js +27 -10
- package/es/Approval/index.js +120 -63
- package/es/Approval/type.js +24 -0
- package/es/Approval/util.js +24 -4
- package/es/AutoComplete/index.js +20 -9
- package/es/Badge/Ribbon.js +16 -9
- package/es/Badge/ScrollNumber.js +28 -17
- package/es/Badge/SingleNumber.d.ts +0 -1
- package/es/Badge/SingleNumber.js +38 -23
- package/es/Badge/index.js +68 -44
- package/es/Badge/utils.js +2 -2
- package/es/Box/body/Item.js +3 -1
- package/es/Box/body/OverflowList.js +2 -2
- package/es/Box/wrapper/BoxContainer.js +12 -8
- package/es/Box/wrapper/BoxRoot.js +7 -5
- package/es/Box/wrapper/reducer.js +4 -2
- package/es/Button/index.js +17 -10
- package/es/ButtonTags/ButtonTags.js +15 -6
- package/es/ButtonTags/index.js +3 -0
- package/es/CardTable/LmCardTable.js +28 -19
- package/es/CardTable/body/TableBody.js +26 -17
- package/es/CardTable/body/TableBodyCell.js +17 -9
- package/es/CardTable/body/TableBodyRow.js +19 -13
- package/es/CardTable/card/PictureTextColumn.js +28 -18
- package/es/CardTable/card/PictureTextRow.js +31 -18
- package/es/CardTable/card/PictureTextRowOperate.js +30 -17
- package/es/CardTable/context.js +5 -0
- package/es/CardTable/empty.js +6 -1
- package/es/CardTable/fns/index.js +36 -22
- package/es/CardTable/footer.js +15 -4
- package/es/CardTable/hooks/usePagination.js +50 -35
- package/es/CardTable/index.js +5 -0
- package/es/CardTable/pager/TablePagination.js +15 -8
- package/es/CardTable/pager/index.js +13 -6
- package/es/CardTable/table/Table.js +6 -2
- package/es/CardTable/table/TableContainer.js +23 -14
- package/es/CardTable/table/TableRoot.js +65 -45
- package/es/CardTable/table/TableWrapper.js +9 -2
- package/es/CardTable/toolbar/ToolBarBottom.js +8 -3
- package/es/CardTable/utils.js +9 -3
- package/es/Cascader/index.js +21 -11
- package/es/Checkbox/index.js +18 -7
- package/es/ConfigProvider/DisabledContext.js +1 -1
- package/es/ConfigProvider/SizeContext.js +1 -1
- package/es/ConfigProvider/context.js +10 -4
- package/es/ConfigProvider/cssVariables.js +25 -16
- package/es/ConfigProvider/defaultRenderEmpty.js +6 -0
- package/es/ConfigProvider/index.js +55 -30
- package/es/CropImg/body/Operate.js +19 -10
- package/es/CropImg/body/index.js +8 -6
- package/es/CropImg/fns/index.js +11 -10
- package/es/CropImg/utils.js +45 -27
- package/es/CropImg/wrapper/Container.js +20 -9
- package/es/CropImg/wrapper/Root.js +16 -13
- package/es/CropImg/wrapper/Wrapper.js +2 -0
- package/es/CropImg/wrapper/reducer.js +9 -5
- package/es/CustomTableOption/cardSort.js +49 -24
- package/es/CustomTableOption/columnsSort.js +56 -22
- package/es/CustomTableOption/filterSort.js +48 -23
- package/es/CustomTableOption/index.js +31 -18
- package/es/CustomerService/components/question.js +20 -3
- package/es/CustomerService/index.js +46 -18
- package/es/DatePicker/PickerButton.d.ts +0 -1
- package/es/DatePicker/PickerTag.d.ts +0 -1
- package/es/DatePicker/generatePicker/generateRangePicker.js +33 -23
- package/es/DatePicker/generatePicker/generateSinglePicker.js +37 -22
- package/es/DatePicker/generatePicker/index.js +25 -12
- package/es/DatePicker/util.js +17 -0
- package/es/Descriptions/Cell.js +17 -11
- package/es/Descriptions/Item.js +1 -0
- package/es/Descriptions/Row.js +31 -24
- package/es/Descriptions/index.js +46 -27
- package/es/Divider/index.js +21 -12
- package/es/Drawer/index.js +11 -4
- package/es/Dropdown/index.js +40 -19
- package/es/EditTable/EditTable.js +171 -75
- package/es/EditTable/index.js +3 -0
- package/es/Empty/empty.js +4 -1
- package/es/Empty/index.js +22 -10
- package/es/Empty/simple.js +4 -1
- package/es/EnlargeImg/index.js +43 -17
- package/es/Filter/Popover.js +65 -29
- package/es/Filter/baseFilter/Popover.js +70 -28
- package/es/Filter/baseFilter/ToggleFilter.js +25 -9
- package/es/Filter/baseFilter/index.js +28 -8
- package/es/Filter/complex/ComplexFilter.js +47 -16
- package/es/Filter/complex/ComplexItem.js +47 -24
- package/es/Filter/components/Checkbox.js +34 -14
- package/es/Filter/components/Date.js +30 -10
- package/es/Filter/components/Input.js +23 -7
- package/es/Filter/components/Select.js +33 -13
- package/es/Filter/components/Tree.js +24 -8
- package/es/Filter/components/header.js +17 -3
- package/es/Filter/components/index.js +6 -0
- package/es/Filter/context.js +4 -0
- package/es/Filter/edit/editFilter.js +78 -41
- package/es/Filter/index.js +43 -21
- package/es/Filter/popContext.js +4 -0
- package/es/Filter/remember.js +41 -18
- package/es/Form/ErrorList.js +22 -16
- package/es/Form/Form.js +49 -27
- package/es/Form/FormItem/ItemHolder.js +42 -26
- package/es/Form/FormItem/index.js +103 -58
- package/es/Form/FormItemInput.js +16 -14
- package/es/Form/FormItemLabel.js +43 -24
- package/es/Form/FormList.js +11 -3
- package/es/Form/FormWrapper.js +4 -0
- package/es/Form/WrapperItem.js +70 -34
- package/es/Form/container.js +25 -12
- package/es/Form/context.js +5 -2
- package/es/Form/hooks/useDebounce.js +4 -3
- package/es/Form/hooks/useForm.js +7 -2
- package/es/Form/hooks/useFormInstance.js +2 -1
- package/es/Form/hooks/useFormItemStatus.js +4 -1
- package/es/Form/hooks/useFrameState.js +8 -3
- package/es/Form/hooks/useItemRef.js +6 -1
- package/es/Form/index.js +2 -0
- package/es/Form/style/index.css +0 -4
- package/es/Form/style/variables.css +0 -4
- package/es/Form/util.js +6 -2
- package/es/FullScreen/index.js +6 -3
- package/es/Grid/col.js +41 -21
- package/es/Grid/hooks/useBreakpoint.js +3 -0
- package/es/Grid/index.js +3 -2
- package/es/Grid/row.js +49 -31
- package/es/Icon/index.js +4 -0
- package/es/IconFont/font/iconfont.js +16 -10
- package/es/IconFont/index.js +4 -1
- package/es/IconSelect/index.js +29 -12
- package/es/ImageViewer/LmImageViewer.js +6 -0
- package/es/ImageViewer/components/Arrows.js +7 -1
- package/es/ImageViewer/components/Carousel.js +15 -13
- package/es/ImageViewer/components/Operate.js +4 -0
- package/es/ImageViewer/components/Thumb.js +10 -3
- package/es/ImageViewer/fns/index.js +26 -17
- package/es/ImageViewer/wrapeer/Container.js +5 -1
- package/es/ImageViewer/wrapeer/Root.js +19 -14
- package/es/ImageViewer/wrapeer/Wrapper.js +5 -1
- package/es/ImageViewer/wrapeer/reducer.js +13 -6
- package/es/Input/index.js +37 -30
- package/es/InputNumber/index.js +17 -9
- package/es/LeftTable/index.js +49 -25
- package/es/LmDrag/LmDrag.js +6 -0
- package/es/LmDrag/components/DndContainer.js +38 -22
- package/es/LmDrag/components/sortableBox.js +5 -4
- package/es/LmDrag/components/sortableItem.js +17 -13
- package/es/LmDrag/wrapper/Root.js +2 -0
- package/es/LmEditTable/DndContainer.js +12 -9
- package/es/LmEditTable/DragHandle.js +6 -4
- package/es/LmEditTable/EditTable.js +323 -158
- package/es/LmEditTable/sortableBox.js +3 -1
- package/es/LmEditTable/sortableBoxCol.js +3 -1
- package/es/LmEditTable/sortableItem.js +16 -9
- package/es/LmEditTable/sortableItemCol.d.ts +0 -1
- package/es/LmEditTable/sortableItemCol.js +14 -8
- package/es/LmEditTable/util.js +10 -2
- package/es/LmFilter/Controls/CheckboxTags.js +12 -2
- package/es/LmFilter/Controls/index.js +24 -10
- package/es/LmFilter/LmFilter.js +14 -4
- package/es/LmFilter/baseFilter/fuzzySearch.js +18 -8
- package/es/LmFilter/baseFilter/index.js +9 -3
- package/es/LmFilter/clearFilter/index.js +9 -2
- package/es/LmFilter/complexFilter/drawer.js +76 -47
- package/es/LmFilter/complexFilter/index.js +14 -2
- package/es/LmFilter/complexFilter/valueDrawer.js +46 -14
- package/es/LmFilter/components/CascaderFilter.js +52 -27
- package/es/LmFilter/components/CheckboxFilter.js +52 -39
- package/es/LmFilter/components/CustomSelectFilter.js +38 -20
- package/es/LmFilter/components/DateFilter.js +39 -23
- package/es/LmFilter/components/DropdownFIlter.js +82 -49
- package/es/LmFilter/components/EmptyFilter.js +5 -0
- package/es/LmFilter/components/InputFilter.js +13 -5
- package/es/LmFilter/components/InputSearchClose.js +22 -10
- package/es/LmFilter/components/SelectFilter.js +37 -21
- package/es/LmFilter/components/index.js +34 -23
- package/es/LmFilter/customFilter/drawer.js +72 -37
- package/es/LmFilter/customFilter/index.js +24 -11
- package/es/LmFilter/customFilter/saveModal.js +36 -12
- package/es/LmFilter/customFilter/valueDrawer.js +45 -14
- package/es/LmFilter/filterFns/index.js +196 -133
- package/es/LmFilter/hooks/index.js +2 -0
- package/es/LmFilter/hooks/useDelayedFn.js +5 -2
- package/es/LmFilter/index.js +3 -0
- package/es/LmFilter/localization.js +1 -2
- package/es/LmFilter/utils.js +47 -21
- package/es/LmFilter/wrapper/Filter.js +13 -4
- package/es/LmFilter/wrapper/FilterContainer.js +5 -1
- package/es/LmFilter/wrapper/FilterRoot.js +62 -40
- package/es/LmFilter/wrapper/FilterWrapper.js +5 -1
- package/es/LmImgList/body/Banner.js +17 -13
- package/es/LmImgList/body/Thumb.js +9 -4
- package/es/LmImgList/fns/index.js +23 -15
- package/es/LmImgList/wrapper/Container.js +13 -9
- package/es/LmImgList/wrapper/Root.js +16 -13
- package/es/LmImgList/wrapper/reducer.js +11 -6
- package/es/LmSelect/GhostSelect.js +150 -99
- package/es/LmSelect/NormalSelect.js +30 -20
- package/es/LmSelect/index.js +7 -1
- package/es/LmSelect/useCheckboxOptions.js +27 -17
- package/es/LmSelect/utils.js +22 -20
- package/es/LmTable/Table.js +525 -416
- package/es/LmTable/VList.js +170 -109
- package/es/LmTable/autosize.js +43 -16
- package/es/LmTable/chartUtil.js +14 -4
- package/es/LmTable/components/DndContainer.d.ts +5 -37
- package/es/LmTable/components/DndContainer.js +30 -630
- package/es/LmTable/components/customRenderEmpty.js +4 -1
- package/es/LmTable/components/inputDataEdit.js +8 -3
- package/es/LmTable/components/sheelTableCell.js +57 -32
- package/{lib/LmTable/components/SortableBox.js → es/LmTable/components/sortableBoxCol.js} +6 -1
- package/es/LmTable/components/sortableItemCol.js +56 -0
- package/es/LmTable/components/tableChartsModal.js +30 -23
- package/es/LmTable/context.js +3 -0
- package/es/LmTable/detectElementResize.js +48 -15
- package/es/LmTable/expression.d.ts +1 -2
- package/es/LmTable/expression.js +19 -75
- package/es/LmTable/hooks/useGroupDataSource.js +29 -2
- package/es/LmTable/hooks/useRowSelectControllableValue.js +20 -6
- package/es/LmTable/index.js +3 -0
- package/es/LmTable/resetConfig.js +8 -8
- package/es/LmTable/style/index.css +2 -13
- package/es/LmTable/style/variables.css +2 -13
- package/es/LmTable/util.js +93 -46
- package/es/LmTable/virTual/VirtualRow.js +26 -14
- package/es/LmTable/virTual/VirtualTable.js +12 -27
- package/es/LmTable/virTual/VirtualWrapper.js +14 -7
- package/es/LmTable/virTual/context.js +13 -4
- package/es/LmUpload/LmUpload.js +17 -11
- package/es/LmUpload/UploadList/ItemPicture.js +9 -8
- package/es/LmUpload/UploadList/ItemPictureCard.js +38 -23
- package/es/LmUpload/UploadList/ItemText.js +7 -5
- package/es/LmUpload/UploadList/RenderItem.js +7 -1
- package/es/LmUpload/UploadList/index.js +19 -11
- package/es/LmUpload/body/Progress.js +2 -0
- package/es/LmUpload/body/UploadCore.js +16 -10
- package/es/LmUpload/body/UploadPicture.js +5 -4
- package/es/LmUpload/components/Crop.js +5 -3
- package/es/LmUpload/components/Preview.js +10 -7
- package/es/LmUpload/fns/index.js +108 -57
- package/es/LmUpload/utils.js +15 -12
- package/es/LmUpload/view/index.js +2 -0
- package/es/LmUpload/wrapper/Upload.js +2 -0
- package/es/LmUpload/wrapper/UploadContainer.js +5 -1
- package/es/LmUpload/wrapper/UploadRoot.js +18 -13
- package/es/LmUpload/wrapper/UploadWrapper.js +2 -0
- package/es/LmUpload/wrapper/reducer.js +11 -6
- package/es/LoadingPage/index.js +7 -1
- package/es/Locale/ku_IQ.js +2 -2
- package/es/Modal/index.js +22 -8
- package/es/PageHeader/index.js +44 -22
- package/es/Pagination/index.js +13 -4
- package/es/Popover/index.d.ts +1 -1
- package/es/Popover/index.js +14 -5
- package/es/QuickMenu/index.js +45 -18
- package/es/Radio/index.js +20 -9
- package/es/Result/index.js +26 -16
- package/es/Result/noFound.js +2 -0
- package/es/Result/serverError.js +2 -0
- package/es/Result/unauthorized.js +2 -0
- package/es/Select/index.js +31 -20
- package/es/Switch/index.js +10 -3
- package/es/Tabs/TabPane.js +2 -0
- package/es/Tabs/hooks/useAnimateConfig.js +3 -0
- package/es/Tabs/hooks/useLegacyItems.js +12 -3
- package/es/Tabs/index.js +27 -15
- package/es/Tabs/index.old.js +11 -4
- package/es/Tag/index.js +13 -5
- package/es/Tooltip/index.d.ts +1 -1
- package/es/Tooltip/index.js +66 -34
- package/es/Tree/DirectoryTree.js +61 -31
- package/es/Tree/Tree.js +21 -14
- package/es/Tree/index.js +5 -1
- package/es/Tree/utils/dictUtil.js +21 -4
- package/es/Tree/utils/dropIndicator.d.ts +0 -1
- package/es/Tree/utils/dropIndicator.js +10 -5
- package/es/Tree/utils/iconUtil.js +13 -2
- package/es/TreeSelect/index.js +24 -15
- package/es/Typography/Base/Ellipsis.js +52 -25
- package/es/Typography/Base/EllipsisTooltip.js +8 -3
- package/es/Typography/Base/index.js +173 -104
- package/es/Typography/Editable.js +34 -21
- package/es/Typography/Link.js +11 -4
- package/es/Typography/Paragraph.js +2 -0
- package/es/Typography/Text.js +9 -1
- package/es/Typography/Title.js +10 -2
- package/es/Typography/Typography.js +23 -11
- package/es/Typography/hooks/useUpdatedEffect.js +1 -0
- package/es/Upload/index.js +6 -2
- package/es/UploadOss/index.js +4 -0
- package/es/UploadOss/uploadBtn.js +54 -32
- package/es/UploadOss/uploadImg.js +86 -58
- package/es/VirtualList/index.js +27 -18
- package/es/_util/colors.js +2 -2
- package/es/_util/domTarget.js +3 -0
- package/es/_util/getDataOrAriaProps.js +1 -0
- package/es/_util/getRenderPropValue.js +3 -0
- package/es/_util/hooks/useFlexGapSupport.js +4 -3
- package/es/_util/hooks/useForceUpdate.js +5 -4
- package/es/_util/motion.js +11 -2
- package/es/_util/placements.js +8 -7
- package/es/_util/responsiveObserve.js +5 -0
- package/es/_util/statusUtils.js +1 -0
- package/es/_util/styleChecker.js +9 -6
- package/es/_util/throttleByAnimationFrame.js +6 -0
- package/es/_util/transButton.js +15 -3
- package/es/_util/type.js +2 -0
- package/es/_util/warning.js +6 -4
- package/es/hooks/useEvent/index.js +7 -6
- package/es/hooks/useFullscreen/index.js +29 -7
- package/es/locale-provider/LocaleReceiver.js +12 -4
- package/es/locale-provider/index.d.ts +2 -2
- package/es/locale-provider/index.js +11 -2
- package/es/message/hooks/useMessage.js +17 -8
- package/es/message/index.js +36 -8
- package/es/notification/hooks/useNotification.js +12 -8
- package/es/notification/index.js +67 -31
- package/es/services/newRequest.js +47 -18
- package/es/services/utils.js +15 -0
- package/es/styles/variables.css +2 -17
- package/lib/Affix/index.js +104 -37
- package/lib/Affix/utils.js +22 -6
- package/lib/Alert/ErrorBoundary.js +21 -5
- package/lib/Alert/index.js +78 -42
- package/lib/Approval/handle.js +37 -10
- package/lib/Approval/index.js +131 -63
- package/lib/Approval/type.js +24 -0
- package/lib/Approval/util.js +30 -4
- package/lib/AutoComplete/index.js +34 -10
- package/lib/Avatar/index.js +4 -0
- package/lib/Badge/Ribbon.js +23 -9
- package/lib/Badge/ScrollNumber.js +35 -17
- package/lib/Badge/SingleNumber.d.ts +0 -1
- package/lib/Badge/SingleNumber.js +43 -23
- package/lib/Badge/index.js +79 -44
- package/lib/Badge/utils.js +2 -0
- package/lib/Box/LmBox.js +5 -0
- package/lib/Box/body/Item.js +7 -1
- package/lib/Box/body/List.js +6 -0
- package/lib/Box/body/OverflowList.js +4 -0
- package/lib/Box/index.js +3 -0
- package/lib/Box/wrapper/BoxContainer.js +19 -8
- package/lib/Box/wrapper/BoxRoot.js +14 -5
- package/lib/Box/wrapper/BoxWrapper.js +5 -0
- package/lib/Box/wrapper/reducer.js +8 -2
- package/lib/Breadcrumb/index.js +4 -0
- package/lib/Button/index.js +25 -10
- package/lib/ButtonTags/ButtonTags.js +15 -6
- package/lib/ButtonTags/index.js +3 -0
- package/lib/Calendar/index.js +4 -0
- package/lib/Card/index.js +4 -0
- package/lib/CardTable/LmCardTable.js +28 -19
- package/lib/CardTable/body/TableBody.js +26 -17
- package/lib/CardTable/body/TableBodyCell.js +17 -9
- package/lib/CardTable/body/TableBodyRow.js +19 -13
- package/lib/CardTable/card/PictureTextColumn.js +28 -18
- package/lib/CardTable/card/PictureTextRow.js +31 -18
- package/lib/CardTable/card/PictureTextRowOperate.js +30 -17
- package/lib/CardTable/context.js +5 -0
- package/lib/CardTable/empty.js +6 -1
- package/lib/CardTable/fns/index.js +36 -22
- package/lib/CardTable/footer.js +15 -4
- package/lib/CardTable/hooks/usePagination.js +50 -35
- package/lib/CardTable/index.js +5 -0
- package/lib/CardTable/pager/TablePagination.js +15 -8
- package/lib/CardTable/pager/index.js +13 -6
- package/lib/CardTable/table/Table.js +6 -2
- package/lib/CardTable/table/TableContainer.js +23 -14
- package/lib/CardTable/table/TableRoot.js +65 -45
- package/lib/CardTable/table/TableWrapper.js +9 -2
- package/lib/CardTable/toolbar/ToolBarBottom.js +8 -3
- package/lib/CardTable/utils.js +9 -3
- package/lib/Carousel/index.js +4 -0
- package/lib/Cascader/index.js +30 -11
- package/lib/Checkbox/index.js +18 -7
- package/lib/Col/index.js +2 -0
- package/lib/Collapse/index.js +4 -0
- package/lib/Comment/index.js +4 -0
- package/lib/ConfigProvider/DisabledContext.js +6 -1
- package/lib/ConfigProvider/SizeContext.js +6 -1
- package/lib/ConfigProvider/context.js +13 -4
- package/lib/ConfigProvider/cssVariables.js +34 -17
- package/lib/ConfigProvider/defaultRenderEmpty.js +12 -0
- package/lib/ConfigProvider/index.js +75 -30
- package/lib/CropImg/LmCropImg.js +5 -0
- package/lib/CropImg/body/Operate.js +23 -10
- package/lib/CropImg/body/index.js +13 -6
- package/lib/CropImg/fns/index.js +12 -8
- package/lib/CropImg/index.js +3 -0
- package/lib/CropImg/utils.js +45 -27
- package/lib/CropImg/wrapper/Container.js +26 -7
- package/lib/CropImg/wrapper/Root.js +24 -13
- package/lib/CropImg/wrapper/Wrapper.js +6 -0
- package/lib/CropImg/wrapper/reducer.js +12 -5
- package/lib/CustomTableOption/cardSort.js +60 -24
- package/lib/CustomTableOption/columnsSort.js +67 -22
- package/lib/CustomTableOption/filterSort.js +59 -23
- package/lib/CustomTableOption/index.js +44 -18
- package/lib/CustomerService/components/question.js +20 -3
- package/lib/CustomerService/index.js +46 -18
- package/lib/DatePicker/PickerButton.d.ts +0 -1
- package/lib/DatePicker/PickerButton.js +4 -0
- package/lib/DatePicker/PickerTag.d.ts +0 -1
- package/lib/DatePicker/PickerTag.js +4 -0
- package/lib/DatePicker/generatePicker/generateRangePicker.js +52 -23
- package/lib/DatePicker/generatePicker/generateSinglePicker.js +56 -22
- package/lib/DatePicker/generatePicker/index.js +33 -12
- package/lib/DatePicker/index.js +6 -0
- package/lib/DatePicker/util.js +20 -0
- package/lib/Descriptions/Cell.js +22 -11
- package/lib/Descriptions/Item.js +2 -0
- package/lib/Descriptions/Row.js +36 -24
- package/lib/Descriptions/index.js +61 -28
- package/lib/Divider/index.js +28 -12
- package/lib/Drawer/index.js +16 -4
- package/lib/Dropdown/index.js +48 -19
- package/lib/EditTable/EditTable.js +171 -75
- package/lib/EditTable/index.js +3 -0
- package/lib/Empty/empty.js +7 -1
- package/lib/Empty/index.js +33 -10
- package/lib/Empty/simple.js +7 -1
- package/lib/EnlargeImg/index.js +43 -17
- package/lib/Filter/Popover.js +65 -29
- package/lib/Filter/baseFilter/Popover.js +70 -28
- package/lib/Filter/baseFilter/ToggleFilter.js +25 -9
- package/lib/Filter/baseFilter/index.js +28 -8
- package/lib/Filter/complex/ComplexFilter.js +47 -16
- package/lib/Filter/complex/ComplexItem.js +47 -24
- package/lib/Filter/components/Checkbox.js +34 -14
- package/lib/Filter/components/Date.js +30 -10
- package/lib/Filter/components/Input.js +23 -7
- package/lib/Filter/components/Select.js +33 -13
- package/lib/Filter/components/Tree.js +24 -8
- package/lib/Filter/components/header.js +17 -3
- package/lib/Filter/components/index.js +6 -0
- package/lib/Filter/context.js +4 -0
- package/lib/Filter/edit/editFilter.js +78 -41
- package/lib/Filter/index.js +43 -21
- package/lib/Filter/popContext.js +4 -0
- package/lib/Filter/remember.js +41 -18
- package/lib/Form/ErrorList.js +34 -16
- package/lib/Form/Form.js +62 -27
- package/lib/Form/FormItem/ItemHolder.js +60 -26
- package/lib/Form/FormItem/index.js +122 -58
- package/lib/Form/FormItemInput.js +23 -14
- package/lib/Form/FormItemLabel.js +55 -24
- package/lib/Form/FormList.js +18 -3
- package/lib/Form/FormWrapper.js +8 -0
- package/lib/Form/WrapperItem.js +79 -34
- package/lib/Form/container.js +32 -12
- package/lib/Form/context.js +15 -2
- package/lib/Form/hooks/useDebounce.js +9 -3
- package/lib/Form/hooks/useForm.js +14 -2
- package/lib/Form/hooks/useFormInstance.js +5 -1
- package/lib/Form/hooks/useFormItemStatus.js +8 -1
- package/lib/Form/hooks/useFrameState.js +16 -3
- package/lib/Form/hooks/useItemRef.js +13 -1
- package/lib/Form/index.js +13 -0
- package/lib/Form/style/index.css +0 -4
- package/lib/Form/style/variables.css +0 -4
- package/lib/Form/util.js +9 -2
- package/lib/FullScreen/index.js +10 -3
- package/lib/Grid/RowContext.js +2 -0
- package/lib/Grid/col.js +48 -21
- package/lib/Grid/hooks/useBreakpoint.js +8 -0
- package/lib/Grid/index.js +7 -0
- package/lib/Grid/row.js +62 -31
- package/lib/Icon/index.js +4 -0
- package/lib/IconFont/font/iconfont.js +16 -10
- package/lib/IconFont/index.js +11 -1
- package/lib/IconSelect/index.js +29 -12
- package/lib/Image/index.js +4 -0
- package/lib/ImageViewer/LmImageViewer.js +11 -0
- package/lib/ImageViewer/components/Arrows.js +10 -1
- package/lib/ImageViewer/components/Carousel.js +18 -13
- package/lib/ImageViewer/components/Operate.js +7 -0
- package/lib/ImageViewer/components/Thumb.js +15 -3
- package/lib/ImageViewer/fns/index.js +27 -17
- package/lib/ImageViewer/index.js +3 -0
- package/lib/ImageViewer/wrapeer/Container.js +12 -2
- package/lib/ImageViewer/wrapeer/Root.js +27 -15
- package/lib/ImageViewer/wrapeer/Wrapper.js +9 -2
- package/lib/ImageViewer/wrapeer/reducer.js +16 -6
- package/lib/Input/index.js +49 -30
- package/lib/InputNumber/index.js +26 -9
- package/lib/Layout/index.js +4 -0
- package/lib/LeftTable/index.js +49 -25
- package/lib/List/index.js +4 -0
- package/lib/LmDrag/LmDrag.js +11 -0
- package/lib/LmDrag/components/DndContainer.js +47 -22
- package/lib/LmDrag/components/sortableBox.js +9 -2
- package/lib/LmDrag/components/sortableItem.js +22 -13
- package/lib/LmDrag/index.js +3 -0
- package/lib/LmDrag/wrapper/Root.js +7 -0
- package/lib/LmEditTable/DndContainer.js +16 -7
- package/lib/LmEditTable/DragHandle.js +12 -4
- package/lib/LmEditTable/EditTable.js +348 -158
- package/lib/LmEditTable/index.js +3 -0
- package/lib/LmEditTable/sortableBox.js +6 -1
- package/lib/LmEditTable/sortableBoxCol.js +6 -1
- package/lib/LmEditTable/sortableItem.js +20 -9
- package/lib/LmEditTable/sortableItemCol.d.ts +0 -1
- package/lib/LmEditTable/sortableItemCol.js +20 -8
- package/lib/LmEditTable/util.js +19 -2
- package/lib/LmFilter/Controls/CheckboxTags.js +12 -2
- package/lib/LmFilter/Controls/index.js +24 -10
- package/lib/LmFilter/LmFilter.js +14 -4
- package/lib/LmFilter/baseFilter/fuzzySearch.js +18 -8
- package/lib/LmFilter/baseFilter/index.js +9 -3
- package/lib/LmFilter/clearFilter/index.js +9 -2
- package/lib/LmFilter/complexFilter/drawer.js +76 -47
- package/lib/LmFilter/complexFilter/index.js +14 -2
- package/lib/LmFilter/complexFilter/valueDrawer.js +46 -14
- package/lib/LmFilter/components/CascaderFilter.js +52 -27
- package/lib/LmFilter/components/CheckboxFilter.js +52 -39
- package/lib/LmFilter/components/CustomSelectFilter.js +38 -20
- package/lib/LmFilter/components/DateFilter.js +39 -23
- package/lib/LmFilter/components/DropdownFIlter.js +82 -49
- package/lib/LmFilter/components/EmptyFilter.js +5 -0
- package/lib/LmFilter/components/InputFilter.js +13 -5
- package/lib/LmFilter/components/InputSearchClose.js +22 -10
- package/lib/LmFilter/components/SelectFilter.js +37 -21
- package/lib/LmFilter/components/index.js +34 -23
- package/lib/LmFilter/customFilter/drawer.js +72 -37
- package/lib/LmFilter/customFilter/index.js +24 -11
- package/lib/LmFilter/customFilter/saveModal.js +36 -12
- package/lib/LmFilter/customFilter/valueDrawer.js +45 -14
- package/lib/LmFilter/filterFns/index.js +202 -131
- package/lib/LmFilter/hooks/index.js +2 -0
- package/lib/LmFilter/hooks/useDelayedFn.js +5 -2
- package/lib/LmFilter/index.js +3 -0
- package/lib/LmFilter/localization.js +1 -2
- package/lib/LmFilter/utils.js +47 -21
- package/lib/LmFilter/wrapper/Filter.js +13 -4
- package/lib/LmFilter/wrapper/FilterContainer.js +5 -1
- package/lib/LmFilter/wrapper/FilterRoot.js +62 -40
- package/lib/LmFilter/wrapper/FilterWrapper.js +5 -1
- package/lib/LmImgList/LmImgList.js +5 -0
- package/lib/LmImgList/body/Banner.js +22 -13
- package/lib/LmImgList/body/Thumb.js +16 -4
- package/lib/LmImgList/fns/index.js +24 -15
- package/lib/LmImgList/index.js +4 -0
- package/lib/LmImgList/wrapper/Container.js +21 -9
- package/lib/LmImgList/wrapper/Root.js +24 -13
- package/lib/LmImgList/wrapper/Wrapper.js +5 -0
- package/lib/LmImgList/wrapper/reducer.js +14 -6
- package/lib/LmSelect/GhostSelect.js +163 -99
- package/lib/LmSelect/NormalSelect.js +40 -20
- package/lib/LmSelect/index.js +14 -1
- package/lib/LmSelect/useCheckboxOptions.js +37 -17
- package/lib/LmSelect/utils.js +38 -18
- package/lib/LmTable/Table.js +525 -416
- package/lib/LmTable/VList.js +170 -109
- package/lib/LmTable/autosize.js +43 -16
- package/lib/LmTable/chartUtil.js +14 -4
- package/lib/LmTable/components/DndContainer.d.ts +5 -37
- package/lib/LmTable/components/DndContainer.js +36 -628
- package/lib/LmTable/components/customRenderEmpty.js +8 -1
- package/lib/LmTable/components/inputDataEdit.js +11 -3
- package/lib/LmTable/components/sheelTableCell.js +65 -32
- package/{es/LmTable/components/SortableBox.js → lib/LmTable/components/sortableBoxCol.js} +6 -1
- package/lib/LmTable/components/sortableItemCol.js +56 -0
- package/lib/LmTable/components/tableChartsModal.js +26 -12
- package/lib/LmTable/context.js +3 -0
- package/lib/LmTable/detectElementResize.js +48 -15
- package/lib/LmTable/expression.d.ts +1 -2
- package/lib/LmTable/expression.js +23 -78
- package/lib/LmTable/hooks/useGroupDataSource.js +29 -2
- package/lib/LmTable/hooks/useRowSelectControllableValue.js +20 -6
- package/lib/LmTable/index.js +3 -0
- package/lib/LmTable/resetConfig.js +8 -8
- package/lib/LmTable/style/index.css +2 -13
- package/lib/LmTable/style/variables.css +2 -13
- package/lib/LmTable/util.js +93 -46
- package/lib/LmTable/virTual/VirtualRow.js +31 -14
- package/lib/LmTable/virTual/VirtualTable.js +20 -27
- package/lib/LmTable/virTual/VirtualWrapper.js +19 -7
- package/lib/LmTable/virTual/context.js +13 -2
- package/lib/LmTable/virTual/index.js +4 -0
- package/lib/LmUpload/LmUpload.js +25 -11
- package/lib/LmUpload/UploadList/ItemPicture.js +13 -6
- package/lib/LmUpload/UploadList/ItemPictureCard.js +44 -23
- package/lib/LmUpload/UploadList/ItemText.js +12 -5
- package/lib/LmUpload/UploadList/RenderItem.js +14 -1
- package/lib/LmUpload/UploadList/index.js +26 -11
- package/lib/LmUpload/body/Progress.js +5 -0
- package/lib/LmUpload/body/UploadCore.js +22 -8
- package/lib/LmUpload/body/UploadPicture.js +10 -2
- package/lib/LmUpload/components/Crop.js +9 -3
- package/lib/LmUpload/components/Preview.js +14 -7
- package/lib/LmUpload/fns/index.js +114 -57
- package/lib/LmUpload/index.js +3 -0
- package/lib/LmUpload/utils.js +24 -10
- package/lib/LmUpload/view/index.js +4 -0
- package/lib/LmUpload/wrapper/Upload.js +6 -1
- package/lib/LmUpload/wrapper/UploadContainer.js +11 -2
- package/lib/LmUpload/wrapper/UploadRoot.js +26 -14
- package/lib/LmUpload/wrapper/UploadWrapper.js +9 -1
- package/lib/LmUpload/wrapper/reducer.js +15 -6
- package/lib/LoadingPage/index.js +7 -1
- package/lib/Locale/ar_EG.js +6 -1
- package/lib/Locale/az_AZ.js +6 -1
- package/lib/Locale/bg_BG.js +6 -0
- package/lib/Locale/bn_BD.js +6 -1
- package/lib/Locale/by_BY.js +6 -1
- package/lib/Locale/ca_ES.js +6 -1
- package/lib/Locale/cs_CZ.js +6 -1
- package/lib/Locale/da_DK.js +6 -0
- package/lib/Locale/de_DE.js +6 -1
- package/lib/Locale/default.js +7 -1
- package/lib/Locale/el_GR.js +6 -0
- package/lib/Locale/en_GB.js +6 -1
- package/lib/Locale/en_US.js +3 -0
- package/lib/Locale/es_ES.js +6 -1
- package/lib/Locale/et_EE.js +6 -1
- package/lib/Locale/fa_IR.js +6 -1
- package/lib/Locale/fi_FI.js +6 -0
- package/lib/Locale/fr_BE.js +6 -0
- package/lib/Locale/fr_CA.js +6 -0
- package/lib/Locale/fr_FR.js +6 -1
- package/lib/Locale/ga_IE.js +6 -1
- package/lib/Locale/gl_ES.js +6 -1
- package/lib/Locale/he_IL.js +6 -1
- package/lib/Locale/hi_IN.js +6 -1
- package/lib/Locale/hr_HR.js +6 -1
- package/lib/Locale/hu_HU.js +6 -0
- package/lib/Locale/id_ID.js +6 -0
- package/lib/Locale/is_IS.js +6 -0
- package/lib/Locale/it_IT.js +6 -0
- package/lib/Locale/ja_JP.js +6 -1
- package/lib/Locale/ka_GE.js +6 -1
- package/lib/Locale/kk_KZ.js +6 -1
- package/lib/Locale/km_KH.js +6 -1
- package/lib/Locale/kmr_IQ.js +6 -0
- package/lib/Locale/kn_IN.js +6 -0
- package/lib/Locale/ko_KR.js +6 -1
- package/lib/Locale/ku_IQ.js +6 -0
- package/lib/Locale/lt_LT.js +6 -1
- package/lib/Locale/lv_LV.js +6 -0
- package/lib/Locale/mk_MK.js +6 -0
- package/lib/Locale/ml_IN.js +6 -1
- package/lib/Locale/mn_MN.js +6 -0
- package/lib/Locale/ms_MY.js +6 -0
- package/lib/Locale/nb_NO.js +6 -1
- package/lib/Locale/ne_NP.js +6 -0
- package/lib/Locale/nl_BE.js +6 -1
- package/lib/Locale/nl_NL.js +6 -1
- package/lib/Locale/pl_PL.js +6 -1
- package/lib/Locale/pt_BR.js +6 -1
- package/lib/Locale/pt_PT.js +6 -0
- package/lib/Locale/ro_RO.js +6 -1
- package/lib/Locale/ru_RU.js +6 -1
- package/lib/Locale/si_LK.js +6 -1
- package/lib/Locale/sk_SK.js +6 -1
- package/lib/Locale/sl_SI.js +6 -0
- package/lib/Locale/sr_RS.js +6 -1
- package/lib/Locale/sv_SE.js +6 -1
- package/lib/Locale/ta_IN.js +6 -0
- package/lib/Locale/th_TH.js +6 -1
- package/lib/Locale/tk_TK.js +6 -1
- package/lib/Locale/tr_TR.js +6 -1
- package/lib/Locale/uk_UA.js +6 -1
- package/lib/Locale/ur_PK.js +6 -1
- package/lib/Locale/vi_VN.js +6 -0
- package/lib/Locale/zh_CN.js +7 -1
- package/lib/Locale/zh_HK.js +6 -1
- package/lib/Locale/zh_TW.js +6 -1
- package/lib/Mentions/index.js +4 -0
- package/lib/Menu/index.js +4 -0
- package/lib/Modal/index.js +33 -8
- package/lib/Modal/locale.js +5 -0
- package/lib/PageHeader/index.js +60 -22
- package/lib/Pagination/index.js +20 -4
- package/lib/Popconfirm/index.js +4 -0
- package/lib/Popover/index.d.ts +1 -1
- package/lib/Popover/index.js +23 -5
- package/lib/Progress/index.js +4 -0
- package/lib/QuickMenu/index.js +54 -18
- package/lib/Radio/index.js +20 -9
- package/lib/Rate/index.js +4 -0
- package/lib/Result/index.js +41 -16
- package/lib/Result/noFound.js +4 -0
- package/lib/Result/serverError.js +4 -0
- package/lib/Result/unauthorized.js +4 -0
- package/lib/Row/index.js +2 -0
- package/lib/Segmented/index.js +4 -0
- package/lib/Select/index.js +41 -20
- package/lib/Skeleton/index.js +4 -0
- package/lib/Slider/index.js +4 -0
- package/lib/Space/index.js +4 -0
- package/lib/Spin/index.js +4 -0
- package/lib/Statistic/index.js +4 -0
- package/lib/Steps/index.js +4 -0
- package/lib/Switch/index.js +15 -3
- package/lib/Table/index.js +4 -0
- package/lib/Tabs/TabPane.js +3 -0
- package/lib/Tabs/hooks/useAnimateConfig.js +8 -0
- package/lib/Tabs/hooks/useLegacyItems.js +17 -3
- package/lib/Tabs/index.js +43 -15
- package/lib/Tabs/index.old.js +17 -4
- package/lib/Tag/index.js +20 -5
- package/lib/TestTable/LmBox.js +3 -0
- package/lib/TestTable/index.js +3 -0
- package/lib/TimePicker/index.js +4 -0
- package/lib/Timeline/index.js +4 -0
- package/lib/Tooltip/index.d.ts +1 -1
- package/lib/Tooltip/index.js +80 -34
- package/lib/Transfer/index.js +4 -0
- package/lib/Tree/DirectoryTree.js +74 -29
- package/lib/Tree/Tree.js +35 -14
- package/lib/Tree/TreeIndex.js +3 -0
- package/lib/Tree/index.js +11 -1
- package/lib/Tree/utils/dictUtil.js +24 -4
- package/lib/Tree/utils/dropIndicator.d.ts +0 -1
- package/lib/Tree/utils/dropIndicator.js +15 -5
- package/lib/Tree/utils/iconUtil.js +25 -2
- package/lib/TreeSelect/index.js +35 -15
- package/lib/Typography/Base/Ellipsis.js +58 -25
- package/lib/Typography/Base/EllipsisTooltip.js +12 -3
- package/lib/Typography/Base/index.js +200 -104
- package/lib/Typography/Editable.js +45 -21
- package/lib/Typography/Link.js +17 -4
- package/lib/Typography/Paragraph.js +7 -0
- package/lib/Typography/Text.js +16 -1
- package/lib/Typography/Title.js +18 -2
- package/lib/Typography/Typography.js +30 -11
- package/lib/Typography/hooks/useMergedConfig.js +5 -0
- package/lib/Typography/hooks/useUpdatedEffect.js +6 -1
- package/lib/Typography/index.js +9 -0
- package/lib/Upload/index.js +13 -2
- package/lib/UploadOss/index.js +4 -0
- package/lib/UploadOss/uploadBtn.js +54 -32
- package/lib/UploadOss/uploadImg.js +86 -58
- package/lib/VirtualList/index.js +27 -18
- package/lib/_util/colors.js +4 -2
- package/lib/_util/domTarget.js +6 -0
- package/lib/_util/getDataOrAriaProps.js +2 -0
- package/lib/_util/getRenderPropValue.js +5 -0
- package/lib/_util/hooks/useFlexGapSupport.js +11 -3
- package/lib/_util/hooks/useForceUpdate.js +10 -4
- package/lib/_util/motion.js +12 -0
- package/lib/_util/placements.js +12 -7
- package/lib/_util/reactNode.js +5 -0
- package/lib/_util/responsiveObserve.js +8 -0
- package/lib/_util/statusUtils.js +9 -0
- package/lib/_util/styleChecker.js +16 -6
- package/lib/_util/throttleByAnimationFrame.js +12 -0
- package/lib/_util/transButton.js +19 -3
- package/lib/_util/type.js +6 -0
- package/lib/_util/warning.js +10 -4
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/useEvent/index.js +7 -4
- package/lib/hooks/useFullscreen/index.js +33 -7
- package/lib/index.js +89 -0
- package/lib/locale-provider/LocaleReceiver.js +20 -4
- package/lib/locale-provider/ar_EG.js +3 -0
- package/lib/locale-provider/az_AZ.js +3 -0
- package/lib/locale-provider/bg_BG.js +3 -0
- package/lib/locale-provider/bn_BD.js +3 -0
- package/lib/locale-provider/by_BY.js +3 -0
- package/lib/locale-provider/ca_ES.js +3 -0
- package/lib/locale-provider/context.js +2 -0
- package/lib/locale-provider/cs_CZ.js +3 -0
- package/lib/locale-provider/da_DK.js +3 -0
- package/lib/locale-provider/de_DE.js +3 -0
- package/lib/locale-provider/default.js +3 -0
- package/lib/locale-provider/el_GR.js +3 -0
- package/lib/locale-provider/en_GB.js +3 -0
- package/lib/locale-provider/en_US.js +3 -0
- package/lib/locale-provider/es_ES.js +3 -0
- package/lib/locale-provider/et_EE.js +3 -0
- package/lib/locale-provider/fa_IR.js +3 -0
- package/lib/locale-provider/fi_FI.js +3 -0
- package/lib/locale-provider/fr_BE.js +3 -0
- package/lib/locale-provider/fr_CA.js +3 -0
- package/lib/locale-provider/fr_FR.js +3 -0
- package/lib/locale-provider/ga_IE.js +3 -0
- package/lib/locale-provider/gl_ES.js +3 -0
- package/lib/locale-provider/he_IL.js +3 -0
- package/lib/locale-provider/hi_IN.js +3 -0
- package/lib/locale-provider/hr_HR.js +3 -0
- package/lib/locale-provider/hu_HU.js +3 -0
- package/lib/locale-provider/hy_AM.js +3 -0
- package/lib/locale-provider/id_ID.js +3 -0
- package/lib/locale-provider/index.d.ts +2 -2
- package/lib/locale-provider/index.js +21 -2
- package/lib/locale-provider/is_IS.js +3 -0
- package/lib/locale-provider/it_IT.js +3 -0
- package/lib/locale-provider/ja_JP.js +3 -0
- package/lib/locale-provider/ka_GE.js +3 -0
- package/lib/locale-provider/kk_KZ.js +3 -0
- package/lib/locale-provider/km_KH.js +3 -0
- package/lib/locale-provider/kmr_IQ.js +3 -0
- package/lib/locale-provider/kn_IN.js +3 -0
- package/lib/locale-provider/ko_KR.js +3 -0
- package/lib/locale-provider/ku_IQ.js +3 -0
- package/lib/locale-provider/lt_LT.js +3 -0
- package/lib/locale-provider/lv_LV.js +3 -0
- package/lib/locale-provider/mk_MK.js +3 -0
- package/lib/locale-provider/ml_IN.js +3 -0
- package/lib/locale-provider/mn_MN.js +3 -0
- package/lib/locale-provider/ms_MY.js +3 -0
- package/lib/locale-provider/nb_NO.js +3 -0
- package/lib/locale-provider/ne_NP.js +3 -0
- package/lib/locale-provider/nl_BE.js +3 -0
- package/lib/locale-provider/nl_NL.js +3 -0
- package/lib/locale-provider/pl_PL.js +3 -0
- package/lib/locale-provider/pt_BR.js +3 -0
- package/lib/locale-provider/pt_PT.js +3 -0
- package/lib/locale-provider/ro_RO.js +3 -0
- package/lib/locale-provider/ru_RU.js +3 -0
- package/lib/locale-provider/si_LK.js +3 -0
- package/lib/locale-provider/sk_SK.js +3 -0
- package/lib/locale-provider/sl_SI.js +3 -0
- package/lib/locale-provider/sr_RS.js +3 -0
- package/lib/locale-provider/sv_SE.js +3 -0
- package/lib/locale-provider/ta_IN.js +3 -0
- package/lib/locale-provider/th_TH.js +3 -0
- package/lib/locale-provider/tk_TK.js +3 -0
- package/lib/locale-provider/tr_TR.js +3 -0
- package/lib/locale-provider/uk_UA.js +3 -0
- package/lib/locale-provider/ur_PK.js +3 -0
- package/lib/locale-provider/vi_VN.js +3 -0
- package/lib/locale-provider/zh_CN.js +3 -0
- package/lib/locale-provider/zh_HK.js +3 -0
- package/lib/locale-provider/zh_TW.js +3 -0
- package/lib/message/hooks/useMessage.js +27 -8
- package/lib/message/index.js +53 -8
- package/lib/notification/hooks/useNotification.js +19 -8
- package/lib/notification/index.js +80 -31
- package/lib/services/newRequest.js +47 -18
- package/lib/services/utils.js +15 -0
- package/lib/styles/variables.css +2 -17
- package/package.json +1 -1
- package/dist/LmTable/common/index.d.ts +0 -10
- package/dist/LmTable/components/CalcExpression.d.ts +0 -9
- package/dist/LmTable/components/Container/Container.d.ts +0 -20
- package/dist/LmTable/components/Container/index.d.ts +0 -2
- package/dist/LmTable/components/HeaderCol.d.ts +0 -1
- package/dist/LmTable/components/Item/Item.d.ts +0 -37
- package/dist/LmTable/components/Item/components/Action/Action.d.ts +0 -10
- package/dist/LmTable/components/Item/components/Action/index.d.ts +0 -2
- package/dist/LmTable/components/Item/components/Handle/index.d.ts +0 -4
- package/dist/LmTable/components/Item/components/Remove/index.d.ts +0 -3
- package/dist/LmTable/components/Item/components/index.d.ts +0 -3
- package/dist/LmTable/components/Item/index.d.ts +0 -2
- package/dist/LmTable/demos/resize.d.ts +0 -2
- package/dist/LmTable/hooks/useDndItems.d.ts +0 -13
- package/dist/LmTable/hooks/useResizeObserver.d.ts +0 -13
- package/dist/LmTable/multipleContainersKeyboardCoordinates.d.ts +0 -3
- package/dist/LmTable/testDemos/group.d.ts +0 -2
- package/es/LmTable/common/index.d.ts +0 -10
- package/es/LmTable/common/index.js +0 -32
- package/es/LmTable/components/CalcExpression.d.ts +0 -9
- package/es/LmTable/components/CalcExpression.js +0 -120
- package/es/LmTable/components/Container/Container.css +0 -94
- package/es/LmTable/components/Container/Container.d.ts +0 -20
- package/es/LmTable/components/Container/Container.js +0 -48
- package/es/LmTable/components/Container/index.d.ts +0 -2
- package/es/LmTable/components/Container/index.js +0 -1
- package/es/LmTable/components/HeaderCol.js +0 -52
- package/es/LmTable/components/Item/Item.css +0 -113
- package/es/LmTable/components/Item/Item.d.ts +0 -37
- package/es/LmTable/components/Item/Item.js +0 -84
- package/es/LmTable/components/Item/components/Action/Action.css +0 -41
- package/es/LmTable/components/Item/components/Action/Action.d.ts +0 -10
- package/es/LmTable/components/Item/components/Action/Action.js +0 -31
- package/es/LmTable/components/Item/components/Action/index.d.ts +0 -2
- package/es/LmTable/components/Item/components/Action/index.js +0 -1
- package/es/LmTable/components/Item/components/Handle/index.d.ts +0 -4
- package/es/LmTable/components/Item/components/Handle/index.js +0 -15
- package/es/LmTable/components/Item/components/Remove/index.d.ts +0 -3
- package/es/LmTable/components/Item/components/Remove/index.js +0 -16
- package/es/LmTable/components/Item/components/index.d.ts +0 -3
- package/es/LmTable/components/Item/components/index.js +0 -3
- package/es/LmTable/components/Item/index.d.ts +0 -2
- package/es/LmTable/components/Item/index.js +0 -2
- package/es/LmTable/hooks/useDndItems.d.ts +0 -13
- package/es/LmTable/hooks/useDndItems.js +0 -193
- package/es/LmTable/hooks/useResizeObserver.d.ts +0 -13
- package/es/LmTable/hooks/useResizeObserver.js +0 -44
- package/es/LmTable/multipleContainersKeyboardCoordinates.d.ts +0 -3
- package/es/LmTable/multipleContainersKeyboardCoordinates.js +0 -92
- package/es/LmTable/testDemos/group.js +0 -115
- package/lib/LmTable/common/index.d.ts +0 -10
- package/lib/LmTable/common/index.js +0 -40
- package/lib/LmTable/components/CalcExpression.d.ts +0 -9
- package/lib/LmTable/components/CalcExpression.js +0 -129
- package/lib/LmTable/components/Container/Container.css +0 -94
- package/lib/LmTable/components/Container/Container.d.ts +0 -20
- package/lib/LmTable/components/Container/Container.js +0 -56
- package/lib/LmTable/components/Container/index.d.ts +0 -2
- package/lib/LmTable/components/Container/index.js +0 -12
- package/lib/LmTable/components/HeaderCol.js +0 -52
- package/lib/LmTable/components/Item/Item.css +0 -113
- package/lib/LmTable/components/Item/Item.d.ts +0 -37
- package/lib/LmTable/components/Item/Item.js +0 -92
- package/lib/LmTable/components/Item/components/Action/Action.css +0 -41
- package/lib/LmTable/components/Item/components/Action/Action.d.ts +0 -10
- package/lib/LmTable/components/Item/components/Action/Action.js +0 -40
- package/lib/LmTable/components/Item/components/Action/index.d.ts +0 -2
- package/lib/LmTable/components/Item/components/Action/index.js +0 -12
- package/lib/LmTable/components/Item/components/Handle/index.d.ts +0 -4
- package/lib/LmTable/components/Item/components/Handle/index.js +0 -23
- package/lib/LmTable/components/Item/components/Remove/index.d.ts +0 -3
- package/lib/LmTable/components/Item/components/Remove/index.js +0 -23
- package/lib/LmTable/components/Item/components/index.d.ts +0 -3
- package/lib/LmTable/components/Item/components/index.js +0 -27
- package/lib/LmTable/components/Item/index.d.ts +0 -2
- package/lib/LmTable/components/Item/index.js +0 -31
- package/lib/LmTable/hooks/useDndItems.d.ts +0 -13
- package/lib/LmTable/hooks/useDndItems.js +0 -201
- package/lib/LmTable/hooks/useResizeObserver.d.ts +0 -13
- package/lib/LmTable/hooks/useResizeObserver.js +0 -51
- package/lib/LmTable/multipleContainersKeyboardCoordinates.d.ts +0 -3
- package/lib/LmTable/multipleContainersKeyboardCoordinates.js +0 -99
- package/lib/LmTable/testDemos/group.js +0 -115
package/lib/LmTable/util.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -14,9 +15,13 @@ exports.isSelectCrossRowGroup = isSelectCrossRowGroup;
|
|
|
14
15
|
exports.range = void 0;
|
|
15
16
|
exports.transformWithColGroup = transformWithColGroup;
|
|
16
17
|
exports.transformWithRowGroup = transformWithRowGroup;
|
|
18
|
+
|
|
17
19
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
20
|
+
|
|
18
21
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
22
|
+
|
|
19
23
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
24
|
+
|
|
20
25
|
/**
|
|
21
26
|
* 生成 start 到 end 数字组成的数组
|
|
22
27
|
* @param {number} start
|
|
@@ -26,25 +31,29 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
|
26
31
|
var range = function range(start, end) {
|
|
27
32
|
var array = [];
|
|
28
33
|
var inc = end - start > 0;
|
|
34
|
+
|
|
29
35
|
for (var i = start; inc ? i <= end : i >= end; inc ? i += 1 : i -= 1) {
|
|
30
36
|
inc ? array.push(i) : array.unshift(i);
|
|
31
37
|
}
|
|
38
|
+
|
|
32
39
|
return array;
|
|
33
40
|
};
|
|
34
|
-
|
|
35
41
|
/**
|
|
36
42
|
* 对数据进行分组
|
|
37
43
|
* @param {Array} data
|
|
38
44
|
* @param {string} key
|
|
39
45
|
* @return {Object}
|
|
40
|
-
* 时间复杂度O(n), 空间复杂度O(n)
|
|
41
46
|
*/
|
|
47
|
+
|
|
48
|
+
|
|
42
49
|
exports.range = range;
|
|
50
|
+
|
|
43
51
|
function dataGroup(data, key) {
|
|
44
52
|
var result = {};
|
|
45
53
|
data === null || data === void 0 ? void 0 : data.forEach(function (item) {
|
|
46
54
|
if (item.children) {
|
|
47
55
|
var _Object$keys;
|
|
56
|
+
|
|
48
57
|
var temp = dataGroup(item.children, key);
|
|
49
58
|
(_Object$keys = Object.keys(temp)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.forEach(function (k) {
|
|
50
59
|
if (!result[k]) result[k] = [];
|
|
@@ -64,37 +73,30 @@ function dataGroup(data, key) {
|
|
|
64
73
|
* @param groupColKeys 列分组的keys
|
|
65
74
|
* @returns
|
|
66
75
|
*/
|
|
67
|
-
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
function transformWithColGroup(columns, dataSource, groupColKeys) {
|
|
68
79
|
if (!Array.isArray(groupColKeys) || !groupColKeys.length) {
|
|
69
80
|
return {
|
|
70
81
|
columns: columns,
|
|
71
82
|
dataSource: dataSource
|
|
72
83
|
};
|
|
73
84
|
}
|
|
74
|
-
columns.forEach(function (c) {
|
|
75
|
-
if (groupRowKeys.includes(c.dataIndex)) {
|
|
76
|
-
c.show = false;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
var columnsCopy = _lodash.default.cloneDeep(columns.filter(function (item) {
|
|
80
|
-
return item.joinCol;
|
|
81
|
-
}));
|
|
82
|
-
var unColumns = _lodash.default.cloneDeep(columns.filter(function (item) {
|
|
83
|
-
return !item.joinCol;
|
|
84
|
-
}));
|
|
85
|
-
var dataSourceCopy = _lodash.default.cloneDeep(dataSource);
|
|
86
|
-
|
|
87
|
-
// 去重
|
|
88
|
-
var groupColKeysCopy = (0, _toConsumableArray2.default)(new Set(groupColKeys));
|
|
89
85
|
|
|
86
|
+
var columnsCopy = _lodash.default.cloneDeep(columns);
|
|
87
|
+
|
|
88
|
+
var dataSourceCopy = _lodash.default.cloneDeep(dataSource); // 去重
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
var groupColKeysCopy = (0, _toConsumableArray2.default)(new Set(groupColKeys));
|
|
90
92
|
/**
|
|
91
93
|
* @param {Array} source source数据源,树状结构,行分组会有children子级结构
|
|
92
94
|
* @param {Array} columns 列数据,用于表头,当列分组时会有children子级结构
|
|
93
95
|
* @param {Array<string>} oGroup 数组,列分组的keys值
|
|
94
96
|
* @param {string} markStr
|
|
95
97
|
* @returns
|
|
96
|
-
* 2万条数据 393ms
|
|
97
98
|
*/
|
|
99
|
+
|
|
98
100
|
var groupBy = function groupBy(source, columns, oGroup, markStr) {
|
|
99
101
|
if (!(oGroup === null || oGroup === void 0 ? void 0 : oGroup.length)) {
|
|
100
102
|
// 表头数据的生成,生成新的 dataIndex 值
|
|
@@ -111,10 +113,11 @@ function transformWithColGroup(columns, dataSource, groupColKeys, groupRowKeys)
|
|
|
111
113
|
}));
|
|
112
114
|
});
|
|
113
115
|
return handledColumns;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
// 获取列表的第一个值
|
|
116
|
+
} // 拷贝
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
var group = oGroup.slice(); // 获取列表的第一个值
|
|
120
|
+
|
|
118
121
|
var filterKey = group.shift();
|
|
119
122
|
var map = dataGroup(source, filterKey);
|
|
120
123
|
return Object.keys(map).map(function (item) {
|
|
@@ -126,34 +129,41 @@ function transformWithColGroup(columns, dataSource, groupColKeys, groupRowKeys)
|
|
|
126
129
|
};
|
|
127
130
|
});
|
|
128
131
|
};
|
|
132
|
+
|
|
129
133
|
var tempColumns = groupBy(dataSourceCopy, columnsCopy, groupColKeysCopy, null);
|
|
130
|
-
tempColumns = unColumns.concat(tempColumns);
|
|
131
134
|
var keyMap = new Map();
|
|
132
135
|
var __index = 0;
|
|
136
|
+
|
|
133
137
|
var dataSourceBy = function dataSourceBy(source) {
|
|
134
138
|
return [source.reduce(function (prev, sItem) {
|
|
135
139
|
if (sItem.children && sItem.children.length) {
|
|
136
140
|
sItem.children = dataSourceBy(sItem.children).flat();
|
|
141
|
+
|
|
137
142
|
if (!prev) {
|
|
138
143
|
prev = [];
|
|
139
144
|
}
|
|
145
|
+
|
|
140
146
|
return [].concat((0, _toConsumableArray2.default)(prev), [sItem]);
|
|
141
147
|
} else {
|
|
142
148
|
var _Object$keys2;
|
|
143
|
-
|
|
144
|
-
// 根据筛选条件生成对应的前缀key值,比如[name, age] => 'name_xiaoming_age_18'
|
|
149
|
+
|
|
150
|
+
var str = ''; // 根据筛选条件生成对应的前缀key值,比如[name, age] => 'name_xiaoming_age_18'
|
|
151
|
+
|
|
145
152
|
groupColKeysCopy === null || groupColKeysCopy === void 0 ? void 0 : groupColKeysCopy.forEach(function (dataIndex, i) {
|
|
146
153
|
if (i !== 0) {
|
|
147
154
|
str += '_';
|
|
148
155
|
}
|
|
156
|
+
|
|
149
157
|
str += "".concat(dataIndex, "_").concat(sItem[dataIndex]);
|
|
150
|
-
});
|
|
151
|
-
|
|
158
|
+
}); // 对dataSource的key值进行更改:例如:'name' => 'name_xiaoming_age_18_address'
|
|
159
|
+
|
|
152
160
|
(_Object$keys2 = Object.keys(sItem)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.forEach(function (key) {
|
|
153
161
|
if (key === '__index') {
|
|
154
162
|
return;
|
|
155
163
|
}
|
|
164
|
+
|
|
156
165
|
var newKey = "".concat(str, "_").concat(key);
|
|
166
|
+
|
|
157
167
|
if (keyMap.has(newKey)) {
|
|
158
168
|
var value = keyMap.get(newKey) + 1;
|
|
159
169
|
keyMap.set(newKey, value);
|
|
@@ -162,42 +172,44 @@ function transformWithColGroup(columns, dataSource, groupColKeys, groupRowKeys)
|
|
|
162
172
|
keyMap.set(newKey, 0);
|
|
163
173
|
newKey = "".concat(newKey, "_", 0);
|
|
164
174
|
}
|
|
175
|
+
|
|
165
176
|
sItem[newKey] = sItem[key];
|
|
166
177
|
sItem["".concat(newKey, "_originIndex")] = sItem.__index === undefined ? __index : sItem.__index;
|
|
167
178
|
});
|
|
168
179
|
__index += 1;
|
|
169
180
|
}
|
|
181
|
+
|
|
170
182
|
if (!prev) {
|
|
171
183
|
prev = {};
|
|
172
184
|
}
|
|
185
|
+
|
|
173
186
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, prev), sItem);
|
|
174
187
|
}, null)];
|
|
175
188
|
};
|
|
189
|
+
|
|
176
190
|
var tempDataSource = dataSourceBy(dataSourceCopy).flat();
|
|
177
191
|
return {
|
|
178
192
|
columns: tempColumns,
|
|
179
193
|
dataSource: tempDataSource
|
|
180
194
|
};
|
|
181
195
|
}
|
|
182
|
-
|
|
183
196
|
/**
|
|
184
197
|
* 行分组
|
|
185
198
|
* @param {Array} dataSource 数据源
|
|
186
199
|
* @param {Array} groupRowKeys 行分组的keys
|
|
187
200
|
* @returns
|
|
188
201
|
*/
|
|
202
|
+
|
|
203
|
+
|
|
189
204
|
function transformWithRowGroup(dataSource, groupRowKeys) {
|
|
190
205
|
var groupBy = function groupBy(lastFilter, oGroup, preKey) {
|
|
191
206
|
if (!(oGroup === null || oGroup === void 0 ? void 0 : oGroup.length)) return lastFilter;
|
|
192
207
|
var group = oGroup.slice();
|
|
193
|
-
var filterKey = group.shift();
|
|
194
|
-
|
|
208
|
+
var filterKey = group.shift(); // 记录数据原来的位置索引信息
|
|
209
|
+
|
|
195
210
|
var i = 0;
|
|
196
211
|
var map = lastFilter.reduce(function (acc, el) {
|
|
197
212
|
var value = el[filterKey];
|
|
198
|
-
if (value === undefined) {
|
|
199
|
-
value = '-';
|
|
200
|
-
}
|
|
201
213
|
acc[value] = [].concat((0, _toConsumableArray2.default)(acc[value] || []), [(0, _objectSpread2.default)((0, _objectSpread2.default)({}, el), {}, {
|
|
202
214
|
__index: i
|
|
203
215
|
})]);
|
|
@@ -206,11 +218,13 @@ function transformWithRowGroup(dataSource, groupRowKeys) {
|
|
|
206
218
|
}, {});
|
|
207
219
|
return Object.keys(map).map(function (item) {
|
|
208
220
|
var key;
|
|
221
|
+
|
|
209
222
|
if (preKey) {
|
|
210
223
|
key = "".concat(preKey, "_").concat(filterKey, "_").concat(item);
|
|
211
224
|
} else {
|
|
212
225
|
key = "".concat(filterKey, "_").concat(item);
|
|
213
226
|
}
|
|
227
|
+
|
|
214
228
|
return {
|
|
215
229
|
type: filterKey,
|
|
216
230
|
_group: item,
|
|
@@ -219,8 +233,10 @@ function transformWithRowGroup(dataSource, groupRowKeys) {
|
|
|
219
233
|
};
|
|
220
234
|
});
|
|
221
235
|
};
|
|
236
|
+
|
|
222
237
|
return groupBy(dataSource, groupRowKeys);
|
|
223
238
|
}
|
|
239
|
+
|
|
224
240
|
function checkIsSelectd(i, j) {
|
|
225
241
|
var start = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
226
242
|
var end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
@@ -230,9 +246,10 @@ function checkIsSelectd(i, j) {
|
|
|
230
246
|
var negY = i <= start.i && i >= end.i;
|
|
231
247
|
return posX && posY || negX && posY || negX && negY || posX && negY;
|
|
232
248
|
}
|
|
249
|
+
|
|
233
250
|
function checkStatus(i, j, commiting) {
|
|
234
251
|
var start = commiting.start,
|
|
235
|
-
|
|
252
|
+
end = commiting.end;
|
|
236
253
|
var maxi = Math.max(start === null || start === void 0 ? void 0 : start.i, end.i);
|
|
237
254
|
var mini = Math.min(start === null || start === void 0 ? void 0 : start.i, end.i);
|
|
238
255
|
var maxj = Math.max(start === null || start === void 0 ? void 0 : start.j, end.j);
|
|
@@ -242,7 +259,6 @@ function checkStatus(i, j, commiting) {
|
|
|
242
259
|
isVaildCommit: mini <= i && maxi >= i || minj <= j && maxj >= j
|
|
243
260
|
};
|
|
244
261
|
}
|
|
245
|
-
|
|
246
262
|
/**
|
|
247
263
|
* 获取选中行文本
|
|
248
264
|
* @param {Object}
|
|
@@ -253,10 +269,12 @@ function checkStatus(i, j, commiting) {
|
|
|
253
269
|
* }
|
|
254
270
|
* @returns {Array}
|
|
255
271
|
*/
|
|
272
|
+
|
|
273
|
+
|
|
256
274
|
function getSelectionRowText(_ref) {
|
|
257
275
|
var selection = _ref.selection,
|
|
258
|
-
|
|
259
|
-
|
|
276
|
+
columnsKeysList = _ref.columnsKeysList,
|
|
277
|
+
dataSource = _ref.dataSource;
|
|
260
278
|
var rowtext = range(selection === null || selection === void 0 ? void 0 : selection.start.i, selection === null || selection === void 0 ? void 0 : selection.end.i).map(function (i) {
|
|
261
279
|
return columnsKeysList.map(function (j) {
|
|
262
280
|
var columnKey = j;
|
|
@@ -267,64 +285,75 @@ function getSelectionRowText(_ref) {
|
|
|
267
285
|
});
|
|
268
286
|
return rowtext;
|
|
269
287
|
}
|
|
270
|
-
|
|
271
288
|
/**
|
|
272
289
|
* 获取选中列文本
|
|
273
290
|
* @param {Object}
|
|
274
291
|
* @returns {Array}
|
|
275
292
|
*/
|
|
293
|
+
|
|
294
|
+
|
|
276
295
|
function getSelectionColText(_ref2) {
|
|
277
296
|
var selection = _ref2.selection,
|
|
278
|
-
|
|
279
|
-
|
|
297
|
+
columns = _ref2.columns,
|
|
298
|
+
dataSource = _ref2.dataSource;
|
|
280
299
|
var coltext = range(selection === null || selection === void 0 ? void 0 : selection.start.i, selection === null || selection === void 0 ? void 0 : selection.end.i).map(function (i) {
|
|
281
300
|
return range(selection === null || selection === void 0 ? void 0 : selection.start.j, selection === null || selection === void 0 ? void 0 : selection.end.j).map(function (j) {
|
|
282
301
|
var _columns$j, _columns$j2;
|
|
302
|
+
|
|
283
303
|
var columnKey = (_columns$j = columns[j]) === null || _columns$j === void 0 ? void 0 : _columns$j.dataIndex;
|
|
284
304
|
var dataItem = dataSource[i];
|
|
285
305
|
var cell = dataItem === null || dataItem === void 0 ? void 0 : dataItem[columnKey];
|
|
306
|
+
|
|
286
307
|
if ((_columns$j2 = columns[j]) === null || _columns$j2 === void 0 ? void 0 : _columns$j2.render) {
|
|
287
308
|
var _columns$j3, _columns$j3$render;
|
|
309
|
+
|
|
288
310
|
return (_columns$j3 = columns[j]) === null || _columns$j3 === void 0 ? void 0 : (_columns$j3$render = _columns$j3.render) === null || _columns$j3$render === void 0 ? void 0 : _columns$j3$render.call(_columns$j3, cell, dataItem, i);
|
|
289
311
|
}
|
|
312
|
+
|
|
290
313
|
return cell;
|
|
291
314
|
});
|
|
292
315
|
});
|
|
293
316
|
return coltext;
|
|
294
317
|
}
|
|
295
|
-
|
|
296
318
|
/**
|
|
297
319
|
* 获取key所对应的原始数据的索引
|
|
298
320
|
* @param {Object} {key, dataSource}
|
|
299
321
|
* @returns {number}
|
|
300
322
|
*/
|
|
323
|
+
|
|
324
|
+
|
|
301
325
|
function getDataSourceIndex(_ref3) {
|
|
302
326
|
var key = _ref3.key,
|
|
303
|
-
|
|
304
|
-
|
|
327
|
+
_ref3$dataSource = _ref3.dataSource,
|
|
328
|
+
dataSource = _ref3$dataSource === void 0 ? [] : _ref3$dataSource;
|
|
305
329
|
var index = -1;
|
|
330
|
+
|
|
306
331
|
var dfs = function dfs(arr) {
|
|
307
332
|
if (!Array.isArray(arr)) {
|
|
308
333
|
return;
|
|
309
334
|
}
|
|
335
|
+
|
|
310
336
|
if (index !== -1) {
|
|
311
337
|
return;
|
|
312
338
|
}
|
|
339
|
+
|
|
313
340
|
for (var i = 0; i < arr.length; i += 1) {
|
|
314
341
|
var item = arr[i];
|
|
342
|
+
|
|
315
343
|
if (item["".concat(key, "_originIndex")] !== undefined) {
|
|
316
344
|
index = item["".concat(key, "_originIndex")];
|
|
317
345
|
return;
|
|
318
346
|
}
|
|
347
|
+
|
|
319
348
|
if (item.children) {
|
|
320
349
|
dfs(item.children);
|
|
321
350
|
}
|
|
322
351
|
}
|
|
323
352
|
};
|
|
353
|
+
|
|
324
354
|
dfs(dataSource);
|
|
325
355
|
return index;
|
|
326
356
|
}
|
|
327
|
-
|
|
328
357
|
/**
|
|
329
358
|
* 框选是否跨行分组
|
|
330
359
|
* @param {number} i
|
|
@@ -332,28 +361,36 @@ function getDataSourceIndex(_ref3) {
|
|
|
332
361
|
* @param {React.Ref} deepDataSourceRef
|
|
333
362
|
* @returns
|
|
334
363
|
*/
|
|
364
|
+
|
|
365
|
+
|
|
335
366
|
function isSelectCrossRowGroup(i, shellStatusRef, deepDataSourceRef) {
|
|
336
367
|
var _shellStatusRef$curre;
|
|
368
|
+
|
|
337
369
|
var x;
|
|
338
370
|
var y;
|
|
371
|
+
|
|
339
372
|
if ((shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre = shellStatusRef.current) === null || _shellStatusRef$curre === void 0 ? void 0 : _shellStatusRef$curre.commiting.start.i) < i) {
|
|
340
373
|
var _shellStatusRef$curre2;
|
|
374
|
+
|
|
341
375
|
x = shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre2 = shellStatusRef.current) === null || _shellStatusRef$curre2 === void 0 ? void 0 : _shellStatusRef$curre2.commiting.start.i;
|
|
342
376
|
y = i;
|
|
343
377
|
} else {
|
|
344
378
|
var _shellStatusRef$curre3;
|
|
379
|
+
|
|
345
380
|
x = i;
|
|
346
381
|
y = shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre3 = shellStatusRef.current) === null || _shellStatusRef$curre3 === void 0 ? void 0 : _shellStatusRef$curre3.commiting.start.i;
|
|
347
382
|
}
|
|
383
|
+
|
|
348
384
|
for (; x <= y; x += 1) {
|
|
349
385
|
var _deepDataSourceRef$cu;
|
|
386
|
+
|
|
350
387
|
if ((deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu = deepDataSourceRef.current) === null || _deepDataSourceRef$cu === void 0 ? void 0 : _deepDataSourceRef$cu.length) && (deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current[x]._group)) {
|
|
351
388
|
return true;
|
|
352
389
|
}
|
|
353
390
|
}
|
|
391
|
+
|
|
354
392
|
return false;
|
|
355
393
|
}
|
|
356
|
-
|
|
357
394
|
/**
|
|
358
395
|
* 不允许跨无效列
|
|
359
396
|
* @param {number} i
|
|
@@ -363,27 +400,37 @@ function isSelectCrossRowGroup(i, shellStatusRef, deepDataSourceRef) {
|
|
|
363
400
|
* @param {React.Ref} deepColumnsRef
|
|
364
401
|
* @returns
|
|
365
402
|
*/
|
|
403
|
+
|
|
404
|
+
|
|
366
405
|
function isSelectCrossInvalidCol(i, j, shellStatusRef, deepDataSourceRef, deepColumnsRef) {
|
|
367
406
|
var _shellStatusRef$curre4;
|
|
407
|
+
|
|
368
408
|
var x;
|
|
369
409
|
var y;
|
|
410
|
+
|
|
370
411
|
if ((shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre4 = shellStatusRef.current) === null || _shellStatusRef$curre4 === void 0 ? void 0 : _shellStatusRef$curre4.commiting.start.j) < j) {
|
|
371
412
|
var _shellStatusRef$curre5;
|
|
413
|
+
|
|
372
414
|
x = shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre5 = shellStatusRef.current) === null || _shellStatusRef$curre5 === void 0 ? void 0 : _shellStatusRef$curre5.commiting.start.j;
|
|
373
415
|
y = j;
|
|
374
416
|
} else {
|
|
375
417
|
var _shellStatusRef$curre6;
|
|
418
|
+
|
|
376
419
|
x = j;
|
|
377
420
|
y = shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre6 = shellStatusRef.current) === null || _shellStatusRef$curre6 === void 0 ? void 0 : _shellStatusRef$curre6.commiting.start.j;
|
|
378
421
|
}
|
|
422
|
+
|
|
379
423
|
for (; x <= y; x += 1) {
|
|
380
424
|
var _deepColumnsRef$curre, _deepDataSourceRef$cu2;
|
|
425
|
+
|
|
381
426
|
if ((deepColumnsRef === null || deepColumnsRef === void 0 ? void 0 : (_deepColumnsRef$curre = deepColumnsRef.current) === null || _deepColumnsRef$curre === void 0 ? void 0 : _deepColumnsRef$curre.length) && (deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu2 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu2 === void 0 ? void 0 : _deepDataSourceRef$cu2.length)) {
|
|
382
427
|
var key = deepColumnsRef === null || deepColumnsRef === void 0 ? void 0 : deepColumnsRef.current[x].dataIndex;
|
|
428
|
+
|
|
383
429
|
if (!(key in (deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current[i]))) {
|
|
384
430
|
return true;
|
|
385
431
|
}
|
|
386
432
|
}
|
|
387
433
|
}
|
|
434
|
+
|
|
388
435
|
return false;
|
|
389
436
|
}
|
|
@@ -1,36 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _context = require("./context");
|
|
13
|
+
|
|
10
14
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
11
15
|
var t = {};
|
|
16
|
+
|
|
12
17
|
for (var p in s) {
|
|
13
18
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
14
19
|
}
|
|
20
|
+
|
|
15
21
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
22
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
17
23
|
}
|
|
18
24
|
return t;
|
|
19
25
|
};
|
|
26
|
+
|
|
20
27
|
var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
|
|
21
28
|
var children = _a.children,
|
|
22
|
-
|
|
29
|
+
resetProps = __rest(_a, ["children"]);
|
|
30
|
+
|
|
23
31
|
var _useStore = (0, _context.useStore)(),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
state = _useStore.state,
|
|
33
|
+
dispatch = _useStore.dispatch,
|
|
34
|
+
instance = _useStore.instance;
|
|
35
|
+
|
|
27
36
|
var rowHeight = state.rowHeight,
|
|
28
|
-
|
|
37
|
+
totalLen = state.totalLen;
|
|
29
38
|
var virtualItems = instance.columnVirtual.virtualItems;
|
|
30
|
-
var trRef = (0, _react.useRef)(null);
|
|
31
|
-
|
|
39
|
+
var trRef = (0, _react.useRef)(null); // 列长度
|
|
40
|
+
|
|
32
41
|
var columnsLen = (0, _react.useMemo)(function () {
|
|
33
42
|
var _a;
|
|
43
|
+
|
|
34
44
|
return (_a = children === null || children === void 0 ? void 0 : children.length) !== null && _a !== void 0 ? _a : 0;
|
|
35
45
|
}, [children]);
|
|
36
46
|
(0, _react.useEffect)(function () {
|
|
@@ -44,6 +54,7 @@ var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
|
|
|
44
54
|
(0, _react.useEffect)(function () {
|
|
45
55
|
var initHeight = function initHeight(tempRef) {
|
|
46
56
|
var _a, _b, _c;
|
|
57
|
+
|
|
47
58
|
if (((_a = tempRef === null || tempRef === void 0 ? void 0 : tempRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) && !rowHeight && totalLen) {
|
|
48
59
|
var tempRowHeight = (_c = (_b = tempRef === null || tempRef === void 0 ? void 0 : tempRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) !== null && _c !== void 0 ? _c : 0;
|
|
49
60
|
dispatch({
|
|
@@ -52,20 +63,24 @@ var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
|
|
|
52
63
|
});
|
|
53
64
|
}
|
|
54
65
|
};
|
|
66
|
+
|
|
55
67
|
initHeight(Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef);
|
|
56
|
-
}, [trRef, dispatch, rowHeight, totalLen, ref]);
|
|
57
|
-
|
|
68
|
+
}, [trRef, dispatch, rowHeight, totalLen, ref]); // return {fixedLeft: [], fixedRight: [], columns: []}
|
|
69
|
+
|
|
58
70
|
var fixedColumns = (0, _react.useMemo)(function () {
|
|
59
71
|
return children === null || children === void 0 ? void 0 : children.reduce(function (pre, cur) {
|
|
60
72
|
var _a, _b;
|
|
73
|
+
|
|
61
74
|
if (typeof ((_a = cur.props) === null || _a === void 0 ? void 0 : _a.fixLeft) === 'number') {
|
|
62
75
|
pre.fixedLeft.push(cur);
|
|
63
76
|
return pre;
|
|
64
77
|
}
|
|
78
|
+
|
|
65
79
|
if (typeof ((_b = cur.props) === null || _b === void 0 ? void 0 : _b.fixRight) === 'number') {
|
|
66
80
|
pre.fixedRight.push(cur);
|
|
67
81
|
return pre;
|
|
68
82
|
}
|
|
83
|
+
|
|
69
84
|
pre.columns.push(cur);
|
|
70
85
|
return pre;
|
|
71
86
|
}, {
|
|
@@ -73,16 +88,17 @@ var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
|
|
|
73
88
|
fixedRight: [],
|
|
74
89
|
columns: []
|
|
75
90
|
});
|
|
76
|
-
}, [children]);
|
|
77
|
-
|
|
91
|
+
}, [children]); // 截取非固定列
|
|
92
|
+
|
|
78
93
|
var resetVirtualItems = (0, _react.useMemo)(function () {
|
|
79
94
|
var fixedLeft = fixedColumns.fixedLeft,
|
|
80
|
-
|
|
95
|
+
columns = fixedColumns.columns;
|
|
81
96
|
return virtualItems.slice(fixedLeft.length, fixedLeft.length + columns.length);
|
|
82
|
-
}, [fixedColumns, virtualItems]);
|
|
83
|
-
|
|
97
|
+
}, [fixedColumns, virtualItems]); // 横线单元格合并
|
|
98
|
+
|
|
84
99
|
var colSpan = (0, _react.useMemo)(function () {
|
|
85
100
|
var _a;
|
|
101
|
+
|
|
86
102
|
var startIndex = ((_a = resetVirtualItems === null || resetVirtualItems === void 0 ? void 0 : resetVirtualItems[0]) === null || _a === void 0 ? void 0 : _a.index) || 0;
|
|
87
103
|
return startIndex ? startIndex - fixedColumns.fixedLeft.length : startIndex;
|
|
88
104
|
}, [fixedColumns, resetVirtualItems]);
|
|
@@ -94,5 +110,6 @@ var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
|
|
|
94
110
|
return children[virtualCol.index];
|
|
95
111
|
}), fixedColumns.fixedRight);
|
|
96
112
|
});
|
|
113
|
+
|
|
97
114
|
var _default = VirtualRow;
|
|
98
115
|
exports.default = _default;
|
|
@@ -1,38 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
4
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
5
7
|
Object.defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
8
10
|
exports.default = void 0;
|
|
11
|
+
|
|
9
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
10
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
11
16
|
var _reactVirtual = require("react-virtual");
|
|
12
|
-
|
|
17
|
+
|
|
13
18
|
var _context = require("./context");
|
|
14
|
-
|
|
15
|
-
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
16
|
-
var t = {};
|
|
17
|
-
for (var p in s) {
|
|
18
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
19
|
-
}
|
|
20
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
21
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
19
|
+
|
|
25
20
|
var VirtualTable = /*#__PURE__*/_react.default.memo(function (tableProps) {
|
|
26
21
|
var _a, _b, _c, _d;
|
|
27
|
-
|
|
28
|
-
isEmpty = tableProps.isEmpty,
|
|
29
|
-
rest = __rest(tableProps, ["className", "isEmpty"]);
|
|
22
|
+
|
|
30
23
|
var bodyRef = (0, _react.useRef)(null);
|
|
24
|
+
|
|
31
25
|
var _useRealive = (0, _context.useRealive)(),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
_useRealive2 = (0, _slicedToArray2.default)(_useRealive, 2),
|
|
27
|
+
state = _useRealive2[0],
|
|
28
|
+
dispatch = _useRealive2[1]; // { totalSize, virtualItems }
|
|
29
|
+
|
|
30
|
+
|
|
36
31
|
var rowVirtual = (0, _reactVirtual.useVirtual)({
|
|
37
32
|
size: state.totalLen,
|
|
38
33
|
// 绑定父节点
|
|
@@ -52,8 +47,9 @@ var VirtualTable = /*#__PURE__*/_react.default.memo(function (tableProps) {
|
|
|
52
47
|
},
|
|
53
48
|
estimateSize: _react.default.useCallback(function (i) {
|
|
54
49
|
var _a, _b;
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
|
|
51
|
+
return (_b = (_a = tableProps === null || tableProps === void 0 ? void 0 : tableProps.children[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.colWidths[i];
|
|
52
|
+
}, [(_d = (_c = tableProps.children[0]) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.colWidths]),
|
|
57
53
|
overscan: 5
|
|
58
54
|
});
|
|
59
55
|
var instance = {
|
|
@@ -66,13 +62,10 @@ var VirtualTable = /*#__PURE__*/_react.default.memo(function (tableProps) {
|
|
|
66
62
|
dispatch: dispatch,
|
|
67
63
|
instance: instance
|
|
68
64
|
}
|
|
69
|
-
},
|
|
70
|
-
className: (0, _classnames.default)('lm_virtual_table', className),
|
|
71
|
-
ref: bodyRef
|
|
72
|
-
}, rest), /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(_customRenderEmpty.default, null))))) : /*#__PURE__*/_react.default.createElement("table", Object.assign({
|
|
73
|
-
className: (0, _classnames.default)('lm_virtual_table', className),
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("table", Object.assign({
|
|
74
66
|
ref: bodyRef
|
|
75
|
-
},
|
|
67
|
+
}, tableProps)));
|
|
76
68
|
});
|
|
69
|
+
|
|
77
70
|
var _default = VirtualTable;
|
|
78
71
|
exports.default = _default;
|