linkmore-design 1.1.28-alpha.8 → 1.1.29
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/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/Avatar/demos/basic.d.ts +1 -0
- 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/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/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/FormItem/index.d.ts +1 -0
- 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/FullScreen/demos/basic.d.ts +1 -0
- package/dist/FullScreen/demos/useInModal.d.ts +1 -0
- package/dist/Grid/demos/basic.d.ts +1 -0
- 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/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/common/index.d.ts +10 -0
- package/dist/LmTable/components/CalcExpression.d.ts +9 -0
- package/dist/LmTable/components/Container/Container.d.ts +20 -0
- package/dist/LmTable/components/Container/index.d.ts +2 -0
- package/dist/LmTable/components/DndContainer.d.ts +37 -5
- package/dist/LmTable/components/HeaderCol.d.ts +1 -0
- package/dist/LmTable/components/Item/Item.d.ts +37 -0
- package/dist/LmTable/components/Item/components/Action/Action.d.ts +10 -0
- package/dist/LmTable/components/Item/components/Action/index.d.ts +2 -0
- package/dist/LmTable/components/Item/components/Handle/index.d.ts +4 -0
- package/dist/LmTable/components/Item/components/Remove/index.d.ts +3 -0
- package/dist/LmTable/components/Item/components/index.d.ts +3 -0
- package/dist/LmTable/components/Item/index.d.ts +2 -0
- package/dist/LmTable/components/{sortableBoxCol.d.ts → SortableBox.d.ts} +0 -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/LmTable/demos/{excelGroup.d.ts → draggable.d.ts} +0 -0
- package/dist/LmTable/demos/resize.d.ts +2 -0
- package/dist/LmTable/expression.d.ts +2 -1
- package/dist/LmTable/hooks/useDndItems.d.ts +13 -0
- package/dist/LmTable/hooks/useGroupDataSource.d.ts +1 -2
- package/dist/LmTable/hooks/useResizeObserver.d.ts +13 -0
- package/dist/LmTable/multipleContainersKeyboardCoordinates.d.ts +3 -0
- package/dist/LmTable/testDemos/group.d.ts +2 -0
- package/dist/LmTable/util.d.ts +1 -1
- 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/Popover/index.d.ts +1 -1
- 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/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/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/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 +1 -1
- package/dist/Transfer/demos/basic.d.ts +1 -0
- 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/Typography/demos/basic.d.ts +1 -0
- package/dist/hooks/useFullscreen/demos/basic.d.ts +1 -0
- package/dist/hooks/useFullscreen/demos/useInModal.d.ts +1 -0
- package/dist/index.umd.css +662 -1236
- package/dist/index.umd.js +181410 -251887
- package/dist/index.umd.min.css +2 -2
- package/dist/index.umd.min.js +24 -52
- package/dist/locale-provider/index.d.ts +2 -2
- package/dist/message/demos/basic.d.ts +1 -0
- package/dist/message/demos/other.d.ts +1 -0
- 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/variables.css +18 -3
- package/es/Affix/index.js +37 -90
- 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.js +0 -24
- package/es/Approval/util.js +4 -24
- package/es/AutoComplete/index.js +9 -20
- 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.js +1 -1
- package/es/ConfigProvider/SizeContext.js +1 -1
- package/es/ConfigProvider/context.js +4 -10
- package/es/ConfigProvider/cssVariables.js +16 -25
- 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 +18 -31
- 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.js +12 -25
- 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/Dropdown/style/index.css +1 -1
- package/es/Dropdown/style/variables.css +1 -1
- 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.js +27 -49
- package/es/Form/FormItem/ItemHolder.js +26 -42
- package/es/Form/FormItem/index.d.ts +1 -0
- package/es/Form/FormItem/index.js +85 -123
- package/es/Form/FormItemInput.js +14 -16
- 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.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.js +1 -4
- package/es/Form/hooks/useFrameState.js +3 -8
- package/es/Form/hooks/useItemRef.js +1 -6
- package/es/Form/index.js +0 -2
- package/es/Form/style/index.css +4 -0
- package/es/Form/style/variables.css +4 -0
- package/es/Form/util.js +2 -6
- package/es/FullScreen/index.js +3 -6
- 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.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.js +148 -360
- package/es/LmEditTable/components/DraggableContainer.js +6 -12
- package/es/LmEditTable/components/QuickOpetate.js +8 -13
- 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 +442 -537
- 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.d.ts +10 -0
- package/es/LmTable/common/index.js +32 -0
- package/es/LmTable/components/CalcExpression.d.ts +9 -0
- package/es/LmTable/components/CalcExpression.js +131 -0
- package/es/LmTable/components/Container/Container.css +94 -0
- package/es/LmTable/components/Container/Container.d.ts +20 -0
- package/es/LmTable/components/Container/Container.js +48 -0
- package/es/LmTable/components/Container/index.d.ts +2 -0
- package/es/LmTable/components/Container/index.js +1 -0
- package/es/LmTable/components/DndContainer.d.ts +37 -5
- package/es/LmTable/components/DndContainer.js +630 -30
- package/es/LmTable/components/HeaderCol.js +52 -0
- package/es/LmTable/components/Item/Item.css +113 -0
- package/es/LmTable/components/Item/Item.d.ts +37 -0
- package/es/LmTable/components/Item/Item.js +84 -0
- package/es/LmTable/components/Item/components/Action/Action.css +41 -0
- package/es/LmTable/components/Item/components/Action/Action.d.ts +10 -0
- package/es/LmTable/components/Item/components/Action/Action.js +31 -0
- package/es/LmTable/components/Item/components/Action/index.d.ts +2 -0
- package/es/LmTable/components/Item/components/Action/index.js +1 -0
- package/es/LmTable/components/Item/components/Handle/index.d.ts +4 -0
- package/es/LmTable/components/Item/components/Handle/index.js +15 -0
- package/es/LmTable/components/Item/components/Remove/index.d.ts +3 -0
- package/es/LmTable/components/Item/components/Remove/index.js +16 -0
- package/es/LmTable/components/Item/components/index.d.ts +3 -0
- package/es/LmTable/components/Item/components/index.js +3 -0
- package/es/LmTable/components/Item/index.d.ts +2 -0
- package/es/LmTable/components/Item/index.js +2 -0
- package/es/LmTable/components/{sortableBoxCol.js → 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.d.ts +2 -1
- package/es/LmTable/expression.js +75 -19
- package/es/LmTable/hooks/useDndItems.d.ts +13 -0
- package/es/LmTable/hooks/useDndItems.js +193 -0
- package/es/LmTable/hooks/useGroupDataSource.js +2 -29
- package/es/LmTable/hooks/useResizeObserver.d.ts +13 -0
- package/es/LmTable/hooks/useResizeObserver.js +44 -0
- package/es/LmTable/hooks/useRowSelectControllableValue.js +6 -20
- package/es/LmTable/index.js +0 -3
- package/es/LmTable/multipleContainersKeyboardCoordinates.d.ts +3 -0
- package/es/LmTable/multipleContainersKeyboardCoordinates.js +92 -0
- package/es/LmTable/resetConfig.js +8 -8
- package/es/LmTable/style/index.css +13 -2
- package/es/LmTable/style/variables.css +13 -2
- package/es/LmTable/testDemos/group.js +115 -0
- package/es/LmTable/util.js +46 -93
- package/es/LmTable/virTual/VirtualRow.js +25 -42
- package/es/LmTable/virTual/VirtualTable.js +31 -16
- 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 +8 -22
- package/es/PageHeader/index.js +22 -44
- package/es/Pagination/index.js +4 -13
- package/es/Popover/index.d.ts +1 -1
- 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.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.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.js +15 -27
- package/es/Tabs/index.old.js +4 -11
- package/es/Tag/index.js +5 -13
- package/es/Tooltip/index.d.ts +1 -1
- package/es/Tooltip/index.js +34 -66
- package/es/Tree/DirectoryTree.js +31 -61
- 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.js +15 -24
- package/es/Typography/Base/Ellipsis.js +25 -52
- package/es/Typography/Base/EllipsisTooltip.js +3 -8
- 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.js +2 -10
- package/es/Typography/Typography.js +11 -23
- package/es/Typography/hooks/useUpdatedEffect.js +0 -1
- 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.js +2 -2
- package/es/_util/domTarget.js +0 -3
- package/es/_util/getDataOrAriaProps.js +0 -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.js +2 -11
- package/es/_util/placements.js +7 -8
- package/es/_util/responsiveObserve.js +0 -5
- 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.js +0 -2
- package/es/_util/warning.js +4 -6
- package/es/hooks/useEvent/index.js +6 -7
- package/es/hooks/useFullscreen/index.js +7 -29
- package/es/locale-provider/LocaleReceiver.js +4 -12
- package/es/locale-provider/index.d.ts +2 -2
- package/es/locale-provider/index.js +2 -11
- package/es/message/hooks/useMessage.js +8 -17
- package/es/message/index.js +8 -36
- package/es/notification/hooks/useNotification.js +8 -12
- package/es/notification/index.js +31 -67
- package/es/services/newRequest.js +18 -47
- package/es/services/utils.js +0 -15
- package/es/styles/variables.css +18 -3
- package/lib/Affix/index.js +37 -104
- 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.js +0 -24
- package/lib/Approval/util.js +4 -30
- package/lib/AutoComplete/index.js +10 -34
- package/lib/Avatar/index.js +0 -4
- 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.js +1 -6
- package/lib/ConfigProvider/SizeContext.js +1 -6
- package/lib/ConfigProvider/context.js +4 -13
- package/lib/ConfigProvider/cssVariables.js +17 -34
- 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 +18 -44
- 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.js +12 -33
- 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/Dropdown/style/index.css +1 -1
- package/lib/Dropdown/style/variables.css +1 -1
- 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.js +27 -62
- package/lib/Form/FormItem/ItemHolder.js +26 -60
- package/lib/Form/FormItem/index.d.ts +1 -0
- package/lib/Form/FormItem/index.js +85 -142
- package/lib/Form/FormItemInput.js +14 -23
- 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.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.js +1 -8
- package/lib/Form/hooks/useFrameState.js +3 -16
- package/lib/Form/hooks/useItemRef.js +1 -13
- package/lib/Form/index.js +0 -13
- package/lib/Form/style/index.css +4 -0
- package/lib/Form/style/variables.css +4 -0
- 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.js +21 -48
- package/lib/Grid/hooks/useBreakpoint.js +0 -8
- package/lib/Grid/index.js +0 -7
- 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.js +148 -387
- package/lib/LmEditTable/components/DraggableContainer.js +6 -17
- package/lib/LmEditTable/components/QuickOpetate.js +8 -19
- 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 +442 -537
- 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.d.ts +10 -0
- package/lib/LmTable/common/index.js +40 -0
- package/lib/LmTable/components/CalcExpression.d.ts +9 -0
- package/lib/LmTable/components/CalcExpression.js +140 -0
- package/lib/LmTable/components/Container/Container.css +94 -0
- package/lib/LmTable/components/Container/Container.d.ts +20 -0
- package/lib/LmTable/components/Container/Container.js +56 -0
- package/lib/LmTable/components/Container/index.d.ts +2 -0
- package/lib/LmTable/components/Container/index.js +12 -0
- package/lib/LmTable/components/DndContainer.d.ts +37 -5
- package/lib/LmTable/components/DndContainer.js +628 -36
- package/lib/LmTable/components/HeaderCol.js +52 -0
- package/lib/LmTable/components/Item/Item.css +113 -0
- package/lib/LmTable/components/Item/Item.d.ts +37 -0
- package/lib/LmTable/components/Item/Item.js +92 -0
- package/lib/LmTable/components/Item/components/Action/Action.css +41 -0
- package/lib/LmTable/components/Item/components/Action/Action.d.ts +10 -0
- package/lib/LmTable/components/Item/components/Action/Action.js +40 -0
- package/lib/LmTable/components/Item/components/Action/index.d.ts +2 -0
- package/lib/LmTable/components/Item/components/Action/index.js +12 -0
- package/lib/LmTable/components/Item/components/Handle/index.d.ts +4 -0
- package/lib/LmTable/components/Item/components/Handle/index.js +23 -0
- package/lib/LmTable/components/Item/components/Remove/index.d.ts +3 -0
- package/lib/LmTable/components/Item/components/Remove/index.js +23 -0
- package/lib/LmTable/components/Item/components/index.d.ts +3 -0
- package/lib/LmTable/components/Item/components/index.js +27 -0
- package/lib/LmTable/components/Item/index.d.ts +2 -0
- package/lib/LmTable/components/Item/index.js +31 -0
- package/lib/LmTable/components/{sortableBoxCol.js → 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.d.ts +2 -1
- package/lib/LmTable/expression.js +78 -23
- package/lib/LmTable/hooks/useDndItems.d.ts +13 -0
- package/lib/LmTable/hooks/useDndItems.js +201 -0
- package/lib/LmTable/hooks/useGroupDataSource.js +2 -29
- package/lib/LmTable/hooks/useResizeObserver.d.ts +13 -0
- package/lib/LmTable/hooks/useResizeObserver.js +51 -0
- package/lib/LmTable/hooks/useRowSelectControllableValue.js +6 -20
- package/lib/LmTable/index.js +0 -3
- package/lib/LmTable/multipleContainersKeyboardCoordinates.d.ts +3 -0
- package/lib/LmTable/multipleContainersKeyboardCoordinates.js +99 -0
- package/lib/LmTable/resetConfig.js +8 -8
- package/lib/LmTable/style/index.css +13 -2
- package/lib/LmTable/style/variables.css +13 -2
- package/lib/LmTable/testDemos/group.js +115 -0
- package/lib/LmTable/util.js +46 -93
- package/lib/LmTable/virTual/VirtualRow.js +25 -46
- package/lib/LmTable/virTual/VirtualTable.js +31 -24
- 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 +8 -33
- 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.d.ts +1 -1
- 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.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.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.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 +1 -1
- package/lib/Tooltip/index.js +34 -80
- package/lib/Transfer/index.js +0 -4
- package/lib/Tree/DirectoryTree.js +29 -74
- 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.js +15 -35
- package/lib/Typography/Base/Ellipsis.js +25 -58
- package/lib/Typography/Base/EllipsisTooltip.js +3 -12
- 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.js +2 -18
- package/lib/Typography/Typography.js +11 -30
- package/lib/Typography/hooks/useMergedConfig.js +0 -5
- package/lib/Typography/hooks/useUpdatedEffect.js +1 -6
- package/lib/Typography/index.js +0 -9
- 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.js +2 -4
- package/lib/_util/domTarget.js +0 -6
- package/lib/_util/getDataOrAriaProps.js +0 -2
- 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.js +0 -12
- package/lib/_util/placements.js +7 -12
- package/lib/_util/reactNode.js +0 -5
- package/lib/_util/responsiveObserve.js +0 -8
- 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.js +0 -6
- 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.js +7 -33
- package/lib/index.js +0 -89
- 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.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.d.ts +2 -2
- 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.js +8 -53
- package/lib/notification/hooks/useNotification.js +8 -19
- package/lib/notification/index.js +31 -80
- package/lib/services/newRequest.js +18 -47
- package/lib/services/utils.js +0 -15
- package/lib/styles/variables.css +18 -3
- package/package.json +11 -11
- package/CHANGELOG.md +0 -1237
- package/dist/LmTable/components/sortableItemCol.d.ts +0 -1
- package/es/LmTable/components/sortableItemCol.js +0 -56
- package/lib/LmTable/components/sortableItemCol.js +0 -56
package/lib/LmEditTable/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,31 +14,24 @@ exports.default = void 0;
|
|
|
15
14
|
exports.getExpandStatus = getExpandStatus;
|
|
16
15
|
exports.isExpandRow = isExpandRow;
|
|
17
16
|
exports.isObjEmpty = isObjEmpty;
|
|
18
|
-
|
|
19
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
20
|
-
|
|
21
18
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
22
|
-
|
|
23
19
|
var _lodash = require("lodash");
|
|
24
|
-
|
|
25
20
|
function isObjEmpty(obj) {
|
|
26
21
|
var _a;
|
|
27
|
-
|
|
28
22
|
return ((_a = Object.keys(obj || {})) === null || _a === void 0 ? void 0 : _a.length) === 0;
|
|
29
23
|
}
|
|
30
|
-
|
|
31
24
|
function deepDataSourcePreKeys(dataSource, rowKey) {
|
|
32
25
|
var deepDataSource = [];
|
|
33
|
-
|
|
34
26
|
var eachChildren = function eachChildren(children, preKeys, deepIds) {
|
|
35
27
|
children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
|
|
36
28
|
deepDataSource.push(Object.assign(Object.assign({}, item), {
|
|
37
29
|
preKeys: [].concat((0, _toConsumableArray2.default)(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]),
|
|
38
30
|
_deepIds: [].concat((0, _toConsumableArray2.default)(deepIds), [index + 1])
|
|
39
31
|
}));
|
|
40
|
-
|
|
41
32
|
if (item === null || item === void 0 ? void 0 : item.children) {
|
|
42
|
-
eachChildren(item === null || item === void 0 ? void 0 : item.children, [].concat((0, _toConsumableArray2.default)(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]), [].concat((0, _toConsumableArray2.default)(deepIds), [index + 1]));
|
|
33
|
+
eachChildren(item === null || item === void 0 ? void 0 : item.children, [].concat((0, _toConsumableArray2.default)(preKeys), [item === null || item === void 0 ? void 0 : item[rowKey]]), [].concat((0, _toConsumableArray2.default)(deepIds), [index + 1]));
|
|
34
|
+
// deepDataSource.push({ ...item, preKeys: [...preKeys, item[rowKey]] })
|
|
43
35
|
}
|
|
44
36
|
});
|
|
45
37
|
};
|
|
@@ -47,140 +39,106 @@ function deepDataSourcePreKeys(dataSource, rowKey) {
|
|
|
47
39
|
eachChildren(dataSource, [], []);
|
|
48
40
|
return (0, _lodash.keyBy)(deepDataSource, rowKey);
|
|
49
41
|
}
|
|
50
|
-
|
|
51
42
|
function isExpandRow(children) {
|
|
52
43
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
53
|
-
|
|
54
44
|
return ['Collapse row', 'Expand row'].includes((_e = (_d = (_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e['aria-label']) || ((_l = (_k = (_j = (_h = (_g = (_f = children === null || children === void 0 ? void 0 : children[0]) === null || _f === void 0 ? void 0 : _f.props) === null || _g === void 0 ? void 0 : _g.children) === null || _h === void 0 ? void 0 : _h[1]) === null || _j === void 0 ? void 0 : _j.props) === null || _k === void 0 ? void 0 : _k.className) === null || _l === void 0 ? void 0 : _l.indexOf('ant-table-row-expand-icon')) > -1;
|
|
55
45
|
}
|
|
56
|
-
|
|
57
46
|
function checkRowKeyByDataSource(dataSource, rowKey) {
|
|
58
47
|
var addRowKey = function addRowKey(children, pkey) {
|
|
59
48
|
return children === null || children === void 0 ? void 0 : children.map(function (item, index) {
|
|
60
49
|
if (item.children) {
|
|
61
50
|
var _Object$assign;
|
|
62
|
-
|
|
63
51
|
var rchildren = addRowKey(item.children, "".concat(pkey, "_").concat(index + 1));
|
|
64
52
|
return Object.assign(Object.assign({}, item), (_Object$assign = {}, (0, _defineProperty2.default)(_Object$assign, rowKey, item[rowKey] || "".concat(pkey, "_").concat(index + 1)), (0, _defineProperty2.default)(_Object$assign, "children", rchildren), _Object$assign));
|
|
65
53
|
}
|
|
66
|
-
|
|
67
54
|
return Object.assign(Object.assign({}, item), (0, _defineProperty2.default)({}, rowKey, item[rowKey] || "".concat(pkey, "_").concat(index + 1)));
|
|
68
55
|
});
|
|
69
56
|
};
|
|
70
|
-
|
|
71
57
|
var res = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (v, idx) {
|
|
72
58
|
if (v.children) {
|
|
73
59
|
var _Object$assign3;
|
|
74
|
-
|
|
75
60
|
var rchildren = addRowKey(v.children, v[rowKey] || "v".concat(idx + 1));
|
|
76
61
|
return Object.assign(Object.assign({}, v), (_Object$assign3 = {}, (0, _defineProperty2.default)(_Object$assign3, rowKey, v[rowKey] || "v".concat(idx + 1)), (0, _defineProperty2.default)(_Object$assign3, "children", rchildren), _Object$assign3));
|
|
77
62
|
}
|
|
78
|
-
|
|
79
63
|
return Object.assign(Object.assign({}, v), (0, _defineProperty2.default)({}, rowKey, v[rowKey] || "v".concat(idx + 1)));
|
|
80
64
|
});
|
|
81
65
|
return res || [];
|
|
82
66
|
}
|
|
83
|
-
|
|
84
67
|
function getExpandStatus(children) {
|
|
85
68
|
var _a, _b, _c, _d, _e;
|
|
86
|
-
|
|
87
69
|
return isExpandRow(children) ? (_e = (_d = (_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e['aria-label'] : '';
|
|
88
70
|
}
|
|
89
|
-
|
|
90
71
|
function checkMemoShouldUploadSpecialFun(prev, next) {
|
|
91
72
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
92
|
-
|
|
93
73
|
var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
|
|
94
|
-
|
|
95
74
|
if (!checkExpandStatus) {
|
|
96
75
|
return false;
|
|
97
76
|
}
|
|
98
|
-
|
|
99
77
|
var prevCol = prev === null || prev === void 0 ? void 0 : prev.col;
|
|
100
78
|
var nextCol = next === null || next === void 0 ? void 0 : next.col;
|
|
101
79
|
/** TODO: 使用了自定义render, 是否要判断rowIndex? 这样排序之后,渲染的性能就会变差 */
|
|
102
|
-
|
|
103
80
|
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.render) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.render)) && !(0, _lodash.isEqual)((0, _lodash.pick)(prev, ['colIndex', 'record', 'children']), (0, _lodash.pick)(next, ['colIndex', 'record', 'children']))) {
|
|
104
81
|
return false;
|
|
105
82
|
}
|
|
106
|
-
|
|
107
83
|
if (!(next === null || next === void 0 ? void 0 : next.quickOpetateClearAll) && ((next === null || next === void 0 ? void 0 : next.getLength) < 2 || (prev === null || prev === void 0 ? void 0 : prev.getLength) === 1) && (next === null || next === void 0 ? void 0 : next.dataIndex) === 'lm_edit_opetate') {
|
|
108
84
|
return false;
|
|
109
85
|
}
|
|
110
|
-
|
|
111
86
|
if (prev.isEdit !== next.isEdit) {
|
|
112
87
|
return false;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
88
|
+
}
|
|
89
|
+
// console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
|
|
116
90
|
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && (((_a = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _a === void 0 ? void 0 : _a.render) || ((_b = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _b === void 0 ? void 0 : _b.render)) && (!(0, _lodash.isEqual)((0, _lodash.omit)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, ['render']), (0, _lodash.omit)(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps, ['render'])) || !(0, _lodash.isEqual)((0, _lodash.pick)(prev, ['colIndex', 'record', 'rowIndex']), (0, _lodash.pick)(next, ['colIndex', 'record', 'rowIndex'])))) {
|
|
117
91
|
return false;
|
|
118
92
|
}
|
|
119
|
-
|
|
120
93
|
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.fixed) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.fixed)) && !(0, _lodash.isEqual)(prev === null || prev === void 0 ? void 0 : prev.style, next === null || next === void 0 ? void 0 : next.style)) {
|
|
121
94
|
return false;
|
|
122
95
|
}
|
|
123
|
-
|
|
124
96
|
if ((((_c = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _c === void 0 ? void 0 : _c.optionOnly) || ((_d = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _d === void 0 ? void 0 : _d.optionOnly)) && !(0, _lodash.isEqual)((_e = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _e === void 0 ? void 0 : _e.options, (_f = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _f === void 0 ? void 0 : _f.options)) {
|
|
125
97
|
return false;
|
|
126
98
|
}
|
|
127
|
-
|
|
128
99
|
if ((((_g = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _g === void 0 ? void 0 : _g.options) || ((_h = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _h === void 0 ? void 0 : _h.options)) && !(0, _lodash.isEqual)((_j = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _j === void 0 ? void 0 : _j.options, (_k = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _k === void 0 ? void 0 : _k.options)) {
|
|
129
100
|
return false;
|
|
130
101
|
}
|
|
131
|
-
|
|
132
102
|
if (((0, _lodash.isFunction)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) || (0, _lodash.isFunction)(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) && !(0, _lodash.isEqual)(prevCol.newOptions, nextCol.newOptions) && !(0, _lodash.isEqual)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) {
|
|
133
103
|
return false;
|
|
134
104
|
}
|
|
135
|
-
|
|
136
105
|
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.order) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.order)) && !(0, _lodash.isEqual)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.order, nextCol === null || nextCol === void 0 ? void 0 : nextCol.order)) {
|
|
137
106
|
// return isEqual(prevCol?.order, nextCol?.fixed)
|
|
138
107
|
return false;
|
|
139
108
|
}
|
|
140
|
-
|
|
141
109
|
if (next.className.indexOf('drag-visible') > -1) {
|
|
142
110
|
return (0, _lodash.isEqual)(prev.style, next.style);
|
|
143
111
|
}
|
|
144
|
-
|
|
145
112
|
if (((_l = next.className) === null || _l === void 0 ? void 0 : _l.indexOf('ant-table-row-expand-icon-cell')) > -1) {
|
|
146
113
|
return false;
|
|
147
114
|
}
|
|
148
|
-
|
|
149
115
|
if (((_m = next.className) === null || _m === void 0 ? void 0 : _m.indexOf('ant-table-cell-with-append')) > -1) {
|
|
150
116
|
return false;
|
|
151
117
|
}
|
|
152
|
-
|
|
153
118
|
if (next.className.indexOf('ant-table-selection-column') > -1) {
|
|
154
119
|
return (0, _lodash.isEqual)((_p = (_o = prev.children) === null || _o === void 0 ? void 0 : _o[1]) === null || _p === void 0 ? void 0 : _p.props, (_r = (_q = next.children) === null || _q === void 0 ? void 0 : _q[1]) === null || _r === void 0 ? void 0 : _r.props);
|
|
155
120
|
}
|
|
156
121
|
/** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
|
|
157
|
-
|
|
158
|
-
|
|
159
122
|
if (((_s = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _s === void 0 ? void 0 : _s.quickcopy) || ((_t = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _t === void 0 ? void 0 : _t.quickcopy)) {
|
|
160
123
|
var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
|
|
161
124
|
var p = (0, _lodash.pick)(prev, pickProps);
|
|
162
125
|
var n = (0, _lodash.pick)(next, pickProps);
|
|
163
126
|
return (0, _lodash.isEqual)(p, n);
|
|
164
127
|
}
|
|
165
|
-
|
|
166
128
|
return true;
|
|
167
129
|
}
|
|
168
|
-
|
|
169
130
|
function checkExpandIconColumnIndex(_ref) {
|
|
170
131
|
var rowSelection = _ref.rowSelection,
|
|
171
|
-
|
|
172
|
-
|
|
132
|
+
sortOpen = _ref.sortOpen,
|
|
133
|
+
indexCol = _ref.indexCol;
|
|
173
134
|
var arr = [rowSelection, sortOpen, indexCol].filter(function (item) {
|
|
174
135
|
return !!item;
|
|
175
136
|
});
|
|
176
137
|
return arr.length;
|
|
177
138
|
}
|
|
178
|
-
|
|
179
139
|
function checkDataSourceIsEmpty(config, dataSource, scrollInfo) {
|
|
180
140
|
var _a, _b;
|
|
181
|
-
|
|
182
141
|
var resultConfig = Object.assign({}, config);
|
|
183
|
-
|
|
184
142
|
if (scrollInfo) {
|
|
185
143
|
resultConfig = Object.assign(Object.assign({}, resultConfig), {
|
|
186
144
|
scroll: {
|
|
@@ -189,11 +147,9 @@ function checkDataSourceIsEmpty(config, dataSource, scrollInfo) {
|
|
|
189
147
|
}
|
|
190
148
|
});
|
|
191
149
|
}
|
|
192
|
-
|
|
193
150
|
if (dataSource.length) {
|
|
194
151
|
return resultConfig;
|
|
195
152
|
}
|
|
196
|
-
|
|
197
153
|
return Object.assign(Object.assign({}, resultConfig), {
|
|
198
154
|
components: Object.assign(Object.assign({}, resultConfig.components), {
|
|
199
155
|
body: {}
|
|
@@ -201,43 +157,33 @@ function checkDataSourceIsEmpty(config, dataSource, scrollInfo) {
|
|
|
201
157
|
});
|
|
202
158
|
}
|
|
203
159
|
/** 根据传入的disabedRows, 得出最终需要disabed的rowKeys */
|
|
204
|
-
|
|
205
|
-
|
|
206
160
|
function checkTableRowIsDisable(deepDataSource, disabledRows, rowKey) {
|
|
207
161
|
var disabledRkeys = [];
|
|
208
|
-
|
|
209
162
|
if (!disabledRows.length) {
|
|
210
163
|
return disabledRkeys;
|
|
211
164
|
}
|
|
212
|
-
|
|
213
165
|
var disableIds = disabledRows.map(function (item) {
|
|
214
166
|
return (0, _lodash.isObject)(item) ? item === null || item === void 0 ? void 0 : item[rowKey] : item;
|
|
215
167
|
});
|
|
216
|
-
|
|
217
168
|
function deep(children, arrs) {
|
|
218
169
|
children === null || children === void 0 ? void 0 : children.forEach(function (item) {
|
|
219
170
|
arrs.push(item[rowKey]);
|
|
220
|
-
|
|
221
171
|
if (item.children) {
|
|
222
172
|
deep(item.children, arrs);
|
|
223
173
|
}
|
|
224
174
|
});
|
|
225
175
|
}
|
|
226
|
-
|
|
227
176
|
if (disableIds.length) {
|
|
228
177
|
disableIds === null || disableIds === void 0 ? void 0 : disableIds.forEach(function (item) {
|
|
229
178
|
disabledRkeys.push(item);
|
|
230
179
|
var record = deepDataSource[item];
|
|
231
|
-
|
|
232
180
|
if (record === null || record === void 0 ? void 0 : record.children) {
|
|
233
181
|
deep(record.children, disabledRkeys);
|
|
234
182
|
}
|
|
235
183
|
});
|
|
236
184
|
}
|
|
237
|
-
|
|
238
185
|
return disabledRkeys;
|
|
239
186
|
}
|
|
240
|
-
|
|
241
187
|
var _default = {
|
|
242
188
|
isObjEmpty: isObjEmpty
|
|
243
189
|
};
|
|
@@ -1,66 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = void 0;
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _context = require("./context");
|
|
15
|
-
|
|
16
11
|
var _useForkRef = _interopRequireDefault(require("../hooks/useForkRef"));
|
|
17
|
-
|
|
18
12
|
var _lodash = require("lodash");
|
|
19
|
-
|
|
20
13
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
21
14
|
var t = {};
|
|
22
|
-
|
|
23
15
|
for (var p in s) {
|
|
24
16
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
25
17
|
}
|
|
26
|
-
|
|
27
18
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
28
19
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
29
20
|
}
|
|
30
21
|
return t;
|
|
31
22
|
};
|
|
32
|
-
|
|
33
23
|
var useOptions = function useOptions(_ref) {
|
|
34
24
|
var children = _ref.children,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
ref = _ref.ref,
|
|
26
|
+
trRef = _ref.trRef;
|
|
38
27
|
var _a;
|
|
39
|
-
|
|
40
28
|
var _useStore = (0, _context.useStore)(),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
29
|
+
state = _useStore.state,
|
|
30
|
+
dispatch = _useStore.dispatch,
|
|
31
|
+
instance = _useStore.instance;
|
|
45
32
|
var virtualItems = instance.columnVirtual.virtualItems;
|
|
46
33
|
var rowHeight = state.rowHeight,
|
|
47
|
-
|
|
34
|
+
totalLen = state.totalLen;
|
|
48
35
|
var sliceColumns = (0, _react.useMemo)(function () {
|
|
49
36
|
var _a;
|
|
50
|
-
|
|
51
37
|
return (_a = children === null || children === void 0 ? void 0 : children.reduce) === null || _a === void 0 ? void 0 : _a.call(children, function (pre, cur) {
|
|
52
38
|
var _a, _b;
|
|
53
|
-
|
|
54
39
|
if (typeof ((_a = cur.props) === null || _a === void 0 ? void 0 : _a.fixLeft) === 'number') {
|
|
55
40
|
pre.leftColumns.push(cur);
|
|
56
41
|
return pre;
|
|
57
42
|
}
|
|
58
|
-
|
|
59
43
|
if (typeof ((_b = cur.props) === null || _b === void 0 ? void 0 : _b.fixRight) === 'number') {
|
|
60
44
|
pre.rightColumns.push(cur);
|
|
61
45
|
return pre;
|
|
62
46
|
}
|
|
63
|
-
|
|
64
47
|
pre.centerColumns.push(cur);
|
|
65
48
|
return pre;
|
|
66
49
|
}, {
|
|
@@ -74,11 +57,10 @@ var useOptions = function useOptions(_ref) {
|
|
|
74
57
|
type: 'changeSliceColumns',
|
|
75
58
|
sliceColumns: sliceColumns
|
|
76
59
|
});
|
|
77
|
-
}, [sliceColumns]);
|
|
78
|
-
|
|
60
|
+
}, [sliceColumns]);
|
|
61
|
+
// 非固定列长度
|
|
79
62
|
var centerColumnsLen = (0, _react.useMemo)(function () {
|
|
80
63
|
var _a, _b;
|
|
81
|
-
|
|
82
64
|
return (_b = (_a = sliceColumns === null || sliceColumns === void 0 ? void 0 : sliceColumns.centerColumns) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
83
65
|
}, [sliceColumns]);
|
|
84
66
|
(0, _react.useEffect)(function () {
|
|
@@ -88,12 +70,11 @@ var useOptions = function useOptions(_ref) {
|
|
|
88
70
|
columnsLen: centerColumnsLen !== null && centerColumnsLen !== void 0 ? centerColumnsLen : 0
|
|
89
71
|
});
|
|
90
72
|
}
|
|
91
|
-
}, [centerColumnsLen, dispatch, state.columnsLen]);
|
|
92
|
-
|
|
73
|
+
}, [centerColumnsLen, dispatch, state.columnsLen]);
|
|
74
|
+
// 获取行的高度
|
|
93
75
|
(0, _react.useEffect)(function () {
|
|
94
76
|
var initHeight = function initHeight(tempRef) {
|
|
95
77
|
var _a, _b, _c;
|
|
96
|
-
|
|
97
78
|
if (((_a = tempRef === null || tempRef === void 0 ? void 0 : tempRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) && !rowHeight && totalLen) {
|
|
98
79
|
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;
|
|
99
80
|
dispatch({
|
|
@@ -102,19 +83,16 @@ var useOptions = function useOptions(_ref) {
|
|
|
102
83
|
});
|
|
103
84
|
}
|
|
104
85
|
};
|
|
105
|
-
|
|
106
86
|
initHeight(Object.prototype.hasOwnProperty.call(ref, 'current') ? ref : trRef);
|
|
107
|
-
}, [trRef, dispatch, rowHeight, totalLen, ref]);
|
|
108
|
-
|
|
87
|
+
}, [trRef, dispatch, rowHeight, totalLen, ref]);
|
|
88
|
+
// 横向单元格合并
|
|
109
89
|
var leftColSpan = (0, _react.useMemo)(function () {
|
|
110
90
|
var _a;
|
|
111
|
-
|
|
112
91
|
return (_a = virtualItems[0]) === null || _a === void 0 ? void 0 : _a.index;
|
|
113
|
-
}, [virtualItems]);
|
|
114
|
-
|
|
92
|
+
}, [virtualItems]);
|
|
93
|
+
// 右侧隐藏数量
|
|
115
94
|
var rightColSpan = (0, _react.useMemo)(function () {
|
|
116
95
|
var _a;
|
|
117
|
-
|
|
118
96
|
return ((_a = sliceColumns === null || sliceColumns === void 0 ? void 0 : sliceColumns.centerColumns) === null || _a === void 0 ? void 0 : _a.length) - (virtualItems === null || virtualItems === void 0 ? void 0 : virtualItems.length) - leftColSpan || 0;
|
|
119
97
|
}, [(_a = sliceColumns === null || sliceColumns === void 0 ? void 0 : sliceColumns.centerColumns) === null || _a === void 0 ? void 0 : _a.length, virtualItems.length, leftColSpan]);
|
|
120
98
|
return Object.assign(Object.assign({
|
|
@@ -124,27 +102,23 @@ var useOptions = function useOptions(_ref) {
|
|
|
124
102
|
rightColSpan: rightColSpan
|
|
125
103
|
});
|
|
126
104
|
};
|
|
127
|
-
|
|
128
105
|
var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
|
|
129
106
|
var children = _a.children,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
107
|
+
pref = _a.pref,
|
|
108
|
+
resetProps = __rest(_a, ["children", "pref"]);
|
|
133
109
|
var trRef = (0, _react.useRef)(null);
|
|
134
110
|
var clearProps = (0, _lodash.omit)(resetProps, ['dataKey', 'pushAllForm']);
|
|
135
|
-
|
|
136
111
|
var _useOptions = useOptions({
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
112
|
+
children: children,
|
|
113
|
+
ref: ref,
|
|
114
|
+
trRef: trRef
|
|
115
|
+
}),
|
|
116
|
+
virtualItems = _useOptions.virtualItems,
|
|
117
|
+
leftColumns = _useOptions.leftColumns,
|
|
118
|
+
centerColumns = _useOptions.centerColumns,
|
|
119
|
+
rightColumns = _useOptions.rightColumns,
|
|
120
|
+
leftColSpan = _useOptions.leftColSpan,
|
|
121
|
+
rightColSpan = _useOptions.rightColSpan;
|
|
148
122
|
return /*#__PURE__*/_react.default.createElement("tr", Object.assign({}, clearProps, {
|
|
149
123
|
ref: (0, _useForkRef.default)(pref, trRef)
|
|
150
124
|
}), leftColumns, !!leftColSpan && /*#__PURE__*/_react.default.createElement("td", {
|
|
@@ -159,6 +133,5 @@ var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
|
|
|
159
133
|
colSpan: rightColSpan
|
|
160
134
|
}), rightColumns);
|
|
161
135
|
});
|
|
162
|
-
|
|
163
136
|
var _default = VirtualRow;
|
|
164
137
|
exports.default = _default;
|
|
@@ -1,49 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = void 0;
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _context = require("./context");
|
|
15
|
-
|
|
16
11
|
var _useForkRef = _interopRequireDefault(require("../hooks/useForkRef"));
|
|
17
|
-
|
|
18
12
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
19
13
|
var t = {};
|
|
20
|
-
|
|
21
14
|
for (var p in s) {
|
|
22
15
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
23
16
|
}
|
|
24
|
-
|
|
25
17
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
26
18
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
27
19
|
}
|
|
28
20
|
return t;
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
|
|
32
23
|
var children = _a.children,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
pref = _a.pref,
|
|
25
|
+
resetProps = __rest(_a, ["children", "pref"]);
|
|
36
26
|
var _useStore = (0, _context.useStore)(),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
state = _useStore.state,
|
|
28
|
+
dispatch = _useStore.dispatch;
|
|
40
29
|
var rowHeight = state.rowHeight,
|
|
41
|
-
|
|
42
|
-
var trRef = (0, _react.useRef)(null);
|
|
43
|
-
|
|
30
|
+
totalLen = state.totalLen;
|
|
31
|
+
var trRef = (0, _react.useRef)(null);
|
|
32
|
+
// 列长度
|
|
44
33
|
var columnsLen = (0, _react.useMemo)(function () {
|
|
45
34
|
var _a;
|
|
46
|
-
|
|
47
35
|
return (_a = children === null || children === void 0 ? void 0 : children.length) !== null && _a !== void 0 ? _a : 0;
|
|
48
36
|
}, [children]);
|
|
49
37
|
(0, _react.useEffect)(function () {
|
|
@@ -57,7 +45,6 @@ var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
|
|
|
57
45
|
(0, _react.useEffect)(function () {
|
|
58
46
|
var initHeight = function initHeight(tempRef) {
|
|
59
47
|
var _a, _b, _c;
|
|
60
|
-
|
|
61
48
|
if (((_a = tempRef === null || tempRef === void 0 ? void 0 : tempRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) && !rowHeight && totalLen) {
|
|
62
49
|
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;
|
|
63
50
|
dispatch({
|
|
@@ -66,13 +53,11 @@ var VirtualRow = /*#__PURE__*/_react.default.memo(function (_a, ref) {
|
|
|
66
53
|
});
|
|
67
54
|
}
|
|
68
55
|
};
|
|
69
|
-
|
|
70
56
|
initHeight(trRef);
|
|
71
57
|
}, [trRef, dispatch, rowHeight, totalLen, ref]);
|
|
72
58
|
return /*#__PURE__*/_react.default.createElement("tr", Object.assign({}, resetProps, {
|
|
73
59
|
ref: (0, _useForkRef.default)(pref, trRef)
|
|
74
60
|
}), children);
|
|
75
61
|
});
|
|
76
|
-
|
|
77
62
|
var _default = VirtualRow;
|
|
78
63
|
exports.default = _default;
|
|
@@ -1,34 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = void 0;
|
|
11
|
-
|
|
12
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
11
|
var _reactVirtual = require("react-virtual");
|
|
17
|
-
|
|
18
12
|
var _context = require("./context");
|
|
19
|
-
|
|
20
13
|
var VirtualTable = /*#__PURE__*/_react.default.memo(function (tableProps) {
|
|
21
14
|
var _a, _b, _c, _d;
|
|
22
|
-
|
|
23
15
|
var fn = tableProps.fn;
|
|
24
16
|
var bodyRef = (0, _react.useRef)(null);
|
|
25
|
-
|
|
26
17
|
var _useRealive = (0, _context.useRealive)(),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
_useRealive2 = (0, _slicedToArray2.default)(_useRealive, 2),
|
|
19
|
+
state = _useRealive2[0],
|
|
20
|
+
dispatch = _useRealive2[1];
|
|
21
|
+
// 行虚拟化 { totalSize, virtualItems }
|
|
32
22
|
var rowVirtual = (0, _reactVirtual.useVirtual)({
|
|
33
23
|
size: state.totalLen,
|
|
34
24
|
// 绑定父节点
|
|
@@ -40,19 +30,18 @@ var VirtualTable = /*#__PURE__*/_react.default.memo(function (tableProps) {
|
|
|
40
30
|
}, [state.rowHeight]),
|
|
41
31
|
overscan: 5
|
|
42
32
|
});
|
|
43
|
-
fn.current = rowVirtual.scrollToIndex;
|
|
44
|
-
|
|
33
|
+
fn.current = rowVirtual.scrollToIndex;
|
|
34
|
+
// 列动态宽度
|
|
45
35
|
var columnEstimateSize = (0, _react.useCallback)(function (i) {
|
|
46
36
|
var _a, _b;
|
|
47
|
-
|
|
48
37
|
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;
|
|
49
38
|
var leftColumnsLen = state.sliceColumns.leftColumns.length;
|
|
50
|
-
var centerColumnsLen = state.sliceColumns.centerColumns.length;
|
|
51
|
-
|
|
39
|
+
var centerColumnsLen = state.sliceColumns.centerColumns.length;
|
|
40
|
+
// 获取非固定列
|
|
52
41
|
var virList = colWidths.slice(leftColumnsLen, leftColumnsLen + centerColumnsLen);
|
|
53
42
|
return virList[i] || 0;
|
|
54
|
-
}, [(_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]);
|
|
55
|
-
|
|
43
|
+
}, [(_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]);
|
|
44
|
+
// 列虚拟化
|
|
56
45
|
var columnVirtual = (0, _reactVirtual.useVirtual)({
|
|
57
46
|
horizontal: true,
|
|
58
47
|
size: state.columnsLen,
|
|
@@ -76,6 +65,5 @@ var VirtualTable = /*#__PURE__*/_react.default.memo(function (tableProps) {
|
|
|
76
65
|
ref: bodyRef
|
|
77
66
|
}, tableProps)));
|
|
78
67
|
});
|
|
79
|
-
|
|
80
68
|
var _default = VirtualTable;
|
|
81
69
|
exports.default = _default;
|
|
@@ -1,49 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _context = require("./context");
|
|
13
|
-
|
|
14
10
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
15
11
|
var t = {};
|
|
16
|
-
|
|
17
12
|
for (var p in s) {
|
|
18
13
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
19
14
|
}
|
|
20
|
-
|
|
21
15
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
16
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
23
17
|
}
|
|
24
18
|
return t;
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
var VirtualWrapper = /*#__PURE__*/_react.default.memo(function (wrapperProps) {
|
|
28
21
|
var _a, _b;
|
|
29
|
-
|
|
30
22
|
var children = wrapperProps.children,
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
resetProps = __rest(wrapperProps, ["children"]);
|
|
33
24
|
var _useStore = (0, _context.useStore)(),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
state = _useStore.state,
|
|
26
|
+
dispatch = _useStore.dispatch,
|
|
27
|
+
instance = _useStore.instance;
|
|
38
28
|
var _instance$rowVirtual = instance.rowVirtual,
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
virtualItems = _instance$rowVirtual.virtualItems,
|
|
30
|
+
totalSize = _instance$rowVirtual.totalSize;
|
|
41
31
|
var contents = (0, _react.useMemo)(function () {
|
|
42
32
|
return children[1];
|
|
43
33
|
}, [children]);
|
|
44
34
|
var contentsLen = (0, _react.useMemo)(function () {
|
|
45
35
|
var _a;
|
|
46
|
-
|
|
47
36
|
return (_a = contents === null || contents === void 0 ? void 0 : contents.length) !== null && _a !== void 0 ? _a : 0;
|
|
48
37
|
}, [contents]);
|
|
49
38
|
(0, _react.useEffect)(function () {
|
|
@@ -68,6 +57,5 @@ var VirtualWrapper = /*#__PURE__*/_react.default.memo(function (wrapperProps) {
|
|
|
68
57
|
}
|
|
69
58
|
})));
|
|
70
59
|
});
|
|
71
|
-
|
|
72
60
|
var _default = VirtualWrapper;
|
|
73
61
|
exports.default = _default;
|