acud 1.2.17 → 1.2.18
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/acud.js +12452 -19749
- package/dist/acud.js.map +1 -1
- package/es/_util/colors.d.ts +3 -3
- package/es/_util/colors.js +2 -2
- package/es/_util/easings.js +2 -4
- 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/getScroll.js +0 -4
- package/es/_util/hooks/useCombinedRefs.js +0 -2
- package/es/_util/hooks/useFlexGapSupport.js +3 -4
- package/es/_util/hooks/useForceUpdate.js +4 -5
- package/es/_util/hooks/useMergedState.js +17 -26
- package/es/_util/hooks/usePatchElement.js +5 -6
- package/es/_util/hooks/useSyncState.d.ts +1 -1
- package/es/_util/hooks/useSyncState.js +2 -2
- package/es/_util/isNumeric.js +0 -1
- package/es/_util/motion.d.ts +1 -1
- package/es/_util/motion.js +2 -11
- package/es/_util/reactNode.d.ts +2 -2
- package/es/_util/reactNode.js +0 -1
- package/es/_util/responsiveObserve.d.ts +5 -5
- package/es/_util/responsiveObserve.js +0 -8
- package/es/_util/scrollTo.js +6 -10
- package/es/_util/statusUtils.d.ts +1 -1
- package/es/_util/statusUtils.js +0 -1
- package/es/_util/styleChecker.js +6 -10
- package/es/_util/throttleByAnimationFrame.js +0 -6
- package/es/_util/type.d.ts +3 -3
- package/es/_util/type.js +0 -2
- package/es/affix/index.d.ts +1 -1
- package/es/affix/index.js +33 -88
- package/es/affix/utils.d.ts +2 -2
- package/es/affix/utils.js +6 -14
- package/es/alert/ErrorBoundary.js +5 -16
- package/es/alert/index.js +28 -54
- package/es/anchor/Anchor.d.ts +2 -2
- package/es/anchor/Anchor.js +21 -72
- package/es/anchor/AnchorLink.d.ts +2 -2
- package/es/anchor/AnchorLink.js +13 -32
- package/es/anchor/style/css.js +2 -1
- package/es/anchor/style/index.js +2 -1
- package/es/avatar/SizeContext.d.ts +1 -1
- package/es/avatar/SizeContext.js +1 -1
- package/es/avatar/avatar.js +27 -55
- package/es/avatar/group.js +12 -17
- package/es/avatar/style/css.js +2 -2
- package/es/avatar/style/index.js +2 -2
- package/es/back-top/index.js +14 -27
- package/es/badge/Ribbon.d.ts +1 -1
- package/es/badge/Ribbon.js +9 -17
- package/es/badge/ScrollNumber.js +20 -34
- package/es/badge/SingleNumber.d.ts +2 -2
- package/es/badge/SingleNumber.js +23 -39
- package/es/badge/index.js +47 -75
- package/es/badge/style/index.css +14 -119
- package/es/badge/utils.js +2 -2
- package/es/breadcrumb/Breadcrumb.js +13 -25
- package/es/breadcrumb/BreadcrumbItem.js +13 -31
- package/es/button/LoadingIcon.d.ts +2 -1
- package/es/button/LoadingIcon.js +0 -2
- package/es/button/button-group.d.ts +1 -1
- package/es/button/button-group.js +2 -12
- package/es/button/button.d.ts +6 -6
- package/es/button/button.js +23 -46
- package/es/calendar/Header.d.ts +2 -2
- package/es/calendar/Header.js +26 -49
- package/es/calendar/generateCalendar.d.ts +8 -8
- package/es/calendar/generateCalendar.js +43 -69
- package/es/calendar/index.d.ts +1 -1
- package/es/calendar/interface.d.ts +4 -4
- package/es/calendar/style/css.js +2 -2
- package/es/calendar/style/index.js +2 -2
- package/es/card/Card.d.ts +4 -4
- package/es/card/Card.js +40 -62
- package/es/card/Grid.js +5 -14
- package/es/card/Meta.js +7 -17
- package/es/card/style/css.js +2 -2
- package/es/card/style/index.css +2 -13
- package/es/card/style/index.js +2 -2
- package/es/carousel/carousel.d.ts +3 -3
- package/es/carousel/carousel.js +48 -64
- package/es/carousel/indicator.js +14 -22
- package/es/carousel/switch.js +2 -4
- package/es/cascader/Cascader.d.ts +4 -4
- package/es/cascader/Cascader.js +41 -147
- package/es/cascader/MenuItem.d.ts +1 -1
- package/es/cascader/MenuItem.js +16 -23
- package/es/cascader/Menus.d.ts +5 -5
- package/es/cascader/Menus.js +87 -153
- package/es/cascader/index.d.ts +1 -1
- package/es/cascader/index.js +71 -155
- package/es/cascader/renderEmpty.d.ts +1 -1
- package/es/cascader/renderEmpty.js +0 -2
- package/es/cascader/style/css.js +2 -2
- package/es/cascader/style/index.css +4 -8
- package/es/cascader/style/index.js +2 -2
- package/es/cascader/utils.js +2 -8
- package/es/checkbox/BaseCheckbox.d.ts +1 -1
- package/es/checkbox/BaseCheckbox.js +22 -46
- package/es/checkbox/ButtonCheckbox.d.ts +1 -1
- package/es/checkbox/ButtonCheckbox.js +9 -33
- package/es/checkbox/Checkbox.js +19 -35
- package/es/checkbox/Group.d.ts +1 -1
- package/es/checkbox/Group.js +20 -45
- package/es/checkbox/GroupButtonCheckbox.d.ts +2 -1
- package/es/checkbox/GroupButtonCheckbox.js +12 -26
- package/es/checkbox/style/index.css +1 -12
- package/es/clear/index.d.ts +2 -1
- package/es/clear/index.js +4 -14
- package/es/col/style/css.js +2 -2
- package/es/col/style/index.js +2 -2
- package/es/collapse/Collapse.d.ts +1 -1
- package/es/collapse/Collapse.js +3 -14
- package/es/collapse/CollapsePanel.js +3 -6
- package/es/color-picker/colorPicker.d.ts +1 -1
- package/es/color-picker/colorPicker.js +37 -46
- package/es/color-picker/style/css.js +2 -2
- package/es/color-picker/style/index.js +2 -2
- package/es/color-picker/util.js +4 -7
- package/es/config-provider/DisabledContext.d.ts +1 -1
- package/es/config-provider/DisabledContext.js +1 -1
- package/es/config-provider/SizeContext.d.ts +1 -1
- package/es/config-provider/SizeContext.js +1 -1
- package/es/config-provider/context.d.ts +2 -2
- package/es/config-provider/context.js +0 -6
- package/es/config-provider/index.js +24 -40
- package/es/config-provider/renderEmpty.d.ts +1 -1
- package/es/config-provider/renderEmpty.js +0 -7
- package/es/date-picker/PickerButton.d.ts +2 -2
- package/es/date-picker/PickerTag.d.ts +2 -2
- package/es/date-picker/generatePicker/generateRangePicker.js +15 -36
- package/es/date-picker/generatePicker/generateSinglePicker.js +14 -40
- package/es/date-picker/generatePicker/index.d.ts +12 -12
- package/es/date-picker/generatePicker/index.js +12 -26
- package/es/date-picker/index.d.ts +4 -4
- package/es/date-picker/locale/en_US.js +2 -2
- package/es/date-picker/locale/zh_CN.js +4 -4
- package/es/date-picker/src/PanelContext.d.ts +2 -2
- package/es/date-picker/src/Picker.d.ts +8 -8
- package/es/date-picker/src/Picker.js +167 -213
- package/es/date-picker/src/PickerPanel.d.ts +6 -6
- package/es/date-picker/src/PickerPanel.js +113 -167
- package/es/date-picker/src/PickerTrigger.d.ts +3 -3
- package/es/date-picker/src/PickerTrigger.js +11 -18
- package/es/date-picker/src/RangeContext.d.ts +1 -1
- package/es/date-picker/src/RangePicker.d.ts +11 -11
- package/es/date-picker/src/RangePicker.js +259 -376
- package/es/date-picker/src/generate/dateFns.js +0 -6
- package/es/date-picker/src/generate/dayjs.js +2 -15
- package/es/date-picker/src/generate/index.d.ts +1 -1
- package/es/date-picker/src/generate/moment.js +2 -11
- package/es/date-picker/src/hooks/useCellClassName.js +8 -14
- package/es/date-picker/src/hooks/useHoverValue.js +11 -20
- package/es/date-picker/src/hooks/usePickerInput.js +23 -44
- package/es/date-picker/src/hooks/useRangeDisabled.js +13 -29
- package/es/date-picker/src/hooks/useRangeViewDates.js +17 -40
- package/es/date-picker/src/hooks/useTextValueMapping.js +4 -9
- package/es/date-picker/src/hooks/useValueTexts.d.ts +1 -1
- package/es/date-picker/src/hooks/useValueTexts.js +4 -8
- package/es/date-picker/src/interface.d.ts +15 -15
- package/es/date-picker/src/panels/DatePanel/DateBody.d.ts +4 -4
- package/es/date-picker/src/panels/DatePanel/DateBody.js +13 -20
- package/es/date-picker/src/panels/DatePanel/DateHeader.d.ts +3 -3
- package/es/date-picker/src/panels/DatePanel/DateHeader.js +12 -17
- package/es/date-picker/src/panels/DatePanel/index.d.ts +3 -3
- package/es/date-picker/src/panels/DatePanel/index.js +17 -20
- package/es/date-picker/src/panels/DatetimePanel/index.d.ts +3 -3
- package/es/date-picker/src/panels/DatetimePanel/index.js +15 -21
- package/es/date-picker/src/panels/DecadePanel/DecadeBody.d.ts +3 -3
- package/es/date-picker/src/panels/DecadePanel/DecadeBody.js +2 -7
- package/es/date-picker/src/panels/DecadePanel/DecadeHeader.d.ts +3 -3
- package/es/date-picker/src/panels/DecadePanel/DecadeHeader.js +5 -10
- package/es/date-picker/src/panels/DecadePanel/index.d.ts +3 -3
- package/es/date-picker/src/panels/DecadePanel/index.js +10 -14
- package/es/date-picker/src/panels/Header.d.ts +2 -2
- package/es/date-picker/src/panels/Header.js +15 -19
- package/es/date-picker/src/panels/MonthPanel/MonthBody.d.ts +3 -3
- package/es/date-picker/src/panels/MonthPanel/MonthBody.js +7 -11
- package/es/date-picker/src/panels/MonthPanel/MonthHeader.d.ts +3 -3
- package/es/date-picker/src/panels/MonthPanel/MonthHeader.js +7 -12
- package/es/date-picker/src/panels/MonthPanel/index.d.ts +3 -3
- package/es/date-picker/src/panels/MonthPanel/index.js +11 -15
- package/es/date-picker/src/panels/PanelBody.d.ts +2 -2
- package/es/date-picker/src/panels/PanelBody.js +22 -33
- package/es/date-picker/src/panels/QuarterPanel/QuarterBody.d.ts +3 -3
- package/es/date-picker/src/panels/QuarterPanel/QuarterBody.js +6 -10
- package/es/date-picker/src/panels/QuarterPanel/QuarterHeader.d.ts +3 -3
- package/es/date-picker/src/panels/QuarterPanel/QuarterHeader.js +7 -12
- package/es/date-picker/src/panels/QuarterPanel/index.d.ts +3 -3
- package/es/date-picker/src/panels/QuarterPanel/index.js +11 -14
- package/es/date-picker/src/panels/TimePanel/TimeBody.d.ts +3 -3
- package/es/date-picker/src/panels/TimePanel/TimeBody.js +55 -75
- package/es/date-picker/src/panels/TimePanel/TimeHeader.d.ts +3 -3
- package/es/date-picker/src/panels/TimePanel/TimeHeader.js +5 -9
- package/es/date-picker/src/panels/TimePanel/TimeUnitColumn.d.ts +3 -3
- package/es/date-picker/src/panels/TimePanel/TimeUnitColumn.js +8 -19
- package/es/date-picker/src/panels/TimePanel/index.d.ts +4 -4
- package/es/date-picker/src/panels/TimePanel/index.js +17 -21
- package/es/date-picker/src/panels/WeekPanel/index.d.ts +3 -3
- package/es/date-picker/src/panels/WeekPanel/index.js +6 -12
- package/es/date-picker/src/panels/YearPanel/YearBody.d.ts +3 -3
- package/es/date-picker/src/panels/YearPanel/YearBody.js +8 -14
- package/es/date-picker/src/panels/YearPanel/YearHeader.d.ts +3 -3
- package/es/date-picker/src/panels/YearPanel/YearHeader.js +6 -11
- package/es/date-picker/src/panels/YearPanel/index.d.ts +3 -3
- package/es/date-picker/src/panels/YearPanel/index.js +12 -16
- package/es/date-picker/src/utils/dateUtil.js +11 -53
- package/es/date-picker/src/utils/getExtraFooter.d.ts +1 -1
- package/es/date-picker/src/utils/getExtraFooter.js +0 -1
- package/es/date-picker/src/utils/getRanges.d.ts +3 -3
- package/es/date-picker/src/utils/getRanges.js +8 -13
- package/es/date-picker/src/utils/miscUtil.d.ts +1 -1
- package/es/date-picker/src/utils/miscUtil.js +0 -6
- package/es/date-picker/src/utils/timeUtil.js +0 -5
- package/es/date-picker/src/utils/uiUtil.d.ts +2 -2
- package/es/date-picker/src/utils/uiUtil.js +14 -63
- package/es/date-picker/style/css.js +2 -2
- package/es/date-picker/style/index.css +4 -9
- package/es/date-picker/style/index.js +2 -2
- package/es/date-picker/util.js +0 -11
- package/es/dialog-box/dialogbox.js +16 -30
- package/es/dialog-box/style/index.css +1 -2
- package/es/divider/index.js +13 -26
- package/es/drawer/index.d.ts +3 -3
- package/es/drawer/index.js +55 -87
- package/es/drawer/style/index.css +1 -10
- package/es/dropdown/dropdown-button.js +23 -35
- package/es/dropdown/dropdown.d.ts +3 -3
- package/es/dropdown/dropdown.js +24 -42
- package/es/dropdown/rc-dropdown/Dropdown.js +24 -58
- package/es/dropdown/style/css.js +2 -2
- package/es/dropdown/style/index.js +2 -2
- package/es/empty/index.js +11 -23
- package/es/flow/index.js +13 -16
- package/es/form/ErrorList.d.ts +1 -1
- package/es/form/ErrorList.js +22 -27
- package/es/form/Form.d.ts +2 -2
- package/es/form/Form.js +30 -50
- package/es/form/FormItem.d.ts +4 -4
- package/es/form/FormItem.js +57 -109
- package/es/form/FormItemInput.js +17 -21
- package/es/form/FormItemLabel.d.ts +2 -2
- package/es/form/FormItemLabel.js +27 -50
- package/es/form/FormList.js +4 -15
- package/es/form/hooks/useCacheErrors.js +0 -6
- package/es/form/hooks/useForm.js +2 -8
- package/es/form/hooks/useFrameState.d.ts +1 -1
- package/es/form/hooks/useFrameState.js +3 -9
- package/es/form/hooks/useItemRef.js +1 -7
- package/es/form/index.d.ts +1 -1
- package/es/form/index.js +0 -2
- package/es/form/interface.d.ts +1 -1
- package/es/form/style/css.js +4 -3
- package/es/form/style/index.css +16 -72
- package/es/form/style/index.js +4 -3
- package/es/form/util.js +0 -4
- 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/row.d.ts +1 -1
- package/es/grid/row.js +24 -41
- package/es/icon/index.js +0 -1
- package/es/img-crop/EasyCrop.js +30 -38
- package/es/img-crop/index.js +178 -241
- package/es/img-crop/interface.d.ts +4 -4
- package/es/img-crop/style/css.js +2 -2
- package/es/img-crop/style/index.js +2 -2
- package/es/input/AutoComplete.d.ts +2 -1
- package/es/input/AutoComplete.js +9 -18
- package/es/input/Input.js +49 -102
- package/es/input/Label.js +18 -53
- package/es/input/MultiSelectInput.js +6 -11
- package/es/input/Password.js +26 -53
- package/es/input/TextArea.js +34 -60
- package/es/input-number/index.d.ts +1 -1
- package/es/input-number/index.js +15 -25
- package/es/input-number/src/InputNumber.js +117 -187
- package/es/input-number/src/StepHandler.d.ts +1 -1
- package/es/input-number/src/StepHandler.js +14 -22
- package/es/input-number/src/hooks/useCursor.js +7 -14
- package/es/input-number/src/hooks/useFrame.js +0 -3
- package/es/input-number/src/hooks/useUpdateEffect.js +0 -2
- package/es/input-number/src/utils/MiniDecimal.d.ts +1 -1
- package/es/input-number/src/utils/MiniDecimal.js +18 -66
- package/es/input-number/src/utils/numberUtil.js +14 -27
- package/es/layout/Sider.d.ts +2 -2
- package/es/layout/Sider.js +44 -75
- package/es/layout/index.d.ts +1 -1
- package/es/layout/layout.js +17 -33
- package/es/link/link.d.ts +4 -4
- package/es/link/link.js +14 -28
- package/es/loading/icon.d.ts +2 -1
- package/es/loading/icon.js +1 -3
- package/es/loading/index.js +12 -18
- package/es/loading/style/index.css +7 -112
- package/es/locale/en_US.js +2 -2
- package/es/locale/zh_CN.js +2 -2
- package/es/locale-provider/LocaleReceiver.d.ts +1 -1
- package/es/locale-provider/LocaleReceiver.js +4 -13
- package/es/locale-provider/demo/locale.js +2 -2
- package/es/locale-provider/index.d.ts +1 -1
- package/es/locale-provider/index.js +4 -14
- package/es/menu/ItemGroup.js +4 -10
- package/es/menu/MenuHead.js +5 -18
- package/es/menu/MenuItem.js +7 -21
- package/es/menu/SubMenu.js +5 -17
- package/es/menu/baseMenu.js +11 -22
- package/es/menu/globalSilderBar.js +18 -32
- package/es/menu/header.js +7 -12
- package/es/menu/menu.js +8 -16
- package/es/menu/rc-menu/Divider.d.ts +1 -1
- package/es/menu/rc-menu/Divider.js +2 -6
- package/es/menu/rc-menu/Icon.js +2 -4
- package/es/menu/rc-menu/Menu.js +162 -188
- package/es/menu/rc-menu/MenuItem.js +54 -87
- package/es/menu/rc-menu/MenuItemGroup.js +7 -20
- package/es/menu/rc-menu/SubMenu/InlineSubMenuList.d.ts +1 -1
- package/es/menu/rc-menu/SubMenu/InlineSubMenuList.js +23 -32
- package/es/menu/rc-menu/SubMenu/PopupTrigger.d.ts +1 -1
- package/es/menu/rc-menu/SubMenu/PopupTrigger.js +22 -27
- package/es/menu/rc-menu/SubMenu/SubMenuList.js +5 -15
- package/es/menu/rc-menu/SubMenu/index.d.ts +1 -1
- package/es/menu/rc-menu/SubMenu/index.js +83 -113
- package/es/menu/rc-menu/context/IdContext.js +0 -2
- package/es/menu/rc-menu/context/MenuContext.d.ts +1 -1
- package/es/menu/rc-menu/context/MenuContext.js +3 -14
- package/es/menu/rc-menu/context/PathContext.js +2 -2
- package/es/menu/rc-menu/hooks/useAccessibility.js +43 -82
- package/es/menu/rc-menu/hooks/useActive.js +5 -8
- package/es/menu/rc-menu/hooks/useDirectionStyle.js +3 -5
- package/es/menu/rc-menu/hooks/useKeyRecords.js +7 -25
- package/es/menu/rc-menu/hooks/useMemoCallback.js +0 -4
- package/es/menu/rc-menu/hooks/useUUID.js +5 -6
- package/es/menu/rc-menu/index.d.ts +1 -1
- package/es/menu/rc-menu/index.js +0 -1
- package/es/menu/rc-menu/interface.d.ts +7 -7
- package/es/menu/rc-menu/utils/motionUtil.js +0 -2
- package/es/menu/rc-menu/utils/nodeUtil.js +0 -6
- package/es/menu/rc-menu/utils/warnUtil.js +2 -9
- package/es/menu/style/css.js +2 -2
- package/es/menu/style/index.js +2 -2
- package/es/modal/DialogBox.js +19 -39
- package/es/modal/Modal.js +17 -28
- package/es/modal/dialog.js +0 -16
- package/es/modal/locale.js +0 -2
- package/es/modal/style/css.js +2 -2
- package/es/modal/style/index.css +1 -2
- package/es/modal/style/index.js +2 -2
- package/es/pagination/pagination.d.ts +1 -1
- package/es/pagination/pagination.js +11 -25
- package/es/pagination/rc-pagination/Goto.js +7 -21
- package/es/pagination/rc-pagination/Options.js +12 -18
- package/es/pagination/rc-pagination/Pager.js +8 -12
- package/es/pagination/rc-pagination/Pagination.js +64 -124
- package/es/pagination/style/css.js +2 -2
- package/es/pagination/style/index.css +6 -0
- package/es/pagination/style/index.js +2 -2
- package/es/pagination/style/index.less +10 -0
- package/es/popconfirm/index.d.ts +1 -1
- package/es/popconfirm/index.js +18 -41
- package/es/popconfirm/style/css.js +2 -2
- package/es/popconfirm/style/index.js +2 -2
- package/es/popover/index.js +5 -15
- package/es/progress/CircleProgress.js +48 -53
- package/es/progress/LineProgress.js +39 -44
- package/es/progress/common/index.js +2 -2
- package/es/progress/index.js +33 -44
- package/es/progress/interface.d.ts +6 -6
- package/es/radio/Radio.js +12 -31
- package/es/radio/RadioButton.d.ts +2 -1
- package/es/radio/RadioButton.js +14 -30
- package/es/radio/RadioGroup.d.ts +1 -1
- package/es/radio/RadioGroup.js +16 -22
- package/es/rate/rate.js +72 -110
- package/es/row/style/css.js +2 -2
- package/es/row/style/index.js +2 -2
- package/es/search/Search.js +40 -61
- package/es/search/style/css.js +2 -2
- package/es/search/style/index.js +2 -2
- package/es/select/index.d.ts +4 -4
- package/es/select/index.js +29 -43
- package/es/select/src/OptGroup.js +0 -1
- package/es/select/src/Option.js +0 -1
- package/es/select/src/OptionList.js +104 -172
- package/es/select/src/Select.d.ts +2 -2
- package/es/select/src/Select.js +0 -12
- package/es/select/src/SelectTrigger.js +28 -44
- package/es/select/src/Selector/Input.d.ts +1 -1
- package/es/select/src/Selector/Input.js +26 -33
- package/es/select/src/Selector/MultipleSelector.js +51 -71
- package/es/select/src/Selector/SingleSelector.js +29 -37
- package/es/select/src/Selector/index.js +22 -47
- package/es/select/src/TransBtn.js +6 -11
- package/es/select/src/generate.js +231 -347
- package/es/select/src/hooks/useCacheDisplayValue.js +1 -4
- package/es/select/src/hooks/useCacheOptions.js +0 -2
- package/es/select/src/hooks/useDelayReset.js +3 -11
- package/es/select/src/hooks/useLayoutEffect.js +0 -1
- package/es/select/src/hooks/useLock.js +2 -6
- package/es/select/src/hooks/useSelectTriggerControl.js +0 -3
- package/es/select/src/interface/generator.d.ts +12 -12
- package/es/select/src/interface/index.d.ts +5 -5
- package/es/select/src/utils/commonUtil.js +8 -26
- package/es/select/src/utils/legacyUtil.js +11 -23
- package/es/select/src/utils/valueUtil.js +23 -62
- package/es/select/src/utils/warningPropsUtil.js +30 -46
- package/es/select/style/css.js +2 -2
- package/es/select/style/index.css +4 -8
- package/es/select/style/index.js +2 -2
- package/es/select/utils/iconUtil.js +16 -26
- package/es/skeleton/Avatar.d.ts +2 -1
- package/es/skeleton/Avatar.js +3 -7
- package/es/skeleton/Button.d.ts +2 -1
- package/es/skeleton/Button.js +5 -10
- package/es/skeleton/Element.d.ts +1 -1
- package/es/skeleton/Element.js +4 -7
- package/es/skeleton/Image.d.ts +2 -1
- package/es/skeleton/Image.js +6 -9
- package/es/skeleton/Input.d.ts +2 -1
- package/es/skeleton/Input.js +4 -9
- package/es/skeleton/Node.js +4 -9
- package/es/skeleton/Paragraph.d.ts +2 -2
- package/es/skeleton/Paragraph.js +7 -15
- package/es/skeleton/Skeleton.d.ts +5 -5
- package/es/skeleton/Skeleton.js +21 -49
- package/es/skeleton/Title.d.ts +1 -1
- package/es/skeleton/Title.js +3 -5
- package/es/skeleton/style/index.css +1 -10
- package/es/slider/SliderTooltip.js +0 -5
- package/es/slider/index.js +21 -41
- package/es/slider/interface.d.ts +1 -1
- package/es/space/Item.d.ts +1 -1
- package/es/space/Item.js +10 -15
- package/es/space/index.d.ts +1 -1
- package/es/space/index.js +29 -48
- package/es/steps/index.d.ts +1 -1
- package/es/steps/index.js +10 -19
- package/es/steps/interface.d.ts +1 -1
- package/es/steps/src/step.d.ts +1 -1
- package/es/steps/src/step.js +39 -66
- package/es/steps/src/steps.d.ts +3 -3
- package/es/steps/src/steps.js +24 -47
- package/es/steps/style/css.js +2 -1
- package/es/steps/style/index.js +2 -1
- package/es/style/index.css +144 -526
- package/es/switch/index.js +19 -34
- package/es/switch/interface.d.ts +2 -2
- package/es/switch/style/index.css +8 -32
- package/es/table/Column.js +0 -2
- package/es/table/ColumnGroup.js +0 -2
- package/es/table/ExpandIcon.d.ts +1 -1
- package/es/table/ExpandIcon.js +4 -8
- package/es/table/Space.js +4 -10
- package/es/table/Table.d.ts +1 -1
- package/es/table/Table.js +114 -166
- package/es/table/baseTable/Body/BodyRow.d.ts +1 -1
- package/es/table/baseTable/Body/BodyRow.js +42 -65
- package/es/table/baseTable/Body/ExpandedRow.d.ts +1 -1
- package/es/table/baseTable/Body/ExpandedRow.js +13 -20
- package/es/table/baseTable/Body/MeasureCell.d.ts +1 -1
- package/es/table/baseTable/Body/MeasureCell.js +1 -1
- package/es/table/baseTable/Body/MeasureRow.d.ts +1 -1
- package/es/table/baseTable/Body/MeasureRow.js +3 -5
- package/es/table/baseTable/Body/index.d.ts +1 -1
- package/es/table/baseTable/Body/index.js +23 -33
- package/es/table/baseTable/Cell/index.d.ts +1 -1
- package/es/table/baseTable/Cell/index.js +58 -98
- package/es/table/baseTable/ColGroup.d.ts +2 -2
- package/es/table/baseTable/ColGroup.js +7 -19
- package/es/table/baseTable/FixedHolder/index.js +29 -46
- package/es/table/baseTable/Footer/Cell.d.ts +1 -1
- package/es/table/baseTable/Footer/Cell.js +11 -14
- package/es/table/baseTable/Footer/Row.d.ts +1 -1
- package/es/table/baseTable/Footer/Row.js +2 -8
- package/es/table/baseTable/Footer/Summary.js +0 -2
- package/es/table/baseTable/Footer/index.d.ts +2 -2
- package/es/table/baseTable/Footer/index.js +2 -4
- package/es/table/baseTable/Header/Header.js +9 -23
- package/es/table/baseTable/Header/HeaderRow.d.ts +2 -2
- package/es/table/baseTable/Header/HeaderRow.js +8 -16
- package/es/table/baseTable/Panel/index.d.ts +1 -1
- package/es/table/baseTable/Panel/index.js +1 -3
- package/es/table/baseTable/Table.d.ts +1 -1
- package/es/table/baseTable/Table.js +127 -195
- package/es/table/baseTable/context/StickyContext.js +2 -2
- package/es/table/baseTable/hooks/useColumns.js +40 -82
- package/es/table/baseTable/hooks/useFlattenRecords.js +4 -10
- package/es/table/baseTable/hooks/useFrame.d.ts +1 -1
- package/es/table/baseTable/hooks/useFrame.js +2 -13
- package/es/table/baseTable/hooks/useSticky.js +12 -14
- package/es/table/baseTable/hooks/useStickyOffsets.js +4 -9
- package/es/table/baseTable/interface.d.ts +20 -20
- package/es/table/baseTable/stickyScrollBar.js +14 -40
- package/es/table/baseTable/sugar/Column.js +0 -2
- package/es/table/baseTable/sugar/ColumnGroup.js +0 -2
- package/es/table/baseTable/utils/expandUtil.d.ts +2 -2
- package/es/table/baseTable/utils/expandUtil.js +4 -10
- package/es/table/baseTable/utils/fixUtil.js +0 -4
- package/es/table/baseTable/utils/legacyUtil.js +2 -13
- package/es/table/baseTable/utils/valueUtil.js +2 -17
- package/es/table/hooks/useFilter/FilterDropdown.d.ts +1 -1
- package/es/table/hooks/useFilter/FilterDropdown.js +50 -102
- package/es/table/hooks/useFilter/FilterSearch.d.ts +1 -1
- package/es/table/hooks/useFilter/FilterSearch.js +6 -9
- package/es/table/hooks/useFilter/FilterWrapper.d.ts +1 -1
- package/es/table/hooks/useFilter/FilterWrapper.js +0 -2
- package/es/table/hooks/useFilter/index.js +20 -45
- package/es/table/hooks/useLazyKVMap.js +0 -6
- package/es/table/hooks/usePagination.js +15 -36
- package/es/table/hooks/useSelection.d.ts +1 -1
- package/es/table/hooks/useSelection.js +105 -167
- package/es/table/hooks/useSorter.js +21 -65
- package/es/table/hooks/useTitleColumns.js +0 -5
- package/es/table/interface.d.ts +15 -15
- package/es/table/style/css.js +2 -2
- package/es/table/style/index.css +0 -3
- package/es/table/style/index.js +2 -2
- package/es/table/util.js +0 -3
- package/es/tabs/src/TabNavList/AddButton.js +4 -8
- package/es/tabs/src/TabNavList/OperationNode.js +33 -55
- package/es/tabs/src/TabNavList/TabNode.js +25 -48
- package/es/tabs/src/TabNavList/index.js +129 -192
- package/es/tabs/src/TabPanelList/TabPane.d.ts +1 -1
- package/es/tabs/src/TabPanelList/TabPane.js +12 -16
- package/es/tabs/src/TabPanelList/index.d.ts +1 -1
- package/es/tabs/src/TabPanelList/index.js +7 -9
- package/es/tabs/src/Tabs.d.ts +1 -1
- package/es/tabs/src/Tabs.js +67 -96
- package/es/tabs/src/hooks/useOffsets.js +6 -11
- package/es/tabs/src/hooks/useRaf.d.ts +1 -1
- package/es/tabs/src/hooks/useRaf.js +2 -9
- package/es/tabs/src/hooks/useRefs.js +0 -4
- package/es/tabs/src/hooks/useSyncState.d.ts +1 -1
- package/es/tabs/src/hooks/useSyncState.js +2 -7
- package/es/tabs/src/hooks/useTouchMove.js +32 -48
- package/es/tabs/src/hooks/useVisibleRange.js +2 -13
- package/es/tabs/src/interface.d.ts +8 -8
- package/es/tabs/tabs.d.ts +3 -3
- package/es/tabs/tabs.js +10 -24
- package/es/tag/CheckableTag.js +7 -19
- package/es/tag/index.d.ts +1 -1
- package/es/tag/index.js +19 -40
- package/es/tag/style/index.css +1 -12
- package/es/time-picker/index.d.ts +1 -1
- package/es/time-picker/index.js +9 -22
- package/es/time-picker/style/css.js +4 -4
- package/es/time-picker/style/index.css +0 -1
- package/es/time-picker/style/index.js +4 -4
- package/es/timeline/interface.d.ts +1 -1
- package/es/timeline/style/index.css +4 -27
- package/es/timeline/timeline.js +16 -23
- package/es/timeline/timelineItem.js +23 -51
- package/es/toast/PurePanel.d.ts +2 -2
- package/es/toast/PurePanel.js +23 -34
- package/es/toast/base.d.ts +1 -1
- package/es/toast/base.js +63 -94
- package/es/toast/index.js +38 -61
- package/es/toast/interface.d.ts +3 -3
- package/es/toast/style/index.css +17 -64
- package/es/toast/useNotification.d.ts +1 -1
- package/es/toast/useNotification.js +52 -70
- package/es/toast/util.js +0 -7
- package/es/tooltip/index.d.ts +2 -2
- package/es/tooltip/index.js +31 -61
- package/es/tooltip/placements.js +6 -8
- package/es/tooltip/style/index.css +0 -1
- package/es/transfer/DataSource.d.ts +2 -1
- package/es/transfer/DataSource.js +39 -53
- package/es/transfer/SourceList.d.ts +2 -1
- package/es/transfer/SourceList.js +15 -31
- package/es/transfer/Target.d.ts +2 -1
- package/es/transfer/Target.js +45 -64
- package/es/transfer/TargetList.d.ts +2 -1
- package/es/transfer/TargetList.js +14 -25
- package/es/transfer/index.d.ts +5 -5
- package/es/transfer/index.js +18 -31
- package/es/transfer/style/css.js +2 -2
- package/es/transfer/style/index.js +2 -2
- package/es/transfer/util.js +0 -3
- package/es/tree/style/css.js +2 -2
- package/es/tree/style/index.css +1 -12
- package/es/tree/style/index.js +2 -2
- package/es/tree/tree.d.ts +3 -3
- package/es/tree/tree.js +34 -92
- package/es/tree/utils/dragHelper.d.ts +2 -2
- package/es/tree/utils/dragHelper.js +5 -10
- package/es/tree/utils/iconHelper.js +0 -6
- package/es/tree/utils/nodeHelper.js +0 -17
- package/es/tree-select/index.d.ts +4 -4
- package/es/tree-select/index.js +59 -77
- package/es/tree-select/src/OptionList.d.ts +1 -1
- package/es/tree-select/src/OptionList.js +63 -107
- package/es/tree-select/src/TreeNode.js +0 -1
- package/es/tree-select/src/TreeSelect.d.ts +4 -4
- package/es/tree-select/src/TreeSelect.js +166 -215
- package/es/tree-select/src/hooks/useCache.js +2 -4
- package/es/tree-select/src/hooks/useCheckedKeys.js +4 -5
- package/es/tree-select/src/hooks/useDataEntities.js +2 -3
- package/es/tree-select/src/hooks/useFilterTreeData.js +2 -9
- package/es/tree-select/src/hooks/useRefFunc.js +0 -1
- package/es/tree-select/src/hooks/useTreeData.js +10 -16
- package/es/tree-select/src/interface.d.ts +4 -4
- package/es/tree-select/src/utils/legacyUtil.js +10 -33
- package/es/tree-select/src/utils/strategyUtil.d.ts +1 -1
- package/es/tree-select/src/utils/strategyUtil.js +0 -7
- package/es/tree-select/src/utils/valueUtil.js +3 -9
- package/es/tree-select/src/utils/warningPropsUtil.js +5 -10
- package/es/tree-select/style/css.js +2 -2
- package/es/tree-select/style/index.css +1 -12
- package/es/tree-select/style/index.js +2 -2
- package/es/upload/BaseUpload/AjaxUploader.d.ts +1 -1
- package/es/upload/BaseUpload/AjaxUploader.js +114 -186
- package/es/upload/BaseUpload/Upload.d.ts +2 -2
- package/es/upload/BaseUpload/Upload.js +0 -13
- package/es/upload/BaseUpload/attr-accept.js +10 -18
- package/es/upload/BaseUpload/interface.d.ts +4 -4
- package/es/upload/BaseUpload/request.js +10 -26
- package/es/upload/BaseUpload/traverseFileTree.js +4 -12
- package/es/upload/Dragger.d.ts +1 -1
- package/es/upload/Dragger.js +3 -12
- package/es/upload/Upload.js +117 -190
- package/es/upload/UploadList/ListItem.js +40 -53
- package/es/upload/UploadList/index.js +45 -79
- package/es/upload/interface.d.ts +8 -8
- package/es/upload/style/css.js +2 -2
- package/es/upload/style/index.css +4 -26
- package/es/upload/style/index.js +2 -2
- package/es/upload/utils.js +3 -23
- package/es/virtual-list/Filler.js +4 -8
- package/es/virtual-list/Item.js +1 -1
- package/es/virtual-list/List.d.ts +5 -5
- package/es/virtual-list/List.js +122 -169
- package/es/virtual-list/ScrollBar.d.ts +1 -1
- package/es/virtual-list/ScrollBar.js +23 -72
- package/es/virtual-list/hooks/useChildren.d.ts +2 -2
- package/es/virtual-list/hooks/useChildren.js +2 -1
- package/es/virtual-list/hooks/useDiffItem.js +6 -10
- package/es/virtual-list/hooks/useFrameWheel.js +10 -14
- package/es/virtual-list/hooks/useHeights.js +7 -14
- package/es/virtual-list/hooks/useMobileTouchMove.js +4 -15
- package/es/virtual-list/hooks/useOriginScroll.js +6 -8
- package/es/virtual-list/hooks/useScrollTo.js +12 -28
- package/es/virtual-list/interface.d.ts +2 -2
- package/es/virtual-list/mock.js +2 -1
- package/es/virtual-list/utils/CacheMap.js +0 -5
- package/es/virtual-list/utils/algorithmUtil.js +6 -20
- package/lib/_util/colors.d.ts +3 -3
- package/lib/_util/colors.js +2 -4
- package/lib/_util/createWorker.js +0 -1
- package/lib/_util/devWarning.js +0 -6
- package/lib/_util/easings.js +2 -5
- 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/getScroll.js +0 -6
- package/lib/_util/hooks/useCombinedRefs.js +0 -7
- package/lib/_util/hooks/useFlexGapSupport.js +3 -13
- package/lib/_util/hooks/useForceUpdate.js +4 -12
- package/lib/_util/hooks/useMergedState.js +17 -30
- package/lib/_util/hooks/usePatchElement.js +5 -14
- package/lib/_util/hooks/useSyncState.d.ts +1 -1
- package/lib/_util/hooks/useSyncState.js +2 -9
- package/lib/_util/isNumeric.js +0 -2
- package/lib/_util/lengthLimit.js +0 -2
- package/lib/_util/motion.d.ts +1 -1
- package/lib/_util/motion.js +0 -12
- package/lib/_util/reactNode.d.ts +2 -2
- package/lib/_util/reactNode.js +0 -8
- package/lib/_util/responsiveObserve.d.ts +5 -5
- package/lib/_util/responsiveObserve.js +0 -12
- package/lib/_util/scrollTo.js +6 -18
- package/lib/_util/statusUtils.d.ts +1 -1
- package/lib/_util/statusUtils.js +0 -9
- package/lib/_util/styleChecker.js +6 -18
- package/lib/_util/throttleByAnimationFrame.js +0 -11
- package/lib/_util/type.d.ts +3 -3
- package/lib/_util/type.js +0 -6
- package/lib/affix/index.d.ts +1 -1
- package/lib/affix/index.js +33 -103
- package/lib/affix/style/css.js +0 -1
- package/lib/affix/style/index.js +0 -1
- package/lib/affix/utils.d.ts +2 -2
- package/lib/affix/utils.js +7 -23
- package/lib/alert/ErrorBoundary.js +5 -23
- package/lib/alert/index.js +28 -73
- package/lib/alert/style/css.js +0 -1
- package/lib/alert/style/index.js +0 -1
- package/lib/anchor/Anchor.d.ts +2 -2
- package/lib/anchor/Anchor.js +21 -87
- package/lib/anchor/AnchorLink.d.ts +2 -2
- package/lib/anchor/AnchorLink.js +13 -43
- package/lib/anchor/context.js +0 -5
- package/lib/anchor/index.js +0 -4
- package/lib/anchor/style/css.js +0 -1
- package/lib/anchor/style/index.js +0 -1
- package/lib/avatar/SizeContext.d.ts +1 -1
- package/lib/avatar/SizeContext.js +1 -6
- package/lib/avatar/avatar.js +27 -71
- package/lib/avatar/group.js +12 -30
- package/lib/avatar/index.js +0 -4
- package/lib/avatar/style/css.js +0 -2
- package/lib/avatar/style/index.js +0 -2
- package/lib/back-top/index.js +14 -48
- package/lib/back-top/style/css.js +0 -1
- package/lib/back-top/style/index.js +0 -1
- package/lib/badge/Ribbon.d.ts +1 -1
- package/lib/badge/Ribbon.js +10 -26
- package/lib/badge/ScrollNumber.js +20 -42
- package/lib/badge/SingleNumber.d.ts +2 -2
- package/lib/badge/SingleNumber.js +24 -46
- package/lib/badge/index.js +47 -88
- package/lib/badge/style/css.js +0 -1
- package/lib/badge/style/index.css +14 -119
- package/lib/badge/style/index.js +0 -1
- package/lib/badge/utils.js +1 -2
- package/lib/breadcrumb/Breadcrumb.js +11 -34
- package/lib/breadcrumb/BreadcrumbItem.js +13 -41
- package/lib/breadcrumb/index.js +0 -3
- package/lib/breadcrumb/style/css.js +0 -1
- package/lib/breadcrumb/style/index.js +0 -1
- package/lib/button/LoadingIcon.d.ts +2 -1
- package/lib/button/LoadingIcon.js +0 -5
- package/lib/button/button-group.d.ts +1 -1
- package/lib/button/button-group.js +2 -20
- package/lib/button/button.d.ts +6 -6
- package/lib/button/button.js +23 -63
- package/lib/button/index.js +0 -3
- package/lib/button/style/css.js +0 -1
- package/lib/button/style/index.js +0 -1
- package/lib/calendar/Header.d.ts +2 -2
- package/lib/calendar/Header.js +26 -60
- package/lib/calendar/generateCalendar.d.ts +8 -8
- package/lib/calendar/generateCalendar.js +43 -86
- package/lib/calendar/index.d.ts +1 -1
- package/lib/calendar/index.js +0 -4
- package/lib/calendar/interface.d.ts +4 -4
- package/lib/calendar/locale/en_US.js +0 -3
- package/lib/calendar/locale/zh_CN.js +0 -3
- package/lib/calendar/style/css.js +0 -3
- package/lib/calendar/style/index.js +0 -3
- package/lib/card/Card.d.ts +4 -4
- package/lib/card/Card.js +40 -83
- package/lib/card/Grid.js +5 -22
- package/lib/card/Meta.js +7 -26
- package/lib/card/index.js +0 -3
- package/lib/card/style/css.js +0 -4
- package/lib/card/style/index.css +2 -13
- package/lib/card/style/index.js +0 -4
- package/lib/carousel/carousel.d.ts +3 -3
- package/lib/carousel/carousel.js +48 -76
- package/lib/carousel/index.js +0 -3
- package/lib/carousel/indicator.js +14 -29
- package/lib/carousel/style/css.js +0 -1
- package/lib/carousel/style/index.js +0 -1
- package/lib/carousel/switch.js +2 -9
- package/lib/cascader/Cascader.d.ts +4 -4
- package/lib/cascader/Cascader.js +41 -158
- package/lib/cascader/MenuItem.d.ts +1 -1
- package/lib/cascader/MenuItem.js +16 -32
- package/lib/cascader/Menus.d.ts +5 -5
- package/lib/cascader/Menus.js +87 -174
- package/lib/cascader/index.d.ts +1 -1
- package/lib/cascader/index.js +71 -192
- package/lib/cascader/renderEmpty.d.ts +1 -1
- package/lib/cascader/renderEmpty.js +1 -9
- package/lib/cascader/style/css.js +0 -7
- package/lib/cascader/style/index.css +4 -8
- package/lib/cascader/style/index.js +0 -7
- package/lib/cascader/utils.js +2 -11
- package/lib/checkbox/BaseCheckbox.d.ts +1 -1
- package/lib/checkbox/BaseCheckbox.js +22 -56
- package/lib/checkbox/ButtonCheckbox.d.ts +1 -1
- package/lib/checkbox/ButtonCheckbox.js +9 -44
- package/lib/checkbox/Checkbox.js +19 -43
- package/lib/checkbox/Group.d.ts +1 -1
- package/lib/checkbox/Group.js +20 -59
- package/lib/checkbox/GroupButtonCheckbox.d.ts +2 -1
- package/lib/checkbox/GroupButtonCheckbox.js +12 -32
- package/lib/checkbox/index.js +1 -5
- package/lib/checkbox/style/css.js +0 -1
- package/lib/checkbox/style/index.css +1 -12
- package/lib/checkbox/style/index.js +0 -1
- package/lib/clear/index.d.ts +2 -1
- package/lib/clear/index.js +4 -19
- package/lib/clear/style/css.js +0 -1
- package/lib/clear/style/index.js +0 -1
- package/lib/col/index.js +0 -2
- package/lib/col/style/css.js +0 -1
- package/lib/col/style/index.js +0 -1
- package/lib/collapse/Collapse.d.ts +1 -1
- package/lib/collapse/Collapse.js +3 -26
- package/lib/collapse/CollapsePanel.js +3 -14
- package/lib/collapse/index.js +0 -3
- package/lib/collapse/style/css.js +0 -1
- package/lib/collapse/style/index.js +0 -1
- package/lib/color-picker/colorPicker.d.ts +1 -1
- package/lib/color-picker/colorPicker.js +38 -59
- package/lib/color-picker/index.js +0 -3
- package/lib/color-picker/style/css.js +0 -3
- package/lib/color-picker/style/index.js +0 -3
- package/lib/color-picker/util.js +4 -12
- package/lib/config-provider/DisabledContext.d.ts +1 -1
- package/lib/config-provider/DisabledContext.js +1 -8
- package/lib/config-provider/SizeContext.d.ts +1 -1
- package/lib/config-provider/SizeContext.js +2 -8
- package/lib/config-provider/context.d.ts +2 -2
- package/lib/config-provider/context.js +1 -13
- package/lib/config-provider/index.js +24 -50
- package/lib/config-provider/renderEmpty.d.ts +1 -1
- package/lib/config-provider/renderEmpty.js +1 -15
- package/lib/config-provider/style/css.js +0 -1
- package/lib/config-provider/style/index.js +0 -1
- package/lib/date-picker/PickerButton.d.ts +2 -2
- package/lib/date-picker/PickerButton.js +0 -8
- package/lib/date-picker/PickerTag.d.ts +2 -2
- package/lib/date-picker/PickerTag.js +0 -8
- package/lib/date-picker/generatePicker/generateRangePicker.js +15 -61
- package/lib/date-picker/generatePicker/generateSinglePicker.js +14 -65
- package/lib/date-picker/generatePicker/index.d.ts +12 -12
- package/lib/date-picker/generatePicker/index.js +12 -33
- package/lib/date-picker/index.d.ts +4 -4
- package/lib/date-picker/index.js +0 -4
- package/lib/date-picker/locale/en_US.js +2 -7
- package/lib/date-picker/locale/zh_CN.js +4 -9
- package/lib/date-picker/src/PanelContext.d.ts +2 -2
- package/lib/date-picker/src/PanelContext.js +1 -5
- package/lib/date-picker/src/Picker.d.ts +8 -8
- package/lib/date-picker/src/Picker.js +168 -234
- package/lib/date-picker/src/PickerPanel.d.ts +6 -6
- package/lib/date-picker/src/PickerPanel.js +114 -193
- package/lib/date-picker/src/PickerTrigger.d.ts +3 -3
- package/lib/date-picker/src/PickerTrigger.js +12 -26
- package/lib/date-picker/src/RangeContext.d.ts +1 -1
- package/lib/date-picker/src/RangeContext.js +1 -5
- package/lib/date-picker/src/RangePicker.d.ts +11 -11
- package/lib/date-picker/src/RangePicker.js +260 -404
- package/lib/date-picker/src/generate/dateFns.js +0 -11
- package/lib/date-picker/src/generate/dayjs.js +2 -32
- package/lib/date-picker/src/generate/index.d.ts +1 -1
- package/lib/date-picker/src/generate/moment.js +2 -15
- package/lib/date-picker/src/hooks/useCellClassName.js +8 -19
- package/lib/date-picker/src/hooks/useHoverValue.js +11 -25
- package/lib/date-picker/src/hooks/usePickerInput.js +23 -50
- package/lib/date-picker/src/hooks/useRangeDisabled.js +13 -36
- package/lib/date-picker/src/hooks/useRangeViewDates.js +17 -48
- package/lib/date-picker/src/hooks/useTextValueMapping.js +4 -16
- package/lib/date-picker/src/hooks/useValueTexts.d.ts +1 -1
- package/lib/date-picker/src/hooks/useValueTexts.js +4 -13
- package/lib/date-picker/src/index.js +0 -5
- package/lib/date-picker/src/interface.d.ts +15 -15
- package/lib/date-picker/src/panels/DatePanel/DateBody.d.ts +4 -4
- package/lib/date-picker/src/panels/DatePanel/DateBody.js +13 -30
- package/lib/date-picker/src/panels/DatePanel/DateHeader.d.ts +3 -3
- package/lib/date-picker/src/panels/DatePanel/DateHeader.js +12 -26
- package/lib/date-picker/src/panels/DatePanel/index.d.ts +3 -3
- package/lib/date-picker/src/panels/DatePanel/index.js +17 -33
- package/lib/date-picker/src/panels/DatetimePanel/index.d.ts +3 -3
- package/lib/date-picker/src/panels/DatetimePanel/index.js +15 -36
- package/lib/date-picker/src/panels/DecadePanel/DecadeBody.d.ts +3 -3
- package/lib/date-picker/src/panels/DecadePanel/DecadeBody.js +2 -20
- package/lib/date-picker/src/panels/DecadePanel/DecadeHeader.d.ts +3 -3
- package/lib/date-picker/src/panels/DecadePanel/DecadeHeader.js +5 -21
- package/lib/date-picker/src/panels/DecadePanel/index.d.ts +3 -3
- package/lib/date-picker/src/panels/DecadePanel/index.js +10 -24
- package/lib/date-picker/src/panels/Header.d.ts +2 -2
- package/lib/date-picker/src/panels/Header.js +15 -26
- package/lib/date-picker/src/panels/MonthPanel/MonthBody.d.ts +3 -3
- package/lib/date-picker/src/panels/MonthPanel/MonthBody.js +7 -22
- package/lib/date-picker/src/panels/MonthPanel/MonthHeader.d.ts +3 -3
- package/lib/date-picker/src/panels/MonthPanel/MonthHeader.js +7 -21
- package/lib/date-picker/src/panels/MonthPanel/index.d.ts +3 -3
- package/lib/date-picker/src/panels/MonthPanel/index.js +11 -24
- package/lib/date-picker/src/panels/PanelBody.d.ts +2 -2
- package/lib/date-picker/src/panels/PanelBody.js +22 -45
- package/lib/date-picker/src/panels/QuarterPanel/QuarterBody.d.ts +3 -3
- package/lib/date-picker/src/panels/QuarterPanel/QuarterBody.js +6 -21
- package/lib/date-picker/src/panels/QuarterPanel/QuarterHeader.d.ts +3 -3
- package/lib/date-picker/src/panels/QuarterPanel/QuarterHeader.js +7 -21
- package/lib/date-picker/src/panels/QuarterPanel/index.d.ts +3 -3
- package/lib/date-picker/src/panels/QuarterPanel/index.js +11 -23
- package/lib/date-picker/src/panels/TimePanel/TimeBody.d.ts +3 -3
- package/lib/date-picker/src/panels/TimePanel/TimeBody.js +55 -86
- package/lib/date-picker/src/panels/TimePanel/TimeHeader.d.ts +3 -3
- package/lib/date-picker/src/panels/TimePanel/TimeHeader.js +5 -17
- package/lib/date-picker/src/panels/TimePanel/TimeUnitColumn.d.ts +3 -3
- package/lib/date-picker/src/panels/TimePanel/TimeUnitColumn.js +8 -28
- package/lib/date-picker/src/panels/TimePanel/index.d.ts +4 -4
- package/lib/date-picker/src/panels/TimePanel/index.js +17 -33
- package/lib/date-picker/src/panels/WeekPanel/index.d.ts +3 -3
- package/lib/date-picker/src/panels/WeekPanel/index.js +6 -22
- package/lib/date-picker/src/panels/YearPanel/YearBody.d.ts +3 -3
- package/lib/date-picker/src/panels/YearPanel/YearBody.js +8 -28
- package/lib/date-picker/src/panels/YearPanel/YearHeader.d.ts +3 -3
- package/lib/date-picker/src/panels/YearPanel/YearHeader.js +6 -22
- package/lib/date-picker/src/panels/YearPanel/index.d.ts +3 -3
- package/lib/date-picker/src/panels/YearPanel/index.js +12 -26
- package/lib/date-picker/src/utils/dateUtil.js +11 -73
- package/lib/date-picker/src/utils/getExtraFooter.d.ts +1 -1
- package/lib/date-picker/src/utils/getExtraFooter.js +0 -6
- package/lib/date-picker/src/utils/getRanges.d.ts +3 -3
- package/lib/date-picker/src/utils/getRanges.js +8 -18
- package/lib/date-picker/src/utils/miscUtil.d.ts +1 -1
- package/lib/date-picker/src/utils/miscUtil.js +0 -13
- package/lib/date-picker/src/utils/timeUtil.js +0 -9
- package/lib/date-picker/src/utils/uiUtil.d.ts +2 -2
- package/lib/date-picker/src/utils/uiUtil.js +14 -78
- package/lib/date-picker/style/css.js +0 -3
- package/lib/date-picker/style/index.css +4 -9
- package/lib/date-picker/style/index.js +0 -3
- package/lib/date-picker/util.js +0 -13
- package/lib/dialog-box/dialogbox.js +16 -48
- package/lib/dialog-box/index.js +0 -3
- package/lib/dialog-box/style/css.js +0 -1
- package/lib/dialog-box/style/index.css +1 -2
- package/lib/dialog-box/style/index.js +0 -1
- package/lib/divider/index.js +13 -29
- package/lib/divider/style/css.js +0 -1
- package/lib/divider/style/index.js +0 -1
- package/lib/drawer/index.d.ts +3 -3
- package/lib/drawer/index.js +55 -102
- package/lib/drawer/style/css.js +0 -1
- package/lib/drawer/style/index.css +1 -10
- package/lib/drawer/style/index.js +0 -1
- package/lib/dropdown/dropdown-button.js +23 -48
- package/lib/dropdown/dropdown.d.ts +3 -3
- package/lib/dropdown/dropdown.js +24 -61
- package/lib/dropdown/index.js +0 -3
- package/lib/dropdown/rc-dropdown/Dropdown.js +24 -69
- package/lib/dropdown/rc-dropdown/index.js +0 -2
- package/lib/dropdown/rc-dropdown/placements.js +0 -1
- package/lib/dropdown/style/css.js +0 -5
- package/lib/dropdown/style/index.js +0 -5
- package/lib/empty/index.js +11 -33
- package/lib/empty/style/css.js +0 -1
- package/lib/empty/style/index.js +0 -1
- package/lib/flow/index.js +13 -25
- package/lib/form/ErrorList.d.ts +1 -1
- package/lib/form/ErrorList.js +23 -40
- package/lib/form/Form.d.ts +2 -2
- package/lib/form/Form.js +30 -64
- package/lib/form/FormItem.d.ts +4 -4
- package/lib/form/FormItem.js +57 -134
- package/lib/form/FormItemInput.js +18 -35
- package/lib/form/FormItemLabel.d.ts +2 -2
- package/lib/form/FormItemLabel.js +27 -66
- package/lib/form/FormList.js +4 -24
- package/lib/form/context.js +1 -10
- package/lib/form/hooks/useCacheErrors.js +0 -12
- package/lib/form/hooks/useForm.js +3 -17
- package/lib/form/hooks/useFrameState.d.ts +1 -1
- package/lib/form/hooks/useFrameState.js +4 -17
- package/lib/form/hooks/useItemRef.js +2 -15
- package/lib/form/index.d.ts +1 -1
- package/lib/form/index.js +1 -13
- package/lib/form/interface.d.ts +1 -1
- package/lib/form/style/css.js +0 -2
- package/lib/form/style/index.css +16 -72
- package/lib/form/style/index.js +0 -2
- package/lib/form/util.js +0 -7
- package/lib/grid/RowContext.js +0 -2
- package/lib/grid/col.d.ts +2 -2
- package/lib/grid/col.js +21 -52
- package/lib/grid/hooks/useBreakpoint.js +0 -8
- package/lib/grid/index.js +0 -5
- package/lib/grid/row.d.ts +1 -1
- package/lib/grid/row.js +24 -57
- package/lib/grid/style/css.js +0 -1
- package/lib/grid/style/index.js +0 -1
- package/lib/icon/index.js +0 -2
- package/lib/img-crop/EasyCrop.js +30 -52
- package/lib/img-crop/index.js +178 -255
- package/lib/img-crop/interface.d.ts +4 -4
- package/lib/img-crop/style/css.js +0 -2
- package/lib/img-crop/style/index.js +0 -2
- package/lib/index.js +0 -61
- package/lib/input/AutoComplete.d.ts +2 -1
- package/lib/input/AutoComplete.js +7 -29
- package/lib/input/Input.js +49 -121
- package/lib/input/Label.js +18 -66
- package/lib/input/MultiSelectInput.js +6 -15
- package/lib/input/Password.js +26 -64
- package/lib/input/TextArea.js +32 -73
- package/lib/input/index.js +0 -8
- package/lib/input/style/css.js +0 -1
- package/lib/input/style/index.js +0 -1
- package/lib/input-number/index.d.ts +1 -1
- package/lib/input-number/index.js +15 -42
- package/lib/input-number/src/InputNumber.js +117 -204
- package/lib/input-number/src/StepHandler.d.ts +1 -1
- package/lib/input-number/src/StepHandler.js +14 -32
- package/lib/input-number/src/hooks/useCursor.js +7 -17
- package/lib/input-number/src/hooks/useFrame.js +0 -7
- package/lib/input-number/src/hooks/useLayoutEffect.js +0 -7
- package/lib/input-number/src/hooks/useUpdateEffect.js +0 -7
- package/lib/input-number/src/index.js +0 -3
- package/lib/input-number/src/utils/MiniDecimal.d.ts +1 -1
- package/lib/input-number/src/utils/MiniDecimal.js +18 -74
- package/lib/input-number/src/utils/numberUtil.js +14 -32
- package/lib/input-number/src/utils/supportUtil.js +0 -1
- package/lib/input-number/style/css.js +0 -1
- package/lib/input-number/style/index.js +0 -1
- package/lib/layout/Sider.d.ts +2 -2
- package/lib/layout/Sider.js +44 -89
- package/lib/layout/index.d.ts +1 -1
- package/lib/layout/index.js +0 -7
- package/lib/layout/layout.js +17 -44
- package/lib/layout/style/css.js +0 -1
- package/lib/layout/style/index.js +0 -1
- package/lib/link/index.js +0 -3
- package/lib/link/link.d.ts +4 -4
- package/lib/link/link.js +14 -36
- package/lib/link/style/css.js +0 -1
- package/lib/link/style/index.js +0 -1
- package/lib/loading/icon.d.ts +2 -1
- package/lib/loading/icon.js +2 -9
- package/lib/loading/index.js +13 -28
- package/lib/loading/style/css.js +0 -1
- package/lib/loading/style/index.css +7 -112
- package/lib/loading/style/index.js +0 -1
- package/lib/locale/default.js +0 -3
- package/lib/locale/en_US.js +2 -4
- package/lib/locale/zh_CN.js +2 -4
- package/lib/locale-provider/LocaleReceiver.d.ts +1 -1
- package/lib/locale-provider/LocaleReceiver.js +4 -23
- package/lib/locale-provider/context.js +1 -2
- package/lib/locale-provider/default.js +0 -3
- package/lib/locale-provider/demo/locale.js +2 -3
- package/lib/locale-provider/index.d.ts +1 -1
- package/lib/locale-provider/index.js +4 -23
- package/lib/menu/ItemGroup.js +5 -17
- package/lib/menu/MenuContext.js +0 -2
- package/lib/menu/MenuHead.js +6 -29
- package/lib/menu/MenuItem.js +7 -33
- package/lib/menu/SubMenu.js +5 -26
- package/lib/menu/baseMenu.js +11 -29
- package/lib/menu/globalSilderBar.js +18 -46
- package/lib/menu/header.js +8 -20
- package/lib/menu/index.js +0 -3
- package/lib/menu/menu.js +9 -32
- package/lib/menu/rc-menu/Divider.d.ts +1 -1
- package/lib/menu/rc-menu/Divider.js +2 -15
- package/lib/menu/rc-menu/Icon.js +2 -11
- package/lib/menu/rc-menu/Menu.js +163 -214
- package/lib/menu/rc-menu/MenuItem.js +51 -103
- package/lib/menu/rc-menu/MenuItemGroup.js +7 -30
- package/lib/menu/rc-menu/SubMenu/InlineSubMenuList.d.ts +1 -1
- package/lib/menu/rc-menu/SubMenu/InlineSubMenuList.js +23 -43
- package/lib/menu/rc-menu/SubMenu/PopupTrigger.d.ts +1 -1
- package/lib/menu/rc-menu/SubMenu/PopupTrigger.js +22 -41
- package/lib/menu/rc-menu/SubMenu/SubMenuList.js +5 -22
- package/lib/menu/rc-menu/SubMenu/index.d.ts +1 -1
- package/lib/menu/rc-menu/SubMenu/index.js +83 -135
- package/lib/menu/rc-menu/context/IdContext.js +0 -9
- package/lib/menu/rc-menu/context/MenuContext.d.ts +1 -1
- package/lib/menu/rc-menu/context/MenuContext.js +3 -21
- package/lib/menu/rc-menu/context/PathContext.js +2 -13
- package/lib/menu/rc-menu/hooks/useAccessibility.js +41 -91
- package/lib/menu/rc-menu/hooks/useActive.js +5 -14
- package/lib/menu/rc-menu/hooks/useDirectionStyle.js +3 -11
- package/lib/menu/rc-menu/hooks/useKeyRecords.js +7 -34
- package/lib/menu/rc-menu/hooks/useMemoCallback.js +0 -8
- package/lib/menu/rc-menu/hooks/useUUID.js +5 -15
- package/lib/menu/rc-menu/index.d.ts +1 -1
- package/lib/menu/rc-menu/index.js +0 -8
- package/lib/menu/rc-menu/interface.d.ts +7 -7
- package/lib/menu/rc-menu/utils/motionUtil.js +0 -3
- package/lib/menu/rc-menu/utils/nodeUtil.js +0 -14
- package/lib/menu/rc-menu/utils/timeUtil.js +0 -1
- package/lib/menu/rc-menu/utils/warnUtil.js +2 -11
- package/lib/menu/style/css.js +0 -2
- package/lib/menu/style/index.js +0 -2
- package/lib/modal/DialogBox.js +19 -57
- package/lib/modal/Modal.js +17 -44
- package/lib/modal/dialog.js +0 -26
- package/lib/modal/index.js +0 -6
- package/lib/modal/locale.js +0 -8
- package/lib/modal/style/css.js +0 -2
- package/lib/modal/style/index.css +1 -2
- package/lib/modal/style/index.js +0 -2
- package/lib/pagination/index.js +0 -3
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/pagination/pagination.js +11 -41
- package/lib/pagination/rc-pagination/Goto.js +8 -31
- package/lib/pagination/rc-pagination/KeyCode.js +0 -1
- package/lib/pagination/rc-pagination/Options.js +13 -26
- package/lib/pagination/rc-pagination/Pager.js +9 -19
- package/lib/pagination/rc-pagination/Pagination.js +64 -138
- package/lib/pagination/rc-pagination/index.js +0 -3
- package/lib/pagination/style/css.js +0 -2
- package/lib/pagination/style/index.css +6 -0
- package/lib/pagination/style/index.js +0 -2
- package/lib/pagination/style/index.less +10 -0
- package/lib/popconfirm/index.d.ts +1 -1
- package/lib/popconfirm/index.js +18 -56
- package/lib/popconfirm/style/css.js +0 -2
- package/lib/popconfirm/style/index.js +0 -2
- package/lib/popover/index.js +5 -24
- package/lib/popover/style/css.js +0 -1
- package/lib/popover/style/index.js +0 -1
- package/lib/progress/CircleProgress.js +49 -61
- package/lib/progress/LineProgress.js +40 -52
- package/lib/progress/common/index.js +2 -7
- package/lib/progress/index.js +33 -54
- package/lib/progress/interface.d.ts +6 -6
- package/lib/progress/interface.js +0 -1
- package/lib/progress/style/css.js +0 -1
- package/lib/progress/style/index.js +0 -1
- package/lib/radio/Radio.js +12 -44
- package/lib/radio/RadioButton.d.ts +2 -1
- package/lib/radio/RadioButton.js +14 -41
- package/lib/radio/RadioGroup.d.ts +1 -1
- package/lib/radio/RadioGroup.js +16 -36
- package/lib/radio/context.js +0 -2
- package/lib/radio/index.js +0 -3
- package/lib/radio/style/css.js +0 -1
- package/lib/radio/style/index.js +0 -1
- package/lib/rate/index.js +0 -3
- package/lib/rate/rate.js +73 -120
- package/lib/rate/style/css.js +0 -1
- package/lib/rate/style/index.js +0 -1
- package/lib/row/index.js +0 -2
- package/lib/row/style/css.js +0 -1
- package/lib/row/style/index.js +0 -1
- package/lib/search/Search.js +40 -82
- package/lib/search/index.js +0 -3
- package/lib/search/style/css.js +0 -4
- package/lib/search/style/index.js +0 -4
- package/lib/select/index.d.ts +4 -4
- package/lib/select/index.js +29 -57
- package/lib/select/src/OptGroup.js +0 -2
- package/lib/select/src/Option.js +0 -2
- package/lib/select/src/OptionList.js +104 -188
- package/lib/select/src/Select.d.ts +2 -2
- package/lib/select/src/Select.js +1 -27
- package/lib/select/src/SelectTrigger.js +28 -48
- package/lib/select/src/Selector/Input.d.ts +1 -1
- package/lib/select/src/Selector/Input.js +26 -40
- package/lib/select/src/Selector/MultipleSelector.js +50 -83
- package/lib/select/src/Selector/SingleSelector.js +29 -46
- package/lib/select/src/Selector/index.js +23 -57
- package/lib/select/src/TransBtn.js +6 -17
- package/lib/select/src/generate.js +231 -371
- package/lib/select/src/hooks/useCacheDisplayValue.js +1 -11
- package/lib/select/src/hooks/useCacheOptions.js +0 -7
- package/lib/select/src/hooks/useDelayReset.js +3 -17
- package/lib/select/src/hooks/useLayoutEffect.js +0 -6
- package/lib/select/src/hooks/useLock.js +2 -10
- package/lib/select/src/hooks/useSelectTriggerControl.js +0 -8
- package/lib/select/src/index.js +0 -5
- package/lib/select/src/interface/generator.d.ts +12 -12
- package/lib/select/src/interface/index.d.ts +5 -5
- package/lib/select/src/utils/commonUtil.js +8 -32
- package/lib/select/src/utils/legacyUtil.js +11 -29
- package/lib/select/src/utils/valueUtil.js +23 -76
- package/lib/select/src/utils/warningPropsUtil.js +30 -56
- package/lib/select/style/css.js +0 -3
- package/lib/select/style/index.css +4 -8
- package/lib/select/style/index.js +0 -3
- package/lib/select/utils/iconUtil.js +16 -37
- package/lib/skeleton/Avatar.d.ts +2 -1
- package/lib/skeleton/Avatar.js +3 -15
- package/lib/skeleton/Button.d.ts +2 -1
- package/lib/skeleton/Button.js +5 -21
- package/lib/skeleton/Element.d.ts +1 -1
- package/lib/skeleton/Element.js +4 -15
- package/lib/skeleton/Image.d.ts +2 -1
- package/lib/skeleton/Image.js +6 -18
- package/lib/skeleton/Input.d.ts +2 -1
- package/lib/skeleton/Input.js +4 -20
- package/lib/skeleton/Node.js +4 -18
- package/lib/skeleton/Paragraph.d.ts +2 -2
- package/lib/skeleton/Paragraph.js +7 -20
- package/lib/skeleton/Skeleton.d.ts +5 -5
- package/lib/skeleton/Skeleton.js +21 -64
- package/lib/skeleton/Title.d.ts +1 -1
- package/lib/skeleton/Title.js +3 -12
- package/lib/skeleton/index.js +0 -3
- package/lib/skeleton/style/css.js +0 -1
- package/lib/skeleton/style/index.css +1 -10
- package/lib/skeleton/style/index.js +0 -1
- package/lib/slider/SliderTooltip.js +0 -16
- package/lib/slider/index.js +21 -55
- package/lib/slider/interface.d.ts +1 -1
- package/lib/slider/style/css.js +0 -1
- package/lib/slider/style/index.js +0 -1
- package/lib/space/Item.d.ts +1 -1
- package/lib/space/Item.js +10 -24
- package/lib/space/index.d.ts +1 -1
- package/lib/space/index.js +29 -61
- package/lib/space/style/css.js +0 -1
- package/lib/space/style/index.js +0 -1
- package/lib/steps/index.d.ts +1 -1
- package/lib/steps/index.js +7 -28
- package/lib/steps/interface.d.ts +1 -1
- package/lib/steps/src/step.d.ts +1 -1
- package/lib/steps/src/step.js +39 -72
- package/lib/steps/src/steps.d.ts +3 -3
- package/lib/steps/src/steps.js +24 -56
- package/lib/steps/style/css.js +0 -1
- package/lib/steps/style/index.js +0 -1
- package/lib/style/index.css +144 -526
- package/lib/switch/index.js +19 -45
- package/lib/switch/interface.d.ts +2 -2
- package/lib/switch/style/css.js +0 -1
- package/lib/switch/style/index.css +8 -32
- package/lib/switch/style/index.js +0 -1
- package/lib/table/Column.js +0 -3
- package/lib/table/ColumnGroup.js +0 -3
- package/lib/table/ExpandIcon.d.ts +1 -1
- package/lib/table/ExpandIcon.js +4 -16
- package/lib/table/Space.js +4 -18
- package/lib/table/Table.d.ts +1 -1
- package/lib/table/Table.js +115 -193
- package/lib/table/baseTable/Body/BodyRow.d.ts +1 -1
- package/lib/table/baseTable/Body/BodyRow.js +42 -78
- package/lib/table/baseTable/Body/ExpandedRow.d.ts +1 -1
- package/lib/table/baseTable/Body/ExpandedRow.js +13 -28
- package/lib/table/baseTable/Body/MeasureCell.d.ts +1 -1
- package/lib/table/baseTable/Body/MeasureCell.js +1 -8
- package/lib/table/baseTable/Body/MeasureRow.d.ts +1 -1
- package/lib/table/baseTable/Body/MeasureRow.js +3 -14
- package/lib/table/baseTable/Body/index.d.ts +1 -1
- package/lib/table/baseTable/Body/index.js +23 -48
- package/lib/table/baseTable/Cell/index.d.ts +1 -1
- package/lib/table/baseTable/Cell/index.js +58 -111
- package/lib/table/baseTable/ColGroup.d.ts +2 -2
- package/lib/table/baseTable/ColGroup.js +7 -25
- package/lib/table/baseTable/FixedHolder/index.js +29 -57
- package/lib/table/baseTable/Footer/Cell.d.ts +1 -1
- package/lib/table/baseTable/Footer/Cell.js +11 -25
- package/lib/table/baseTable/Footer/Row.d.ts +1 -1
- package/lib/table/baseTable/Footer/Row.js +2 -13
- package/lib/table/baseTable/Footer/Summary.js +0 -5
- package/lib/table/baseTable/Footer/index.d.ts +2 -2
- package/lib/table/baseTable/Footer/index.js +2 -12
- package/lib/table/baseTable/Header/Header.js +9 -30
- package/lib/table/baseTable/Header/HeaderRow.d.ts +2 -2
- package/lib/table/baseTable/Header/HeaderRow.js +8 -26
- package/lib/table/baseTable/Panel/index.d.ts +1 -1
- package/lib/table/baseTable/Panel/index.js +1 -7
- package/lib/table/baseTable/Table.d.ts +1 -1
- package/lib/table/baseTable/Table.js +126 -234
- package/lib/table/baseTable/context/BodyContext.js +0 -5
- package/lib/table/baseTable/context/ExpandedRowContext.js +0 -5
- package/lib/table/baseTable/context/HoverContext.js +0 -5
- package/lib/table/baseTable/context/ResizeContext.js +0 -5
- package/lib/table/baseTable/context/StickyContext.js +0 -5
- package/lib/table/baseTable/context/TableContext.js +0 -5
- package/lib/table/baseTable/hooks/useColumns.js +40 -94
- package/lib/table/baseTable/hooks/useFlattenRecords.js +2 -15
- package/lib/table/baseTable/hooks/useFrame.d.ts +1 -1
- package/lib/table/baseTable/hooks/useFrame.js +2 -17
- package/lib/table/baseTable/hooks/useSticky.js +10 -20
- package/lib/table/baseTable/hooks/useStickyOffsets.js +4 -10
- package/lib/table/baseTable/index.js +0 -7
- package/lib/table/baseTable/interface.d.ts +20 -20
- package/lib/table/baseTable/stickyScrollBar.js +14 -55
- package/lib/table/baseTable/sugar/Column.js +0 -3
- package/lib/table/baseTable/sugar/ColumnGroup.js +0 -3
- package/lib/table/baseTable/utils/expandUtil.d.ts +2 -2
- package/lib/table/baseTable/utils/expandUtil.js +4 -19
- package/lib/table/baseTable/utils/fixUtil.js +0 -5
- package/lib/table/baseTable/utils/legacyUtil.js +2 -17
- package/lib/table/baseTable/utils/valueUtil.js +2 -23
- package/lib/table/hooks/useFilter/FilterDropdown.d.ts +1 -1
- package/lib/table/hooks/useFilter/FilterDropdown.js +50 -124
- package/lib/table/hooks/useFilter/FilterSearch.d.ts +1 -1
- package/lib/table/hooks/useFilter/FilterSearch.js +6 -15
- package/lib/table/hooks/useFilter/FilterWrapper.d.ts +1 -1
- package/lib/table/hooks/useFilter/FilterWrapper.js +0 -6
- package/lib/table/hooks/useFilter/index.js +20 -56
- package/lib/table/hooks/useLazyKVMap.js +0 -13
- package/lib/table/hooks/usePagination.js +15 -42
- package/lib/table/hooks/useSelection.d.ts +1 -1
- package/lib/table/hooks/useSelection.js +103 -186
- package/lib/table/hooks/useSorter.js +21 -83
- package/lib/table/hooks/useTitleColumns.js +0 -11
- package/lib/table/index.js +0 -3
- package/lib/table/interface.d.ts +15 -15
- package/lib/table/interface.js +0 -1
- package/lib/table/style/css.js +0 -11
- package/lib/table/style/index.css +0 -3
- package/lib/table/style/index.js +0 -11
- package/lib/table/util.js +0 -6
- package/lib/tabs/index.js +0 -3
- package/lib/tabs/src/TabContext.js +0 -3
- package/lib/tabs/src/TabNavList/AddButton.js +4 -13
- package/lib/tabs/src/TabNavList/OperationNode.js +32 -67
- package/lib/tabs/src/TabNavList/TabNode.js +25 -60
- package/lib/tabs/src/TabNavList/index.js +129 -217
- package/lib/tabs/src/TabPanelList/TabPane.d.ts +1 -1
- package/lib/tabs/src/TabPanelList/TabPane.js +12 -25
- package/lib/tabs/src/TabPanelList/index.d.ts +1 -1
- package/lib/tabs/src/TabPanelList/index.js +7 -18
- package/lib/tabs/src/Tabs.d.ts +1 -1
- package/lib/tabs/src/Tabs.js +68 -112
- package/lib/tabs/src/hooks/useOffsets.js +6 -15
- package/lib/tabs/src/hooks/useRaf.d.ts +1 -1
- package/lib/tabs/src/hooks/useRaf.js +2 -17
- package/lib/tabs/src/hooks/useRefs.js +0 -9
- package/lib/tabs/src/hooks/useSyncState.d.ts +1 -1
- package/lib/tabs/src/hooks/useSyncState.js +2 -14
- package/lib/tabs/src/hooks/useTouchMove.js +32 -55
- package/lib/tabs/src/hooks/useVisibleRange.js +2 -16
- package/lib/tabs/src/index.js +0 -4
- package/lib/tabs/src/interface.d.ts +8 -8
- package/lib/tabs/style/css.js +0 -1
- package/lib/tabs/style/index.js +0 -1
- package/lib/tabs/tabs.d.ts +3 -3
- package/lib/tabs/tabs.js +10 -37
- package/lib/tag/CheckableTag.js +7 -27
- package/lib/tag/index.d.ts +1 -1
- package/lib/tag/index.js +19 -55
- package/lib/tag/style/css.js +0 -1
- package/lib/tag/style/index.css +1 -12
- package/lib/tag/style/index.js +0 -1
- package/lib/time-picker/index.d.ts +1 -1
- package/lib/time-picker/index.js +9 -32
- package/lib/time-picker/style/css.js +0 -2
- package/lib/time-picker/style/index.css +0 -1
- package/lib/time-picker/style/index.js +0 -2
- package/lib/timeline/index.js +0 -3
- package/lib/timeline/interface.d.ts +1 -1
- package/lib/timeline/style/css.js +0 -1
- package/lib/timeline/style/index.css +4 -27
- package/lib/timeline/style/index.js +0 -1
- package/lib/timeline/timeline.js +17 -33
- package/lib/timeline/timelineItem.js +24 -60
- package/lib/toast/PurePanel.d.ts +2 -2
- package/lib/toast/PurePanel.js +25 -47
- package/lib/toast/base.d.ts +1 -1
- package/lib/toast/base.js +63 -105
- package/lib/toast/index.js +39 -72
- package/lib/toast/interface.d.ts +3 -3
- package/lib/toast/style/css.js +0 -1
- package/lib/toast/style/index.css +17 -64
- package/lib/toast/style/index.js +0 -1
- package/lib/toast/useNotification.d.ts +1 -1
- package/lib/toast/useNotification.js +52 -82
- package/lib/toast/util.js +0 -9
- package/lib/tooltip/index.d.ts +2 -2
- package/lib/tooltip/index.js +32 -72
- package/lib/tooltip/placements.js +7 -13
- package/lib/tooltip/style/css.js +0 -1
- package/lib/tooltip/style/index.css +0 -1
- package/lib/tooltip/style/index.js +0 -1
- package/lib/transfer/DataSource.d.ts +2 -1
- package/lib/transfer/DataSource.js +40 -66
- package/lib/transfer/SourceList.d.ts +2 -1
- package/lib/transfer/SourceList.js +16 -44
- package/lib/transfer/Target.d.ts +2 -1
- package/lib/transfer/Target.js +46 -78
- package/lib/transfer/TargetList.d.ts +2 -1
- package/lib/transfer/TargetList.js +15 -38
- package/lib/transfer/index.d.ts +5 -5
- package/lib/transfer/index.js +19 -43
- package/lib/transfer/style/css.js +0 -2
- package/lib/transfer/style/index.js +0 -2
- package/lib/transfer/util.js +0 -6
- package/lib/tree/index.js +0 -3
- package/lib/tree/style/css.js +0 -3
- package/lib/tree/style/index.css +1 -12
- package/lib/tree/style/index.js +0 -3
- package/lib/tree/tree.d.ts +3 -3
- package/lib/tree/tree.js +34 -118
- package/lib/tree/utils/dragHelper.d.ts +2 -2
- package/lib/tree/utils/dragHelper.js +5 -15
- package/lib/tree/utils/iconHelper.js +0 -13
- package/lib/tree/utils/nodeHelper.js +0 -32
- package/lib/tree-select/index.d.ts +4 -4
- package/lib/tree-select/index.js +59 -95
- package/lib/tree-select/src/LegacyContext.js +0 -5
- package/lib/tree-select/src/OptionList.d.ts +1 -1
- package/lib/tree-select/src/OptionList.js +63 -124
- package/lib/tree-select/src/TreeNode.js +0 -2
- package/lib/tree-select/src/TreeSelect.d.ts +4 -4
- package/lib/tree-select/src/TreeSelect.js +166 -242
- package/lib/tree-select/src/TreeSelectContext.js +0 -5
- package/lib/tree-select/src/hooks/useCache.js +2 -11
- package/lib/tree-select/src/hooks/useCheckedKeys.js +4 -14
- package/lib/tree-select/src/hooks/useDataEntities.js +2 -14
- package/lib/tree-select/src/hooks/useFilterTreeData.js +2 -19
- package/lib/tree-select/src/hooks/useRefFunc.js +0 -5
- package/lib/tree-select/src/hooks/useTreeData.js +10 -22
- package/lib/tree-select/src/index.js +0 -5
- package/lib/tree-select/src/interface.d.ts +4 -4
- package/lib/tree-select/src/utils/legacyUtil.js +10 -43
- package/lib/tree-select/src/utils/strategyUtil.d.ts +1 -1
- package/lib/tree-select/src/utils/strategyUtil.js +0 -10
- package/lib/tree-select/src/utils/valueUtil.js +3 -14
- package/lib/tree-select/src/utils/warningPropsUtil.js +5 -14
- package/lib/tree-select/style/css.js +0 -3
- package/lib/tree-select/style/index.css +1 -12
- package/lib/tree-select/style/index.js +0 -3
- package/lib/upload/BaseUpload/AjaxUploader.d.ts +1 -1
- package/lib/upload/BaseUpload/AjaxUploader.js +114 -202
- package/lib/upload/BaseUpload/Upload.d.ts +2 -2
- package/lib/upload/BaseUpload/Upload.js +1 -21
- package/lib/upload/BaseUpload/attr-accept.js +10 -22
- package/lib/upload/BaseUpload/index.js +0 -3
- package/lib/upload/BaseUpload/interface.d.ts +4 -4
- package/lib/upload/BaseUpload/request.js +10 -27
- package/lib/upload/BaseUpload/traverseFileTree.js +4 -13
- package/lib/upload/BaseUpload/uid.js +0 -2
- package/lib/upload/Dragger.d.ts +1 -1
- package/lib/upload/Dragger.js +3 -18
- package/lib/upload/Upload.js +117 -206
- package/lib/upload/UploadList/ListItem.js +41 -71
- package/lib/upload/UploadList/index.js +46 -102
- package/lib/upload/index.js +1 -4
- package/lib/upload/interface.d.ts +8 -8
- package/lib/upload/style/css.js +0 -4
- package/lib/upload/style/index.css +4 -26
- package/lib/upload/style/index.js +0 -4
- package/lib/upload/utils.js +3 -34
- package/lib/virtual-list/Filler.js +4 -17
- package/lib/virtual-list/Item.js +1 -6
- package/lib/virtual-list/List.d.ts +5 -5
- package/lib/virtual-list/List.js +122 -189
- package/lib/virtual-list/ScrollBar.d.ts +1 -1
- package/lib/virtual-list/ScrollBar.js +23 -84
- package/lib/virtual-list/hooks/useChildren.d.ts +2 -2
- package/lib/virtual-list/hooks/useChildren.js +2 -7
- package/lib/virtual-list/hooks/useDiffItem.js +6 -18
- package/lib/virtual-list/hooks/useFrameWheel.js +10 -22
- package/lib/virtual-list/hooks/useHeights.js +7 -23
- package/lib/virtual-list/hooks/useMobileTouchMove.js +4 -20
- package/lib/virtual-list/hooks/useOriginScroll.js +6 -11
- package/lib/virtual-list/hooks/useScrollTo.js +13 -35
- package/lib/virtual-list/index.js +0 -3
- package/lib/virtual-list/interface.d.ts +2 -2
- package/lib/virtual-list/mock.js +2 -9
- package/lib/virtual-list/utils/CacheMap.js +0 -6
- package/lib/virtual-list/utils/algorithmUtil.js +6 -22
- package/lib/virtual-list/utils/isFirefox.js +0 -3
- package/package.json +1 -1
- package/dist/acud.css +0 -28511
- package/dist/acud.css.map +0 -1
- package/dist/acud.min.css +0 -2
- package/dist/acud.min.css.map +0 -1
- package/dist/acud.min.js +0 -56
- package/dist/acud.min.js.map +0 -1
package/es/form/FormItem.js
CHANGED
|
@@ -3,24 +3,18 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* @file form item element
|
|
9
8
|
* @author chenqiang(chenqiang03)
|
|
10
9
|
*/
|
|
11
10
|
var __rest = this && this.__rest || function (s, e) {
|
|
12
11
|
var t = {};
|
|
13
|
-
|
|
14
|
-
for (var p in s) {
|
|
15
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
16
|
-
}
|
|
17
|
-
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
18
13
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
14
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
20
15
|
}
|
|
21
16
|
return t;
|
|
22
17
|
};
|
|
23
|
-
|
|
24
18
|
import * as React from 'react';
|
|
25
19
|
import { useContext, useRef } from 'react';
|
|
26
20
|
import isEqual from 'lodash/isEqual';
|
|
@@ -48,132 +42,110 @@ var MemoInput = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
48
42
|
}, function (prev, next) {
|
|
49
43
|
return prev.value === next.value && prev.update === next.update;
|
|
50
44
|
});
|
|
51
|
-
|
|
52
45
|
function hasValidName(name) {
|
|
53
46
|
if (name === null) {
|
|
54
47
|
devWarning(false, 'Form.Item', '`null` is passed as `name` property');
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
return !(name === undefined || name === null);
|
|
58
50
|
}
|
|
59
|
-
|
|
60
51
|
function FormItem(props) {
|
|
61
52
|
var name = props.name,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
53
|
+
cols = props.cols,
|
|
54
|
+
fieldKey = props.fieldKey,
|
|
55
|
+
noStyle = props.noStyle,
|
|
56
|
+
dependencies = props.dependencies,
|
|
57
|
+
customizePrefixCls = props.prefixCls,
|
|
58
|
+
style = props.style,
|
|
59
|
+
className = props.className,
|
|
60
|
+
shouldUpdate = props.shouldUpdate,
|
|
61
|
+
hasFeedback = props.hasFeedback,
|
|
62
|
+
extra = props.extra,
|
|
63
|
+
help = props.help,
|
|
64
|
+
rules = props.rules,
|
|
65
|
+
validateStatus = props.validateStatus,
|
|
66
|
+
children = props.children,
|
|
67
|
+
required = props.required,
|
|
68
|
+
label = props.label,
|
|
69
|
+
messageVariables = props.messageVariables,
|
|
70
|
+
_props$trigger = props.trigger,
|
|
71
|
+
trigger = _props$trigger === void 0 ? 'onChange' : _props$trigger,
|
|
72
|
+
validateTrigger = props.validateTrigger,
|
|
73
|
+
hidden = props.hidden,
|
|
74
|
+
restProps = __rest(props, ["name", "cols", "fieldKey", "noStyle", "dependencies", "prefixCls", "style", "className", "shouldUpdate", "hasFeedback", "extra", "help", "rules", "validateStatus", "children", "required", "label", "messageVariables", "trigger", "validateTrigger", "hidden"]);
|
|
85
75
|
var destoryRef = useRef(false);
|
|
86
|
-
|
|
87
76
|
var _useContext = useContext(ConfigContext),
|
|
88
|
-
|
|
89
|
-
|
|
77
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
90
78
|
var _useContext2 = useContext(FormContext),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
79
|
+
formName = _useContext2.name,
|
|
80
|
+
contextCols = _useContext2.cols,
|
|
81
|
+
requiredMark = _useContext2.requiredMark;
|
|
95
82
|
var _useContext3 = useContext(FormItemContext),
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
updateItemErrors = _useContext3.updateItemErrors;
|
|
98
84
|
var _React$useState = React.useState(!!help),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
85
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
86
|
+
domErrorVisible = _React$useState2[0],
|
|
87
|
+
innerSetDomErrorVisible = _React$useState2[1];
|
|
103
88
|
var _useFrameState = useFrameState({}),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
89
|
+
_useFrameState2 = _slicedToArray(_useFrameState, 2),
|
|
90
|
+
inlineErrors = _useFrameState2[0],
|
|
91
|
+
setInlineErrors = _useFrameState2[1];
|
|
108
92
|
var _useContext4 = useContext(FieldContext),
|
|
109
|
-
|
|
110
|
-
|
|
93
|
+
contextValidateTrigger = _useContext4.validateTrigger;
|
|
111
94
|
var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : contextValidateTrigger;
|
|
112
|
-
|
|
113
95
|
function setDomErrorVisible(visible) {
|
|
114
96
|
if (!destoryRef.current) {
|
|
115
97
|
innerSetDomErrorVisible(visible);
|
|
116
98
|
}
|
|
117
99
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
100
|
+
var hasName = hasValidName(name);
|
|
101
|
+
// Cache field namepath
|
|
102
|
+
var nameRef = useRef([]);
|
|
103
|
+
// Should clean up if field removed
|
|
123
104
|
React.useEffect(function () {
|
|
124
105
|
return function () {
|
|
125
106
|
destoryRef.current = true;
|
|
126
107
|
updateItemErrors(nameRef.current.join(NAME_SPLIT), []);
|
|
127
108
|
};
|
|
128
109
|
}, [updateItemErrors]);
|
|
129
|
-
var prefixCls = getPrefixCls('form', customizePrefixCls);
|
|
110
|
+
var prefixCls = getPrefixCls('form', customizePrefixCls);
|
|
111
|
+
// ======================= Errors =======================
|
|
130
112
|
// Collect noStyle field error to the top FormItem
|
|
131
|
-
|
|
132
113
|
var updateChildItemErrors = noStyle ? updateItemErrors : function (subName, subErrors, originSubName) {
|
|
133
114
|
setInlineErrors(function () {
|
|
134
115
|
var prevInlineErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
135
|
-
|
|
136
116
|
// Clean up origin error when name changed
|
|
137
117
|
if (originSubName && originSubName !== subName) {
|
|
138
118
|
delete prevInlineErrors[originSubName];
|
|
139
119
|
}
|
|
140
|
-
|
|
141
120
|
if (!isEqual(prevInlineErrors[subName], subErrors)) {
|
|
142
121
|
return _extends(_extends({}, prevInlineErrors), _defineProperty({}, subName, subErrors));
|
|
143
122
|
}
|
|
144
|
-
|
|
145
123
|
return prevInlineErrors;
|
|
146
124
|
});
|
|
147
|
-
};
|
|
148
|
-
|
|
125
|
+
};
|
|
126
|
+
// ======================= Children Ref ===================
|
|
149
127
|
var getItemRef = useItemRef();
|
|
150
|
-
|
|
151
128
|
function renderLayout(baseChildren, fieldId, meta, isRequired) {
|
|
152
129
|
var _itemClassName;
|
|
153
|
-
|
|
154
130
|
if (noStyle && !hidden) {
|
|
155
131
|
return baseChildren;
|
|
156
|
-
}
|
|
132
|
+
}
|
|
133
|
+
// ===================== Errors ========================
|
|
157
134
|
// >>> collect sub errors
|
|
158
|
-
|
|
159
|
-
|
|
160
135
|
var subErrorList = [];
|
|
161
136
|
Object.keys(inlineErrors).forEach(function (subName) {
|
|
162
137
|
subErrorList = [].concat(_toConsumableArray(subErrorList), _toConsumableArray(inlineErrors[subName] || []));
|
|
163
|
-
});
|
|
164
|
-
|
|
138
|
+
});
|
|
139
|
+
// >>> merged errors
|
|
165
140
|
var mergedErrors;
|
|
166
|
-
|
|
167
141
|
if (help !== undefined && help !== null) {
|
|
168
142
|
mergedErrors = toArray(help);
|
|
169
143
|
} else {
|
|
170
144
|
mergedErrors = meta ? meta.errors : [];
|
|
171
145
|
mergedErrors = [].concat(_toConsumableArray(mergedErrors), _toConsumableArray(subErrorList));
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
146
|
+
}
|
|
147
|
+
// ===================== Status ========================
|
|
175
148
|
var mergedValidateStatus = '';
|
|
176
|
-
|
|
177
149
|
if (validateStatus !== undefined) {
|
|
178
150
|
mergedValidateStatus = validateStatus;
|
|
179
151
|
} else if (meta === null || meta === void 0 ? void 0 : meta.validating) {
|
|
@@ -183,10 +155,9 @@ function FormItem(props) {
|
|
|
183
155
|
} else if (meta === null || meta === void 0 ? void 0 : meta.touched) {
|
|
184
156
|
mergedValidateStatus = 'success';
|
|
185
157
|
}
|
|
186
|
-
|
|
187
158
|
var mergedCols = cols || contextCols;
|
|
188
|
-
var itemClassName = (_itemClassName = {}, _defineProperty(_itemClassName, "".concat(prefixCls, "-item"), true), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-col-").concat(mergedCols), true), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-with-extra"), !!extra), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-with-help"), domErrorVisible || !!help), _defineProperty(_itemClassName, "".concat(className), !!className), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-feedback"), mergedValidateStatus && hasFeedback), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-success"), mergedValidateStatus === 'success'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-warning"), mergedValidateStatus === 'warning'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-error"), mergedValidateStatus === 'error'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-is-validating"), mergedValidateStatus === 'validating'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-hidden"), hidden), _itemClassName);
|
|
189
|
-
|
|
159
|
+
var itemClassName = (_itemClassName = {}, _defineProperty(_itemClassName, "".concat(prefixCls, "-item"), true), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-col-").concat(mergedCols), true), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-with-extra"), !!extra), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-with-help"), domErrorVisible || !!help), _defineProperty(_itemClassName, "".concat(className), !!className), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-feedback"), mergedValidateStatus && hasFeedback), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-success"), mergedValidateStatus === 'success'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-warning"), mergedValidateStatus === 'warning'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-has-error"), mergedValidateStatus === 'error'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-is-validating"), mergedValidateStatus === 'validating'), _defineProperty(_itemClassName, "".concat(prefixCls, "-item-hidden"), hidden), _itemClassName);
|
|
160
|
+
// ===================== Children ======================
|
|
190
161
|
return /*#__PURE__*/React.createElement(Row, _extends({
|
|
191
162
|
className: classNames(itemClassName),
|
|
192
163
|
style: style,
|
|
@@ -209,26 +180,20 @@ function FormItem(props) {
|
|
|
209
180
|
}
|
|
210
181
|
}, baseChildren)));
|
|
211
182
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
183
|
+
var isRenderProps = typeof children === 'function';
|
|
184
|
+
// Record for real component render
|
|
215
185
|
var updateRef = useRef(0);
|
|
216
186
|
updateRef.current += 1;
|
|
217
|
-
|
|
218
187
|
if (!hasName && !isRenderProps && !dependencies) {
|
|
219
188
|
return renderLayout(children);
|
|
220
189
|
}
|
|
221
|
-
|
|
222
190
|
var variables = {};
|
|
223
|
-
|
|
224
191
|
if (typeof label === 'string') {
|
|
225
192
|
variables.label = label;
|
|
226
193
|
}
|
|
227
|
-
|
|
228
194
|
if (messageVariables) {
|
|
229
195
|
variables = _extends(_extends({}, variables), messageVariables);
|
|
230
196
|
}
|
|
231
|
-
|
|
232
197
|
return /*#__PURE__*/React.createElement(Field, _extends({}, props, {
|
|
233
198
|
messageVariables: variables,
|
|
234
199
|
trigger: trigger,
|
|
@@ -240,38 +205,30 @@ function FormItem(props) {
|
|
|
240
205
|
var errors = meta.errors;
|
|
241
206
|
var mergedName = toArray(name).length && meta ? meta.name : [];
|
|
242
207
|
var fieldId = getFieldId(mergedName, formName);
|
|
243
|
-
|
|
244
208
|
if (noStyle) {
|
|
245
209
|
// Clean up origin one
|
|
246
210
|
var originErrorName = nameRef.current.join(NAME_SPLIT);
|
|
247
211
|
nameRef.current = _toConsumableArray(mergedName);
|
|
248
|
-
|
|
249
212
|
if (fieldKey) {
|
|
250
213
|
var fieldKeys = Array.isArray(fieldKey) ? fieldKey : [fieldKey];
|
|
251
214
|
nameRef.current = [].concat(_toConsumableArray(mergedName.slice(0, -1)), _toConsumableArray(fieldKeys));
|
|
252
215
|
}
|
|
253
|
-
|
|
254
216
|
updateItemErrors(nameRef.current.join(NAME_SPLIT), errors, originErrorName);
|
|
255
217
|
}
|
|
256
|
-
|
|
257
218
|
var isRequired = required !== undefined ? required : !!(rules && rules.some(function (rule) {
|
|
258
219
|
if (rule && _typeof(rule) === 'object' && rule.required) {
|
|
259
220
|
return true;
|
|
260
221
|
}
|
|
261
|
-
|
|
262
222
|
if (typeof rule === 'function') {
|
|
263
223
|
var ruleEntity = rule(context);
|
|
264
224
|
return ruleEntity && ruleEntity.required;
|
|
265
225
|
}
|
|
266
|
-
|
|
267
226
|
return false;
|
|
268
|
-
}));
|
|
269
|
-
|
|
227
|
+
}));
|
|
228
|
+
// ======================= Children =======================
|
|
270
229
|
var mergedControl = _extends({}, control);
|
|
271
|
-
|
|
272
230
|
var childNode = null;
|
|
273
231
|
devWarning(!(shouldUpdate && dependencies), 'Form.Item', '`shouldUpdate` and `dependencies` shouldn\'t be used together. See https://ant.design/components/form/#dependencies.');
|
|
274
|
-
|
|
275
232
|
if (Array.isArray(children) && hasName) {
|
|
276
233
|
devWarning(false, 'Form.Item', '`children` is array of render props cannot have `name`.');
|
|
277
234
|
childNode = children;
|
|
@@ -282,29 +239,22 @@ function FormItem(props) {
|
|
|
282
239
|
devWarning(false, 'Form.Item', 'Must set `name` or use render props when `dependencies` is set.');
|
|
283
240
|
} else if (isValidElement(children)) {
|
|
284
241
|
devWarning(children.props.defaultValue === undefined, 'Form.Item', '`defaultValue` will not work on controlled field. ' + 'You should use `initialValues` of Form instead.');
|
|
285
|
-
|
|
286
242
|
var childProps = _extends(_extends({}, children.props), mergedControl);
|
|
287
|
-
|
|
288
243
|
if (!childProps.id) {
|
|
289
244
|
childProps.id = fieldId;
|
|
290
245
|
}
|
|
291
|
-
|
|
292
246
|
if (supportRef(children)) {
|
|
293
247
|
childProps.ref = getItemRef(mergedName, children);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
248
|
+
}
|
|
249
|
+
// We should keep user origin event handler
|
|
297
250
|
var triggers = new Set([].concat(_toConsumableArray(toArray(trigger)), _toConsumableArray(toArray(mergedValidateTrigger))));
|
|
298
251
|
triggers.forEach(function (eventName) {
|
|
299
252
|
childProps[eventName] = function () {
|
|
300
253
|
var _a2, _c2;
|
|
301
|
-
|
|
302
254
|
var _a, _b, _c;
|
|
303
|
-
|
|
304
255
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
305
256
|
args[_key] = arguments[_key];
|
|
306
257
|
}
|
|
307
|
-
|
|
308
258
|
(_a = mergedControl[eventName]) === null || _a === void 0 ? void 0 : (_a2 = _a).call.apply(_a2, [mergedControl].concat(args));
|
|
309
259
|
(_c = (_b = children.props)[eventName]) === null || _c === void 0 ? void 0 : (_c2 = _c).call.apply(_c2, [_b].concat(args));
|
|
310
260
|
};
|
|
@@ -319,9 +269,7 @@ function FormItem(props) {
|
|
|
319
269
|
devWarning(!mergedName.length, 'Form.Item', '`name` is only used for validate React element. ' + 'If you are using Form.Item as layout display, please remove `name` instead.');
|
|
320
270
|
childNode = children;
|
|
321
271
|
}
|
|
322
|
-
|
|
323
272
|
return renderLayout(childNode, fieldId, meta, isRequired);
|
|
324
273
|
});
|
|
325
274
|
}
|
|
326
|
-
|
|
327
275
|
export default FormItem;
|
package/es/form/FormItemInput.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* @file Input for FormItem
|
|
5
4
|
* @author chenqiang(chenqiang03)
|
|
@@ -20,20 +19,19 @@ var iconMap = {
|
|
|
20
19
|
error: FilledError,
|
|
21
20
|
validating: OutlinedLoading
|
|
22
21
|
};
|
|
23
|
-
|
|
24
22
|
var FormItemInput = function FormItemInput(props) {
|
|
25
23
|
var prefixCls = props.prefixCls,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
status = props.status,
|
|
25
|
+
wrapperCol = props.wrapperCol,
|
|
26
|
+
inputMaxWidth = props.inputMaxWidth,
|
|
27
|
+
children = props.children,
|
|
28
|
+
help = props.help,
|
|
29
|
+
errors = props.errors,
|
|
30
|
+
onDomErrorVisibleChange = props.onDomErrorVisibleChange,
|
|
31
|
+
hasFeedback = props.hasFeedback,
|
|
32
|
+
formItemRender = props._internalItemRender,
|
|
33
|
+
validateStatus = props.validateStatus,
|
|
34
|
+
extra = props.extra;
|
|
37
35
|
var baseClassName = "".concat(prefixCls, "-item");
|
|
38
36
|
var formContext = React.useContext(FormContext);
|
|
39
37
|
var mergedWrapperCol = wrapperCol || formContext.wrapperCol || {};
|
|
@@ -43,15 +41,14 @@ var FormItemInput = function FormItemInput(props) {
|
|
|
43
41
|
return function () {
|
|
44
42
|
onDomErrorVisibleChange(false);
|
|
45
43
|
};
|
|
46
|
-
}, [onDomErrorVisibleChange]);
|
|
47
|
-
|
|
44
|
+
}, [onDomErrorVisibleChange]);
|
|
45
|
+
// Should provides additional icon if `hasFeedback`
|
|
48
46
|
var IconNode = validateStatus && iconMap[validateStatus];
|
|
49
47
|
var icon = hasFeedback && IconNode ? /*#__PURE__*/React.createElement("span", {
|
|
50
48
|
className: "".concat(baseClassName, "-children-icon")
|
|
51
|
-
}, /*#__PURE__*/React.createElement(IconNode, null)) : null;
|
|
52
|
-
|
|
49
|
+
}, /*#__PURE__*/React.createElement(IconNode, null)) : null;
|
|
50
|
+
// Pass to sub FormItem should not with col info
|
|
53
51
|
var subFormContext = _extends({}, formContext);
|
|
54
|
-
|
|
55
52
|
delete subFormContext.labelCol;
|
|
56
53
|
delete subFormContext.wrapperCol;
|
|
57
54
|
var inputDom = /*#__PURE__*/React.createElement("div", {
|
|
@@ -68,9 +65,9 @@ var FormItemInput = function FormItemInput(props) {
|
|
|
68
65
|
errors: errors,
|
|
69
66
|
help: help,
|
|
70
67
|
onDomErrorVisibleChange: onDomErrorVisibleChange
|
|
71
|
-
}));
|
|
68
|
+
}));
|
|
69
|
+
// If extra = 0, && will goes wrong
|
|
72
70
|
// 0 && error -> 0
|
|
73
|
-
|
|
74
71
|
var extraDom = extra ? /*#__PURE__*/React.createElement("div", {
|
|
75
72
|
className: "".concat(baseClassName, "-extra")
|
|
76
73
|
}, extra) : null;
|
|
@@ -89,5 +86,4 @@ var FormItemInput = function FormItemInput(props) {
|
|
|
89
86
|
className: className
|
|
90
87
|
}), dom));
|
|
91
88
|
};
|
|
92
|
-
|
|
93
89
|
export default FormItemInput;
|
|
@@ -7,10 +7,10 @@ import { ColProps } from '../grid/col';
|
|
|
7
7
|
import { FormLabelAlign } from './interface';
|
|
8
8
|
import { RequiredMark } from './Form';
|
|
9
9
|
import { TooltipProps } from '../tooltip';
|
|
10
|
-
export
|
|
10
|
+
export type WrapperTooltipProps = TooltipProps & {
|
|
11
11
|
icon?: React.ReactElement;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type LabelTooltipType = WrapperTooltipProps | React.ReactNode;
|
|
14
14
|
export interface FormItemLabelProps {
|
|
15
15
|
colon?: boolean;
|
|
16
16
|
htmlFor?: string;
|
package/es/form/FormItemLabel.js
CHANGED
|
@@ -2,24 +2,18 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* @file Label for FormItem
|
|
8
7
|
* @author chenqiang(chenqiang03)
|
|
9
8
|
*/
|
|
10
9
|
var __rest = this && this.__rest || function (s, e) {
|
|
11
10
|
var t = {};
|
|
12
|
-
|
|
13
|
-
for (var p in s) {
|
|
14
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
15
|
-
}
|
|
16
|
-
|
|
11
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
17
12
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
13
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
19
14
|
}
|
|
20
15
|
return t;
|
|
21
16
|
};
|
|
22
|
-
|
|
23
17
|
import * as React from 'react';
|
|
24
18
|
import classNames from 'classnames';
|
|
25
19
|
import OutlinedQuestionCircle from "acud-icon/es/icons/OutlinedQuestionCircle";
|
|
@@ -29,94 +23,78 @@ import { useLocaleReceiver } from '../locale-provider/LocaleReceiver';
|
|
|
29
23
|
import defaultLocale from '../locale/default';
|
|
30
24
|
import Tooltip from '../tooltip';
|
|
31
25
|
import { getCSSNumbericValue } from './util';
|
|
32
|
-
|
|
33
26
|
function toTooltipProps(tooltip) {
|
|
34
27
|
if (!tooltip) {
|
|
35
28
|
return null;
|
|
36
29
|
}
|
|
37
|
-
|
|
38
30
|
if (_typeof(tooltip) === 'object' && ! /*#__PURE__*/React.isValidElement(tooltip)) {
|
|
39
31
|
return tooltip;
|
|
40
32
|
}
|
|
41
|
-
|
|
42
33
|
return {
|
|
43
34
|
title: tooltip
|
|
44
35
|
};
|
|
45
36
|
}
|
|
46
|
-
|
|
47
37
|
var FormItemLabel = function FormItemLabel(_ref) {
|
|
48
38
|
var prefixCls = _ref.prefixCls,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
39
|
+
label = _ref.label,
|
|
40
|
+
htmlFor = _ref.htmlFor,
|
|
41
|
+
labelCol = _ref.labelCol,
|
|
42
|
+
labelAlign = _ref.labelAlign,
|
|
43
|
+
labelWidth = _ref.labelWidth,
|
|
44
|
+
colon = _ref.colon,
|
|
45
|
+
required = _ref.required,
|
|
46
|
+
requiredMark = _ref.requiredMark,
|
|
47
|
+
tooltip = _ref.tooltip;
|
|
59
48
|
var _useLocaleReceiver = useLocaleReceiver('Form'),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
49
|
+
_useLocaleReceiver2 = _slicedToArray(_useLocaleReceiver, 1),
|
|
50
|
+
formLocale = _useLocaleReceiver2[0];
|
|
51
|
+
// 允许水平方向label设置空字符串作为占位符
|
|
64
52
|
if (typeof label === 'undefined') {
|
|
65
53
|
return null;
|
|
66
54
|
}
|
|
67
|
-
|
|
68
55
|
return /*#__PURE__*/React.createElement(FormContext.Consumer, {
|
|
69
56
|
key: "label"
|
|
70
57
|
}, function (_ref2) {
|
|
71
58
|
var _classNames;
|
|
72
|
-
|
|
73
59
|
var vertical = _ref2.vertical,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
60
|
+
contextLabelAlign = _ref2.labelAlign,
|
|
61
|
+
contextLabelCol = _ref2.labelCol,
|
|
62
|
+
contextLabelWidth = _ref2.labelWidth,
|
|
63
|
+
contextColon = _ref2.colon;
|
|
64
|
+
var _a;
|
|
65
|
+
// 取消垂直布局label为空字符串的占位功能
|
|
82
66
|
if (!label && vertical) {
|
|
83
67
|
return null;
|
|
84
68
|
}
|
|
85
|
-
|
|
86
69
|
var mergedLabelCol = labelCol || contextLabelCol || {};
|
|
87
70
|
var mergedLabelAlign = labelAlign || contextLabelAlign;
|
|
88
71
|
var mergedLabelWidth = getCSSNumbericValue(labelWidth || contextLabelWidth);
|
|
89
72
|
var labelClsBasic = "".concat(prefixCls, "-item-label");
|
|
90
73
|
var labelColClassName = classNames(labelClsBasic, mergedLabelAlign === 'left' && "".concat(labelClsBasic, "-left"), mergedLabelCol.className);
|
|
91
|
-
var labelChildren = label;
|
|
92
|
-
|
|
74
|
+
var labelChildren = label;
|
|
75
|
+
// Keep label is original where there should have no colon
|
|
93
76
|
var computedColon = colon === true || contextColon !== false && colon !== false;
|
|
94
|
-
var haveColon = computedColon && !vertical && typeof label === 'string' && label.trim() !== '';
|
|
95
|
-
|
|
77
|
+
var haveColon = computedColon && !vertical && typeof label === 'string' && label.trim() !== '';
|
|
78
|
+
// Remove duplicated user input colon
|
|
96
79
|
if (haveColon) {
|
|
97
80
|
labelChildren = label.replace(/[:|:]\s*$/, '');
|
|
98
81
|
}
|
|
99
|
-
|
|
100
82
|
var tooltipProps = toTooltipProps(tooltip);
|
|
101
|
-
|
|
102
83
|
if (tooltipProps) {
|
|
103
84
|
var _tooltipProps$icon = tooltipProps.icon,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
85
|
+
icon = _tooltipProps$icon === void 0 ? /*#__PURE__*/React.createElement(OutlinedQuestionCircle, null) : _tooltipProps$icon,
|
|
86
|
+
restTooltipProps = __rest(tooltipProps, ["icon"]);
|
|
107
87
|
var tooltipNode = /*#__PURE__*/React.createElement(Tooltip, restTooltipProps, /*#__PURE__*/React.cloneElement(icon, {
|
|
108
88
|
className: "".concat(prefixCls, "-item-tooltip")
|
|
109
89
|
}));
|
|
110
90
|
labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, tooltipNode);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
91
|
+
}
|
|
92
|
+
// Add required mark if optional
|
|
114
93
|
if (requiredMark === 'optional' && !required) {
|
|
115
94
|
labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, /*#__PURE__*/React.createElement("span", {
|
|
116
95
|
className: "".concat(prefixCls, "-item-optional")
|
|
117
96
|
}, (formLocale === null || formLocale === void 0 ? void 0 : formLocale.optional) || ((_a = defaultLocale.Form) === null || _a === void 0 ? void 0 : _a.optional)));
|
|
118
97
|
}
|
|
119
|
-
|
|
120
98
|
var labelClassName = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-item-required"), required), _defineProperty(_classNames, "".concat(prefixCls, "-item-required-mark-optional"), requiredMark === 'optional'), _defineProperty(_classNames, "".concat(prefixCls, "-item-no-colon"), !haveColon), _classNames));
|
|
121
99
|
var labelStyle = !vertical ? {
|
|
122
100
|
width: mergedLabelWidth
|
|
@@ -131,5 +109,4 @@ var FormItemLabel = function FormItemLabel(_ref) {
|
|
|
131
109
|
}, labelChildren));
|
|
132
110
|
});
|
|
133
111
|
};
|
|
134
|
-
|
|
135
112
|
export default FormItemLabel;
|
package/es/form/FormList.js
CHANGED
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* @file Form list collection
|
|
5
4
|
* @author chenqiang(chenqiang03)
|
|
6
5
|
*/
|
|
7
6
|
var __rest = this && this.__rest || function (s, e) {
|
|
8
7
|
var t = {};
|
|
9
|
-
|
|
10
|
-
for (var p in s) {
|
|
11
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
|
|
8
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
14
9
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
15
10
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
16
11
|
}
|
|
17
12
|
return t;
|
|
18
13
|
};
|
|
19
|
-
|
|
20
14
|
import * as React from 'react';
|
|
21
15
|
import { List } from 'rc-field-form';
|
|
22
16
|
import devWarning from '../_util/devWarning';
|
|
23
17
|
import { ConfigContext } from '../config-provider';
|
|
24
18
|
import { FormItemPrefixContext } from './context';
|
|
25
|
-
|
|
26
19
|
var FormList = function FormList(_a) {
|
|
27
20
|
var customizePrefixCls = _a.prefixCls,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
children = _a.children,
|
|
22
|
+
props = __rest(_a, ["prefixCls", "children"]);
|
|
31
23
|
devWarning(!!props.name, 'Form.List', 'Miss `name` prop.');
|
|
32
|
-
|
|
33
24
|
var _React$useContext = React.useContext(ConfigContext),
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
getPrefixCls = _React$useContext.getPrefixCls;
|
|
36
26
|
var prefixCls = getPrefixCls('form', customizePrefixCls);
|
|
37
27
|
return /*#__PURE__*/React.createElement(List, props, function (fields, operation, meta) {
|
|
38
28
|
return /*#__PURE__*/React.createElement(FormItemPrefixContext.Provider, {
|
|
@@ -49,5 +39,4 @@ var FormList = function FormList(_a) {
|
|
|
49
39
|
}));
|
|
50
40
|
});
|
|
51
41
|
};
|
|
52
|
-
|
|
53
42
|
export default FormList;
|
|
@@ -5,21 +5,18 @@
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import useForceUpdate from '../../_util/hooks/useForceUpdate';
|
|
7
7
|
/** Always debounce error to avoid [error -> null -> error] blink */
|
|
8
|
-
|
|
9
8
|
export default function useCacheErrors(errors, changeTrigger, directly) {
|
|
10
9
|
var cacheRef = React.useRef({
|
|
11
10
|
errors: errors,
|
|
12
11
|
visible: !!errors.length
|
|
13
12
|
});
|
|
14
13
|
var forceUpdate = useForceUpdate();
|
|
15
|
-
|
|
16
14
|
var update = function update() {
|
|
17
15
|
var prevVisible = cacheRef.current.visible;
|
|
18
16
|
var newVisible = !!errors.length;
|
|
19
17
|
var prevErrors = cacheRef.current.errors;
|
|
20
18
|
cacheRef.current.errors = errors;
|
|
21
19
|
cacheRef.current.visible = newVisible;
|
|
22
|
-
|
|
23
20
|
if (prevVisible !== newVisible) {
|
|
24
21
|
changeTrigger(newVisible);
|
|
25
22
|
} else if (prevErrors.length !== errors.length || prevErrors.some(function (prevErr, index) {
|
|
@@ -28,7 +25,6 @@ export default function useCacheErrors(errors, changeTrigger, directly) {
|
|
|
28
25
|
forceUpdate();
|
|
29
26
|
}
|
|
30
27
|
};
|
|
31
|
-
|
|
32
28
|
React.useEffect(function () {
|
|
33
29
|
if (!directly) {
|
|
34
30
|
var timeout = setTimeout(update, 10);
|
|
@@ -37,10 +33,8 @@ export default function useCacheErrors(errors, changeTrigger, directly) {
|
|
|
37
33
|
};
|
|
38
34
|
}
|
|
39
35
|
}, [errors]);
|
|
40
|
-
|
|
41
36
|
if (directly) {
|
|
42
37
|
update();
|
|
43
38
|
}
|
|
44
|
-
|
|
45
39
|
return [cacheRef.current.visible, cacheRef.current.errors];
|
|
46
40
|
}
|