linkmore-design 1.1.38 → 1.1.39
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 +192984 -206130
- package/dist/index.umd.min.css +2 -2
- package/dist/index.umd.min.js +23 -27
- 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 +25 -50
- package/es/CustomTableOption/columnsSort.js +29 -63
- package/es/CustomTableOption/filterSort.js +28 -53
- package/es/CustomTableOption/index.js +18 -33
- 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 +8 -14
- 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 +30 -42
- 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 +287 -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 +11 -17
- 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 +60 -118
- 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/Locale/zh_CN.js +1 -1
- package/es/Locale/zh_HK.js +1 -1
- package/es/Locale/zh_TW.js +1 -1
- 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 +25 -61
- package/lib/CustomTableOption/columnsSort.js +29 -77
- package/lib/CustomTableOption/filterSort.js +28 -65
- package/lib/CustomTableOption/index.js +18 -46
- 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 +8 -19
- 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 +31 -54
- 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 +287 -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 +9 -23
- 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 +60 -124
- 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 +2 -8
- package/lib/Locale/zh_HK.js +2 -7
- package/lib/Locale/zh_TW.js +2 -7
- 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/LmUpload/fns/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
-
|
|
4
3
|
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5
4
|
function adopt(value) {
|
|
6
5
|
return value instanceof P ? value : new P(function (resolve) {
|
|
7
6
|
resolve(value);
|
|
8
7
|
});
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12
10
|
function fulfilled(value) {
|
|
13
11
|
try {
|
|
@@ -16,7 +14,6 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
16
14
|
reject(e);
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
|
-
|
|
20
17
|
function rejected(value) {
|
|
21
18
|
try {
|
|
22
19
|
step(generator["throw"](value));
|
|
@@ -24,41 +21,34 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
24
21
|
reject(e);
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
|
-
|
|
28
24
|
function step(result) {
|
|
29
25
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
30
26
|
}
|
|
31
|
-
|
|
32
27
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
33
28
|
});
|
|
34
29
|
};
|
|
35
|
-
|
|
36
30
|
import { useCallback, useRef } from 'react';
|
|
37
31
|
import { message } from 'linkmore-design';
|
|
38
32
|
import OSS from 'ali-oss';
|
|
39
|
-
|
|
40
33
|
var useCoreOptions = function useCoreOptions(_ref) {
|
|
41
34
|
var state = _ref.state,
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
dispatch = _ref.dispatch,
|
|
36
|
+
props = _ref.props;
|
|
44
37
|
var uid = props.uid,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
onChange = props.onChange,
|
|
39
|
+
type = props.type,
|
|
40
|
+
fileSize = props.fileSize,
|
|
41
|
+
fileSizeType = props.fileSizeType,
|
|
42
|
+
fileAreaSize = props.fileAreaSize,
|
|
43
|
+
enabledOss = props.enabledOss,
|
|
44
|
+
enableCrop = props.enableCrop,
|
|
45
|
+
ossConfig = props.ossConfig,
|
|
46
|
+
multiple = props.multiple;
|
|
54
47
|
var fileUploadLen = useRef(null); // 上传的文件数量
|
|
55
|
-
|
|
56
48
|
var doneFileUploadLen = useRef([]); // 已完成上传的文件
|
|
57
|
-
|
|
58
49
|
/* 获取两个对象是否存在指定值相等
|
|
59
50
|
* 取用户定义的列字段,如果读取不到则取'fileName'对比
|
|
60
51
|
*/
|
|
61
|
-
|
|
62
52
|
var getHasEqual = useCallback(function (obj1, obj2) {
|
|
63
53
|
var extend = [uid, 'fileName'];
|
|
64
54
|
var flag = false;
|
|
@@ -68,8 +58,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
68
58
|
}
|
|
69
59
|
});
|
|
70
60
|
return flag;
|
|
71
|
-
}, [uid]);
|
|
72
|
-
|
|
61
|
+
}, [uid]);
|
|
62
|
+
// 从对象中读取存在的指定属性
|
|
73
63
|
var getFileHasValue = useCallback(function (obj) {
|
|
74
64
|
if (!obj) return '';
|
|
75
65
|
var extend = [uid, 'fileName'];
|
|
@@ -78,50 +68,46 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
78
68
|
if (!val && obj[v]) val = obj[v];
|
|
79
69
|
});
|
|
80
70
|
return val;
|
|
81
|
-
}, [uid]);
|
|
82
|
-
|
|
71
|
+
}, [uid]);
|
|
72
|
+
// 获取当前的文件列表
|
|
83
73
|
var getFileList = useCallback(function () {
|
|
84
74
|
return props.fileList || state.fileList;
|
|
85
|
-
}, [props.fileList, state.fileList]);
|
|
86
|
-
|
|
75
|
+
}, [props.fileList, state.fileList]);
|
|
76
|
+
// 获取上传状态
|
|
87
77
|
var getUploadStatus = useCallback(function () {
|
|
88
78
|
var uploading = typeof state.percent === 'number';
|
|
89
79
|
return {
|
|
90
80
|
uploading: uploading
|
|
91
81
|
};
|
|
92
|
-
}, [state.percent]);
|
|
93
|
-
|
|
82
|
+
}, [state.percent]);
|
|
83
|
+
// 获取文件字段值
|
|
94
84
|
var getFileFields = useCallback(function (fileParams) {
|
|
95
85
|
var fileNames = props.fileNames;
|
|
96
86
|
var obj = {};
|
|
97
87
|
Object.entries(fileNames).forEach(function (v) {
|
|
98
88
|
var itemKey = v[0];
|
|
99
89
|
var itemValue = v[1];
|
|
100
|
-
|
|
101
90
|
if (fileParams[itemKey]) {
|
|
102
91
|
obj[itemKey] = fileParams[itemValue];
|
|
103
92
|
}
|
|
104
93
|
});
|
|
105
94
|
return obj;
|
|
106
|
-
}, [props]);
|
|
107
|
-
|
|
95
|
+
}, [props]);
|
|
96
|
+
// 获取是否达到最大上传数量
|
|
108
97
|
var getIsMaxCount = useCallback(function () {
|
|
109
98
|
var maxCount = props.maxCount,
|
|
110
|
-
|
|
99
|
+
limit = props.limit;
|
|
111
100
|
var flag = false;
|
|
112
101
|
var num = maxCount || limit;
|
|
113
|
-
|
|
114
102
|
if (num && typeof num === 'number') {
|
|
115
103
|
flag = !(getFileList().length < num);
|
|
116
104
|
}
|
|
117
|
-
|
|
118
105
|
return flag;
|
|
119
|
-
}, [getFileList, props]);
|
|
120
|
-
|
|
106
|
+
}, [getFileList, props]);
|
|
107
|
+
// 上传成功事件: File, fileParams
|
|
121
108
|
var uploadSuccess = useCallback(function (file, params, ossCallBack) {
|
|
122
109
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
123
110
|
var _a, _b, fileList, res;
|
|
124
|
-
|
|
125
111
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
126
112
|
while (1) {
|
|
127
113
|
switch (_context.prev = _context.next) {
|
|
@@ -134,8 +120,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
134
120
|
dispatch({
|
|
135
121
|
type: 'changePercent',
|
|
136
122
|
percent: null
|
|
137
|
-
});
|
|
138
|
-
|
|
123
|
+
});
|
|
124
|
+
// 上传事件:抛出 file: 文件 filelist: 文件列表 event: 上传进度信息
|
|
139
125
|
(_a = props.onSuccess) === null || _a === void 0 ? void 0 : _a.call(props, {
|
|
140
126
|
file: file,
|
|
141
127
|
fileList: fileList
|
|
@@ -147,11 +133,9 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
147
133
|
doneFileUploadLen.current = [];
|
|
148
134
|
_context.next = 8;
|
|
149
135
|
return ossCallBack === null || ossCallBack === void 0 ? void 0 : ossCallBack(Array.isArray(params) ? params : [params]);
|
|
150
|
-
|
|
151
136
|
case 8:
|
|
152
137
|
res = _context.sent;
|
|
153
138
|
(_b = props.onCallBack) === null || _b === void 0 ? void 0 : _b.call(props, res);
|
|
154
|
-
|
|
155
139
|
case 10:
|
|
156
140
|
case "end":
|
|
157
141
|
return _context.stop();
|
|
@@ -159,15 +143,13 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
159
143
|
}
|
|
160
144
|
}, _callee);
|
|
161
145
|
}));
|
|
162
|
-
}, [getFileList, props.onSuccess, props.onCallBack, onChange, dispatch, doneFileUploadLen.current]);
|
|
163
|
-
|
|
146
|
+
}, [getFileList, props.onSuccess, props.onCallBack, onChange, dispatch, doneFileUploadLen.current]);
|
|
147
|
+
// 上传进度事件
|
|
164
148
|
var uploadProgress = useCallback(function (file, _ref2) {
|
|
165
149
|
var progress = _ref2.progress,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
150
|
+
checkPoint = _ref2.checkPoint,
|
|
151
|
+
result = _ref2.result;
|
|
169
152
|
var _a;
|
|
170
|
-
|
|
171
153
|
var params = {
|
|
172
154
|
file: file,
|
|
173
155
|
fileList: getFileList(),
|
|
@@ -184,11 +166,11 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
184
166
|
type: 'changePercent',
|
|
185
167
|
percent: Number((progress * 100).toFixed(2))
|
|
186
168
|
});
|
|
187
|
-
}, [getFileList, props.onProgress, onChange, dispatch]);
|
|
188
|
-
|
|
169
|
+
}, [getFileList, props.onProgress, onChange, dispatch]);
|
|
170
|
+
// 上传失败事件
|
|
189
171
|
var uploadError = useCallback(function (_ref3) {
|
|
190
172
|
var error = _ref3.error,
|
|
191
|
-
|
|
173
|
+
file = _ref3.file;
|
|
192
174
|
console.log('上传报错:', error);
|
|
193
175
|
props.onError ? props.onError({
|
|
194
176
|
error: error,
|
|
@@ -203,12 +185,11 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
203
185
|
}
|
|
204
186
|
});
|
|
205
187
|
doneFileUploadLen.current = [];
|
|
206
|
-
}, [props.onError, getFileList, onChange, doneFileUploadLen.current]);
|
|
207
|
-
|
|
188
|
+
}, [props.onError, getFileList, onChange, doneFileUploadLen.current]);
|
|
189
|
+
// 上传至ali-oss
|
|
208
190
|
var uploadOss = useCallback(function (file) {
|
|
209
191
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
210
192
|
var _ossConfig, _ossConfig$dir, filePath, shortlink, _ossConfig$region, region, accessKeyId, accessKeySecret, stsToken, _ossConfig$bucket, bucket, ossCallBack, client, timestamp, fileName, pathName, url, params;
|
|
211
|
-
|
|
212
193
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
213
194
|
while (1) {
|
|
214
195
|
switch (_context2.prev = _context2.next) {
|
|
@@ -238,9 +219,7 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
238
219
|
},
|
|
239
220
|
parallel: 4,
|
|
240
221
|
partSize: 1024 * 1024 // 分片大小
|
|
241
|
-
|
|
242
222
|
});
|
|
243
|
-
|
|
244
223
|
case 9:
|
|
245
224
|
params = props.fileConfig({
|
|
246
225
|
file: file,
|
|
@@ -250,22 +229,17 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
250
229
|
shortlink: shortlink,
|
|
251
230
|
url: url
|
|
252
231
|
});
|
|
253
|
-
|
|
254
232
|
if (!multiple) {
|
|
255
233
|
uploadSuccess(file, params, ossCallBack);
|
|
256
234
|
}
|
|
257
|
-
|
|
258
235
|
if (multiple) {
|
|
259
236
|
doneFileUploadLen.current = [].concat(_toConsumableArray(doneFileUploadLen.current), [params]);
|
|
260
|
-
|
|
261
237
|
if (fileUploadLen.current === doneFileUploadLen.current.length) {
|
|
262
238
|
uploadSuccess(null, doneFileUploadLen.current, ossCallBack);
|
|
263
239
|
}
|
|
264
240
|
}
|
|
265
|
-
|
|
266
241
|
_context2.next = 17;
|
|
267
242
|
break;
|
|
268
|
-
|
|
269
243
|
case 14:
|
|
270
244
|
_context2.prev = 14;
|
|
271
245
|
_context2.t0 = _context2["catch"](0);
|
|
@@ -273,7 +247,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
273
247
|
error: _context2.t0,
|
|
274
248
|
file: file
|
|
275
249
|
});
|
|
276
|
-
|
|
277
250
|
case 17:
|
|
278
251
|
case "end":
|
|
279
252
|
return _context2.stop();
|
|
@@ -281,23 +254,22 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
281
254
|
}
|
|
282
255
|
}, _callee2, null, [[0, 14]]);
|
|
283
256
|
}));
|
|
284
|
-
}, [multiple, ossConfig, uploadProgress, props.fileConfig, uploadSuccess, uploadError, fileUploadLen.current, doneFileUploadLen.current]);
|
|
285
|
-
|
|
257
|
+
}, [multiple, ossConfig, uploadProgress, props.fileConfig, uploadSuccess, uploadError, fileUploadLen.current, doneFileUploadLen.current]);
|
|
258
|
+
// 自定义使用外部上传
|
|
286
259
|
var customUpload = useCallback(function (file) {
|
|
287
260
|
var _a;
|
|
288
|
-
|
|
289
261
|
(_a = props.fileUpload) === null || _a === void 0 ? void 0 : _a.call(props, {
|
|
290
262
|
file: file,
|
|
291
263
|
value: getFileList(),
|
|
292
264
|
onChange: uploadSuccess
|
|
293
265
|
});
|
|
294
|
-
}, [props.fileUpload, getFileList, uploadSuccess]);
|
|
295
|
-
|
|
266
|
+
}, [props.fileUpload, getFileList, uploadSuccess]);
|
|
267
|
+
// 调用上传方法: 执行 uploadOss && customUpload事件
|
|
296
268
|
var uploadFile = useCallback(function (file) {
|
|
297
269
|
enabledOss && uploadOss(file);
|
|
298
270
|
customUpload(file);
|
|
299
|
-
}, [enabledOss, uploadOss, customUpload]);
|
|
300
|
-
|
|
271
|
+
}, [enabledOss, uploadOss, customUpload]);
|
|
272
|
+
// 检测完成, 执行外部 `beforeUpload` 事件
|
|
301
273
|
var checkOver = useCallback(function (file) {
|
|
302
274
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
303
275
|
var res, newFile;
|
|
@@ -309,48 +281,37 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
309
281
|
_context3.next = 3;
|
|
310
282
|
break;
|
|
311
283
|
}
|
|
312
|
-
|
|
313
284
|
uploadFile(file);
|
|
314
285
|
return _context3.abrupt("return");
|
|
315
|
-
|
|
316
286
|
case 3:
|
|
317
287
|
res = props.beforeUpload(file, getFileList()); // Promise
|
|
318
|
-
|
|
319
288
|
if (!(res === null || res === void 0 ? void 0 : res.then)) {
|
|
320
289
|
_context3.next = 16;
|
|
321
290
|
break;
|
|
322
291
|
}
|
|
323
|
-
|
|
324
292
|
_context3.prev = 5;
|
|
325
293
|
_context3.next = 8;
|
|
326
294
|
return res;
|
|
327
|
-
|
|
328
295
|
case 8:
|
|
329
296
|
newFile = _context3.sent;
|
|
330
297
|
uploadFile(newFile);
|
|
331
298
|
_context3.next = 15;
|
|
332
299
|
break;
|
|
333
|
-
|
|
334
300
|
case 12:
|
|
335
301
|
_context3.prev = 12;
|
|
336
302
|
_context3.t0 = _context3["catch"](5);
|
|
337
303
|
console.log('上传失败!');
|
|
338
|
-
|
|
339
304
|
case 15:
|
|
340
305
|
return _context3.abrupt("return");
|
|
341
|
-
|
|
342
306
|
case 16:
|
|
343
307
|
if (res) {
|
|
344
308
|
_context3.next = 18;
|
|
345
309
|
break;
|
|
346
310
|
}
|
|
347
|
-
|
|
348
311
|
return _context3.abrupt("return");
|
|
349
|
-
|
|
350
312
|
case 18:
|
|
351
313
|
// () => true
|
|
352
314
|
uploadFile(file);
|
|
353
|
-
|
|
354
315
|
case 19:
|
|
355
316
|
case "end":
|
|
356
317
|
return _context3.stop();
|
|
@@ -358,40 +319,34 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
358
319
|
}
|
|
359
320
|
}, _callee3, null, [[5, 12]]);
|
|
360
321
|
}));
|
|
361
|
-
}, [props.beforeUpload, getFileList, uploadFile]);
|
|
362
|
-
|
|
322
|
+
}, [props.beforeUpload, getFileList, uploadFile]);
|
|
323
|
+
// 单个文件异步校验
|
|
363
324
|
var fileCheckAsync = useCallback(function (file) {
|
|
364
325
|
return new Promise(function (resolve, reject) {
|
|
365
326
|
// 文件类型校验是否通过 | 存在通配符或符合规定类型
|
|
366
|
-
var isCheckType = type.includes('*') || type.includes(file.name.replace(/.*\./, '').toLowerCase());
|
|
367
|
-
|
|
327
|
+
var isCheckType = type.includes('*') || type.includes(file.name.replace(/.*\./, '').toLowerCase());
|
|
328
|
+
// 大小校验是否通过
|
|
368
329
|
var isCheckSize = file.size / 1024 / (fileSizeType.toLowerCase().includes('m') ? 1024 : 1) <= fileSize;
|
|
369
|
-
|
|
370
330
|
if (!isCheckType) {
|
|
371
331
|
var content = type.join('、');
|
|
372
332
|
reject(new Error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01\u4EC5\u652F\u6301".concat(content, "\u7684\u6587\u4EF6\u7C7B\u578B\uFF01")));
|
|
373
333
|
}
|
|
374
|
-
|
|
375
334
|
if (!isCheckSize) {
|
|
376
335
|
reject(new Error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01\u9644\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7".concat(fileSize).concat(fileSizeType, "\uFF01")));
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
|
|
336
|
+
}
|
|
337
|
+
// 是否需要校验图片宽高
|
|
380
338
|
if (fileAreaSize) {
|
|
381
339
|
var reader = new FileReader();
|
|
382
340
|
reader.readAsDataURL(file);
|
|
383
|
-
|
|
384
341
|
reader.onload = function (evt) {
|
|
385
342
|
var res = evt.target.result;
|
|
386
343
|
var imageObj = new Image();
|
|
387
344
|
imageObj.src = res;
|
|
388
|
-
|
|
389
345
|
imageObj.onload = function () {
|
|
390
346
|
var maxWidth = fileAreaSize.maxWidth,
|
|
391
|
-
|
|
347
|
+
maxHeight = fileAreaSize.maxHeight;
|
|
392
348
|
var isCheckAreaSizeMaxWidth = !maxWidth || imageObj.width <= maxWidth;
|
|
393
349
|
var isCheckAreaSizeMaxHeight = !maxHeight || imageObj.height <= maxHeight;
|
|
394
|
-
|
|
395
350
|
if (!isCheckAreaSizeMaxWidth || !isCheckAreaSizeMaxHeight) {
|
|
396
351
|
reject(new Error("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01\u56FE\u7247\u5C3A\u5BF8\u4E0D\u7B26\u5408"));
|
|
397
352
|
} else {
|
|
@@ -403,8 +358,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
403
358
|
resolve(file);
|
|
404
359
|
}
|
|
405
360
|
});
|
|
406
|
-
}, [type, fileSize, fileSizeType, fileAreaSize]);
|
|
407
|
-
|
|
361
|
+
}, [type, fileSize, fileSizeType, fileAreaSize]);
|
|
362
|
+
// 文件循环校验,返回校验后的文件数组
|
|
408
363
|
var filesLoopCheck = useCallback(function (files) {
|
|
409
364
|
return Promise.all(files.map(fileCheckAsync));
|
|
410
365
|
}, [fileCheckAsync]);
|
|
@@ -416,7 +371,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
416
371
|
* => uploadProgress => uploadSuccess || uploadError
|
|
417
372
|
* => Props.onChange && (Props.onSuccess || Props.onError)
|
|
418
373
|
*/
|
|
419
|
-
|
|
420
374
|
var beforeUpload = useCallback(function (e) {
|
|
421
375
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
422
376
|
var files, res;
|
|
@@ -428,11 +382,10 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
428
382
|
_context4.prev = 1;
|
|
429
383
|
_context4.next = 4;
|
|
430
384
|
return filesLoopCheck(files);
|
|
431
|
-
|
|
432
385
|
case 4:
|
|
433
386
|
res = _context4.sent;
|
|
434
|
-
fileUploadLen.current = res.length;
|
|
435
|
-
|
|
387
|
+
fileUploadLen.current = res.length;
|
|
388
|
+
// 仅单文件上传时可剪裁
|
|
436
389
|
if (enableCrop) {
|
|
437
390
|
dispatch({
|
|
438
391
|
type: 'changeCropFile',
|
|
@@ -442,16 +395,13 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
442
395
|
// 校验完成开始执行上传
|
|
443
396
|
res.forEach(checkOver);
|
|
444
397
|
}
|
|
445
|
-
|
|
446
398
|
_context4.next = 13;
|
|
447
399
|
break;
|
|
448
|
-
|
|
449
400
|
case 9:
|
|
450
401
|
_context4.prev = 9;
|
|
451
402
|
_context4.t0 = _context4["catch"](1);
|
|
452
403
|
console.log('文件校验未通过!', _context4.t0.message);
|
|
453
404
|
message.warning(_context4.t0.message, 1.5);
|
|
454
|
-
|
|
455
405
|
case 13:
|
|
456
406
|
case "end":
|
|
457
407
|
return _context4.stop();
|
|
@@ -459,22 +409,19 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
459
409
|
}
|
|
460
410
|
}, _callee4, null, [[1, 9]]);
|
|
461
411
|
}));
|
|
462
|
-
}, [filesLoopCheck, enableCrop, checkOver, fileUploadLen.current]);
|
|
463
|
-
|
|
412
|
+
}, [filesLoopCheck, enableCrop, checkOver, fileUploadLen.current]);
|
|
413
|
+
// 删除事件
|
|
464
414
|
var remove = useCallback(function (file) {
|
|
465
415
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
466
416
|
var _c, _d, res, fileList;
|
|
467
|
-
|
|
468
417
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
469
418
|
while (1) {
|
|
470
419
|
switch (_context5.prev = _context5.next) {
|
|
471
420
|
case 0:
|
|
472
421
|
_context5.next = 2;
|
|
473
422
|
return (_c = props.onRemove) === null || _c === void 0 ? void 0 : _c.call(props, file);
|
|
474
|
-
|
|
475
423
|
case 2:
|
|
476
424
|
res = _context5.sent;
|
|
477
|
-
|
|
478
425
|
if (res) {
|
|
479
426
|
fileList = (_d = getFileList()) === null || _d === void 0 ? void 0 : _d.filter(function (v) {
|
|
480
427
|
return !getHasEqual(v, file);
|
|
@@ -488,7 +435,6 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
488
435
|
fileList: fileList
|
|
489
436
|
});
|
|
490
437
|
}
|
|
491
|
-
|
|
492
438
|
case 4:
|
|
493
439
|
case "end":
|
|
494
440
|
return _context5.stop();
|
|
@@ -496,23 +442,20 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
496
442
|
}
|
|
497
443
|
}, _callee5);
|
|
498
444
|
}));
|
|
499
|
-
}, [props.onRemove, getFileList, onChange, dispatch, getHasEqual]);
|
|
500
|
-
|
|
445
|
+
}, [props.onRemove, getFileList, onChange, dispatch, getHasEqual]);
|
|
446
|
+
// 点击文件链接或预览图标时的回调
|
|
501
447
|
var preview = useCallback(function (file) {
|
|
502
448
|
var _a;
|
|
503
|
-
|
|
504
449
|
(_a = props.onPreview) === null || _a === void 0 ? void 0 : _a.call(props, file);
|
|
505
|
-
}, [props.onPreview]);
|
|
506
|
-
|
|
450
|
+
}, [props.onPreview]);
|
|
451
|
+
// 点击下载文件时的回调
|
|
507
452
|
var download = useCallback(function (file) {
|
|
508
453
|
var _a;
|
|
509
|
-
|
|
510
454
|
(_a = props.onDownload) === null || _a === void 0 ? void 0 : _a.call(props, file);
|
|
511
|
-
}, [props.onDownload]);
|
|
512
|
-
|
|
455
|
+
}, [props.onDownload]);
|
|
456
|
+
// 拖拽移动事件
|
|
513
457
|
var move = useCallback(function (active, over, fileList) {
|
|
514
458
|
var _a;
|
|
515
|
-
|
|
516
459
|
(_a = props.onMove) === null || _a === void 0 ? void 0 : _a.call(props, active, over, fileList);
|
|
517
460
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
518
461
|
file: active,
|
|
@@ -547,5 +490,4 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
547
490
|
RefMethods: RefMethods
|
|
548
491
|
};
|
|
549
492
|
};
|
|
550
|
-
|
|
551
493
|
export default useCoreOptions;
|
package/es/LmUpload/utils.js
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
// 检查是否存在内容
|
|
4
4
|
export function getIsHas(val) {
|
|
5
|
-
var _a;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
var _a;
|
|
6
|
+
// 检查是否数字类型, 是否布尔类型
|
|
7
|
+
var flag = !!val || typeof val === 'number' || typeof val === 'boolean';
|
|
8
|
+
// 检查空对象和空数组
|
|
10
9
|
if (!!val && _typeof(val) === 'object') {
|
|
11
10
|
flag = Array.isArray(val) ? !!val.length : !!((_a = Object.keys(val)) === null || _a === void 0 ? void 0 : _a.length);
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
return flag;
|
|
15
|
-
}
|
|
16
|
-
|
|
13
|
+
}
|
|
14
|
+
// 检查是否类组件
|
|
17
15
|
export function isClassComponent(component) {
|
|
18
16
|
return typeof component === 'function' && function () {
|
|
19
17
|
var proto = Object.getPrototypeOf(component);
|
|
20
18
|
return proto.prototype && proto.prototype.isReactComponent;
|
|
21
19
|
}();
|
|
22
|
-
}
|
|
23
|
-
|
|
20
|
+
}
|
|
21
|
+
// 检查是否自定义组件
|
|
24
22
|
export function isExoticComponent(component) {
|
|
25
23
|
return _typeof(component) === 'object' && _typeof(component.$$typeof) === 'symbol' && ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description);
|
|
26
|
-
}
|
|
27
|
-
|
|
24
|
+
}
|
|
25
|
+
// 检查是否React组件
|
|
28
26
|
export function isReactComponent(component) {
|
|
29
27
|
return isClassComponent(component) || typeof component === 'function' || isExoticComponent(component);
|
|
30
28
|
}
|
|
@@ -35,7 +33,6 @@ export var render = function render(Comp, props) {
|
|
|
35
33
|
* 将上传的图片转换为可展示的形式
|
|
36
34
|
* getBase64(file, (img) => {})
|
|
37
35
|
*/
|
|
38
|
-
|
|
39
36
|
export var getBase64 = function getBase64(img, callback) {
|
|
40
37
|
var reader = new FileReader();
|
|
41
38
|
reader.addEventListener('load', function () {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
// 上传组件组合
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import UploadCore from '../body/UploadCore';
|
|
4
|
-
|
|
5
4
|
var LmUpload = function LmUpload(_ref) {
|
|
6
5
|
var instance = _ref.instance;
|
|
7
6
|
return /*#__PURE__*/React.createElement(UploadCore, {
|
|
8
7
|
instance: instance
|
|
9
8
|
});
|
|
10
9
|
};
|
|
11
|
-
|
|
12
10
|
export default LmUpload;
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import LmUpload from './Upload';
|
|
4
4
|
import LmUploadList from '../UploadList';
|
|
5
|
-
|
|
6
5
|
var LmUploadContainer = function LmUploadContainer(_ref) {
|
|
7
6
|
var instance = _ref.instance;
|
|
8
7
|
var readOnly = instance.readOnly,
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
wrapper = instance.components.wrapper;
|
|
11
9
|
if (!wrapper) {
|
|
12
10
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !readOnly && /*#__PURE__*/React.createElement(LmUpload, {
|
|
13
11
|
instance: instance
|
|
@@ -15,7 +13,6 @@ var LmUploadContainer = function LmUploadContainer(_ref) {
|
|
|
15
13
|
instance: instance
|
|
16
14
|
}));
|
|
17
15
|
}
|
|
18
|
-
|
|
19
16
|
return wrapper === null || wrapper === void 0 ? void 0 : wrapper({
|
|
20
17
|
uploadDom: !readOnly && /*#__PURE__*/React.createElement(LmUpload, {
|
|
21
18
|
instance: instance
|
|
@@ -25,5 +22,4 @@ var LmUploadContainer = function LmUploadContainer(_ref) {
|
|
|
25
22
|
})
|
|
26
23
|
});
|
|
27
24
|
};
|
|
28
|
-
|
|
29
25
|
export default /*#__PURE__*/React.memo(LmUploadContainer);
|
|
@@ -4,34 +4,30 @@ import React, { useMemo, useReducer, forwardRef, useImperativeHandle } from 'rea
|
|
|
4
4
|
import reducer, { initialState as initReducerState } from './reducer';
|
|
5
5
|
import useCoreOptions from '../fns';
|
|
6
6
|
import LmUploadWrapper from './UploadWrapper';
|
|
7
|
-
|
|
8
7
|
var LmUploadRoot = function LmUploadRoot(props, ref) {
|
|
9
8
|
var initialState = useMemo(function () {
|
|
10
9
|
return initReducerState(props);
|
|
11
10
|
}, []);
|
|
12
|
-
|
|
13
11
|
var _useReducer = useReducer(reducer, initialState),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
13
|
+
state = _useReducer2[0],
|
|
14
|
+
dispatch = _useReducer2[1];
|
|
15
|
+
// 获取核心Methods
|
|
19
16
|
var _useCoreOptions = useCoreOptions({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
state: state,
|
|
18
|
+
dispatch: dispatch,
|
|
19
|
+
props: props
|
|
20
|
+
}),
|
|
21
|
+
CoreMethods = _useCoreOptions.CoreMethods,
|
|
22
|
+
RefMethods = _useCoreOptions.RefMethods;
|
|
23
|
+
// 组件实例
|
|
28
24
|
var instance = useMemo(function () {
|
|
29
25
|
return Object.assign(Object.assign(Object.assign(Object.assign({}, props), CoreMethods), RefMethods), {
|
|
30
26
|
state: state,
|
|
31
27
|
dispatch: dispatch
|
|
32
28
|
});
|
|
33
|
-
}, [props, CoreMethods, RefMethods, state, dispatch]);
|
|
34
|
-
|
|
29
|
+
}, [props, CoreMethods, RefMethods, state, dispatch]);
|
|
30
|
+
// 向外暴露出的方法
|
|
35
31
|
useImperativeHandle(ref, function () {
|
|
36
32
|
return Object.assign({}, RefMethods);
|
|
37
33
|
});
|
|
@@ -39,5 +35,4 @@ var LmUploadRoot = function LmUploadRoot(props, ref) {
|
|
|
39
35
|
instance: instance
|
|
40
36
|
});
|
|
41
37
|
};
|
|
42
|
-
|
|
43
38
|
export default /*#__PURE__*/forwardRef(LmUploadRoot);
|
|
@@ -4,7 +4,6 @@ import LmUploadContainer from './UploadContainer';
|
|
|
4
4
|
import LmUploadView from '../view';
|
|
5
5
|
import Crop from '../components/Crop';
|
|
6
6
|
import Preview from '../components/Preview';
|
|
7
|
-
|
|
8
7
|
var LmUploadWrapper = function LmUploadWrapper(_ref) {
|
|
9
8
|
var instance = _ref.instance;
|
|
10
9
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -19,5 +18,4 @@ var LmUploadWrapper = function LmUploadWrapper(_ref) {
|
|
|
19
18
|
instance: instance
|
|
20
19
|
}));
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
export default /*#__PURE__*/React.memo(LmUploadWrapper);
|