linkmore-design 1.1.22-beta.2 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1164 -0
- package/dist/Affix/demos/basic.d.ts +0 -1
- package/dist/Alert/demos/basic.d.ts +0 -1
- package/dist/Alert/demos/visible.d.ts +0 -1
- package/dist/Approval/demos/basic.d.ts +0 -1
- package/dist/Avatar/demos/basic.d.ts +0 -1
- package/dist/Badge/SingleNumber.d.ts +0 -1
- package/dist/Badge/demos/basic.d.ts +0 -1
- package/dist/Breadcrumb/demos/basic.d.ts +0 -1
- package/dist/Breadcrumb/demos/basic1.d.ts +0 -1
- package/dist/Button/demos/basic.d.ts +0 -1
- package/dist/Button/demos/disabled.d.ts +0 -1
- package/dist/Button/demos/ghost.d.ts +0 -1
- package/dist/Button/demos/icon.d.ts +0 -1
- package/dist/Button/demos/type.d.ts +0 -1
- package/dist/Calendar/demos/basic.d.ts +0 -1
- package/dist/Card/demos/basic.d.ts +0 -1
- package/dist/Carousel/demos/basic.d.ts +0 -1
- package/dist/Cascader/demos/basic.d.ts +0 -1
- package/dist/Cascader/demos/formItem.d.ts +0 -1
- package/dist/Col/demos/basic.d.ts +0 -1
- package/dist/Collapse/demos/basic.d.ts +0 -1
- package/dist/Comment/demos/basic.d.ts +0 -1
- package/dist/ConfigProvider/demos/componentSize.d.ts +0 -1
- package/dist/CustomTableOption/demos/basic.d.ts +0 -1
- package/dist/DatePicker/PickerButton.d.ts +0 -1
- package/dist/DatePicker/PickerTag.d.ts +0 -1
- package/dist/DatePicker/demos/basic.d.ts +0 -1
- package/dist/Descriptions/demos/basic.d.ts +0 -1
- package/dist/Drawer/demos/basic.d.ts +0 -1
- package/dist/Drawer/demos/button.d.ts +0 -1
- package/dist/Drawer/demos/nested.d.ts +0 -1
- package/dist/Dropdown/demos/basic.d.ts +0 -1
- package/dist/Dropdown/demos/button.d.ts +0 -1
- package/dist/Dropdown/demos/icon.d.ts +0 -1
- package/dist/Dropdown/demos/local.d.ts +0 -1
- package/dist/Dropdown/demos/target.d.ts +0 -1
- package/dist/Empty/demos/basic.d.ts +0 -1
- package/dist/Empty/demos/custom.d.ts +0 -1
- package/dist/Empty/empty.d.ts +0 -1
- package/dist/Empty/simple.d.ts +0 -1
- package/dist/Form/demos/disabled.d.ts +0 -1
- package/dist/Form/demos/drawer1152-triple.d.ts +0 -1
- package/dist/Form/demos/drawer440-double.d.ts +0 -1
- package/dist/Form/demos/drawer440.d.ts +0 -1
- package/dist/Form/demos/drawer720-double.d.ts +0 -1
- package/dist/Form/demos/error-tip.d.ts +0 -1
- package/dist/Form/demos/formlist.d.ts +0 -1
- package/dist/Form/demos/horizontal.d.ts +0 -1
- package/dist/Form/demos/inline.d.ts +0 -1
- package/dist/Form/demos/modal416.d.ts +0 -1
- package/dist/Form/demos/modal552-double.d.ts +0 -1
- package/dist/Form/demos/responsive.d.ts +0 -1
- package/dist/Form/demos/ruleTime.d.ts +0 -1
- package/dist/Form/demos/vertical.d.ts +0 -1
- package/dist/FullScreen/demos/basic.d.ts +0 -1
- package/dist/FullScreen/demos/useInModal.d.ts +0 -1
- package/dist/Grid/demos/basic.d.ts +0 -1
- package/dist/IconFont/index.d.ts +0 -1
- package/dist/Image/demos/basic.d.ts +0 -1
- package/dist/ImageViewer/components/Arrows.d.ts +0 -1
- package/dist/ImageViewer/components/Carousel.d.ts +0 -1
- package/dist/ImageViewer/components/Operate.d.ts +0 -1
- package/dist/ImageViewer/components/Thumb.d.ts +0 -1
- package/dist/Input/demos/after.d.ts +0 -1
- package/dist/Input/demos/base.d.ts +0 -1
- package/dist/Input/demos/basic.d.ts +0 -1
- package/dist/Input/demos/color.d.ts +0 -1
- package/dist/Input/demos/combination.d.ts +0 -1
- package/dist/Input/demos/import.d.ts +0 -1
- package/dist/Input/demos/line.d.ts +0 -1
- package/dist/Input/demos/password.d.ts +0 -1
- package/dist/Input/demos/size.d.ts +0 -1
- package/dist/InputNumber/demos/basic.d.ts +0 -1
- package/dist/InputNumber/demos/format.d.ts +0 -1
- package/dist/InputNumber/demos/price.d.ts +0 -1
- package/dist/InputNumber/demos/status.d.ts +0 -1
- package/dist/InputNumber/demos/suffix.d.ts +0 -1
- package/dist/Layout/demos/basic.d.ts +0 -1
- package/dist/List/demos/basic.d.ts +0 -1
- package/dist/LmDrag/components/DndContainer.d.ts +0 -1
- package/dist/LmDrag/demos/basic.d.ts +0 -1
- package/dist/LmEditTable/DndContainer.d.ts +0 -1
- package/dist/LmEditTable/DragHandle.d.ts +0 -1
- package/dist/LmEditTable/demos/basic.d.ts +0 -1
- package/dist/LmEditTable/demos/colsort.d.ts +0 -1
- package/dist/LmEditTable/demos/group.d.ts +0 -1
- package/dist/LmEditTable/demos/priceTable.d.ts +0 -1
- package/dist/LmEditTable/demos/sinleEdit.d.ts +0 -1
- package/dist/LmEditTable/demos/size.d.ts +0 -1
- package/dist/LmEditTable/sortableBox.d.ts +0 -1
- package/dist/LmEditTable/sortableBoxCol.d.ts +0 -1
- package/dist/LmEditTable/sortableItem.d.ts +0 -1
- package/dist/LmEditTable/sortableItemCol.d.ts +0 -1
- package/dist/LmSelect/GhostSelect.d.ts +0 -1
- package/dist/LmSelect/demos/basic.d.ts +0 -1
- package/dist/LmSelect/demos/checkbox.d.ts +0 -1
- package/dist/LmSelect/demos/ghost.d.ts +0 -1
- package/dist/LmSelect/useCheckboxOptions.d.ts +0 -1
- package/dist/LmTable/components/DndContainer.d.ts +5 -37
- package/dist/LmTable/components/customRenderEmpty.d.ts +0 -1
- package/dist/LmTable/components/inputDataEdit.d.ts +0 -1
- package/dist/LmTable/components/{SortableBox.d.ts → sortableBoxCol.d.ts} +0 -0
- package/dist/LmTable/components/sortableItemCol.d.ts +1 -0
- package/dist/LmTable/components/tableChartsModal.d.ts +0 -1
- package/dist/LmTable/demos/{draggable.d.ts → excelGroup.d.ts} +0 -0
- package/dist/LmUpload/UploadList/ItemPicture.d.ts +0 -1
- package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +0 -1
- package/dist/LmUpload/UploadList/ItemText.d.ts +0 -1
- package/dist/LmUpload/view/index.d.ts +0 -1
- package/dist/LmUpload/wrapper/Upload.d.ts +0 -1
- package/dist/Mentions/demos/basic.d.ts +0 -1
- package/dist/Menu/demos/basic.d.ts +0 -1
- package/dist/Modal/demos/basic.d.ts +0 -1
- package/dist/Modal/demos/info.d.ts +0 -1
- package/dist/Modal/demos/locale.d.ts +0 -1
- package/dist/PageHeader/demos/basic.d.ts +0 -1
- package/dist/Pagination/demos/basic.d.ts +0 -1
- package/dist/Popconfirm/demos/basic.d.ts +0 -1
- package/dist/Popover/demos/basic.d.ts +0 -1
- package/dist/Popover/demos/basic1.d.ts +0 -1
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Progress/demos/basic.d.ts +0 -1
- package/dist/Progress/demos/circle.d.ts +0 -1
- package/dist/Progress/demos/dynamic.d.ts +0 -1
- package/dist/Progress/demos/small.d.ts +0 -1
- package/dist/QuickMenu/demos/basic.d.ts +0 -1
- package/dist/QuickMenu/demos/useInDraw.d.ts +0 -1
- package/dist/QuickMenu/index.d.ts +2 -1
- package/dist/Rate/demos/basic.d.ts +0 -1
- package/dist/Result/demos/403.d.ts +0 -1
- package/dist/Result/demos/404.d.ts +0 -1
- package/dist/Result/demos/500.d.ts +0 -1
- package/dist/Result/demos/basic.d.ts +0 -1
- package/dist/Result/demos/customicon.d.ts +0 -1
- package/dist/Result/demos/error.d.ts +0 -1
- package/dist/Result/demos/info.d.ts +0 -1
- package/dist/Result/demos/success.d.ts +0 -1
- package/dist/Result/demos/warning.d.ts +0 -1
- package/dist/Result/noFound.d.ts +0 -1
- package/dist/Result/serverError.d.ts +0 -1
- package/dist/Result/unauthorized.d.ts +0 -1
- package/dist/Row/demos/basic.d.ts +0 -1
- package/dist/Segmented/demos/basic.d.ts +0 -1
- package/dist/Select/demos/basic.d.ts +0 -1
- package/dist/Select/demos/bordered.d.ts +0 -1
- package/dist/Select/demos/formItem.d.ts +0 -1
- package/dist/Skeleton/demos/basic.d.ts +0 -1
- package/dist/Slider/demos/basic.d.ts +0 -1
- package/dist/Space/demos/auto.d.ts +0 -1
- package/dist/Space/demos/basic.d.ts +0 -1
- package/dist/Space/demos/vertical.d.ts +0 -1
- package/dist/Spin/demos/basic.d.ts +0 -1
- package/dist/Spin/demos/size.d.ts +0 -1
- package/dist/Statistic/demos/basic.d.ts +0 -1
- package/dist/Steps/demos/basic.d.ts +0 -1
- package/dist/Switch/demos/basic.d.ts +0 -1
- package/dist/Switch/demos/table.d.ts +0 -1
- package/dist/Table/demos/basic.d.ts +0 -1
- package/dist/Tabs/demos/basic.d.ts +0 -1
- package/dist/Tabs/demos/nobroder.d.ts +0 -1
- package/dist/Tag/demos/CheckableTag.d.ts +0 -1
- package/dist/Tag/demos/ExigencyTag.d.ts +0 -1
- package/dist/Tag/demos/add.d.ts +0 -1
- package/dist/Tag/demos/basic.d.ts +0 -1
- package/dist/Tag/demos/border.d.ts +0 -1
- package/dist/Tag/demos/colors.d.ts +0 -1
- package/dist/Timeline/demos/basic.d.ts +0 -1
- package/dist/Tooltip/demos/basic.d.ts +0 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Transfer/demos/basic.d.ts +0 -1
- package/dist/Tree/demos/basic.d.ts +0 -1
- package/dist/Tree/demos/controlled.d.ts +0 -1
- package/dist/Tree/demos/search.d.ts +0 -1
- package/dist/Tree/demos/sort.d.ts +0 -1
- package/dist/Tree/utils/dropIndicator.d.ts +0 -1
- package/dist/TreeSelect/demos/basic.d.ts +0 -1
- package/dist/TreeSelect/demos/formItem.d.ts +0 -1
- package/dist/Typography/demos/basic.d.ts +0 -1
- package/dist/hooks/useFullscreen/demos/basic.d.ts +0 -1
- package/dist/hooks/useFullscreen/demos/useInModal.d.ts +0 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.umd.css +1224 -650
- package/dist/index.umd.js +206770 -136121
- package/dist/index.umd.min.css +2 -2
- package/dist/index.umd.min.js +52 -24
- package/dist/locale-provider/index.d.ts +2 -2
- package/dist/message/demos/basic.d.ts +0 -1
- package/dist/message/demos/other.d.ts +0 -1
- package/dist/notification/demos/basic.d.ts +0 -1
- package/dist/notification/demos/button.d.ts +0 -1
- package/dist/notification/demos/icon.d.ts +0 -1
- package/dist/variables.css +2 -1
- package/es/Affix/index.js +90 -37
- package/es/Affix/utils.js +13 -6
- package/es/Alert/ErrorBoundary.js +15 -5
- package/es/Alert/index.js +64 -42
- package/es/Approval/handle.js +27 -10
- package/es/Approval/index.js +120 -63
- package/es/Approval/type.js +24 -0
- package/es/Approval/util.js +24 -4
- package/es/AutoComplete/index.js +20 -9
- package/es/Badge/Ribbon.js +16 -9
- package/es/Badge/ScrollNumber.js +28 -17
- package/es/Badge/SingleNumber.d.ts +0 -1
- package/es/Badge/SingleNumber.js +38 -23
- package/es/Badge/index.js +68 -44
- package/es/Badge/utils.js +2 -2
- package/es/Box/body/Item.js +3 -1
- package/es/Box/body/OverflowList.js +2 -2
- package/es/Box/wrapper/BoxContainer.js +12 -8
- package/es/Box/wrapper/BoxRoot.js +7 -5
- package/es/Box/wrapper/reducer.js +4 -2
- package/es/Button/index.js +17 -10
- package/es/ButtonTags/ButtonTags.js +15 -6
- package/es/ButtonTags/index.js +3 -0
- package/es/CardTable/LmCardTable.js +28 -19
- package/es/CardTable/body/TableBody.js +26 -17
- package/es/CardTable/body/TableBodyCell.js +17 -9
- package/es/CardTable/body/TableBodyRow.js +19 -13
- package/es/CardTable/card/PictureTextColumn.js +28 -18
- package/es/CardTable/card/PictureTextRow.js +31 -18
- package/es/CardTable/card/PictureTextRowOperate.js +30 -17
- package/es/CardTable/context.js +5 -0
- package/es/CardTable/empty.js +6 -1
- package/es/CardTable/fns/index.js +36 -22
- package/es/CardTable/footer.js +15 -4
- package/es/CardTable/hooks/usePagination.js +50 -35
- package/es/CardTable/index.js +5 -0
- package/es/CardTable/pager/TablePagination.js +15 -8
- package/es/CardTable/pager/index.js +13 -6
- package/es/CardTable/table/Table.js +6 -2
- package/es/CardTable/table/TableContainer.js +23 -14
- package/es/CardTable/table/TableRoot.js +65 -45
- package/es/CardTable/table/TableWrapper.js +9 -2
- package/es/CardTable/toolbar/ToolBarBottom.js +8 -3
- package/es/CardTable/utils.js +9 -3
- package/es/Cascader/index.js +21 -11
- package/es/Checkbox/index.js +18 -7
- package/es/ConfigProvider/DisabledContext.js +1 -1
- package/es/ConfigProvider/SizeContext.js +1 -1
- package/es/ConfigProvider/context.js +10 -4
- package/es/ConfigProvider/cssVariables.js +25 -16
- package/es/ConfigProvider/defaultRenderEmpty.js +6 -0
- package/es/ConfigProvider/index.js +55 -30
- package/es/CropImg/body/Operate.js +19 -10
- package/es/CropImg/body/index.js +8 -6
- package/es/CropImg/fns/index.js +11 -10
- package/es/CropImg/utils.js +45 -27
- package/es/CropImg/wrapper/Container.js +20 -9
- package/es/CropImg/wrapper/Root.js +16 -13
- package/es/CropImg/wrapper/Wrapper.js +2 -0
- package/es/CropImg/wrapper/reducer.js +9 -5
- package/es/CustomTableOption/cardSort.js +49 -24
- package/es/CustomTableOption/columnsSort.js +56 -22
- package/es/CustomTableOption/filterSort.js +48 -23
- package/es/CustomTableOption/index.js +31 -18
- package/es/CustomerService/components/question.js +20 -3
- package/es/CustomerService/index.js +46 -18
- package/es/DatePicker/PickerButton.d.ts +0 -1
- package/es/DatePicker/PickerTag.d.ts +0 -1
- package/es/DatePicker/generatePicker/generateRangePicker.js +33 -23
- package/es/DatePicker/generatePicker/generateSinglePicker.js +37 -22
- package/es/DatePicker/generatePicker/index.js +25 -12
- package/es/DatePicker/util.js +17 -0
- package/es/Descriptions/Cell.js +17 -11
- package/es/Descriptions/Item.js +1 -0
- package/es/Descriptions/Row.js +31 -24
- package/es/Descriptions/index.js +46 -27
- package/es/Divider/index.js +21 -12
- package/es/Drawer/index.js +11 -4
- package/es/Dropdown/index.js +40 -19
- package/es/EditTable/EditTable.js +171 -75
- package/es/EditTable/index.js +3 -0
- package/es/Empty/empty.js +4 -1
- package/es/Empty/index.js +22 -10
- package/es/Empty/simple.js +4 -1
- package/es/EnlargeImg/index.js +43 -17
- package/es/Filter/Popover.js +65 -29
- package/es/Filter/baseFilter/Popover.js +70 -28
- package/es/Filter/baseFilter/ToggleFilter.js +25 -9
- package/es/Filter/baseFilter/index.js +28 -8
- package/es/Filter/complex/ComplexFilter.js +47 -16
- package/es/Filter/complex/ComplexItem.js +47 -24
- package/es/Filter/components/Checkbox.js +34 -14
- package/es/Filter/components/Date.js +30 -10
- package/es/Filter/components/Input.js +23 -7
- package/es/Filter/components/Select.js +33 -13
- package/es/Filter/components/Tree.js +24 -8
- package/es/Filter/components/header.js +17 -3
- package/es/Filter/components/index.js +6 -0
- package/es/Filter/context.js +4 -0
- package/es/Filter/edit/editFilter.js +78 -41
- package/es/Filter/index.js +43 -21
- package/es/Filter/popContext.js +4 -0
- package/es/Filter/remember.js +41 -18
- package/es/Form/ErrorList.js +22 -16
- package/es/Form/Form.js +49 -27
- package/es/Form/FormItem/ItemHolder.js +42 -26
- package/es/Form/FormItem/index.js +103 -58
- package/es/Form/FormItemInput.js +16 -14
- package/es/Form/FormItemLabel.js +43 -24
- package/es/Form/FormList.js +11 -3
- package/es/Form/FormWrapper.js +4 -0
- package/es/Form/WrapperItem.js +70 -34
- package/es/Form/container.js +25 -12
- package/es/Form/context.js +5 -2
- package/es/Form/hooks/useDebounce.js +4 -3
- package/es/Form/hooks/useForm.js +7 -2
- package/es/Form/hooks/useFormInstance.js +2 -1
- package/es/Form/hooks/useFormItemStatus.js +4 -1
- package/es/Form/hooks/useFrameState.js +8 -3
- package/es/Form/hooks/useItemRef.js +6 -1
- package/es/Form/index.js +2 -0
- package/es/Form/util.js +6 -2
- package/es/FullScreen/index.js +6 -3
- package/es/Grid/col.js +41 -21
- package/es/Grid/hooks/useBreakpoint.js +3 -0
- package/es/Grid/index.js +3 -2
- package/es/Grid/row.js +49 -31
- package/es/Icon/index.js +4 -0
- package/es/IconFont/font/iconfont.js +16 -10
- package/es/IconFont/index.js +4 -1
- package/es/IconSelect/index.js +29 -12
- package/es/ImageViewer/LmImageViewer.js +6 -0
- package/es/ImageViewer/components/Arrows.js +7 -1
- package/es/ImageViewer/components/Carousel.js +15 -13
- package/es/ImageViewer/components/Operate.js +4 -0
- package/es/ImageViewer/components/Thumb.js +10 -3
- package/es/ImageViewer/fns/index.js +26 -17
- package/es/ImageViewer/wrapeer/Container.js +5 -1
- package/es/ImageViewer/wrapeer/Root.js +19 -14
- package/es/ImageViewer/wrapeer/Wrapper.js +5 -1
- package/es/ImageViewer/wrapeer/reducer.js +13 -6
- package/es/Input/index.js +24 -16
- package/es/InputNumber/index.js +17 -9
- package/es/LeftTable/index.js +49 -25
- package/es/LmDrag/LmDrag.js +6 -0
- package/es/LmDrag/components/DndContainer.js +38 -22
- package/es/LmDrag/components/sortableBox.js +5 -4
- package/es/LmDrag/components/sortableItem.js +17 -13
- package/es/LmDrag/wrapper/Root.js +2 -0
- package/es/LmEditTable/DndContainer.js +12 -9
- package/es/LmEditTable/DragHandle.js +6 -4
- package/es/LmEditTable/EditTable.js +312 -154
- package/es/LmEditTable/sortableBox.js +3 -1
- package/es/LmEditTable/sortableBoxCol.js +3 -1
- package/es/LmEditTable/sortableItem.js +16 -9
- package/es/LmEditTable/sortableItemCol.d.ts +0 -1
- package/es/LmEditTable/sortableItemCol.js +14 -8
- package/es/LmEditTable/util.js +10 -2
- package/es/LmFilter/Controls/CheckboxTags.js +12 -2
- package/es/LmFilter/Controls/index.js +24 -10
- package/es/LmFilter/LmFilter.js +14 -4
- package/es/LmFilter/baseFilter/fuzzySearch.js +18 -8
- package/es/LmFilter/baseFilter/index.js +6 -1
- package/es/LmFilter/clearFilter/index.js +9 -2
- package/es/LmFilter/complexFilter/drawer.js +76 -47
- package/es/LmFilter/complexFilter/index.js +14 -2
- package/es/LmFilter/complexFilter/valueDrawer.js +46 -14
- package/es/LmFilter/components/CascaderFilter.js +52 -27
- package/es/LmFilter/components/CheckboxFilter.js +52 -39
- package/es/LmFilter/components/CustomSelectFilter.js +38 -20
- package/es/LmFilter/components/DateFilter.js +39 -23
- package/es/LmFilter/components/DropdownFIlter.js +82 -49
- package/es/LmFilter/components/EmptyFilter.js +5 -0
- package/es/LmFilter/components/InputFilter.js +13 -5
- package/es/LmFilter/components/InputSearchClose.js +22 -10
- package/es/LmFilter/components/SelectFilter.js +37 -21
- package/es/LmFilter/components/index.js +34 -23
- package/es/LmFilter/customFilter/drawer.js +72 -37
- package/es/LmFilter/customFilter/index.js +24 -11
- package/es/LmFilter/customFilter/saveModal.js +36 -12
- package/es/LmFilter/customFilter/valueDrawer.js +45 -14
- package/es/LmFilter/filterFns/index.js +191 -131
- package/es/LmFilter/hooks/index.js +2 -0
- package/es/LmFilter/hooks/useDelayedFn.js +5 -2
- package/es/LmFilter/index.js +3 -0
- package/es/LmFilter/localization.js +1 -2
- package/es/LmFilter/utils.js +47 -21
- package/es/LmFilter/wrapper/Filter.js +13 -4
- package/es/LmFilter/wrapper/FilterContainer.js +5 -1
- package/es/LmFilter/wrapper/FilterRoot.js +62 -40
- package/es/LmFilter/wrapper/FilterWrapper.js +5 -1
- package/es/LmImgList/body/Banner.js +17 -13
- package/es/LmImgList/body/Thumb.js +9 -4
- package/es/LmImgList/fns/index.js +23 -15
- package/es/LmImgList/wrapper/Container.js +13 -9
- package/es/LmImgList/wrapper/Root.js +16 -13
- package/es/LmImgList/wrapper/reducer.js +11 -6
- package/es/LmSelect/GhostSelect.js +150 -99
- package/es/LmSelect/NormalSelect.js +30 -20
- package/es/LmSelect/index.js +7 -1
- package/es/LmSelect/useCheckboxOptions.js +27 -17
- package/es/LmSelect/utils.js +22 -20
- package/es/LmTable/Table.js +522 -352
- package/es/LmTable/VList.js +170 -109
- package/es/LmTable/autosize.js +43 -16
- package/es/LmTable/chartUtil.js +14 -4
- package/es/LmTable/components/DndContainer.d.ts +5 -37
- package/es/LmTable/components/DndContainer.js +31 -629
- package/es/LmTable/components/customRenderEmpty.js +4 -1
- package/es/LmTable/components/inputDataEdit.js +8 -3
- package/es/LmTable/components/sheelTableCell.js +57 -32
- package/{lib/LmTable/components/SortableBox.js → es/LmTable/components/sortableBoxCol.js} +6 -1
- package/es/LmTable/components/sortableItemCol.js +56 -0
- package/es/LmTable/components/tableChartsModal.js +30 -23
- package/es/LmTable/context.js +3 -0
- package/es/LmTable/detectElementResize.js +48 -15
- package/es/LmTable/expression.js +7 -2
- package/es/LmTable/hooks/useGroupDataSource.js +12 -4
- package/es/LmTable/hooks/useRowSelectControllableValue.js +20 -6
- package/es/LmTable/index.js +3 -0
- package/es/LmTable/resetConfig.js +8 -8
- package/es/LmTable/style/index.css +2 -1
- package/es/LmTable/style/variables.css +2 -1
- package/es/LmTable/util.js +90 -30
- package/es/LmTable/virTual/VirtualRow.js +26 -14
- package/es/LmTable/virTual/VirtualTable.js +9 -13
- package/es/LmTable/virTual/VirtualWrapper.js +14 -7
- package/es/LmTable/virTual/context.js +13 -4
- package/es/LmUpload/LmUpload.js +17 -11
- package/es/LmUpload/UploadList/ItemPicture.js +8 -7
- package/es/LmUpload/UploadList/ItemPictureCard.js +37 -22
- package/es/LmUpload/UploadList/ItemText.js +6 -4
- package/es/LmUpload/UploadList/RenderItem.js +7 -1
- package/es/LmUpload/UploadList/index.js +18 -10
- package/es/LmUpload/body/Progress.js +2 -0
- package/es/LmUpload/body/UploadCore.js +15 -9
- package/es/LmUpload/body/UploadPicture.js +5 -4
- package/es/LmUpload/components/Crop.js +5 -3
- package/es/LmUpload/components/Preview.js +10 -7
- package/es/LmUpload/fns/index.js +108 -57
- package/es/LmUpload/utils.js +15 -12
- package/es/LmUpload/view/index.js +2 -0
- package/es/LmUpload/wrapper/Upload.js +2 -0
- package/es/LmUpload/wrapper/UploadContainer.js +5 -1
- package/es/LmUpload/wrapper/UploadRoot.js +18 -13
- package/es/LmUpload/wrapper/UploadWrapper.js +2 -0
- package/es/LmUpload/wrapper/reducer.js +11 -6
- package/es/LoadingPage/index.js +7 -1
- package/es/Locale/ku_IQ.js +2 -2
- package/es/Modal/index.js +22 -8
- package/es/PageHeader/index.js +44 -22
- package/es/Pagination/index.js +13 -4
- package/es/Popover/index.d.ts +1 -1
- package/es/Popover/index.js +14 -5
- package/es/QuickMenu/index.d.ts +2 -1
- package/es/QuickMenu/index.js +54 -27
- package/es/Radio/index.js +20 -9
- package/es/Result/index.js +26 -16
- package/es/Result/noFound.js +2 -0
- package/es/Result/serverError.js +2 -0
- package/es/Result/unauthorized.js +2 -0
- package/es/Select/index.js +31 -20
- package/es/Switch/index.js +10 -3
- package/es/Tabs/TabPane.js +2 -0
- package/es/Tabs/hooks/useAnimateConfig.js +3 -0
- package/es/Tabs/hooks/useLegacyItems.js +12 -3
- package/es/Tabs/index.js +27 -15
- package/es/Tabs/index.old.js +11 -4
- package/es/Tag/index.js +13 -5
- package/es/Tooltip/index.d.ts +1 -1
- package/es/Tooltip/index.js +66 -34
- package/es/Tree/DirectoryTree.js +61 -31
- package/es/Tree/Tree.js +21 -14
- package/es/Tree/index.js +5 -1
- package/es/Tree/utils/dictUtil.js +21 -4
- package/es/Tree/utils/dropIndicator.d.ts +0 -1
- package/es/Tree/utils/dropIndicator.js +10 -5
- package/es/Tree/utils/iconUtil.js +13 -2
- package/es/TreeSelect/index.js +24 -15
- package/es/Typography/Base/Ellipsis.js +52 -25
- package/es/Typography/Base/EllipsisTooltip.js +8 -3
- package/es/Typography/Base/index.js +173 -104
- package/es/Typography/Editable.js +34 -21
- package/es/Typography/Link.js +11 -4
- package/es/Typography/Paragraph.js +2 -0
- package/es/Typography/Text.js +9 -1
- package/es/Typography/Title.js +10 -2
- package/es/Typography/Typography.js +23 -11
- package/es/Typography/hooks/useUpdatedEffect.js +1 -0
- package/es/Upload/index.js +6 -2
- package/es/UploadOss/index.js +4 -0
- package/es/UploadOss/uploadBtn.js +54 -32
- package/es/UploadOss/uploadImg.js +86 -58
- package/es/VirtualList/index.js +27 -18
- package/es/_util/colors.js +2 -2
- package/es/_util/domTarget.js +3 -0
- package/es/_util/getDataOrAriaProps.js +1 -0
- package/es/_util/getRenderPropValue.js +3 -0
- package/es/_util/hooks/useFlexGapSupport.js +4 -3
- package/es/_util/hooks/useForceUpdate.js +5 -4
- package/es/_util/motion.js +11 -2
- package/es/_util/placements.js +8 -7
- package/es/_util/responsiveObserve.js +5 -0
- package/es/_util/statusUtils.js +1 -0
- package/es/_util/styleChecker.js +9 -6
- package/es/_util/throttleByAnimationFrame.js +6 -0
- package/es/_util/transButton.js +15 -3
- package/es/_util/type.js +2 -0
- package/es/_util/warning.js +6 -4
- package/es/hooks/useEvent/index.js +7 -6
- package/es/hooks/useFullscreen/index.js +29 -7
- package/es/index.d.ts +1 -0
- package/es/locale-provider/LocaleReceiver.js +12 -4
- package/es/locale-provider/index.d.ts +2 -2
- package/es/locale-provider/index.js +11 -2
- package/es/message/hooks/useMessage.js +17 -8
- package/es/message/index.js +36 -8
- package/es/notification/hooks/useNotification.js +12 -8
- package/es/notification/index.js +67 -31
- package/es/services/newRequest.js +47 -18
- package/es/services/utils.js +15 -0
- package/es/styles/variables.css +2 -1
- package/lib/Affix/index.js +104 -37
- package/lib/Affix/utils.js +22 -6
- package/lib/Alert/ErrorBoundary.js +21 -5
- package/lib/Alert/index.js +78 -42
- package/lib/Approval/handle.js +37 -10
- package/lib/Approval/index.js +131 -63
- package/lib/Approval/type.js +24 -0
- package/lib/Approval/util.js +30 -4
- package/lib/AutoComplete/index.js +34 -10
- package/lib/Avatar/index.js +4 -0
- package/lib/Badge/Ribbon.js +23 -9
- package/lib/Badge/ScrollNumber.js +35 -17
- package/lib/Badge/SingleNumber.d.ts +0 -1
- package/lib/Badge/SingleNumber.js +43 -23
- package/lib/Badge/index.js +79 -44
- package/lib/Badge/utils.js +2 -0
- package/lib/Box/LmBox.js +5 -0
- package/lib/Box/body/Item.js +7 -1
- package/lib/Box/body/List.js +6 -0
- package/lib/Box/body/OverflowList.js +4 -0
- package/lib/Box/index.js +3 -0
- package/lib/Box/wrapper/BoxContainer.js +19 -8
- package/lib/Box/wrapper/BoxRoot.js +14 -5
- package/lib/Box/wrapper/BoxWrapper.js +5 -0
- package/lib/Box/wrapper/reducer.js +8 -2
- package/lib/Breadcrumb/index.js +4 -0
- package/lib/Button/index.js +25 -10
- package/lib/ButtonTags/ButtonTags.js +15 -6
- package/lib/ButtonTags/index.js +3 -0
- package/lib/Calendar/index.js +4 -0
- package/lib/Card/index.js +4 -0
- package/lib/CardTable/LmCardTable.js +28 -19
- package/lib/CardTable/body/TableBody.js +26 -17
- package/lib/CardTable/body/TableBodyCell.js +17 -9
- package/lib/CardTable/body/TableBodyRow.js +19 -13
- package/lib/CardTable/card/PictureTextColumn.js +28 -18
- package/lib/CardTable/card/PictureTextRow.js +31 -18
- package/lib/CardTable/card/PictureTextRowOperate.js +30 -17
- package/lib/CardTable/context.js +5 -0
- package/lib/CardTable/empty.js +6 -1
- package/lib/CardTable/fns/index.js +36 -22
- package/lib/CardTable/footer.js +15 -4
- package/lib/CardTable/hooks/usePagination.js +50 -35
- package/lib/CardTable/index.js +5 -0
- package/lib/CardTable/pager/TablePagination.js +15 -8
- package/lib/CardTable/pager/index.js +13 -6
- package/lib/CardTable/table/Table.js +6 -2
- package/lib/CardTable/table/TableContainer.js +23 -14
- package/lib/CardTable/table/TableRoot.js +65 -45
- package/lib/CardTable/table/TableWrapper.js +9 -2
- package/lib/CardTable/toolbar/ToolBarBottom.js +8 -3
- package/lib/CardTable/utils.js +9 -3
- package/lib/Carousel/index.js +4 -0
- package/lib/Cascader/index.js +30 -11
- package/lib/Checkbox/index.js +18 -7
- package/lib/Col/index.js +2 -0
- package/lib/Collapse/index.js +4 -0
- package/lib/Comment/index.js +4 -0
- package/lib/ConfigProvider/DisabledContext.js +6 -1
- package/lib/ConfigProvider/SizeContext.js +6 -1
- package/lib/ConfigProvider/context.js +13 -4
- package/lib/ConfigProvider/cssVariables.js +34 -17
- package/lib/ConfigProvider/defaultRenderEmpty.js +12 -0
- package/lib/ConfigProvider/index.js +75 -30
- package/lib/CropImg/LmCropImg.js +5 -0
- package/lib/CropImg/body/Operate.js +23 -10
- package/lib/CropImg/body/index.js +13 -6
- package/lib/CropImg/fns/index.js +12 -8
- package/lib/CropImg/index.js +3 -0
- package/lib/CropImg/utils.js +45 -27
- package/lib/CropImg/wrapper/Container.js +26 -7
- package/lib/CropImg/wrapper/Root.js +24 -13
- package/lib/CropImg/wrapper/Wrapper.js +6 -0
- package/lib/CropImg/wrapper/reducer.js +12 -5
- package/lib/CustomTableOption/cardSort.js +60 -24
- package/lib/CustomTableOption/columnsSort.js +67 -22
- package/lib/CustomTableOption/filterSort.js +59 -23
- package/lib/CustomTableOption/index.js +44 -18
- package/lib/CustomerService/components/question.js +20 -3
- package/lib/CustomerService/index.js +46 -18
- package/lib/DatePicker/PickerButton.d.ts +0 -1
- package/lib/DatePicker/PickerButton.js +4 -0
- package/lib/DatePicker/PickerTag.d.ts +0 -1
- package/lib/DatePicker/PickerTag.js +4 -0
- package/lib/DatePicker/generatePicker/generateRangePicker.js +52 -23
- package/lib/DatePicker/generatePicker/generateSinglePicker.js +56 -22
- package/lib/DatePicker/generatePicker/index.js +33 -12
- package/lib/DatePicker/index.js +6 -0
- package/lib/DatePicker/util.js +20 -0
- package/lib/Descriptions/Cell.js +22 -11
- package/lib/Descriptions/Item.js +2 -0
- package/lib/Descriptions/Row.js +36 -24
- package/lib/Descriptions/index.js +61 -28
- package/lib/Divider/index.js +28 -12
- package/lib/Drawer/index.js +16 -4
- package/lib/Dropdown/index.js +48 -19
- package/lib/EditTable/EditTable.js +171 -75
- package/lib/EditTable/index.js +3 -0
- package/lib/Empty/empty.js +7 -1
- package/lib/Empty/index.js +33 -10
- package/lib/Empty/simple.js +7 -1
- package/lib/EnlargeImg/index.js +43 -17
- package/lib/Filter/Popover.js +65 -29
- package/lib/Filter/baseFilter/Popover.js +70 -28
- package/lib/Filter/baseFilter/ToggleFilter.js +25 -9
- package/lib/Filter/baseFilter/index.js +28 -8
- package/lib/Filter/complex/ComplexFilter.js +47 -16
- package/lib/Filter/complex/ComplexItem.js +47 -24
- package/lib/Filter/components/Checkbox.js +34 -14
- package/lib/Filter/components/Date.js +30 -10
- package/lib/Filter/components/Input.js +23 -7
- package/lib/Filter/components/Select.js +33 -13
- package/lib/Filter/components/Tree.js +24 -8
- package/lib/Filter/components/header.js +17 -3
- package/lib/Filter/components/index.js +6 -0
- package/lib/Filter/context.js +4 -0
- package/lib/Filter/edit/editFilter.js +78 -41
- package/lib/Filter/index.js +43 -21
- package/lib/Filter/popContext.js +4 -0
- package/lib/Filter/remember.js +41 -18
- package/lib/Form/ErrorList.js +34 -16
- package/lib/Form/Form.js +62 -27
- package/lib/Form/FormItem/ItemHolder.js +60 -26
- package/lib/Form/FormItem/index.js +122 -58
- package/lib/Form/FormItemInput.js +23 -14
- package/lib/Form/FormItemLabel.js +55 -24
- package/lib/Form/FormList.js +18 -3
- package/lib/Form/FormWrapper.js +8 -0
- package/lib/Form/WrapperItem.js +79 -34
- package/lib/Form/container.js +32 -12
- package/lib/Form/context.js +15 -2
- package/lib/Form/hooks/useDebounce.js +9 -3
- package/lib/Form/hooks/useForm.js +14 -2
- package/lib/Form/hooks/useFormInstance.js +5 -1
- package/lib/Form/hooks/useFormItemStatus.js +8 -1
- package/lib/Form/hooks/useFrameState.js +16 -3
- package/lib/Form/hooks/useItemRef.js +13 -1
- package/lib/Form/index.js +13 -0
- package/lib/Form/util.js +9 -2
- package/lib/FullScreen/index.js +10 -3
- package/lib/Grid/RowContext.js +2 -0
- package/lib/Grid/col.js +48 -21
- package/lib/Grid/hooks/useBreakpoint.js +8 -0
- package/lib/Grid/index.js +7 -0
- package/lib/Grid/row.js +62 -31
- package/lib/Icon/index.js +4 -0
- package/lib/IconFont/font/iconfont.js +16 -10
- package/lib/IconFont/index.js +11 -1
- package/lib/IconSelect/index.js +29 -12
- package/lib/Image/index.js +4 -0
- package/lib/ImageViewer/LmImageViewer.js +11 -0
- package/lib/ImageViewer/components/Arrows.js +10 -1
- package/lib/ImageViewer/components/Carousel.js +18 -13
- package/lib/ImageViewer/components/Operate.js +7 -0
- package/lib/ImageViewer/components/Thumb.js +15 -3
- package/lib/ImageViewer/fns/index.js +27 -17
- package/lib/ImageViewer/index.js +3 -0
- package/lib/ImageViewer/wrapeer/Container.js +12 -2
- package/lib/ImageViewer/wrapeer/Root.js +27 -15
- package/lib/ImageViewer/wrapeer/Wrapper.js +9 -2
- package/lib/ImageViewer/wrapeer/reducer.js +16 -6
- package/lib/Input/index.js +34 -16
- package/lib/InputNumber/index.js +26 -9
- package/lib/Layout/index.js +4 -0
- package/lib/LeftTable/index.js +49 -25
- package/lib/List/index.js +4 -0
- package/lib/LmDrag/LmDrag.js +11 -0
- package/lib/LmDrag/components/DndContainer.js +47 -22
- package/lib/LmDrag/components/sortableBox.js +9 -2
- package/lib/LmDrag/components/sortableItem.js +22 -13
- package/lib/LmDrag/index.js +3 -0
- package/lib/LmDrag/wrapper/Root.js +7 -0
- package/lib/LmEditTable/DndContainer.js +16 -7
- package/lib/LmEditTable/DragHandle.js +12 -4
- package/lib/LmEditTable/EditTable.js +337 -154
- package/lib/LmEditTable/index.js +3 -0
- package/lib/LmEditTable/sortableBox.js +6 -1
- package/lib/LmEditTable/sortableBoxCol.js +6 -1
- package/lib/LmEditTable/sortableItem.js +20 -9
- package/lib/LmEditTable/sortableItemCol.d.ts +0 -1
- package/lib/LmEditTable/sortableItemCol.js +20 -8
- package/lib/LmEditTable/util.js +19 -2
- package/lib/LmFilter/Controls/CheckboxTags.js +12 -2
- package/lib/LmFilter/Controls/index.js +24 -10
- package/lib/LmFilter/LmFilter.js +14 -4
- package/lib/LmFilter/baseFilter/fuzzySearch.js +18 -8
- package/lib/LmFilter/baseFilter/index.js +6 -1
- package/lib/LmFilter/clearFilter/index.js +9 -2
- package/lib/LmFilter/complexFilter/drawer.js +76 -47
- package/lib/LmFilter/complexFilter/index.js +14 -2
- package/lib/LmFilter/complexFilter/valueDrawer.js +46 -14
- package/lib/LmFilter/components/CascaderFilter.js +52 -27
- package/lib/LmFilter/components/CheckboxFilter.js +52 -39
- package/lib/LmFilter/components/CustomSelectFilter.js +38 -20
- package/lib/LmFilter/components/DateFilter.js +39 -23
- package/lib/LmFilter/components/DropdownFIlter.js +82 -49
- package/lib/LmFilter/components/EmptyFilter.js +5 -0
- package/lib/LmFilter/components/InputFilter.js +13 -5
- package/lib/LmFilter/components/InputSearchClose.js +22 -10
- package/lib/LmFilter/components/SelectFilter.js +37 -21
- package/lib/LmFilter/components/index.js +34 -23
- package/lib/LmFilter/customFilter/drawer.js +72 -37
- package/lib/LmFilter/customFilter/index.js +24 -11
- package/lib/LmFilter/customFilter/saveModal.js +36 -12
- package/lib/LmFilter/customFilter/valueDrawer.js +45 -14
- package/lib/LmFilter/filterFns/index.js +197 -129
- package/lib/LmFilter/hooks/index.js +2 -0
- package/lib/LmFilter/hooks/useDelayedFn.js +5 -2
- package/lib/LmFilter/index.js +3 -0
- package/lib/LmFilter/localization.js +1 -2
- package/lib/LmFilter/utils.js +47 -21
- package/lib/LmFilter/wrapper/Filter.js +13 -4
- package/lib/LmFilter/wrapper/FilterContainer.js +5 -1
- package/lib/LmFilter/wrapper/FilterRoot.js +62 -40
- package/lib/LmFilter/wrapper/FilterWrapper.js +5 -1
- package/lib/LmImgList/LmImgList.js +5 -0
- package/lib/LmImgList/body/Banner.js +22 -13
- package/lib/LmImgList/body/Thumb.js +16 -4
- package/lib/LmImgList/fns/index.js +24 -15
- package/lib/LmImgList/index.js +4 -0
- package/lib/LmImgList/wrapper/Container.js +21 -9
- package/lib/LmImgList/wrapper/Root.js +24 -13
- package/lib/LmImgList/wrapper/Wrapper.js +5 -0
- package/lib/LmImgList/wrapper/reducer.js +14 -6
- package/lib/LmSelect/GhostSelect.js +163 -99
- package/lib/LmSelect/NormalSelect.js +40 -20
- package/lib/LmSelect/index.js +14 -1
- package/lib/LmSelect/useCheckboxOptions.js +37 -17
- package/lib/LmSelect/utils.js +38 -18
- package/lib/LmTable/Table.js +522 -352
- package/lib/LmTable/VList.js +170 -109
- package/lib/LmTable/autosize.js +43 -16
- package/lib/LmTable/chartUtil.js +14 -4
- package/lib/LmTable/components/DndContainer.d.ts +5 -37
- package/lib/LmTable/components/DndContainer.js +37 -627
- package/lib/LmTable/components/customRenderEmpty.js +8 -1
- package/lib/LmTable/components/inputDataEdit.js +11 -3
- package/lib/LmTable/components/sheelTableCell.js +65 -32
- package/{es/LmTable/components/SortableBox.js → lib/LmTable/components/sortableBoxCol.js} +6 -1
- package/lib/LmTable/components/sortableItemCol.js +56 -0
- package/lib/LmTable/components/tableChartsModal.js +26 -12
- package/lib/LmTable/context.js +3 -0
- package/lib/LmTable/detectElementResize.js +48 -15
- package/lib/LmTable/expression.js +10 -2
- package/lib/LmTable/hooks/useGroupDataSource.js +12 -4
- package/lib/LmTable/hooks/useRowSelectControllableValue.js +20 -6
- package/lib/LmTable/index.js +3 -0
- package/lib/LmTable/resetConfig.js +8 -8
- package/lib/LmTable/style/index.css +2 -1
- package/lib/LmTable/style/variables.css +2 -1
- package/lib/LmTable/util.js +90 -30
- package/lib/LmTable/virTual/VirtualRow.js +31 -14
- package/lib/LmTable/virTual/VirtualTable.js +17 -13
- package/lib/LmTable/virTual/VirtualWrapper.js +19 -7
- package/lib/LmTable/virTual/context.js +13 -2
- package/lib/LmTable/virTual/index.js +4 -0
- package/lib/LmUpload/LmUpload.js +22 -11
- package/lib/LmUpload/UploadList/ItemPicture.js +12 -5
- package/lib/LmUpload/UploadList/ItemPictureCard.js +43 -22
- package/lib/LmUpload/UploadList/ItemText.js +11 -4
- package/lib/LmUpload/UploadList/RenderItem.js +14 -1
- package/lib/LmUpload/UploadList/index.js +25 -10
- package/lib/LmUpload/body/Progress.js +5 -0
- package/lib/LmUpload/body/UploadCore.js +20 -7
- package/lib/LmUpload/body/UploadPicture.js +10 -2
- package/lib/LmUpload/components/Crop.js +9 -3
- package/lib/LmUpload/components/Preview.js +14 -7
- package/lib/LmUpload/fns/index.js +114 -57
- package/lib/LmUpload/index.js +3 -0
- package/lib/LmUpload/utils.js +24 -10
- package/lib/LmUpload/view/index.js +4 -0
- package/lib/LmUpload/wrapper/Upload.js +6 -1
- package/lib/LmUpload/wrapper/UploadContainer.js +11 -2
- package/lib/LmUpload/wrapper/UploadRoot.js +26 -14
- package/lib/LmUpload/wrapper/UploadWrapper.js +9 -1
- package/lib/LmUpload/wrapper/reducer.js +15 -6
- package/lib/LoadingPage/index.js +7 -1
- package/lib/Locale/ar_EG.js +6 -1
- package/lib/Locale/az_AZ.js +6 -1
- package/lib/Locale/bg_BG.js +6 -0
- package/lib/Locale/bn_BD.js +6 -1
- package/lib/Locale/by_BY.js +6 -1
- package/lib/Locale/ca_ES.js +6 -1
- package/lib/Locale/cs_CZ.js +6 -1
- package/lib/Locale/da_DK.js +6 -0
- package/lib/Locale/de_DE.js +6 -1
- package/lib/Locale/default.js +7 -1
- package/lib/Locale/el_GR.js +6 -0
- package/lib/Locale/en_GB.js +6 -1
- package/lib/Locale/en_US.js +3 -0
- package/lib/Locale/es_ES.js +6 -1
- package/lib/Locale/et_EE.js +6 -1
- package/lib/Locale/fa_IR.js +6 -1
- package/lib/Locale/fi_FI.js +6 -0
- package/lib/Locale/fr_BE.js +6 -0
- package/lib/Locale/fr_CA.js +6 -0
- package/lib/Locale/fr_FR.js +6 -1
- package/lib/Locale/ga_IE.js +6 -1
- package/lib/Locale/gl_ES.js +6 -1
- package/lib/Locale/he_IL.js +6 -1
- package/lib/Locale/hi_IN.js +6 -1
- package/lib/Locale/hr_HR.js +6 -1
- package/lib/Locale/hu_HU.js +6 -0
- package/lib/Locale/id_ID.js +6 -0
- package/lib/Locale/is_IS.js +6 -0
- package/lib/Locale/it_IT.js +6 -0
- package/lib/Locale/ja_JP.js +6 -1
- package/lib/Locale/ka_GE.js +6 -1
- package/lib/Locale/kk_KZ.js +6 -1
- package/lib/Locale/km_KH.js +6 -1
- package/lib/Locale/kmr_IQ.js +6 -0
- package/lib/Locale/kn_IN.js +6 -0
- package/lib/Locale/ko_KR.js +6 -1
- package/lib/Locale/ku_IQ.js +6 -0
- package/lib/Locale/lt_LT.js +6 -1
- package/lib/Locale/lv_LV.js +6 -0
- package/lib/Locale/mk_MK.js +6 -0
- package/lib/Locale/ml_IN.js +6 -1
- package/lib/Locale/mn_MN.js +6 -0
- package/lib/Locale/ms_MY.js +6 -0
- package/lib/Locale/nb_NO.js +6 -1
- package/lib/Locale/ne_NP.js +6 -0
- package/lib/Locale/nl_BE.js +6 -1
- package/lib/Locale/nl_NL.js +6 -1
- package/lib/Locale/pl_PL.js +6 -1
- package/lib/Locale/pt_BR.js +6 -1
- package/lib/Locale/pt_PT.js +6 -0
- package/lib/Locale/ro_RO.js +6 -1
- package/lib/Locale/ru_RU.js +6 -1
- package/lib/Locale/si_LK.js +6 -1
- package/lib/Locale/sk_SK.js +6 -1
- package/lib/Locale/sl_SI.js +6 -0
- package/lib/Locale/sr_RS.js +6 -1
- package/lib/Locale/sv_SE.js +6 -1
- package/lib/Locale/ta_IN.js +6 -0
- package/lib/Locale/th_TH.js +6 -1
- package/lib/Locale/tk_TK.js +6 -1
- package/lib/Locale/tr_TR.js +6 -1
- package/lib/Locale/uk_UA.js +6 -1
- package/lib/Locale/ur_PK.js +6 -1
- package/lib/Locale/vi_VN.js +6 -0
- package/lib/Locale/zh_CN.js +7 -1
- package/lib/Locale/zh_HK.js +6 -1
- package/lib/Locale/zh_TW.js +6 -1
- package/lib/Mentions/index.js +4 -0
- package/lib/Menu/index.js +4 -0
- package/lib/Modal/index.js +33 -8
- package/lib/Modal/locale.js +5 -0
- package/lib/PageHeader/index.js +60 -22
- package/lib/Pagination/index.js +20 -4
- package/lib/Popconfirm/index.js +4 -0
- package/lib/Popover/index.d.ts +1 -1
- package/lib/Popover/index.js +23 -5
- package/lib/Progress/index.js +4 -0
- package/lib/QuickMenu/index.d.ts +2 -1
- package/lib/QuickMenu/index.js +63 -27
- package/lib/Radio/index.js +20 -9
- package/lib/Rate/index.js +4 -0
- package/lib/Result/index.js +41 -16
- package/lib/Result/noFound.js +4 -0
- package/lib/Result/serverError.js +4 -0
- package/lib/Result/unauthorized.js +4 -0
- package/lib/Row/index.js +2 -0
- package/lib/Segmented/index.js +4 -0
- package/lib/Select/index.js +41 -20
- package/lib/Skeleton/index.js +4 -0
- package/lib/Slider/index.js +4 -0
- package/lib/Space/index.js +4 -0
- package/lib/Spin/index.js +4 -0
- package/lib/Statistic/index.js +4 -0
- package/lib/Steps/index.js +4 -0
- package/lib/Switch/index.js +15 -3
- package/lib/Table/index.js +4 -0
- package/lib/Tabs/TabPane.js +3 -0
- package/lib/Tabs/hooks/useAnimateConfig.js +8 -0
- package/lib/Tabs/hooks/useLegacyItems.js +17 -3
- package/lib/Tabs/index.js +43 -15
- package/lib/Tabs/index.old.js +17 -4
- package/lib/Tag/index.js +20 -5
- package/lib/TestTable/LmBox.js +3 -0
- package/lib/TestTable/index.js +3 -0
- package/lib/TimePicker/index.js +4 -0
- package/lib/Timeline/index.js +4 -0
- package/lib/Tooltip/index.d.ts +1 -1
- package/lib/Tooltip/index.js +80 -34
- package/lib/Transfer/index.js +4 -0
- package/lib/Tree/DirectoryTree.js +74 -29
- package/lib/Tree/Tree.js +35 -14
- package/lib/Tree/TreeIndex.js +3 -0
- package/lib/Tree/index.js +11 -1
- package/lib/Tree/utils/dictUtil.js +24 -4
- package/lib/Tree/utils/dropIndicator.d.ts +0 -1
- package/lib/Tree/utils/dropIndicator.js +15 -5
- package/lib/Tree/utils/iconUtil.js +25 -2
- package/lib/TreeSelect/index.js +35 -15
- package/lib/Typography/Base/Ellipsis.js +58 -25
- package/lib/Typography/Base/EllipsisTooltip.js +12 -3
- package/lib/Typography/Base/index.js +200 -104
- package/lib/Typography/Editable.js +45 -21
- package/lib/Typography/Link.js +17 -4
- package/lib/Typography/Paragraph.js +7 -0
- package/lib/Typography/Text.js +16 -1
- package/lib/Typography/Title.js +18 -2
- package/lib/Typography/Typography.js +30 -11
- package/lib/Typography/hooks/useMergedConfig.js +5 -0
- package/lib/Typography/hooks/useUpdatedEffect.js +6 -1
- package/lib/Typography/index.js +9 -0
- package/lib/Upload/index.js +13 -2
- package/lib/UploadOss/index.js +4 -0
- package/lib/UploadOss/uploadBtn.js +54 -32
- package/lib/UploadOss/uploadImg.js +86 -58
- package/lib/VirtualList/index.js +27 -18
- package/lib/_util/colors.js +4 -2
- package/lib/_util/domTarget.js +6 -0
- package/lib/_util/getDataOrAriaProps.js +2 -0
- package/lib/_util/getRenderPropValue.js +5 -0
- package/lib/_util/hooks/useFlexGapSupport.js +11 -3
- package/lib/_util/hooks/useForceUpdate.js +10 -4
- package/lib/_util/motion.js +12 -0
- package/lib/_util/placements.js +12 -7
- package/lib/_util/reactNode.js +5 -0
- package/lib/_util/responsiveObserve.js +8 -0
- package/lib/_util/statusUtils.js +9 -0
- package/lib/_util/styleChecker.js +16 -6
- package/lib/_util/throttleByAnimationFrame.js +12 -0
- package/lib/_util/transButton.js +19 -3
- package/lib/_util/type.js +6 -0
- package/lib/_util/warning.js +10 -4
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/useEvent/index.js +7 -4
- package/lib/hooks/useFullscreen/index.js +33 -7
- package/lib/index.d.ts +1 -0
- package/lib/index.js +89 -0
- package/lib/locale-provider/LocaleReceiver.js +20 -4
- package/lib/locale-provider/ar_EG.js +3 -0
- package/lib/locale-provider/az_AZ.js +3 -0
- package/lib/locale-provider/bg_BG.js +3 -0
- package/lib/locale-provider/bn_BD.js +3 -0
- package/lib/locale-provider/by_BY.js +3 -0
- package/lib/locale-provider/ca_ES.js +3 -0
- package/lib/locale-provider/context.js +2 -0
- package/lib/locale-provider/cs_CZ.js +3 -0
- package/lib/locale-provider/da_DK.js +3 -0
- package/lib/locale-provider/de_DE.js +3 -0
- package/lib/locale-provider/default.js +3 -0
- package/lib/locale-provider/el_GR.js +3 -0
- package/lib/locale-provider/en_GB.js +3 -0
- package/lib/locale-provider/en_US.js +3 -0
- package/lib/locale-provider/es_ES.js +3 -0
- package/lib/locale-provider/et_EE.js +3 -0
- package/lib/locale-provider/fa_IR.js +3 -0
- package/lib/locale-provider/fi_FI.js +3 -0
- package/lib/locale-provider/fr_BE.js +3 -0
- package/lib/locale-provider/fr_CA.js +3 -0
- package/lib/locale-provider/fr_FR.js +3 -0
- package/lib/locale-provider/ga_IE.js +3 -0
- package/lib/locale-provider/gl_ES.js +3 -0
- package/lib/locale-provider/he_IL.js +3 -0
- package/lib/locale-provider/hi_IN.js +3 -0
- package/lib/locale-provider/hr_HR.js +3 -0
- package/lib/locale-provider/hu_HU.js +3 -0
- package/lib/locale-provider/hy_AM.js +3 -0
- package/lib/locale-provider/id_ID.js +3 -0
- package/lib/locale-provider/index.d.ts +2 -2
- package/lib/locale-provider/index.js +21 -2
- package/lib/locale-provider/is_IS.js +3 -0
- package/lib/locale-provider/it_IT.js +3 -0
- package/lib/locale-provider/ja_JP.js +3 -0
- package/lib/locale-provider/ka_GE.js +3 -0
- package/lib/locale-provider/kk_KZ.js +3 -0
- package/lib/locale-provider/km_KH.js +3 -0
- package/lib/locale-provider/kmr_IQ.js +3 -0
- package/lib/locale-provider/kn_IN.js +3 -0
- package/lib/locale-provider/ko_KR.js +3 -0
- package/lib/locale-provider/ku_IQ.js +3 -0
- package/lib/locale-provider/lt_LT.js +3 -0
- package/lib/locale-provider/lv_LV.js +3 -0
- package/lib/locale-provider/mk_MK.js +3 -0
- package/lib/locale-provider/ml_IN.js +3 -0
- package/lib/locale-provider/mn_MN.js +3 -0
- package/lib/locale-provider/ms_MY.js +3 -0
- package/lib/locale-provider/nb_NO.js +3 -0
- package/lib/locale-provider/ne_NP.js +3 -0
- package/lib/locale-provider/nl_BE.js +3 -0
- package/lib/locale-provider/nl_NL.js +3 -0
- package/lib/locale-provider/pl_PL.js +3 -0
- package/lib/locale-provider/pt_BR.js +3 -0
- package/lib/locale-provider/pt_PT.js +3 -0
- package/lib/locale-provider/ro_RO.js +3 -0
- package/lib/locale-provider/ru_RU.js +3 -0
- package/lib/locale-provider/si_LK.js +3 -0
- package/lib/locale-provider/sk_SK.js +3 -0
- package/lib/locale-provider/sl_SI.js +3 -0
- package/lib/locale-provider/sr_RS.js +3 -0
- package/lib/locale-provider/sv_SE.js +3 -0
- package/lib/locale-provider/ta_IN.js +3 -0
- package/lib/locale-provider/th_TH.js +3 -0
- package/lib/locale-provider/tk_TK.js +3 -0
- package/lib/locale-provider/tr_TR.js +3 -0
- package/lib/locale-provider/uk_UA.js +3 -0
- package/lib/locale-provider/ur_PK.js +3 -0
- package/lib/locale-provider/vi_VN.js +3 -0
- package/lib/locale-provider/zh_CN.js +3 -0
- package/lib/locale-provider/zh_HK.js +3 -0
- package/lib/locale-provider/zh_TW.js +3 -0
- package/lib/message/hooks/useMessage.js +27 -8
- package/lib/message/index.js +53 -8
- package/lib/notification/hooks/useNotification.js +19 -8
- package/lib/notification/index.js +80 -31
- package/lib/services/newRequest.js +47 -18
- package/lib/services/utils.js +15 -0
- package/lib/styles/variables.css +2 -1
- package/package.json +1 -1
- package/dist/LmTable/common/index.d.ts +0 -10
- package/dist/LmTable/components/Container/Container.d.ts +0 -18
- package/dist/LmTable/components/Container/index.d.ts +0 -2
- package/dist/LmTable/components/HeaderCol.d.ts +0 -1
- package/dist/LmTable/components/Item/Item.d.ts +0 -37
- package/dist/LmTable/components/Item/components/Action/Action.d.ts +0 -10
- package/dist/LmTable/components/Item/components/Action/index.d.ts +0 -2
- package/dist/LmTable/components/Item/components/Handle/index.d.ts +0 -4
- package/dist/LmTable/components/Item/components/Remove/index.d.ts +0 -3
- package/dist/LmTable/components/Item/components/index.d.ts +0 -3
- package/dist/LmTable/components/Item/index.d.ts +0 -2
- package/dist/LmTable/hooks/useDndItems.d.ts +0 -13
- package/dist/LmTable/multipleContainersKeyboardCoordinates.d.ts +0 -3
- package/dist/LmTable/testDemos/group.d.ts +0 -2
- package/es/LmTable/common/index.d.ts +0 -10
- package/es/LmTable/common/index.js +0 -32
- package/es/LmTable/components/Container/Container.css +0 -87
- package/es/LmTable/components/Container/Container.d.ts +0 -18
- package/es/LmTable/components/Container/Container.js +0 -44
- package/es/LmTable/components/Container/index.d.ts +0 -2
- package/es/LmTable/components/Container/index.js +0 -1
- package/es/LmTable/components/DndContainer.module.css +0 -6
- package/es/LmTable/components/HeaderCol.js +0 -38
- package/es/LmTable/components/Item/Item.css +0 -113
- package/es/LmTable/components/Item/Item.d.ts +0 -37
- package/es/LmTable/components/Item/Item.js +0 -84
- package/es/LmTable/components/Item/components/Action/Action.css +0 -41
- package/es/LmTable/components/Item/components/Action/Action.d.ts +0 -10
- package/es/LmTable/components/Item/components/Action/Action.js +0 -31
- package/es/LmTable/components/Item/components/Action/index.d.ts +0 -2
- package/es/LmTable/components/Item/components/Action/index.js +0 -1
- package/es/LmTable/components/Item/components/Handle/index.d.ts +0 -4
- package/es/LmTable/components/Item/components/Handle/index.js +0 -15
- package/es/LmTable/components/Item/components/Remove/index.d.ts +0 -3
- package/es/LmTable/components/Item/components/Remove/index.js +0 -16
- package/es/LmTable/components/Item/components/index.d.ts +0 -3
- package/es/LmTable/components/Item/components/index.js +0 -3
- package/es/LmTable/components/Item/index.d.ts +0 -2
- package/es/LmTable/components/Item/index.js +0 -2
- package/es/LmTable/hooks/useDndItems.d.ts +0 -13
- package/es/LmTable/hooks/useDndItems.js +0 -130
- package/es/LmTable/multipleContainersKeyboardCoordinates.d.ts +0 -3
- package/es/LmTable/multipleContainersKeyboardCoordinates.js +0 -92
- package/es/LmTable/testDemos/group.js +0 -115
- package/lib/LmTable/common/index.d.ts +0 -10
- package/lib/LmTable/common/index.js +0 -40
- package/lib/LmTable/components/Container/Container.css +0 -87
- package/lib/LmTable/components/Container/Container.d.ts +0 -18
- package/lib/LmTable/components/Container/Container.js +0 -52
- package/lib/LmTable/components/Container/index.d.ts +0 -2
- package/lib/LmTable/components/Container/index.js +0 -12
- package/lib/LmTable/components/DndContainer.module.css +0 -6
- package/lib/LmTable/components/HeaderCol.js +0 -38
- package/lib/LmTable/components/Item/Item.css +0 -113
- package/lib/LmTable/components/Item/Item.d.ts +0 -37
- package/lib/LmTable/components/Item/Item.js +0 -92
- package/lib/LmTable/components/Item/components/Action/Action.css +0 -41
- package/lib/LmTable/components/Item/components/Action/Action.d.ts +0 -10
- package/lib/LmTable/components/Item/components/Action/Action.js +0 -40
- package/lib/LmTable/components/Item/components/Action/index.d.ts +0 -2
- package/lib/LmTable/components/Item/components/Action/index.js +0 -12
- package/lib/LmTable/components/Item/components/Handle/index.d.ts +0 -4
- package/lib/LmTable/components/Item/components/Handle/index.js +0 -23
- package/lib/LmTable/components/Item/components/Remove/index.d.ts +0 -3
- package/lib/LmTable/components/Item/components/Remove/index.js +0 -23
- package/lib/LmTable/components/Item/components/index.d.ts +0 -3
- package/lib/LmTable/components/Item/components/index.js +0 -27
- package/lib/LmTable/components/Item/index.d.ts +0 -2
- package/lib/LmTable/components/Item/index.js +0 -31
- package/lib/LmTable/hooks/useDndItems.d.ts +0 -13
- package/lib/LmTable/hooks/useDndItems.js +0 -138
- package/lib/LmTable/multipleContainersKeyboardCoordinates.d.ts +0 -3
- package/lib/LmTable/multipleContainersKeyboardCoordinates.js +0 -99
- package/lib/LmTable/testDemos/group.js +0 -115
package/es/_util/transButton.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
var __rest = this && this.__rest || function (s, e) {
|
|
2
2
|
var t = {};
|
|
3
|
+
|
|
3
4
|
for (var p in s) {
|
|
4
5
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
6
|
}
|
|
7
|
+
|
|
6
8
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
9
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
8
10
|
}
|
|
@@ -13,6 +15,8 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
13
15
|
*
|
|
14
16
|
* This helps accessibility reader to tread as a interactive button to operation.
|
|
15
17
|
*/
|
|
18
|
+
|
|
19
|
+
|
|
16
20
|
import KeyCode from 'rc-util/lib/KeyCode';
|
|
17
21
|
import * as React from 'react';
|
|
18
22
|
var inlineStyle = {
|
|
@@ -25,28 +29,36 @@ var inlineStyle = {
|
|
|
25
29
|
var TransButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
26
30
|
var onKeyDown = function onKeyDown(event) {
|
|
27
31
|
var keyCode = event.keyCode;
|
|
32
|
+
|
|
28
33
|
if (keyCode === KeyCode.ENTER) {
|
|
29
34
|
event.preventDefault();
|
|
30
35
|
}
|
|
31
36
|
};
|
|
37
|
+
|
|
32
38
|
var onKeyUp = function onKeyUp(event) {
|
|
33
39
|
var keyCode = event.keyCode;
|
|
34
40
|
var onClick = props.onClick;
|
|
41
|
+
|
|
35
42
|
if (keyCode === KeyCode.ENTER && onClick) {
|
|
36
43
|
onClick();
|
|
37
44
|
}
|
|
38
45
|
};
|
|
46
|
+
|
|
39
47
|
var style = props.style,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
noStyle = props.noStyle,
|
|
49
|
+
disabled = props.disabled,
|
|
50
|
+
restProps = __rest(props, ["style", "noStyle", "disabled"]);
|
|
51
|
+
|
|
43
52
|
var mergedStyle = {};
|
|
53
|
+
|
|
44
54
|
if (!noStyle) {
|
|
45
55
|
mergedStyle = Object.assign({}, inlineStyle);
|
|
46
56
|
}
|
|
57
|
+
|
|
47
58
|
if (disabled) {
|
|
48
59
|
mergedStyle.pointerEvents = 'none';
|
|
49
60
|
}
|
|
61
|
+
|
|
50
62
|
mergedStyle = Object.assign(Object.assign({}, mergedStyle), style);
|
|
51
63
|
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
52
64
|
role: "button",
|
package/es/_util/type.js
CHANGED
|
@@ -3,11 +3,13 @@ export var tuple = function tuple() {
|
|
|
3
3
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4
4
|
args[_key] = arguments[_key];
|
|
5
5
|
}
|
|
6
|
+
|
|
6
7
|
return args;
|
|
7
8
|
};
|
|
8
9
|
export var tupleNum = function tupleNum() {
|
|
9
10
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
10
11
|
args[_key2] = arguments[_key2];
|
|
11
12
|
}
|
|
13
|
+
|
|
12
14
|
return args;
|
|
13
15
|
};
|
package/es/_util/warning.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import rcWarning, { resetWarned } from 'rc-util/lib/warning';
|
|
2
2
|
export { resetWarned };
|
|
3
|
-
export function noop() {}
|
|
4
|
-
|
|
3
|
+
export function noop() {} // eslint-disable-next-line import/no-mutable-exports
|
|
4
|
+
|
|
5
5
|
var warning = noop;
|
|
6
|
+
|
|
6
7
|
if (process.env.NODE_ENV !== 'production') {
|
|
7
8
|
warning = function warning(valid, component, message) {
|
|
8
|
-
rcWarning(valid, "[antd: ".concat(component, "] ").concat(message));
|
|
9
|
-
|
|
9
|
+
rcWarning(valid, "[antd: ".concat(component, "] ").concat(message)); // StrictMode will inject console which will not throw warning in React 17.
|
|
10
|
+
|
|
10
11
|
if (process.env.NODE_ENV === 'test') {
|
|
11
12
|
resetWarned();
|
|
12
13
|
}
|
|
13
14
|
};
|
|
14
15
|
}
|
|
16
|
+
|
|
15
17
|
export default warning;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { useCallback, useLayoutEffect, useRef } from 'react';
|
|
2
|
-
|
|
1
|
+
import { useCallback, useLayoutEffect, useRef } from 'react'; // * 解决useCallback的依赖传导问题,存储事件
|
|
2
|
+
|
|
3
3
|
function useEvent(handler) {
|
|
4
|
-
var handlerRef = useRef(null);
|
|
5
|
-
|
|
4
|
+
var handlerRef = useRef(null); // 同步,运行时间在布局前
|
|
5
|
+
|
|
6
6
|
useLayoutEffect(function () {
|
|
7
7
|
handlerRef.current = handler;
|
|
8
|
-
});
|
|
9
|
-
|
|
8
|
+
}); // 存储方法函数
|
|
9
|
+
|
|
10
10
|
return useCallback(function () {
|
|
11
11
|
var fn = handlerRef.current;
|
|
12
12
|
return fn.apply(void 0, arguments);
|
|
13
13
|
}, []);
|
|
14
14
|
}
|
|
15
|
+
|
|
15
16
|
export default useEvent;
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import { useState, useRef, useEffect } from 'react';
|
|
3
3
|
var isBrowser = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
4
|
+
|
|
4
5
|
var isFunction = function isFunction(value) {
|
|
5
6
|
return typeof value === 'function';
|
|
6
7
|
};
|
|
8
|
+
|
|
7
9
|
var getTargetElement = function getTargetElement(target, defaultElement) {
|
|
8
10
|
if (!isBrowser) {
|
|
9
11
|
return undefined;
|
|
10
12
|
}
|
|
13
|
+
|
|
11
14
|
if (!target) {
|
|
12
15
|
return defaultElement;
|
|
13
16
|
}
|
|
17
|
+
|
|
14
18
|
var targetElement;
|
|
19
|
+
|
|
15
20
|
if (isFunction(target)) {
|
|
16
21
|
targetElement = target();
|
|
17
22
|
} else if ('current' in target) {
|
|
@@ -19,47 +24,60 @@ var getTargetElement = function getTargetElement(target, defaultElement) {
|
|
|
19
24
|
} else {
|
|
20
25
|
targetElement = target;
|
|
21
26
|
}
|
|
27
|
+
|
|
22
28
|
return targetElement;
|
|
23
29
|
};
|
|
30
|
+
|
|
24
31
|
var fullScreenCssText = 'position: fixed;width: 100%;height:100%;top:0;left:0;z-index:1100;background-color: #fff;padding: 16px;';
|
|
32
|
+
|
|
25
33
|
var useFullscreen = function useFullscreen(target, options) {
|
|
26
34
|
var _ref = options || {},
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
onExit = _ref.onExit,
|
|
36
|
+
onEnter = _ref.onEnter;
|
|
37
|
+
|
|
29
38
|
var _useState = useState(false),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
40
|
+
isFullscreen = _useState2[0],
|
|
41
|
+
setIsFullscreen = _useState2[1];
|
|
42
|
+
|
|
33
43
|
var originCssTextRef = useRef('');
|
|
34
44
|
var eleRef = useRef(null);
|
|
35
45
|
var cloneEleRef = useRef(null);
|
|
46
|
+
|
|
36
47
|
var enterFullscreen = function enterFullscreen() {
|
|
37
48
|
var _a;
|
|
49
|
+
|
|
38
50
|
onEnter === null || onEnter === void 0 ? void 0 : onEnter();
|
|
39
51
|
setIsFullscreen(true);
|
|
40
52
|
var el = getTargetElement(target);
|
|
53
|
+
|
|
41
54
|
if (!eleRef.current) {
|
|
42
55
|
eleRef.current = el;
|
|
43
56
|
var originCssText = el.style.cssText;
|
|
44
57
|
originCssTextRef.current = originCssText;
|
|
45
58
|
}
|
|
59
|
+
|
|
46
60
|
eleRef.current.style.cssText = "".concat(originCssTextRef.current).concat(fullScreenCssText);
|
|
61
|
+
|
|
47
62
|
try {
|
|
48
63
|
cloneEleRef.current = (_a = eleRef.current) === null || _a === void 0 ? void 0 : _a.cloneNode(true);
|
|
49
64
|
document.body.appendChild(cloneEleRef.current);
|
|
50
65
|
eleRef.current.style.cssText = "".concat(originCssTextRef.current).concat(fullScreenCssText, "display: none;");
|
|
51
66
|
} catch (_b) {
|
|
52
67
|
console.log('fullScreen error');
|
|
53
|
-
}
|
|
54
|
-
|
|
68
|
+
} // message.info({content: '使用 Esc 键可退出全屏模式', key: 'tip'})
|
|
69
|
+
|
|
55
70
|
};
|
|
56
71
|
|
|
57
72
|
var exitFullscreen = function exitFullscreen() {
|
|
58
73
|
var _a, _b;
|
|
74
|
+
|
|
59
75
|
onExit === null || onExit === void 0 ? void 0 : onExit();
|
|
60
76
|
setIsFullscreen(false);
|
|
77
|
+
|
|
61
78
|
if (eleRef.current) {
|
|
62
79
|
eleRef.current.style.cssText = "".concat(originCssTextRef.current);
|
|
80
|
+
|
|
63
81
|
try {
|
|
64
82
|
(_b = (_a = document.body).removeChild) === null || _b === void 0 ? void 0 : _b.call(_a, cloneEleRef.current);
|
|
65
83
|
} catch (_c) {
|
|
@@ -67,6 +85,7 @@ var useFullscreen = function useFullscreen(target, options) {
|
|
|
67
85
|
}
|
|
68
86
|
}
|
|
69
87
|
};
|
|
88
|
+
|
|
70
89
|
var toggleFullscreen = function toggleFullscreen() {
|
|
71
90
|
if (isFullscreen) {
|
|
72
91
|
exitFullscreen();
|
|
@@ -74,6 +93,7 @@ var useFullscreen = function useFullscreen(target, options) {
|
|
|
74
93
|
enterFullscreen();
|
|
75
94
|
}
|
|
76
95
|
};
|
|
96
|
+
|
|
77
97
|
useEffect(function () {
|
|
78
98
|
var fn = function fn(event) {
|
|
79
99
|
if (event.keyCode === 27) {
|
|
@@ -81,6 +101,7 @@ var useFullscreen = function useFullscreen(target, options) {
|
|
|
81
101
|
exitFullscreen();
|
|
82
102
|
}
|
|
83
103
|
};
|
|
104
|
+
|
|
84
105
|
window.addEventListener('keydown', fn);
|
|
85
106
|
return function () {
|
|
86
107
|
window.removeEventListener('keydown', fn);
|
|
@@ -93,4 +114,5 @@ var useFullscreen = function useFullscreen(target, options) {
|
|
|
93
114
|
toggleFullscreen: toggleFullscreen
|
|
94
115
|
};
|
|
95
116
|
};
|
|
117
|
+
|
|
96
118
|
export default useFullscreen;
|
package/es/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export { default as LmEditTable } from './LmEditTable';
|
|
|
54
54
|
export type { CountdownHandle, TLmEditTable } from './LmEditTable/EditTable';
|
|
55
55
|
export { default as List } from './List';
|
|
56
56
|
export { default as LMQuickMenu } from './QuickMenu';
|
|
57
|
+
export type { IMenuData, IQuickMenuProps } from './QuickMenu';
|
|
57
58
|
export { default as DatePicker } from './DatePicker';
|
|
58
59
|
export type { DatePickerProps, MonthPickerProps, WeekPickerProps, RangePickerProps } from './DatePicker';
|
|
59
60
|
export { default as Popover } from './Popover';
|
|
@@ -5,19 +5,24 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import LocaleContext from './context';
|
|
7
7
|
import defaultLocaleData from './default';
|
|
8
|
+
|
|
8
9
|
var LocaleReceiver = /*#__PURE__*/function (_React$Component) {
|
|
9
10
|
_inherits(LocaleReceiver, _React$Component);
|
|
11
|
+
|
|
10
12
|
var _super = _createSuper(LocaleReceiver);
|
|
13
|
+
|
|
11
14
|
function LocaleReceiver() {
|
|
12
15
|
_classCallCheck(this, LocaleReceiver);
|
|
16
|
+
|
|
13
17
|
return _super.apply(this, arguments);
|
|
14
18
|
}
|
|
19
|
+
|
|
15
20
|
_createClass(LocaleReceiver, [{
|
|
16
21
|
key: "getLocale",
|
|
17
22
|
value: function getLocale() {
|
|
18
23
|
var _this$props = this.props,
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
componentName = _this$props.componentName,
|
|
25
|
+
defaultLocale = _this$props.defaultLocale;
|
|
21
26
|
var locale = defaultLocale || defaultLocaleData[componentName !== null && componentName !== void 0 ? componentName : 'global'];
|
|
22
27
|
var antLocale = this.context;
|
|
23
28
|
var localeFromContext = componentName && antLocale ? antLocale[componentName] : {};
|
|
@@ -27,11 +32,12 @@ var LocaleReceiver = /*#__PURE__*/function (_React$Component) {
|
|
|
27
32
|
key: "getLocaleCode",
|
|
28
33
|
value: function getLocaleCode() {
|
|
29
34
|
var antLocale = this.context;
|
|
30
|
-
var localeCode = antLocale && antLocale.locale;
|
|
31
|
-
|
|
35
|
+
var localeCode = antLocale && antLocale.locale; // Had use LocaleProvide but didn't set locale
|
|
36
|
+
|
|
32
37
|
if (antLocale && antLocale.exist && !localeCode) {
|
|
33
38
|
return defaultLocaleData.locale;
|
|
34
39
|
}
|
|
40
|
+
|
|
35
41
|
return localeCode;
|
|
36
42
|
}
|
|
37
43
|
}, {
|
|
@@ -40,8 +46,10 @@ var LocaleReceiver = /*#__PURE__*/function (_React$Component) {
|
|
|
40
46
|
return this.props.children(this.getLocale(), this.getLocaleCode(), this.context);
|
|
41
47
|
}
|
|
42
48
|
}]);
|
|
49
|
+
|
|
43
50
|
return LocaleReceiver;
|
|
44
51
|
}(React.Component);
|
|
52
|
+
|
|
45
53
|
export { LocaleReceiver as default };
|
|
46
54
|
LocaleReceiver.defaultProps = {
|
|
47
55
|
componentName: 'global'
|
|
@@ -54,8 +54,8 @@ export default class LocaleProvider extends React.Component<LocaleProviderProps,
|
|
|
54
54
|
componentDidMount(): void;
|
|
55
55
|
componentDidUpdate(prevProps: LocaleProviderProps): void;
|
|
56
56
|
componentWillUnmount(): void;
|
|
57
|
-
getMemoizedContextValue:
|
|
57
|
+
getMemoizedContextValue: (localeValue: Locale) => Locale & {
|
|
58
58
|
exist?: boolean;
|
|
59
|
-
}
|
|
59
|
+
};
|
|
60
60
|
render(): JSX.Element;
|
|
61
61
|
}
|
|
@@ -8,12 +8,17 @@ import { changeConfirmLocale } from 'antd/es/modal/locale';
|
|
|
8
8
|
import warning from '../_util/warning';
|
|
9
9
|
import LocaleContext from './context';
|
|
10
10
|
export var ANT_MARK = 'internalMark';
|
|
11
|
+
|
|
11
12
|
var LocaleProvider = /*#__PURE__*/function (_React$Component) {
|
|
12
13
|
_inherits(LocaleProvider, _React$Component);
|
|
14
|
+
|
|
13
15
|
var _super = _createSuper(LocaleProvider);
|
|
16
|
+
|
|
14
17
|
function LocaleProvider(props) {
|
|
15
18
|
var _this;
|
|
19
|
+
|
|
16
20
|
_classCallCheck(this, LocaleProvider);
|
|
21
|
+
|
|
17
22
|
_this = _super.call(this, props);
|
|
18
23
|
_this.getMemoizedContextValue = memoizeOne(function (localeValue) {
|
|
19
24
|
return Object.assign(Object.assign({}, localeValue), {
|
|
@@ -24,6 +29,7 @@ var LocaleProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
24
29
|
warning(props._ANT_MARK__ === ANT_MARK, 'LocaleProvider', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale');
|
|
25
30
|
return _this;
|
|
26
31
|
}
|
|
32
|
+
|
|
27
33
|
_createClass(LocaleProvider, [{
|
|
28
34
|
key: "componentDidMount",
|
|
29
35
|
value: function componentDidMount() {
|
|
@@ -33,6 +39,7 @@ var LocaleProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
33
39
|
key: "componentDidUpdate",
|
|
34
40
|
value: function componentDidUpdate(prevProps) {
|
|
35
41
|
var locale = this.props.locale;
|
|
42
|
+
|
|
36
43
|
if (prevProps.locale !== locale) {
|
|
37
44
|
changeConfirmLocale(locale && locale.Modal);
|
|
38
45
|
}
|
|
@@ -46,16 +53,18 @@ var LocaleProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
46
53
|
key: "render",
|
|
47
54
|
value: function render() {
|
|
48
55
|
var _this$props = this.props,
|
|
49
|
-
|
|
50
|
-
|
|
56
|
+
locale = _this$props.locale,
|
|
57
|
+
children = _this$props.children;
|
|
51
58
|
var contextValue = this.getMemoizedContextValue(locale);
|
|
52
59
|
return /*#__PURE__*/React.createElement(LocaleContext.Provider, {
|
|
53
60
|
value: contextValue
|
|
54
61
|
}, children);
|
|
55
62
|
}
|
|
56
63
|
}]);
|
|
64
|
+
|
|
57
65
|
return LocaleProvider;
|
|
58
66
|
}(React.Component);
|
|
67
|
+
|
|
59
68
|
export { LocaleProvider as default };
|
|
60
69
|
LocaleProvider.defaultProps = {
|
|
61
70
|
locale: {}
|
|
@@ -7,18 +7,20 @@ export default function createUseMessage(getRcNotificationInstance, getRCNoticeP
|
|
|
7
7
|
var useMessage = function useMessage() {
|
|
8
8
|
// We can only get content by render
|
|
9
9
|
var getPrefixCls;
|
|
10
|
-
var getPopupContainer;
|
|
11
|
-
|
|
10
|
+
var getPopupContainer; // We create a proxy to handle delay created instance
|
|
11
|
+
|
|
12
12
|
var innerInstance = null;
|
|
13
13
|
var proxy = {
|
|
14
14
|
add: function add(noticeProps, holderCallback) {
|
|
15
15
|
innerInstance === null || innerInstance === void 0 ? void 0 : innerInstance.component.add(noticeProps, holderCallback);
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
+
|
|
18
19
|
var _useRCNotification = useRCNotification(proxy),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
_useRCNotification2 = _slicedToArray(_useRCNotification, 2),
|
|
21
|
+
hookNotify = _useRCNotification2[0],
|
|
22
|
+
holder = _useRCNotification2[1];
|
|
23
|
+
|
|
22
24
|
function notify(args) {
|
|
23
25
|
var customizePrefixCls = args.prefixCls;
|
|
24
26
|
var mergedPrefixCls = getPrefixCls('message', customizePrefixCls);
|
|
@@ -29,15 +31,17 @@ export default function createUseMessage(getRcNotificationInstance, getRCNoticeP
|
|
|
29
31
|
if (typeof args.onClose === 'function') {
|
|
30
32
|
args.onClose();
|
|
31
33
|
}
|
|
34
|
+
|
|
32
35
|
return resolve(true);
|
|
33
36
|
};
|
|
37
|
+
|
|
34
38
|
getRcNotificationInstance(Object.assign(Object.assign({}, args), {
|
|
35
39
|
prefixCls: mergedPrefixCls,
|
|
36
40
|
rootPrefixCls: rootPrefixCls,
|
|
37
41
|
getPopupContainer: getPopupContainer
|
|
38
42
|
}), function (_ref) {
|
|
39
43
|
var prefixCls = _ref.prefixCls,
|
|
40
|
-
|
|
44
|
+
instance = _ref.instance;
|
|
41
45
|
innerInstance = instance;
|
|
42
46
|
hookNotify(getRCNoticeProps(Object.assign(Object.assign({}, args), {
|
|
43
47
|
key: target,
|
|
@@ -45,18 +49,22 @@ export default function createUseMessage(getRcNotificationInstance, getRCNoticeP
|
|
|
45
49
|
}), prefixCls));
|
|
46
50
|
});
|
|
47
51
|
});
|
|
52
|
+
|
|
48
53
|
var result = function result() {
|
|
49
54
|
if (innerInstance) {
|
|
50
55
|
innerInstance.removeNotice(target);
|
|
51
56
|
}
|
|
52
57
|
};
|
|
58
|
+
|
|
53
59
|
result.then = function (filled, rejected) {
|
|
54
60
|
return closePromise.then(filled, rejected);
|
|
55
61
|
};
|
|
62
|
+
|
|
56
63
|
result.promise = closePromise;
|
|
57
64
|
return result;
|
|
58
|
-
}
|
|
59
|
-
|
|
65
|
+
} // Fill functions
|
|
66
|
+
|
|
67
|
+
|
|
60
68
|
var hookApiRef = React.useRef({});
|
|
61
69
|
hookApiRef.current.open = notify;
|
|
62
70
|
typeList.forEach(function (type) {
|
|
@@ -70,5 +78,6 @@ export default function createUseMessage(getRcNotificationInstance, getRCNoticeP
|
|
|
70
78
|
return holder;
|
|
71
79
|
})];
|
|
72
80
|
};
|
|
81
|
+
|
|
73
82
|
return useMessage;
|
|
74
83
|
}
|
package/es/message/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var rtl = false;
|
|
|
20
20
|
export function getKeyThenIncreaseKey() {
|
|
21
21
|
return key++;
|
|
22
22
|
}
|
|
23
|
+
|
|
23
24
|
function setMessageConfig(options) {
|
|
24
25
|
if (options.top !== undefined) {
|
|
25
26
|
defaultTop = options.top;
|
|
@@ -29,9 +30,11 @@ function setMessageConfig(options) {
|
|
|
29
30
|
if (options.duration !== undefined) {
|
|
30
31
|
defaultDuration = options.duration;
|
|
31
32
|
}
|
|
33
|
+
|
|
32
34
|
if (options.prefixCls !== undefined) {
|
|
33
35
|
localPrefixCls = options.prefixCls;
|
|
34
36
|
}
|
|
37
|
+
|
|
35
38
|
if (options.getContainer !== undefined) {
|
|
36
39
|
getContainer = options.getContainer;
|
|
37
40
|
messageInstance = null; // delete messageInstance for new getContainer
|
|
@@ -40,26 +43,33 @@ function setMessageConfig(options) {
|
|
|
40
43
|
if (options.transitionName !== undefined) {
|
|
41
44
|
transitionName = options.transitionName;
|
|
42
45
|
messageInstance = null; // delete messageInstance for new transitionName
|
|
46
|
+
|
|
43
47
|
hasTransitionName = true;
|
|
44
48
|
}
|
|
49
|
+
|
|
45
50
|
if (options.maxCount !== undefined) {
|
|
46
51
|
maxCount = options.maxCount;
|
|
47
52
|
messageInstance = null;
|
|
48
53
|
}
|
|
54
|
+
|
|
49
55
|
if (options.rtl !== undefined) {
|
|
50
56
|
rtl = options.rtl;
|
|
51
57
|
}
|
|
52
58
|
}
|
|
59
|
+
|
|
53
60
|
function getRCNotificationInstance(args, callback) {
|
|
54
61
|
var customizePrefixCls = args.prefixCls,
|
|
55
|
-
|
|
62
|
+
getContextPopupContainer = args.getPopupContainer;
|
|
63
|
+
|
|
56
64
|
var _globalConfig = globalConfig(),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
getPrefixCls = _globalConfig.getPrefixCls,
|
|
66
|
+
getRootPrefixCls = _globalConfig.getRootPrefixCls,
|
|
67
|
+
getIconPrefixCls = _globalConfig.getIconPrefixCls;
|
|
68
|
+
|
|
60
69
|
var prefixCls = getPrefixCls('message', customizePrefixCls || localPrefixCls);
|
|
61
70
|
var rootPrefixCls = getRootPrefixCls(args.rootPrefixCls, prefixCls);
|
|
62
71
|
var iconPrefixCls = getIconPrefixCls();
|
|
72
|
+
|
|
63
73
|
if (messageInstance) {
|
|
64
74
|
callback({
|
|
65
75
|
prefixCls: prefixCls,
|
|
@@ -69,6 +79,7 @@ function getRCNotificationInstance(args, callback) {
|
|
|
69
79
|
});
|
|
70
80
|
return;
|
|
71
81
|
}
|
|
82
|
+
|
|
72
83
|
var instanceConfig = {
|
|
73
84
|
prefixCls: prefixCls,
|
|
74
85
|
transitionName: hasTransitionName ? transitionName : "".concat(rootPrefixCls, "-").concat(transitionName),
|
|
@@ -88,10 +99,13 @@ function getRCNotificationInstance(args, callback) {
|
|
|
88
99
|
});
|
|
89
100
|
return;
|
|
90
101
|
}
|
|
102
|
+
|
|
91
103
|
messageInstance = instance;
|
|
104
|
+
|
|
92
105
|
if (process.env.NODE_ENV === 'test') {
|
|
93
106
|
messageInstance.config = instanceConfig;
|
|
94
107
|
}
|
|
108
|
+
|
|
95
109
|
callback({
|
|
96
110
|
prefixCls: prefixCls,
|
|
97
111
|
rootPrefixCls: rootPrefixCls,
|
|
@@ -100,6 +114,7 @@ function getRCNotificationInstance(args, callback) {
|
|
|
100
114
|
});
|
|
101
115
|
});
|
|
102
116
|
}
|
|
117
|
+
|
|
103
118
|
var typeToIcon = {
|
|
104
119
|
info: InfoCircleFilled,
|
|
105
120
|
success: CheckCircleFilled,
|
|
@@ -108,8 +123,10 @@ var typeToIcon = {
|
|
|
108
123
|
loading: LoadingOutlined
|
|
109
124
|
};
|
|
110
125
|
export var typeList = Object.keys(typeToIcon);
|
|
126
|
+
|
|
111
127
|
function getRCNoticeProps(args, prefixCls, iconPrefixCls) {
|
|
112
128
|
var _classNames;
|
|
129
|
+
|
|
113
130
|
var duration = args.duration !== undefined ? args.duration : defaultDuration;
|
|
114
131
|
var progress = args.progress === false ? false : true;
|
|
115
132
|
var IconComponent = typeToIcon[args.type];
|
|
@@ -133,6 +150,7 @@ function getRCNoticeProps(args, prefixCls, iconPrefixCls) {
|
|
|
133
150
|
onClick: args.onClick
|
|
134
151
|
};
|
|
135
152
|
}
|
|
153
|
+
|
|
136
154
|
function notice(args) {
|
|
137
155
|
var target = args.key || getKeyThenIncreaseKey();
|
|
138
156
|
var closePromise = new Promise(function (resolve) {
|
|
@@ -140,32 +158,39 @@ function notice(args) {
|
|
|
140
158
|
if (typeof args.onClose === 'function') {
|
|
141
159
|
args.onClose();
|
|
142
160
|
}
|
|
161
|
+
|
|
143
162
|
return resolve(true);
|
|
144
163
|
};
|
|
164
|
+
|
|
145
165
|
getRCNotificationInstance(args, function (_ref) {
|
|
146
166
|
var prefixCls = _ref.prefixCls,
|
|
147
|
-
|
|
148
|
-
|
|
167
|
+
iconPrefixCls = _ref.iconPrefixCls,
|
|
168
|
+
instance = _ref.instance;
|
|
149
169
|
instance.notice(getRCNoticeProps(Object.assign(Object.assign({}, args), {
|
|
150
170
|
key: target,
|
|
151
171
|
onClose: callback
|
|
152
172
|
}), prefixCls, iconPrefixCls));
|
|
153
173
|
});
|
|
154
174
|
});
|
|
175
|
+
|
|
155
176
|
var result = function result() {
|
|
156
177
|
if (messageInstance) {
|
|
157
178
|
messageInstance.removeNotice(target);
|
|
158
179
|
}
|
|
159
180
|
};
|
|
181
|
+
|
|
160
182
|
result.then = function (filled, rejected) {
|
|
161
183
|
return closePromise.then(filled, rejected);
|
|
162
184
|
};
|
|
185
|
+
|
|
163
186
|
result.promise = closePromise;
|
|
164
187
|
return result;
|
|
165
188
|
}
|
|
189
|
+
|
|
166
190
|
function isArgsProps(content) {
|
|
167
191
|
return Object.prototype.toString.call(content) === '[object Object]' && !!content.content;
|
|
168
192
|
}
|
|
193
|
+
|
|
169
194
|
var api = {
|
|
170
195
|
open: notice,
|
|
171
196
|
config: setMessageConfig,
|
|
@@ -173,11 +198,11 @@ var api = {
|
|
|
173
198
|
if (messageInstance) {
|
|
174
199
|
if (messageKey) {
|
|
175
200
|
var _messageInstance = messageInstance,
|
|
176
|
-
|
|
201
|
+
removeNotice = _messageInstance.removeNotice;
|
|
177
202
|
removeNotice(messageKey);
|
|
178
203
|
} else {
|
|
179
204
|
var _messageInstance2 = messageInstance,
|
|
180
|
-
|
|
205
|
+
destroy = _messageInstance2.destroy;
|
|
181
206
|
destroy();
|
|
182
207
|
messageInstance = null;
|
|
183
208
|
}
|
|
@@ -192,10 +217,12 @@ export function attachTypeApi(originalApi, type) {
|
|
|
192
217
|
type: type
|
|
193
218
|
}));
|
|
194
219
|
}
|
|
220
|
+
|
|
195
221
|
if (typeof duration === 'function') {
|
|
196
222
|
onClose = duration;
|
|
197
223
|
duration = undefined;
|
|
198
224
|
}
|
|
225
|
+
|
|
199
226
|
return originalApi.open({
|
|
200
227
|
content: content,
|
|
201
228
|
duration: duration,
|
|
@@ -210,6 +237,7 @@ typeList.forEach(function (type) {
|
|
|
210
237
|
api.warn = api.warning;
|
|
211
238
|
api.useMessage = createUseMessage(getRCNotificationInstance, getRCNoticeProps);
|
|
212
239
|
/** @private test Only function. Not work on production */
|
|
240
|
+
|
|
213
241
|
export var getInstance = function getInstance() {
|
|
214
242
|
return process.env.NODE_ENV === 'test' ? messageInstance : null;
|
|
215
243
|
};
|
|
@@ -5,18 +5,20 @@ import { ConfigConsumer } from 'antd/es/config-provider';
|
|
|
5
5
|
export default function createUseNotification(getNotificationInstance, getRCNoticeProps) {
|
|
6
6
|
var useNotification = function useNotification() {
|
|
7
7
|
// We can only get content by render
|
|
8
|
-
var getPrefixCls;
|
|
9
|
-
|
|
8
|
+
var getPrefixCls; // We create a proxy to handle delay created instance
|
|
9
|
+
|
|
10
10
|
var innerInstance = null;
|
|
11
11
|
var proxy = {
|
|
12
12
|
add: function add(noticeProps, holderCallback) {
|
|
13
13
|
innerInstance === null || innerInstance === void 0 ? void 0 : innerInstance.component.add(noticeProps, holderCallback);
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
+
|
|
16
17
|
var _useRCNotification = useRCNotification(proxy),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
_useRCNotification2 = _slicedToArray(_useRCNotification, 2),
|
|
19
|
+
hookNotify = _useRCNotification2[0],
|
|
20
|
+
holder = _useRCNotification2[1];
|
|
21
|
+
|
|
20
22
|
function notify(args) {
|
|
21
23
|
var customizePrefixCls = args.prefixCls;
|
|
22
24
|
var mergedPrefixCls = getPrefixCls('notification', customizePrefixCls);
|
|
@@ -24,12 +26,13 @@ export default function createUseNotification(getNotificationInstance, getRCNoti
|
|
|
24
26
|
prefixCls: mergedPrefixCls
|
|
25
27
|
}), function (_ref) {
|
|
26
28
|
var prefixCls = _ref.prefixCls,
|
|
27
|
-
|
|
29
|
+
instance = _ref.instance;
|
|
28
30
|
innerInstance = instance;
|
|
29
31
|
hookNotify(getRCNoticeProps(args, prefixCls));
|
|
30
32
|
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
+
} // Fill functions
|
|
34
|
+
|
|
35
|
+
|
|
33
36
|
var hookApiRef = React.useRef({});
|
|
34
37
|
hookApiRef.current.open = notify;
|
|
35
38
|
['success', 'info', 'warning', 'error'].forEach(function (type) {
|
|
@@ -46,5 +49,6 @@ export default function createUseNotification(getNotificationInstance, getRCNoti
|
|
|
46
49
|
return holder;
|
|
47
50
|
})];
|
|
48
51
|
};
|
|
52
|
+
|
|
49
53
|
return useNotification;
|
|
50
54
|
}
|