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