@kdcloudjs/kdesign 1.8.11 → 1.8.13
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/kdesign.css +1 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +93 -15
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +3 -3
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/KeyCode.js +1 -333
- package/es/_utils/arrayUtil.js +0 -8
- package/es/_utils/formatUtil.js +9 -59
- package/es/_utils/getStringLength.js +0 -1
- package/es/_utils/hooks.js +2 -34
- package/es/_utils/index.js +1 -7
- package/es/_utils/numberUtil.js +0 -54
- package/es/_utils/raf.js +2 -2
- package/es/_utils/reactNode.js +1 -1
- package/es/_utils/resizeObserver.js +2 -4
- package/es/_utils/type.js +0 -1
- package/es/_utils/usePopper.js +3 -3
- package/es/alert/alert.js +8 -16
- package/es/anchor/anchor-link.js +3 -3
- package/es/anchor/anchor.js +23 -26
- package/es/anchor/context.js +1 -1
- package/es/avatar/avatar.js +8 -11
- package/es/badge/badge.js +7 -13
- package/es/base-data/base-data.js +42 -104
- package/es/breadcrumb/breadcrumb.js +12 -12
- package/es/breadcrumb/breadcrumbItem.js +5 -5
- package/es/button/button.js +13 -24
- package/es/button/group.js +13 -13
- package/es/card/card.js +12 -14
- package/es/carousel/carousel.js +13 -13
- package/es/carousel/displayList.js +3 -3
- package/es/carousel/fadeList.js +3 -3
- package/es/carousel/slideList.js +4 -4
- package/es/carousel/slidebar.js +3 -3
- package/es/cascader/cascader.js +31 -36
- package/es/checkbox/checkbox.js +25 -30
- package/es/checkbox/group.js +8 -9
- package/es/city-picker/city-picker.js +28 -38
- package/es/city-picker/interface.js +1 -1
- package/es/city-picker/option.js +4 -4
- package/es/clipboard/clipboard.js +5 -23
- package/es/clipboard/util.js +0 -60
- package/es/collapse/collapse.js +5 -5
- package/es/collapse/panel.js +15 -15
- package/es/color-picker/color-picker-panel.js +12 -13
- package/es/color-picker/color-picker.js +6 -10
- package/es/color-picker/utils/validateColor.js +0 -3
- package/es/config-provider/ConfigContext.js +1 -4
- package/es/config-provider/SizeContext.js +3 -3
- package/es/config-provider/compDefaultProps.js +3 -10
- package/es/config-provider/configProvider.js +1 -6
- package/es/config-provider/defaultConfig.js +0 -1
- package/es/date-picker/calendar.js +6 -23
- package/es/date-picker/context.js +1 -1
- package/es/date-picker/date-panel.js +12 -13
- package/es/date-picker/date-picker.js +7 -12
- package/es/date-picker/hooks/use-hover-value.js +0 -1
- package/es/date-picker/hooks/use-picker-input.js +0 -4
- package/es/date-picker/hooks/use-range-disabled.js +2 -6
- package/es/date-picker/hooks/use-range-view-dates.js +1 -9
- package/es/date-picker/hooks/use-text-value-mapping.js +0 -1
- package/es/date-picker/locale/zh_CN.js +0 -1
- package/es/date-picker/panel/date-time/date-time.js +4 -6
- package/es/date-picker/panel/header/header.js +14 -14
- package/es/date-picker/panel/month/month.js +5 -6
- package/es/date-picker/panel/quarter/quarter.js +4 -4
- package/es/date-picker/panel/time/time-column.js +4 -6
- package/es/date-picker/panel/time/time.js +10 -35
- package/es/date-picker/panel/week/week.js +5 -8
- package/es/date-picker/panel/year/year.js +4 -6
- package/es/date-picker/popper.js +3 -6
- package/es/date-picker/range/input-range.js +12 -13
- package/es/date-picker/range-picker.js +13 -36
- package/es/date-picker/single/input-date.js +8 -14
- package/es/date-picker/utils/date-fns.js +0 -35
- package/es/date-picker/utils/get-extra-footer.js +1 -1
- package/es/date-picker/utils/get-ranges.js +8 -8
- package/es/date-picker/utils/index.js +0 -3
- package/es/divider/divider.js +2 -2
- package/es/drawer/drawer.js +14 -39
- package/es/dropdown/dropdown.js +10 -11
- package/es/dropdown/menu.js +8 -12
- package/es/empty/defaultEmptyImg.js +18 -18
- package/es/empty/empty.js +9 -10
- package/es/empty/illustrationEmptyImg.js +106 -106
- package/es/filter/condition.js +10 -10
- package/es/filter/filter.js +17 -19
- package/es/filter/scheme.js +34 -41
- package/es/form/Field.js +5 -5
- package/es/form/FieldContext.js +1 -1
- package/es/form/FieldLabel.js +2 -2
- package/es/form/FieldWrapper.js +6 -6
- package/es/form/Form.js +2 -5
- package/es/form/FormContext.js +2 -4
- package/es/form/hooks/useForm.js +1 -14
- package/es/form/index.js +1 -1
- package/es/grid/col.js +1 -7
- package/es/grid/row.js +3 -9
- package/es/icon/icon.js +2 -2
- package/es/image/image.js +5 -7
- package/es/image/preview-group.js +3 -4
- package/es/image/preview.js +22 -24
- package/es/image-cropper/cropper.js +3 -6
- package/es/image-cropper/image-cropper.js +5 -5
- package/es/image-cropper/operation-bar.js +9 -9
- package/es/index.js +4 -0
- package/es/input/ClearableLabeledInput.js +13 -13
- package/es/input/TextArea.js +7 -7
- package/es/input/calculateNodeHeight.js +6 -11
- package/es/input/index.js +0 -1
- package/es/input/input.js +5 -5
- package/es/input-number/inputNumber.js +3 -10
- package/es/layout/layout.js +5 -9
- package/es/layout/sider.js +11 -14
- package/es/link/link.js +8 -12
- package/es/locale/locale.js +4 -34
- package/es/menu/menu.js +3 -4
- package/es/menu/menuItem.js +8 -13
- package/es/menu/subMenu.js +19 -27
- package/es/menu/util.js +0 -4
- package/es/message/content.js +13 -13
- package/es/message/index.js +1 -3
- package/es/modal/confirm.js +1 -1
- package/es/modal/modal.js +32 -40
- package/es/notification/content.js +18 -18
- package/es/notification/index.js +1 -1
- package/es/notification-base/index.js +1 -1
- package/es/notification-base/notice.js +2 -2
- package/es/notification-base/notification.js +3 -3
- package/es/pagination/pagination.js +48 -70
- package/es/popconfirm/popconfirm.js +8 -10
- package/es/popper/index.d.ts +4 -1
- package/es/popper/index.js +84 -22
- package/es/progress/circle.js +6 -8
- package/es/progress/line.js +3 -3
- package/es/progress/progress.js +11 -11
- package/es/qr-code/qr-code.js +6 -6
- package/es/radio/context.js +1 -1
- package/es/radio/group.js +9 -13
- package/es/radio/radio-button.js +2 -2
- package/es/radio/radio.js +19 -24
- package/es/rate/rate.js +11 -61
- package/es/search/option.js +4 -5
- package/es/search/quick-search.js +36 -57
- package/es/search/search-panel.js +56 -60
- package/es/search/search.js +9 -10
- package/es/select/interface.js +1 -1
- package/es/select/option.js +4 -4
- package/es/select/select.js +47 -87
- package/es/signature/drawingBoard.js +16 -16
- package/es/signature/signature.js +20 -20
- package/es/signature/utils/signature_pad.js +4 -12
- package/es/slider/marks.js +3 -5
- package/es/slider/slider.js +11 -32
- package/es/slider/sliderTooltip.js +3 -3
- package/es/slider/steps.js +2 -2
- package/es/slider/track.js +1 -1
- package/es/space/space.js +3 -5
- package/es/spin/spin.js +16 -18
- package/es/split-panel/split-panel.js +7 -18
- package/es/split-panel/trigger.js +6 -6
- package/es/stepper/stepper.js +11 -12
- package/es/steps/Step.js +8 -8
- package/es/steps/Steps.js +5 -5
- package/es/switch/switch.js +4 -6
- package/es/table/api.js +5 -22
- package/es/table/table.js +4 -15
- package/es/tabs/active-line.js +2 -6
- package/es/tabs/arrow-button.js +3 -3
- package/es/tabs/context.js +1 -1
- package/es/tabs/index.js +0 -1
- package/es/tabs/tab-pane.js +6 -6
- package/es/tabs/tabs.js +31 -34
- package/es/tag/tag.js +7 -15
- package/es/timeline/Timeline.js +5 -5
- package/es/timeline/TimelineItem.js +5 -5
- package/es/tooltip/tooltip.js +2 -2
- package/es/transfer/list-body.js +4 -4
- package/es/transfer/list-item.js +5 -6
- package/es/transfer/list.js +18 -22
- package/es/transfer/operation.js +7 -7
- package/es/transfer/search.js +5 -5
- package/es/transfer/transfer.js +8 -13
- package/es/tree/tree.js +9 -9
- package/es/tree/treeNode.js +18 -20
- package/es/tree/utils/treeUtils.js +1 -27
- package/es/tree-select/interface.js +1 -1
- package/es/tree-select/tree-select.js +35 -48
- package/es/typography/base.js +5 -5
- package/es/typography/index.js +0 -1
- package/es/typography/paragraph.js +1 -1
- package/es/typography/text.js +1 -1
- package/es/typography/title.js +1 -1
- package/es/typography/typography.js +4 -8
- package/es/upload/dragger.js +2 -2
- package/es/upload/request.js +0 -5
- package/es/upload/scan-files.js +0 -1
- package/es/upload/upload.js +34 -34
- package/es/upload/verify-file.js +0 -1
- package/es/view-container/context.js +1 -1
- package/es/view-container/view-container.js +4 -8
- package/es/virtual-list/Filler.js +2 -2
- package/es/virtual-list/utils/algorithmUtil.js +0 -13
- package/es/virtual-list/utils/itemUtil.js +0 -30
- package/es/virtual-list/virtual-list.js +8 -11
- package/lib/_utils/KeyCode.js +1 -333
- package/lib/_utils/arrayUtil.js +0 -8
- package/lib/_utils/formatUtil.js +9 -59
- package/lib/_utils/getStringLength.js +0 -1
- package/lib/_utils/hooks.js +2 -34
- package/lib/_utils/index.js +0 -7
- package/lib/_utils/numberUtil.js +0 -54
- package/lib/_utils/raf.js +2 -2
- package/lib/_utils/reactNode.js +1 -1
- package/lib/_utils/resizeObserver.js +2 -4
- package/lib/_utils/type.js +0 -1
- package/lib/_utils/usePopper.js +3 -3
- package/lib/alert/alert.js +8 -16
- package/lib/anchor/anchor-link.js +3 -3
- package/lib/anchor/anchor.js +23 -26
- package/lib/anchor/context.js +1 -1
- package/lib/avatar/avatar.js +8 -11
- package/lib/badge/badge.js +7 -13
- package/lib/base-data/base-data.js +42 -104
- package/lib/breadcrumb/breadcrumb.js +12 -12
- package/lib/breadcrumb/breadcrumbItem.js +5 -5
- package/lib/button/button.js +13 -24
- package/lib/button/group.js +13 -13
- package/lib/card/card.js +12 -14
- package/lib/carousel/carousel.js +13 -13
- package/lib/carousel/displayList.js +3 -3
- package/lib/carousel/fadeList.js +3 -3
- package/lib/carousel/slideList.js +4 -4
- package/lib/carousel/slidebar.js +3 -3
- package/lib/cascader/cascader.js +31 -36
- package/lib/checkbox/checkbox.js +25 -30
- package/lib/checkbox/group.js +8 -8
- package/lib/city-picker/city-picker.js +28 -38
- package/lib/city-picker/interface.js +1 -1
- package/lib/city-picker/option.js +4 -4
- package/lib/clipboard/clipboard.js +5 -23
- package/lib/clipboard/util.js +0 -60
- package/lib/collapse/collapse.js +5 -5
- package/lib/collapse/panel.js +15 -15
- package/lib/color-picker/color-picker-panel.js +12 -14
- package/lib/color-picker/color-picker.js +6 -10
- package/lib/color-picker/utils/validateColor.js +0 -3
- package/lib/config-provider/ConfigContext.js +1 -5
- package/lib/config-provider/SizeContext.js +3 -3
- package/lib/config-provider/compDefaultProps.js +3 -10
- package/lib/config-provider/configProvider.js +1 -7
- package/lib/config-provider/defaultConfig.js +0 -1
- package/lib/date-picker/calendar.js +6 -23
- package/lib/date-picker/context.js +1 -1
- package/lib/date-picker/date-panel.js +12 -13
- package/lib/date-picker/date-picker.js +7 -12
- package/lib/date-picker/hooks/use-hover-value.js +0 -1
- package/lib/date-picker/hooks/use-picker-input.js +0 -4
- package/lib/date-picker/hooks/use-range-disabled.js +2 -6
- package/lib/date-picker/hooks/use-range-view-dates.js +1 -9
- package/lib/date-picker/hooks/use-text-value-mapping.js +0 -1
- package/lib/date-picker/locale/zh_CN.js +0 -1
- package/lib/date-picker/panel/date-time/date-time.js +4 -6
- package/lib/date-picker/panel/header/header.js +14 -14
- package/lib/date-picker/panel/month/month.js +5 -6
- package/lib/date-picker/panel/quarter/quarter.js +4 -4
- package/lib/date-picker/panel/time/time-column.js +4 -6
- package/lib/date-picker/panel/time/time.js +10 -35
- package/lib/date-picker/panel/week/week.js +5 -8
- package/lib/date-picker/panel/year/year.js +4 -6
- package/lib/date-picker/popper.js +3 -6
- package/lib/date-picker/range/input-range.js +12 -13
- package/lib/date-picker/range-picker.js +13 -36
- package/lib/date-picker/single/input-date.js +8 -14
- package/lib/date-picker/utils/date-fns.js +0 -34
- package/lib/date-picker/utils/get-extra-footer.js +1 -1
- package/lib/date-picker/utils/get-ranges.js +8 -8
- package/lib/date-picker/utils/index.js +0 -3
- package/lib/divider/divider.js +2 -2
- package/lib/drawer/drawer.js +14 -40
- package/lib/dropdown/dropdown.js +10 -11
- package/lib/dropdown/menu.js +8 -12
- package/lib/empty/defaultEmptyImg.js +18 -18
- package/lib/empty/empty.js +9 -10
- package/lib/empty/illustrationEmptyImg.js +106 -106
- package/lib/filter/condition.js +10 -10
- package/lib/filter/filter.js +17 -19
- package/lib/filter/scheme.js +34 -41
- package/lib/form/Field.js +5 -5
- package/lib/form/FieldContext.js +1 -1
- package/lib/form/FieldLabel.js +2 -2
- package/lib/form/FieldWrapper.js +6 -6
- package/lib/form/Form.js +2 -5
- package/lib/form/FormContext.js +2 -4
- package/lib/form/hooks/useForm.js +1 -14
- package/lib/form/index.js +1 -1
- package/lib/grid/col.js +1 -7
- package/lib/grid/row.js +3 -9
- package/lib/icon/icon.js +2 -2
- package/lib/image/image.js +5 -7
- package/lib/image/preview-group.js +3 -4
- package/lib/image/preview.js +22 -24
- package/lib/image-cropper/cropper.js +3 -6
- package/lib/image-cropper/image-cropper.js +5 -5
- package/lib/image-cropper/operation-bar.js +9 -9
- package/lib/index.js +2 -8
- package/lib/input/ClearableLabeledInput.js +13 -13
- package/lib/input/TextArea.js +7 -7
- package/lib/input/calculateNodeHeight.js +6 -11
- package/lib/input/index.js +0 -1
- package/lib/input/input.js +5 -5
- package/lib/input-number/inputNumber.js +3 -10
- package/lib/layout/layout.js +5 -9
- package/lib/layout/sider.js +11 -14
- package/lib/link/link.js +8 -12
- package/lib/locale/locale.js +4 -34
- package/lib/menu/menu.js +3 -4
- package/lib/menu/menuItem.js +8 -13
- package/lib/menu/subMenu.js +19 -27
- package/lib/menu/util.js +0 -4
- package/lib/message/content.js +13 -13
- package/lib/message/index.js +1 -3
- package/lib/modal/confirm.js +1 -1
- package/lib/modal/modal.js +32 -40
- package/lib/notification/content.js +18 -18
- package/lib/notification/index.js +1 -1
- package/lib/notification-base/index.js +1 -1
- package/lib/notification-base/notice.js +2 -2
- package/lib/notification-base/notification.js +3 -3
- package/lib/pagination/pagination.js +48 -70
- package/lib/popconfirm/popconfirm.js +8 -10
- package/lib/popper/index.d.ts +4 -1
- package/lib/popper/index.js +84 -22
- package/lib/progress/circle.js +6 -8
- package/lib/progress/line.js +3 -3
- package/lib/progress/progress.js +11 -11
- package/lib/qr-code/qr-code.js +6 -6
- package/lib/radio/context.js +1 -1
- package/lib/radio/group.js +9 -13
- package/lib/radio/radio-button.js +2 -2
- package/lib/radio/radio.js +19 -24
- package/lib/rate/rate.js +11 -61
- package/lib/search/option.js +4 -5
- package/lib/search/quick-search.js +36 -57
- package/lib/search/search-panel.js +56 -60
- package/lib/search/search.js +9 -10
- package/lib/select/interface.js +1 -1
- package/lib/select/option.js +4 -4
- package/lib/select/select.js +47 -87
- package/lib/signature/drawingBoard.js +16 -16
- package/lib/signature/signature.js +20 -20
- package/lib/signature/utils/signature_pad.js +4 -12
- package/lib/slider/marks.js +3 -5
- package/lib/slider/slider.js +11 -32
- package/lib/slider/sliderTooltip.js +3 -3
- package/lib/slider/steps.js +2 -2
- package/lib/slider/track.js +1 -1
- package/lib/space/space.js +3 -5
- package/lib/spin/spin.js +16 -18
- package/lib/split-panel/split-panel.js +7 -18
- package/lib/split-panel/trigger.js +6 -6
- package/lib/stepper/stepper.js +11 -12
- package/lib/steps/Step.js +8 -8
- package/lib/steps/Steps.js +5 -5
- package/lib/switch/switch.js +4 -6
- package/lib/table/api.js +5 -22
- package/lib/table/table.js +4 -15
- package/lib/tabs/active-line.js +2 -6
- package/lib/tabs/arrow-button.js +3 -3
- package/lib/tabs/context.js +1 -1
- package/lib/tabs/index.js +0 -1
- package/lib/tabs/tab-pane.js +6 -6
- package/lib/tabs/tabs.js +31 -34
- package/lib/tag/tag.js +7 -15
- package/lib/timeline/Timeline.js +5 -5
- package/lib/timeline/TimelineItem.js +5 -5
- package/lib/tooltip/tooltip.js +2 -2
- package/lib/transfer/list-body.js +4 -4
- package/lib/transfer/list-item.js +5 -6
- package/lib/transfer/list.js +18 -22
- package/lib/transfer/operation.js +7 -7
- package/lib/transfer/search.js +5 -5
- package/lib/transfer/transfer.js +8 -13
- package/lib/tree/tree.js +9 -9
- package/lib/tree/treeNode.js +18 -20
- package/lib/tree/utils/treeUtils.js +1 -27
- package/lib/tree-select/interface.js +1 -1
- package/lib/tree-select/tree-select.js +35 -48
- package/lib/typography/base.js +5 -5
- package/lib/typography/index.js +0 -1
- package/lib/typography/paragraph.js +1 -1
- package/lib/typography/text.js +1 -1
- package/lib/typography/title.js +1 -1
- package/lib/typography/typography.js +4 -8
- package/lib/upload/dragger.js +2 -2
- package/lib/upload/request.js +0 -5
- package/lib/upload/scan-files.js +0 -1
- package/lib/upload/upload.js +34 -34
- package/lib/upload/verify-file.js +0 -1
- package/lib/view-container/context.js +1 -1
- package/lib/view-container/view-container.js +4 -8
- package/lib/virtual-list/Filler.js +2 -2
- package/lib/virtual-list/utils/algorithmUtil.js +0 -13
- package/lib/virtual-list/utils/itemUtil.js +0 -30
- package/lib/virtual-list/virtual-list.js +8 -12
- package/package.json +1 -3
|
@@ -29,7 +29,7 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
29
29
|
getPrefixCls = _useContext.getPrefixCls,
|
|
30
30
|
prefixCls = _useContext.prefixCls,
|
|
31
31
|
userDefaultProps = _useContext.compDefaultProps;
|
|
32
|
-
var splitPanelProps = getCompProps('SplitPanel', userDefaultProps, props);
|
|
32
|
+
var splitPanelProps = getCompProps('SplitPanel', userDefaultProps, props);
|
|
33
33
|
var customPrefixcls = splitPanelProps.prefixCls,
|
|
34
34
|
className = splitPanelProps.className,
|
|
35
35
|
style = splitPanelProps.style,
|
|
@@ -86,27 +86,22 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
86
86
|
useEffect(function () {
|
|
87
87
|
setAnotherOffset(100 - offset);
|
|
88
88
|
}, [offset]);
|
|
89
|
-
// 将defaultOffset转换成百分比
|
|
90
89
|
var getComputeOffset = useCallback(function (value) {
|
|
91
90
|
var newVal = typeof value === 'string' ? pxToScale(value, outerWrapper.current[offsetSizeProperty]) : calcNumber(value);
|
|
92
91
|
return newVal * 100;
|
|
93
92
|
}, [offsetSizeProperty]);
|
|
94
|
-
// 将min和max转换为百分比
|
|
95
93
|
var getComputedThresholdValue = useCallback(function (val) {
|
|
96
94
|
var size = outerWrapper.current[offsetSizeProperty];
|
|
97
95
|
var newVal = typeof val === 'string' ? pxToScale(val, size) : calcNumber(val);
|
|
98
96
|
return newVal * 100;
|
|
99
97
|
}, [offsetSizeProperty]);
|
|
100
|
-
// 初始化分割线、min和max
|
|
101
98
|
var initPanel = useCallback(function () {
|
|
102
99
|
var thresholdMin = getComputedThresholdValue(min);
|
|
103
100
|
var thresholdMax = 100 - getComputedThresholdValue(max);
|
|
104
101
|
var computeOffset = getComputeOffset(defaultSplit);
|
|
105
|
-
// 边界处理,计算出的min和max进行判断
|
|
106
102
|
if (thresholdMin > thresholdMax) {
|
|
107
103
|
thresholdMin = thresholdMax;
|
|
108
104
|
}
|
|
109
|
-
// 计算出的offset值的边界处理
|
|
110
105
|
if (computeOffset < thresholdMin) {
|
|
111
106
|
computeOffset = thresholdMin;
|
|
112
107
|
} else if (computeOffset > thresholdMax) {
|
|
@@ -136,7 +131,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
136
131
|
};
|
|
137
132
|
}, [initPanel]);
|
|
138
133
|
var handleMove = useCallback(function (e) {
|
|
139
|
-
// 将鼠标移动距离与offset进行处理
|
|
140
134
|
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
|
141
135
|
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
|
142
136
|
var wrapperOffset = outerWrapper.current.getBoundingClientRect()[pos];
|
|
@@ -144,7 +138,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
144
138
|
var moveInstance = mouseOffset - wrapperOffset;
|
|
145
139
|
var outerWidth = outerWrapper.current[offsetSizeProperty];
|
|
146
140
|
var value = pxToScale(moveInstance, outerWidth) * 100;
|
|
147
|
-
// 边界阈值处理
|
|
148
141
|
if (value <= computeMin) value = Math.max(value, computeMin);
|
|
149
142
|
if (value >= computeMax) value = Math.min(value, computeMax);
|
|
150
143
|
setOffset(value);
|
|
@@ -186,7 +179,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
186
179
|
return 0;
|
|
187
180
|
}
|
|
188
181
|
};
|
|
189
|
-
// 折叠第一个面板
|
|
190
182
|
var hideFirstPanel = function hideFirstPanel(e, direction) {
|
|
191
183
|
if (disabled) return;
|
|
192
184
|
e.persist();
|
|
@@ -194,7 +186,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
194
186
|
changeSplit(pos);
|
|
195
187
|
onFold && onFold(e, direction);
|
|
196
188
|
};
|
|
197
|
-
// 折叠第二个面板
|
|
198
189
|
var hideSecondPanel = function hideSecondPanel(e, direction) {
|
|
199
190
|
if (disabled) return;
|
|
200
191
|
e.persist();
|
|
@@ -202,7 +193,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
202
193
|
changeSplit(pos);
|
|
203
194
|
onFold && onFold(e, direction);
|
|
204
195
|
};
|
|
205
|
-
// 处理lineStyle
|
|
206
196
|
var handleLineStyle = useCallback(function (mode) {
|
|
207
197
|
if (typeof lineStyle === 'function') {
|
|
208
198
|
return lineStyle(mode);
|
|
@@ -215,7 +205,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
215
205
|
vertical: handleLineStyle('vertical') || {}
|
|
216
206
|
};
|
|
217
207
|
}, [handleLineStyle]);
|
|
218
|
-
// 处理自定义折叠图标
|
|
219
208
|
var handleFoldIcons = useCallback(function (mode) {
|
|
220
209
|
if (typeof foldIcons === 'function') {
|
|
221
210
|
return foldIcons(mode);
|
|
@@ -239,19 +228,19 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
239
228
|
'is-disabled': disabled,
|
|
240
229
|
'is-active': isFirstPanelHide || isSecondPanelHide
|
|
241
230
|
});
|
|
242
|
-
return
|
|
231
|
+
return React.createElement("div", {
|
|
243
232
|
className: cls,
|
|
244
233
|
style: style,
|
|
245
234
|
ref: outerWrapper
|
|
246
|
-
},
|
|
235
|
+
}, React.createElement("div", {
|
|
247
236
|
className: _concatInstanceProperty(_context = "".concat(splitPanelPrefixCls, "-")).call(_context, mode)
|
|
248
|
-
},
|
|
237
|
+
}, React.createElement("div", {
|
|
249
238
|
className: getPanelCls(pos),
|
|
250
239
|
style: _defineProperty({}, oppositePos, "".concat(anotherOffset, "%"))
|
|
251
|
-
}, firstSlot),
|
|
240
|
+
}, firstSlot), React.createElement("div", {
|
|
252
241
|
className: triggerWrapperCls,
|
|
253
242
|
style: _defineProperty({}, pos, "".concat(offset, "%"))
|
|
254
|
-
},
|
|
243
|
+
}, React.createElement(Trigger, {
|
|
255
244
|
style: triggerLineStyle[mode],
|
|
256
245
|
mode: oppositeMode,
|
|
257
246
|
prefixCls: splitPanelPrefixCls,
|
|
@@ -261,7 +250,7 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
261
250
|
hideSecondPanel: hideSecondPanel,
|
|
262
251
|
foldIcons: triggerFoldIcons[mode],
|
|
263
252
|
handleMousedown: handleMousedown
|
|
264
|
-
})),
|
|
253
|
+
})), React.createElement("div", {
|
|
265
254
|
className: getPanelCls(oppositePos),
|
|
266
255
|
style: _defineProperty({}, pos, "".concat(offset, "%"))
|
|
267
256
|
}, secondSlot)));
|
|
@@ -31,26 +31,26 @@ var Trigger = function Trigger(props) {
|
|
|
31
31
|
var secondIconPos = isVertical ? 'right' : 'bottom';
|
|
32
32
|
var firstIconType = isVertical ? 'arrow-left-solid' : 'arrow-up-solid';
|
|
33
33
|
var secondIconType = isVertical ? 'arrow-right-solid' : 'arrow-down-solid';
|
|
34
|
-
return
|
|
34
|
+
return React.createElement(React.Fragment, null, React.createElement("span", {
|
|
35
35
|
className: getArrowCls(firstIconPos),
|
|
36
36
|
onClick: function onClick(e) {
|
|
37
37
|
return hideFirstPanel(e, firstIconPos);
|
|
38
38
|
}
|
|
39
|
-
}, firstCustomIcons ||
|
|
39
|
+
}, firstCustomIcons || React.createElement(Icon, {
|
|
40
40
|
type: firstIconType
|
|
41
|
-
})),
|
|
41
|
+
})), React.createElement("span", {
|
|
42
42
|
className: getArrowCls(secondIconPos),
|
|
43
43
|
onClick: function onClick(e) {
|
|
44
44
|
return hideSecondPanel(e, secondIconPos);
|
|
45
45
|
}
|
|
46
|
-
}, secondCustomIcons ||
|
|
46
|
+
}, secondCustomIcons || React.createElement(Icon, {
|
|
47
47
|
type: secondIconType
|
|
48
48
|
})));
|
|
49
49
|
};
|
|
50
|
-
return
|
|
50
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
51
51
|
className: triggerCls,
|
|
52
52
|
style: style,
|
|
53
53
|
onMouseDown: handleMousedown
|
|
54
54
|
}), renderFoldIcons());
|
|
55
55
|
};
|
|
56
|
-
export default
|
|
56
|
+
export default React.memo(Trigger);
|
package/es/stepper/stepper.js
CHANGED
|
@@ -55,7 +55,6 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
55
55
|
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
56
56
|
value = _useMergedState2[0],
|
|
57
57
|
setValue = _useMergedState2[1];
|
|
58
|
-
// class
|
|
59
58
|
var getStepBtnClassNames = function getStepBtnClassNames(stepType, btnType) {
|
|
60
59
|
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _classNames;
|
|
61
60
|
var isDisabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
@@ -66,26 +65,26 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
66
65
|
return null;
|
|
67
66
|
}
|
|
68
67
|
var decreaseClassName = getStepBtnClassNames('base', 'decrease', showPlusdisabled || disabled);
|
|
69
|
-
return
|
|
68
|
+
return React.createElement("span", {
|
|
70
69
|
className: decreaseClassName,
|
|
71
70
|
onMouseDown: function onMouseDown() {
|
|
72
71
|
if (disabled) return;
|
|
73
72
|
handleStepMouseDown('minus');
|
|
74
73
|
}
|
|
75
|
-
},
|
|
74
|
+
}, React.createElement(Icon, {
|
|
76
75
|
className: "".concat(inputPrefixCls, "-icon"),
|
|
77
76
|
type: "reduce"
|
|
78
77
|
}));
|
|
79
78
|
};
|
|
80
79
|
var getStepSuffix = function getStepSuffix() {
|
|
81
80
|
var increaseClassName = getStepBtnClassNames('base', 'increase', showMinusdisabled || disabled);
|
|
82
|
-
return type === 'embed' ? getEmbedStepView() :
|
|
81
|
+
return type === 'embed' ? getEmbedStepView() : React.createElement("span", {
|
|
83
82
|
className: increaseClassName,
|
|
84
83
|
onMouseDown: function onMouseDown() {
|
|
85
84
|
if (disabled) return;
|
|
86
85
|
handleStepMouseDown('plus');
|
|
87
86
|
}
|
|
88
|
-
},
|
|
87
|
+
}, React.createElement(Icon, {
|
|
89
88
|
className: "".concat(inputPrefixCls, "-icon"),
|
|
90
89
|
type: "add"
|
|
91
90
|
}));
|
|
@@ -175,29 +174,29 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
175
174
|
var embedStepClassName = getStepBtnClassNames('embed');
|
|
176
175
|
var plusClassName = classNames("".concat(inputPrefixCls, "-embedStep-plus"), (_classNames2 = {}, _defineProperty(_classNames2, stepBtnClassName, stepBtnClassName), _defineProperty(_classNames2, "".concat(inputPrefixCls, "-embedStep-disabled"), showMinusdisabled || disabled), _classNames2));
|
|
177
176
|
var minusClassName = classNames("".concat(inputPrefixCls, "-embedStep-minus"), (_classNames3 = {}, _defineProperty(_classNames3, stepBtnClassName, stepBtnClassName), _defineProperty(_classNames3, "".concat(inputPrefixCls, "-embedStep-disabled"), showPlusdisabled || disabled), _classNames3));
|
|
178
|
-
return
|
|
177
|
+
return React.createElement("span", {
|
|
179
178
|
className: embedStepClassName
|
|
180
|
-
},
|
|
179
|
+
}, React.createElement("span", {
|
|
181
180
|
className: plusClassName,
|
|
182
181
|
onMouseDown: function onMouseDown() {
|
|
183
182
|
if (disabled) return;
|
|
184
183
|
handleStepMouseDown('plus');
|
|
185
184
|
}
|
|
186
|
-
},
|
|
185
|
+
}, React.createElement(Icon, {
|
|
187
186
|
className: "".concat(inputPrefixCls, "-icon"),
|
|
188
187
|
type: "arrow-up"
|
|
189
|
-
})),
|
|
188
|
+
})), React.createElement("span", {
|
|
190
189
|
className: minusClassName,
|
|
191
190
|
onMouseDown: function onMouseDown() {
|
|
192
191
|
if (disabled) return;
|
|
193
192
|
handleStepMouseDown('minus');
|
|
194
193
|
}
|
|
195
|
-
},
|
|
194
|
+
}, React.createElement(Icon, {
|
|
196
195
|
className: "".concat(inputPrefixCls, "-icon"),
|
|
197
196
|
type: "arrow-down"
|
|
198
197
|
})));
|
|
199
198
|
};
|
|
200
|
-
return
|
|
199
|
+
return React.createElement(InputNumber, _extends({}, omit(inputNumberProps, ['step', 'type', 'stepBtnClassName', 'value', 'defaultValue']), {
|
|
201
200
|
ref: inputNumberRef,
|
|
202
201
|
className: "".concat(inputPrefixCls, "-stepper"),
|
|
203
202
|
stepperrref: stepperrref,
|
|
@@ -207,6 +206,6 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
207
206
|
onChange: handleChange
|
|
208
207
|
}));
|
|
209
208
|
};
|
|
210
|
-
var Stepper =
|
|
209
|
+
var Stepper = React.forwardRef(InternalStepper);
|
|
211
210
|
Stepper.displayName = 'Stepper';
|
|
212
211
|
export default Stepper;
|
package/es/steps/Step.js
CHANGED
|
@@ -55,28 +55,28 @@ var Step = function Step(props) {
|
|
|
55
55
|
} else {
|
|
56
56
|
iconNode = stepNumber;
|
|
57
57
|
}
|
|
58
|
-
return
|
|
58
|
+
return React.createElement("span", {
|
|
59
59
|
className: "".concat(prefixCls, "-icon")
|
|
60
60
|
}, iconNode);
|
|
61
61
|
};
|
|
62
62
|
var iconContainerClassName = classNames("".concat(prefixCls, "-item-iconContainer"), _defineProperty({}, "".concat(prefixCls, "-item-iconContainer-finish"), current > stepIndex));
|
|
63
|
-
return
|
|
63
|
+
return React.createElement("div", _extends({}, others, {
|
|
64
64
|
className: stepClassName,
|
|
65
65
|
style: style,
|
|
66
66
|
onClick: handleClick
|
|
67
|
-
}),
|
|
67
|
+
}), React.createElement("div", {
|
|
68
68
|
onClick: onClick,
|
|
69
69
|
className: "".concat(prefixCls, "-item-container")
|
|
70
|
-
},
|
|
70
|
+
}, React.createElement("div", {
|
|
71
71
|
className: iconContainerClassName
|
|
72
|
-
},
|
|
72
|
+
}, React.createElement("div", {
|
|
73
73
|
className: "".concat(prefixCls, "-item-iconContainer-icon")
|
|
74
|
-
}, renderIconNode())),
|
|
74
|
+
}, renderIconNode())), React.createElement("div", {
|
|
75
75
|
className: "".concat(prefixCls, "-item-content")
|
|
76
|
-
},
|
|
76
|
+
}, React.createElement("div", {
|
|
77
77
|
className: "".concat(prefixCls, "-item-title"),
|
|
78
78
|
title: isString(title) ? title : ''
|
|
79
|
-
}, title), description &&
|
|
79
|
+
}, title), description && React.createElement("div", {
|
|
80
80
|
className: "".concat(prefixCls, "-item-description"),
|
|
81
81
|
title: isString(description) ? description : ''
|
|
82
82
|
}, description))));
|
package/es/steps/Steps.js
CHANGED
|
@@ -45,7 +45,7 @@ var Steps = function Steps(props) {
|
|
|
45
45
|
devWarning(Directions.indexOf(direction) === -1, 'steps', "cannot found steps direction '".concat(direction, "'"));
|
|
46
46
|
devWarning(Statuses.indexOf(status) === -1, 'steps', "cannot found steps status '".concat(status, "'"));
|
|
47
47
|
devWarning(LabelPlacements.indexOf(labelPlacement) === -1, 'steps', "cannot found steps labelPlacement '".concat(labelPlacement, "'"));
|
|
48
|
-
var stepsPrefixCls = getPrefixCls(prefixCls, 'steps', customPrefixcls);
|
|
48
|
+
var stepsPrefixCls = getPrefixCls(prefixCls, 'steps', customPrefixcls);
|
|
49
49
|
var stepsClassName = classNames(stepsPrefixCls, _concatInstanceProperty(_context = "".concat(stepsPrefixCls, "-")).call(_context, direction), className, (_classNames = {}, _defineProperty(_classNames, "".concat(stepsPrefixCls, "-leftLable"), labelPlacement === 'left'), _defineProperty(_classNames, "".concat(stepsPrefixCls, "-rightLable"), labelPlacement === 'right'), _defineProperty(_classNames, "".concat(stepsPrefixCls, "-bottomLable"), labelPlacement === 'bottom'), _defineProperty(_classNames, "".concat(stepsPrefixCls, "-topLable"), labelPlacement === 'top'), _classNames));
|
|
50
50
|
var onStepClick = function onStepClick(next) {
|
|
51
51
|
if (canClickCurrentStep || onChange && current !== next) {
|
|
@@ -54,18 +54,18 @@ var Steps = function Steps(props) {
|
|
|
54
54
|
};
|
|
55
55
|
var getIcons = function getIcons() {
|
|
56
56
|
var actualIcons = {};
|
|
57
|
-
actualIcons.finish = icons && icons.finish ||
|
|
57
|
+
actualIcons.finish = icons && icons.finish || React.createElement(Icon, {
|
|
58
58
|
type: "right-bold",
|
|
59
59
|
className: "".concat(stepsPrefixCls, "-iconSize")
|
|
60
60
|
});
|
|
61
|
-
actualIcons.error = icons && icons.error ||
|
|
61
|
+
actualIcons.error = icons && icons.error || React.createElement(Icon, {
|
|
62
62
|
type: "exclamatory",
|
|
63
63
|
className: "".concat(stepsPrefixCls, "-iconSize")
|
|
64
64
|
});
|
|
65
65
|
return actualIcons;
|
|
66
66
|
};
|
|
67
67
|
var stepIcons = getIcons();
|
|
68
|
-
return
|
|
68
|
+
return React.createElement("div", _extends({
|
|
69
69
|
className: stepsClassName,
|
|
70
70
|
style: style
|
|
71
71
|
}, others), _mapInstanceProperty(_context2 = toArray(children)).call(_context2, function (child, index) {
|
|
@@ -89,7 +89,7 @@ var Steps = function Steps(props) {
|
|
|
89
89
|
childProps.status = 'wait';
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
return
|
|
92
|
+
return cloneElement(child, childProps);
|
|
93
93
|
}));
|
|
94
94
|
};
|
|
95
95
|
Steps.displayName = 'Steps';
|
package/es/switch/switch.js
CHANGED
|
@@ -18,7 +18,6 @@ import ConfigContext from '../config-provider/ConfigContext';
|
|
|
18
18
|
import { getCompProps } from '../_utils';
|
|
19
19
|
import { tuple } from '../_utils/type';
|
|
20
20
|
import { useMergedState } from '../_utils/hooks';
|
|
21
|
-
// type SwitchSize = 'large' | 'middle' | 'small'
|
|
22
21
|
export var SwitchSizes = tuple('large', 'small');
|
|
23
22
|
var Switch = function Switch(props) {
|
|
24
23
|
var _context, _classNames;
|
|
@@ -61,19 +60,18 @@ var Switch = function Switch(props) {
|
|
|
61
60
|
}
|
|
62
61
|
return afterChangedChecked;
|
|
63
62
|
}
|
|
64
|
-
// ref
|
|
65
63
|
var switchClasses = classNames(switchPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(switchPrefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames, "".concat(switchPrefixCls, "-disabled"), disabled || loading), _defineProperty(_classNames, "".concat(switchPrefixCls, "-loading"), loading), _defineProperty(_classNames, "".concat(switchPrefixCls, "-checked"), newChecked), _classNames));
|
|
66
|
-
var loadingIcon = loading ?
|
|
64
|
+
var loadingIcon = loading ? React.createElement("span", {
|
|
67
65
|
className: "".concat(switchPrefixCls, "-loading-icon")
|
|
68
|
-
},
|
|
66
|
+
}, React.createElement(Icon, {
|
|
69
67
|
type: "loadding-circle",
|
|
70
68
|
spin: true
|
|
71
69
|
})) : null;
|
|
72
|
-
return
|
|
70
|
+
return React.createElement("span", _extends({
|
|
73
71
|
className: switchClasses
|
|
74
72
|
}, others, {
|
|
75
73
|
onClick: handleClick
|
|
76
|
-
}),
|
|
74
|
+
}), React.createElement("div", {
|
|
77
75
|
className: "".concat(switchPrefixCls, "-inner")
|
|
78
76
|
}, loadingIcon, newChecked ? checkedChildren : unCheckedChildren));
|
|
79
77
|
};
|
package/es/table/api.js
CHANGED
|
@@ -16,19 +16,10 @@ export default function getApi(pipelineRef) {
|
|
|
16
16
|
var _a;
|
|
17
17
|
return (_a = pipelineRef.current.getFooterDataSource) === null || _a === void 0 ? void 0 : _a.bind(pipelineRef.current)();
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
20
|
-
* 清除范围选中内容
|
|
21
|
-
*/
|
|
22
19
|
function clearRangeSelection() {
|
|
23
20
|
var pipeline = pipelineRef.current;
|
|
24
21
|
pipeline.setStateAtKey(rangeSelectionKey, null);
|
|
25
22
|
}
|
|
26
|
-
/**
|
|
27
|
-
* 将目标行滚动到可视位置
|
|
28
|
-
* @param rowIndex 行索引
|
|
29
|
-
* @param position 目标行滚动到的位置,不传则根据目标行相对视口的位置滚动到底部或顶部,可取值为'top' | 'middle' | 'bottom'
|
|
30
|
-
* @returns
|
|
31
|
-
*/
|
|
32
23
|
function ensureRowIndexVisible(rowIndex, position) {
|
|
33
24
|
var _a, _b;
|
|
34
25
|
var pipeline = pipelineRef.current;
|
|
@@ -61,21 +52,14 @@ export default function getApi(pipelineRef) {
|
|
|
61
52
|
} else if (position === 'middle') {
|
|
62
53
|
newScrollPosition = pxMiddle;
|
|
63
54
|
} else if (rowBelowViewport) {
|
|
64
|
-
// 目标行在视口之上,则向上滚动到顶部
|
|
65
55
|
newScrollPosition = pxTop;
|
|
66
56
|
} else if (rowAboveViewport) {
|
|
67
|
-
// 目标行在视口之下,则向下滚动到底部
|
|
68
57
|
newScrollPosition = pxBottom;
|
|
69
58
|
}
|
|
70
59
|
if (newScrollPosition !== null) {
|
|
71
60
|
tableBodyContainer.scrollTop = newScrollPosition;
|
|
72
61
|
}
|
|
73
62
|
}
|
|
74
|
-
/**
|
|
75
|
-
* 将目标列滚动到可视位置
|
|
76
|
-
* @param code 列标识
|
|
77
|
-
* @returns
|
|
78
|
-
*/
|
|
79
63
|
function ensureColumnVisible(code) {
|
|
80
64
|
var _a, _b, _c, _d;
|
|
81
65
|
var pipeline = pipelineRef.current;
|
|
@@ -88,7 +72,6 @@ export default function getApi(pipelineRef) {
|
|
|
88
72
|
var index = _findIndexInstanceProperty(columnNodes).call(columnNodes, function (col) {
|
|
89
73
|
return col.code === code;
|
|
90
74
|
});
|
|
91
|
-
// 固定列也不需要重置滚动条
|
|
92
75
|
if (!column || !tableBodyContainer || (column === null || column === void 0 ? void 0 : column.lock)) return;
|
|
93
76
|
var colLeft = _sliceInstanceProperty(columnNodes).call(columnNodes, 0, index).reduce(function (acc, col) {
|
|
94
77
|
return acc + col.width;
|
|
@@ -109,16 +92,16 @@ export default function getApi(pipelineRef) {
|
|
|
109
92
|
break;
|
|
110
93
|
}
|
|
111
94
|
}
|
|
112
|
-
var colLeftPixel = colLeft;
|
|
95
|
+
var colLeftPixel = colLeft;
|
|
113
96
|
var colRightPixel = colLeftPixel + column.width;
|
|
114
|
-
var viewportWidth = tableBodyContainer.clientWidth;
|
|
115
|
-
var scrollPosition = tableScroll.scrollLeft;
|
|
97
|
+
var viewportWidth = tableBodyContainer.clientWidth;
|
|
98
|
+
var scrollPosition = tableScroll.scrollLeft;
|
|
116
99
|
var vScrollLeft = scrollPosition;
|
|
117
100
|
var vScrollRight = scrollPosition + viewportWidth;
|
|
118
101
|
var pxLeft = colLeftPixel - lockColumnLeft;
|
|
119
102
|
var pxRight = colRightPixel - viewportWidth + lockColumnRight;
|
|
120
|
-
var colBeforeViewport = vScrollLeft > colLeftPixel;
|
|
121
|
-
var colPastViewport = vScrollRight < colRightPixel;
|
|
103
|
+
var colBeforeViewport = vScrollLeft > colLeftPixel;
|
|
104
|
+
var colPastViewport = vScrollRight < colRightPixel;
|
|
122
105
|
var colToSmallForViewport = viewportWidth < column.width;
|
|
123
106
|
var alignColToLeft = colBeforeViewport || colToSmallForViewport;
|
|
124
107
|
var alignColToRight = colPastViewport;
|
package/es/table/table.js
CHANGED
|
@@ -24,7 +24,7 @@ import useFooterDataSource from './feature/useFooterDataSource';
|
|
|
24
24
|
import usecolGroupExtendable from './feature/colGroupExtendable';
|
|
25
25
|
import useRowDrag from './feature/useRowDrag';
|
|
26
26
|
import getApi from './api';
|
|
27
|
-
var Table =
|
|
27
|
+
var Table = forwardRef(function (props, ref) {
|
|
28
28
|
var columns = props.columns,
|
|
29
29
|
dataSource = props.dataSource,
|
|
30
30
|
columnDrag = props.columnDrag,
|
|
@@ -80,19 +80,11 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
80
80
|
});
|
|
81
81
|
var pipelineRef = useRef(pipeline);
|
|
82
82
|
pipelineRef.current = pipeline;
|
|
83
|
-
// if (footerDataSource) {
|
|
84
|
-
// // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
85
|
-
// // @ts-ignore
|
|
86
|
-
// pipeline.footerDataSource(footerDataSource)
|
|
87
|
-
// }
|
|
88
83
|
useImperativeHandle(ref, function () {
|
|
89
84
|
return {
|
|
90
85
|
api: getApi(pipelineRef)
|
|
91
86
|
};
|
|
92
87
|
});
|
|
93
|
-
/* -------------------------------------------------------------------------- */
|
|
94
|
-
/* features */
|
|
95
|
-
/* -------------------------------------------------------------------------- */
|
|
96
88
|
useFilter(pipeline, filter);
|
|
97
89
|
useSort(pipeline, sort);
|
|
98
90
|
useRowSelection(pipeline, rowSelection);
|
|
@@ -107,9 +99,6 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
107
99
|
useMergeCellHover(pipeline);
|
|
108
100
|
useFooterDataSource(pipeline, footerDataSource);
|
|
109
101
|
useRowDrag(pipeline, rowDrag, estimatedRowHeight);
|
|
110
|
-
/* -------------------------------------------------------------------------- */
|
|
111
|
-
/* after useTablePipeline, merge pipeline.getProps result */
|
|
112
|
-
/* -------------------------------------------------------------------------- */
|
|
113
102
|
if (typeof getRowProps === 'function') {
|
|
114
103
|
pipeline.appendRowPropsGetter(getRowProps);
|
|
115
104
|
} else {
|
|
@@ -121,18 +110,18 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
121
110
|
} else {
|
|
122
111
|
devWarning(getTableProps !== undefined, 'table', "parameter 'getTableProps' should be a function but here it is ".concat(getTableProps));
|
|
123
112
|
}
|
|
124
|
-
return
|
|
113
|
+
return React.createElement(BaseTable, _extends({}, pipeline.getProps(), {
|
|
125
114
|
className: tableCls,
|
|
126
115
|
style: style,
|
|
127
116
|
isLoading: isLoading,
|
|
128
117
|
components: {
|
|
129
118
|
LoadingIcon: (components === null || components === void 0 ? void 0 : components.LoadingIcon) || function () {
|
|
130
|
-
return
|
|
119
|
+
return React.createElement(Spin, {
|
|
131
120
|
type: "container"
|
|
132
121
|
});
|
|
133
122
|
},
|
|
134
123
|
EmptyContent: (components === null || components === void 0 ? void 0 : components.EmptyContent) || function () {
|
|
135
|
-
return
|
|
124
|
+
return React.createElement(Empty, null);
|
|
136
125
|
}
|
|
137
126
|
},
|
|
138
127
|
useVirtual: useVirtual,
|
package/es/tabs/active-line.js
CHANGED
|
@@ -9,16 +9,12 @@ var Line = function Line(props) {
|
|
|
9
9
|
width = props.width,
|
|
10
10
|
className = props.className;
|
|
11
11
|
var activeLinePrefixCls = getPrefixCls(prefixCls, 'active-line');
|
|
12
|
-
var activeLineClasses = classNames(activeLinePrefixCls, className, {
|
|
13
|
-
// [`${tabPanePrefixCls}-size-${size}`]: size, // 尺寸样式
|
|
14
|
-
// [`${tabPanePrefixCls}-disabled`]: disabled || loadingDisabled, // 禁用态样式
|
|
15
|
-
// [`${tabPanePrefixCls}-loading`]: loading, // 加载中样式
|
|
16
|
-
});
|
|
12
|
+
var activeLineClasses = classNames(activeLinePrefixCls, className, {});
|
|
17
13
|
var activeLineStyle = {
|
|
18
14
|
left: "".concat(left, "px"),
|
|
19
15
|
width: "".concat(width, "px")
|
|
20
16
|
};
|
|
21
|
-
return
|
|
17
|
+
return React.createElement("span", {
|
|
22
18
|
className: activeLineClasses,
|
|
23
19
|
style: activeLineStyle
|
|
24
20
|
});
|
package/es/tabs/arrow-button.js
CHANGED
|
@@ -17,12 +17,12 @@ var ArrowButton = function ArrowButton(props) {
|
|
|
17
17
|
onClick = props.onClick;
|
|
18
18
|
var arrowButtonPrefixCls = getPrefixCls(prefixCls, 'arrow-button');
|
|
19
19
|
var arrowButtonClasses = classNames(arrowButtonPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(arrowButtonPrefixCls, "-dynamic"), (context === null || context === void 0 ? void 0 : context.type) === 'dynamic'), _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(arrowButtonPrefixCls, "-")).call(_context, direction), direction), _defineProperty(_classNames, "".concat(arrowButtonPrefixCls, "-line"), (context === null || context === void 0 ? void 0 : context.type) === 'line'), _defineProperty(_classNames, "".concat(arrowButtonPrefixCls, "-disabled"), disabled), _classNames));
|
|
20
|
-
return
|
|
20
|
+
return React.createElement("span", {
|
|
21
21
|
className: arrowButtonClasses,
|
|
22
22
|
onClick: onClick
|
|
23
|
-
}, direction === 'left' ?
|
|
23
|
+
}, direction === 'left' ? React.createElement(Icon, {
|
|
24
24
|
type: "arrow-left"
|
|
25
|
-
}) :
|
|
25
|
+
}) : React.createElement(Icon, {
|
|
26
26
|
type: "arrow-right"
|
|
27
27
|
}));
|
|
28
28
|
};
|
package/es/tabs/context.js
CHANGED
package/es/tabs/index.js
CHANGED
package/es/tabs/tab-pane.js
CHANGED
|
@@ -49,7 +49,7 @@ var TabPane = function TabPane(props) {
|
|
|
49
49
|
var event = function event() {
|
|
50
50
|
op.props.onClick && op.props.onClick(id);
|
|
51
51
|
};
|
|
52
|
-
return
|
|
52
|
+
return React.createElement("span", {
|
|
53
53
|
key: index,
|
|
54
54
|
onClick: event
|
|
55
55
|
}, op);
|
|
@@ -61,22 +61,22 @@ var TabPane = function TabPane(props) {
|
|
|
61
61
|
context === null || context === void 0 ? void 0 : context.getTriggerKey(id);
|
|
62
62
|
};
|
|
63
63
|
if (tabPaneProps.type !== 'dynamic') {
|
|
64
|
-
return
|
|
64
|
+
return React.createElement("span", {
|
|
65
65
|
ref: tabPaneRef,
|
|
66
66
|
className: tabPaneBoxClasses,
|
|
67
67
|
onClick: handleClick
|
|
68
|
-
},
|
|
68
|
+
}, React.createElement("span", {
|
|
69
69
|
className: tabPaneTextClasses
|
|
70
70
|
}, tab));
|
|
71
71
|
}
|
|
72
|
-
return
|
|
72
|
+
return React.createElement("span", {
|
|
73
73
|
className: tabPaneBoxClasses,
|
|
74
74
|
onContextMenu: handleContextMenu
|
|
75
|
-
},
|
|
75
|
+
}, React.createElement("span", {
|
|
76
76
|
ref: tabPaneRef,
|
|
77
77
|
className: tabPaneTextClasses,
|
|
78
78
|
onClick: handleClick
|
|
79
|
-
}, tab),
|
|
79
|
+
}, tab), React.createElement("span", {
|
|
80
80
|
className: operationsClasses
|
|
81
81
|
}, renderOperations()));
|
|
82
82
|
};
|