@kdcloudjs/kdesign 1.8.12 → 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 +5 -3
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +2 -2
- 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 +34 -103
- 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 +2 -0
- package/es/popper/index.js +9 -15
- 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 +34 -103
- 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 +2 -0
- package/lib/popper/index.js +9 -15
- 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
|
@@ -42,7 +42,7 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
42
42
|
getPrefixCls = _useContext.getPrefixCls,
|
|
43
43
|
prefixCls = _useContext.prefixCls,
|
|
44
44
|
userDefaultProps = _useContext.compDefaultProps;
|
|
45
|
-
var splitPanelProps = (0, _utils.getCompProps)('SplitPanel', userDefaultProps, props);
|
|
45
|
+
var splitPanelProps = (0, _utils.getCompProps)('SplitPanel', userDefaultProps, props);
|
|
46
46
|
var customPrefixcls = splitPanelProps.prefixCls,
|
|
47
47
|
className = splitPanelProps.className,
|
|
48
48
|
style = splitPanelProps.style,
|
|
@@ -99,27 +99,22 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
99
99
|
(0, _react.useEffect)(function () {
|
|
100
100
|
setAnotherOffset(100 - offset);
|
|
101
101
|
}, [offset]);
|
|
102
|
-
// 将defaultOffset转换成百分比
|
|
103
102
|
var getComputeOffset = (0, _react.useCallback)(function (value) {
|
|
104
103
|
var newVal = typeof value === 'string' ? pxToScale(value, outerWrapper.current[offsetSizeProperty]) : calcNumber(value);
|
|
105
104
|
return newVal * 100;
|
|
106
105
|
}, [offsetSizeProperty]);
|
|
107
|
-
// 将min和max转换为百分比
|
|
108
106
|
var getComputedThresholdValue = (0, _react.useCallback)(function (val) {
|
|
109
107
|
var size = outerWrapper.current[offsetSizeProperty];
|
|
110
108
|
var newVal = typeof val === 'string' ? pxToScale(val, size) : calcNumber(val);
|
|
111
109
|
return newVal * 100;
|
|
112
110
|
}, [offsetSizeProperty]);
|
|
113
|
-
// 初始化分割线、min和max
|
|
114
111
|
var initPanel = (0, _react.useCallback)(function () {
|
|
115
112
|
var thresholdMin = getComputedThresholdValue(min);
|
|
116
113
|
var thresholdMax = 100 - getComputedThresholdValue(max);
|
|
117
114
|
var computeOffset = getComputeOffset(defaultSplit);
|
|
118
|
-
// 边界处理,计算出的min和max进行判断
|
|
119
115
|
if (thresholdMin > thresholdMax) {
|
|
120
116
|
thresholdMin = thresholdMax;
|
|
121
117
|
}
|
|
122
|
-
// 计算出的offset值的边界处理
|
|
123
118
|
if (computeOffset < thresholdMin) {
|
|
124
119
|
computeOffset = thresholdMin;
|
|
125
120
|
} else if (computeOffset > thresholdMax) {
|
|
@@ -149,7 +144,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
149
144
|
};
|
|
150
145
|
}, [initPanel]);
|
|
151
146
|
var handleMove = (0, _react.useCallback)(function (e) {
|
|
152
|
-
// 将鼠标移动距离与offset进行处理
|
|
153
147
|
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
|
154
148
|
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
|
155
149
|
var wrapperOffset = outerWrapper.current.getBoundingClientRect()[pos];
|
|
@@ -157,7 +151,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
157
151
|
var moveInstance = mouseOffset - wrapperOffset;
|
|
158
152
|
var outerWidth = outerWrapper.current[offsetSizeProperty];
|
|
159
153
|
var value = pxToScale(moveInstance, outerWidth) * 100;
|
|
160
|
-
// 边界阈值处理
|
|
161
154
|
if (value <= computeMin) value = Math.max(value, computeMin);
|
|
162
155
|
if (value >= computeMax) value = Math.min(value, computeMax);
|
|
163
156
|
setOffset(value);
|
|
@@ -199,7 +192,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
199
192
|
return 0;
|
|
200
193
|
}
|
|
201
194
|
};
|
|
202
|
-
// 折叠第一个面板
|
|
203
195
|
var hideFirstPanel = function hideFirstPanel(e, direction) {
|
|
204
196
|
if (disabled) return;
|
|
205
197
|
e.persist();
|
|
@@ -207,7 +199,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
207
199
|
changeSplit(pos);
|
|
208
200
|
onFold && onFold(e, direction);
|
|
209
201
|
};
|
|
210
|
-
// 折叠第二个面板
|
|
211
202
|
var hideSecondPanel = function hideSecondPanel(e, direction) {
|
|
212
203
|
if (disabled) return;
|
|
213
204
|
e.persist();
|
|
@@ -215,7 +206,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
215
206
|
changeSplit(pos);
|
|
216
207
|
onFold && onFold(e, direction);
|
|
217
208
|
};
|
|
218
|
-
// 处理lineStyle
|
|
219
209
|
var handleLineStyle = (0, _react.useCallback)(function (mode) {
|
|
220
210
|
if (typeof lineStyle === 'function') {
|
|
221
211
|
return lineStyle(mode);
|
|
@@ -228,7 +218,6 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
228
218
|
vertical: handleLineStyle('vertical') || {}
|
|
229
219
|
};
|
|
230
220
|
}, [handleLineStyle]);
|
|
231
|
-
// 处理自定义折叠图标
|
|
232
221
|
var handleFoldIcons = (0, _react.useCallback)(function (mode) {
|
|
233
222
|
if (typeof foldIcons === 'function') {
|
|
234
223
|
return foldIcons(mode);
|
|
@@ -252,19 +241,19 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
252
241
|
'is-disabled': disabled,
|
|
253
242
|
'is-active': isFirstPanelHide || isSecondPanelHide
|
|
254
243
|
});
|
|
255
|
-
return
|
|
244
|
+
return _react.default.createElement("div", {
|
|
256
245
|
className: cls,
|
|
257
246
|
style: style,
|
|
258
247
|
ref: outerWrapper
|
|
259
|
-
},
|
|
248
|
+
}, _react.default.createElement("div", {
|
|
260
249
|
className: (0, _concat.default)(_context = "".concat(splitPanelPrefixCls, "-")).call(_context, mode)
|
|
261
|
-
},
|
|
250
|
+
}, _react.default.createElement("div", {
|
|
262
251
|
className: getPanelCls(pos),
|
|
263
252
|
style: (0, _defineProperty2.default)({}, oppositePos, "".concat(anotherOffset, "%"))
|
|
264
|
-
}, firstSlot),
|
|
253
|
+
}, firstSlot), _react.default.createElement("div", {
|
|
265
254
|
className: triggerWrapperCls,
|
|
266
255
|
style: (0, _defineProperty2.default)({}, pos, "".concat(offset, "%"))
|
|
267
|
-
},
|
|
256
|
+
}, _react.default.createElement(_trigger.default, {
|
|
268
257
|
style: triggerLineStyle[mode],
|
|
269
258
|
mode: oppositeMode,
|
|
270
259
|
prefixCls: splitPanelPrefixCls,
|
|
@@ -274,7 +263,7 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
274
263
|
hideSecondPanel: hideSecondPanel,
|
|
275
264
|
foldIcons: triggerFoldIcons[mode],
|
|
276
265
|
handleMousedown: handleMousedown
|
|
277
|
-
})),
|
|
266
|
+
})), _react.default.createElement("div", {
|
|
278
267
|
className: getPanelCls(oppositePos),
|
|
279
268
|
style: (0, _defineProperty2.default)({}, pos, "".concat(offset, "%"))
|
|
280
269
|
}, secondSlot)));
|
|
@@ -38,27 +38,27 @@ var Trigger = function Trigger(props) {
|
|
|
38
38
|
var secondIconPos = isVertical ? 'right' : 'bottom';
|
|
39
39
|
var firstIconType = isVertical ? 'arrow-left-solid' : 'arrow-up-solid';
|
|
40
40
|
var secondIconType = isVertical ? 'arrow-right-solid' : 'arrow-down-solid';
|
|
41
|
-
return
|
|
41
|
+
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("span", {
|
|
42
42
|
className: getArrowCls(firstIconPos),
|
|
43
43
|
onClick: function onClick(e) {
|
|
44
44
|
return hideFirstPanel(e, firstIconPos);
|
|
45
45
|
}
|
|
46
|
-
}, firstCustomIcons ||
|
|
46
|
+
}, firstCustomIcons || _react.default.createElement(_icon.default, {
|
|
47
47
|
type: firstIconType
|
|
48
|
-
})),
|
|
48
|
+
})), _react.default.createElement("span", {
|
|
49
49
|
className: getArrowCls(secondIconPos),
|
|
50
50
|
onClick: function onClick(e) {
|
|
51
51
|
return hideSecondPanel(e, secondIconPos);
|
|
52
52
|
}
|
|
53
|
-
}, secondCustomIcons ||
|
|
53
|
+
}, secondCustomIcons || _react.default.createElement(_icon.default, {
|
|
54
54
|
type: secondIconType
|
|
55
55
|
})));
|
|
56
56
|
};
|
|
57
|
-
return
|
|
57
|
+
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement("div", {
|
|
58
58
|
className: triggerCls,
|
|
59
59
|
style: style,
|
|
60
60
|
onMouseDown: handleMousedown
|
|
61
61
|
}), renderFoldIcons());
|
|
62
62
|
};
|
|
63
|
-
var _default =
|
|
63
|
+
var _default = _react.default.memo(Trigger);
|
|
64
64
|
exports.default = _default;
|
package/lib/stepper/stepper.js
CHANGED
|
@@ -68,7 +68,6 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
68
68
|
_useMergedState2 = (0, _slicedToArray2.default)(_useMergedState, 2),
|
|
69
69
|
value = _useMergedState2[0],
|
|
70
70
|
setValue = _useMergedState2[1];
|
|
71
|
-
// class
|
|
72
71
|
var getStepBtnClassNames = function getStepBtnClassNames(stepType, btnType) {
|
|
73
72
|
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _classNames;
|
|
74
73
|
var isDisabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
@@ -79,26 +78,26 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
79
78
|
return null;
|
|
80
79
|
}
|
|
81
80
|
var decreaseClassName = getStepBtnClassNames('base', 'decrease', showPlusdisabled || disabled);
|
|
82
|
-
return
|
|
81
|
+
return _react.default.createElement("span", {
|
|
83
82
|
className: decreaseClassName,
|
|
84
83
|
onMouseDown: function onMouseDown() {
|
|
85
84
|
if (disabled) return;
|
|
86
85
|
handleStepMouseDown('minus');
|
|
87
86
|
}
|
|
88
|
-
},
|
|
87
|
+
}, _react.default.createElement(_icon.default, {
|
|
89
88
|
className: "".concat(inputPrefixCls, "-icon"),
|
|
90
89
|
type: "reduce"
|
|
91
90
|
}));
|
|
92
91
|
};
|
|
93
92
|
var getStepSuffix = function getStepSuffix() {
|
|
94
93
|
var increaseClassName = getStepBtnClassNames('base', 'increase', showMinusdisabled || disabled);
|
|
95
|
-
return type === 'embed' ? getEmbedStepView() :
|
|
94
|
+
return type === 'embed' ? getEmbedStepView() : _react.default.createElement("span", {
|
|
96
95
|
className: increaseClassName,
|
|
97
96
|
onMouseDown: function onMouseDown() {
|
|
98
97
|
if (disabled) return;
|
|
99
98
|
handleStepMouseDown('plus');
|
|
100
99
|
}
|
|
101
|
-
},
|
|
100
|
+
}, _react.default.createElement(_icon.default, {
|
|
102
101
|
className: "".concat(inputPrefixCls, "-icon"),
|
|
103
102
|
type: "add"
|
|
104
103
|
}));
|
|
@@ -188,29 +187,29 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
188
187
|
var embedStepClassName = getStepBtnClassNames('embed');
|
|
189
188
|
var plusClassName = (0, _classnames.default)("".concat(inputPrefixCls, "-embedStep-plus"), (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, stepBtnClassName, stepBtnClassName), (0, _defineProperty2.default)(_classNames2, "".concat(inputPrefixCls, "-embedStep-disabled"), showMinusdisabled || disabled), _classNames2));
|
|
190
189
|
var minusClassName = (0, _classnames.default)("".concat(inputPrefixCls, "-embedStep-minus"), (_classNames3 = {}, (0, _defineProperty2.default)(_classNames3, stepBtnClassName, stepBtnClassName), (0, _defineProperty2.default)(_classNames3, "".concat(inputPrefixCls, "-embedStep-disabled"), showPlusdisabled || disabled), _classNames3));
|
|
191
|
-
return
|
|
190
|
+
return _react.default.createElement("span", {
|
|
192
191
|
className: embedStepClassName
|
|
193
|
-
},
|
|
192
|
+
}, _react.default.createElement("span", {
|
|
194
193
|
className: plusClassName,
|
|
195
194
|
onMouseDown: function onMouseDown() {
|
|
196
195
|
if (disabled) return;
|
|
197
196
|
handleStepMouseDown('plus');
|
|
198
197
|
}
|
|
199
|
-
},
|
|
198
|
+
}, _react.default.createElement(_icon.default, {
|
|
200
199
|
className: "".concat(inputPrefixCls, "-icon"),
|
|
201
200
|
type: "arrow-up"
|
|
202
|
-
})),
|
|
201
|
+
})), _react.default.createElement("span", {
|
|
203
202
|
className: minusClassName,
|
|
204
203
|
onMouseDown: function onMouseDown() {
|
|
205
204
|
if (disabled) return;
|
|
206
205
|
handleStepMouseDown('minus');
|
|
207
206
|
}
|
|
208
|
-
},
|
|
207
|
+
}, _react.default.createElement(_icon.default, {
|
|
209
208
|
className: "".concat(inputPrefixCls, "-icon"),
|
|
210
209
|
type: "arrow-down"
|
|
211
210
|
})));
|
|
212
211
|
};
|
|
213
|
-
return
|
|
212
|
+
return _react.default.createElement(_inputNumber.default, (0, _extends2.default)({}, (0, _omit.omit)(inputNumberProps, ['step', 'type', 'stepBtnClassName', 'value', 'defaultValue']), {
|
|
214
213
|
ref: inputNumberRef,
|
|
215
214
|
className: "".concat(inputPrefixCls, "-stepper"),
|
|
216
215
|
stepperrref: stepperrref,
|
|
@@ -220,7 +219,7 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
220
219
|
onChange: handleChange
|
|
221
220
|
}));
|
|
222
221
|
};
|
|
223
|
-
var Stepper =
|
|
222
|
+
var Stepper = _react.default.forwardRef(InternalStepper);
|
|
224
223
|
Stepper.displayName = 'Stepper';
|
|
225
224
|
var _default = Stepper;
|
|
226
225
|
exports.default = _default;
|
package/lib/steps/Step.js
CHANGED
|
@@ -62,28 +62,28 @@ var Step = function Step(props) {
|
|
|
62
62
|
} else {
|
|
63
63
|
iconNode = stepNumber;
|
|
64
64
|
}
|
|
65
|
-
return
|
|
65
|
+
return _react.default.createElement("span", {
|
|
66
66
|
className: "".concat(prefixCls, "-icon")
|
|
67
67
|
}, iconNode);
|
|
68
68
|
};
|
|
69
69
|
var iconContainerClassName = (0, _classnames.default)("".concat(prefixCls, "-item-iconContainer"), (0, _defineProperty2.default)({}, "".concat(prefixCls, "-item-iconContainer-finish"), current > stepIndex));
|
|
70
|
-
return
|
|
70
|
+
return _react.default.createElement("div", (0, _extends2.default)({}, others, {
|
|
71
71
|
className: stepClassName,
|
|
72
72
|
style: style,
|
|
73
73
|
onClick: handleClick
|
|
74
|
-
}),
|
|
74
|
+
}), _react.default.createElement("div", {
|
|
75
75
|
onClick: onClick,
|
|
76
76
|
className: "".concat(prefixCls, "-item-container")
|
|
77
|
-
},
|
|
77
|
+
}, _react.default.createElement("div", {
|
|
78
78
|
className: iconContainerClassName
|
|
79
|
-
},
|
|
79
|
+
}, _react.default.createElement("div", {
|
|
80
80
|
className: "".concat(prefixCls, "-item-iconContainer-icon")
|
|
81
|
-
}, renderIconNode())),
|
|
81
|
+
}, renderIconNode())), _react.default.createElement("div", {
|
|
82
82
|
className: "".concat(prefixCls, "-item-content")
|
|
83
|
-
},
|
|
83
|
+
}, _react.default.createElement("div", {
|
|
84
84
|
className: "".concat(prefixCls, "-item-title"),
|
|
85
85
|
title: isString(title) ? title : ''
|
|
86
|
-
}, title), description &&
|
|
86
|
+
}, title), description && _react.default.createElement("div", {
|
|
87
87
|
className: "".concat(prefixCls, "-item-description"),
|
|
88
88
|
title: isString(description) ? description : ''
|
|
89
89
|
}, description))));
|
package/lib/steps/Steps.js
CHANGED
|
@@ -57,7 +57,7 @@ var Steps = function Steps(props) {
|
|
|
57
57
|
(0, _devwarning.default)(_interface.Directions.indexOf(direction) === -1, 'steps', "cannot found steps direction '".concat(direction, "'"));
|
|
58
58
|
(0, _devwarning.default)(_interface.Statuses.indexOf(status) === -1, 'steps', "cannot found steps status '".concat(status, "'"));
|
|
59
59
|
(0, _devwarning.default)(_interface.LabelPlacements.indexOf(labelPlacement) === -1, 'steps', "cannot found steps labelPlacement '".concat(labelPlacement, "'"));
|
|
60
|
-
var stepsPrefixCls = getPrefixCls(prefixCls, 'steps', customPrefixcls);
|
|
60
|
+
var stepsPrefixCls = getPrefixCls(prefixCls, 'steps', customPrefixcls);
|
|
61
61
|
var stepsClassName = (0, _classnames.default)(stepsPrefixCls, (0, _concat.default)(_context = "".concat(stepsPrefixCls, "-")).call(_context, direction), className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-leftLable"), labelPlacement === 'left'), (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-rightLable"), labelPlacement === 'right'), (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-bottomLable"), labelPlacement === 'bottom'), (0, _defineProperty2.default)(_classNames, "".concat(stepsPrefixCls, "-topLable"), labelPlacement === 'top'), _classNames));
|
|
62
62
|
var onStepClick = function onStepClick(next) {
|
|
63
63
|
if (canClickCurrentStep || onChange && current !== next) {
|
|
@@ -66,18 +66,18 @@ var Steps = function Steps(props) {
|
|
|
66
66
|
};
|
|
67
67
|
var getIcons = function getIcons() {
|
|
68
68
|
var actualIcons = {};
|
|
69
|
-
actualIcons.finish = icons && icons.finish ||
|
|
69
|
+
actualIcons.finish = icons && icons.finish || _react.default.createElement(_index.Icon, {
|
|
70
70
|
type: "right-bold",
|
|
71
71
|
className: "".concat(stepsPrefixCls, "-iconSize")
|
|
72
72
|
});
|
|
73
|
-
actualIcons.error = icons && icons.error ||
|
|
73
|
+
actualIcons.error = icons && icons.error || _react.default.createElement(_index.Icon, {
|
|
74
74
|
type: "exclamatory",
|
|
75
75
|
className: "".concat(stepsPrefixCls, "-iconSize")
|
|
76
76
|
});
|
|
77
77
|
return actualIcons;
|
|
78
78
|
};
|
|
79
79
|
var stepIcons = getIcons();
|
|
80
|
-
return
|
|
80
|
+
return _react.default.createElement("div", (0, _extends2.default)({
|
|
81
81
|
className: stepsClassName,
|
|
82
82
|
style: style
|
|
83
83
|
}, others), (0, _map.default)(_context2 = (0, _reactChildren.toArray)(children)).call(_context2, function (child, index) {
|
|
@@ -101,7 +101,7 @@ var Steps = function Steps(props) {
|
|
|
101
101
|
childProps.status = 'wait';
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
return
|
|
104
|
+
return (0, _react.cloneElement)(child, childProps);
|
|
105
105
|
}));
|
|
106
106
|
};
|
|
107
107
|
Steps.displayName = 'Steps';
|
package/lib/switch/switch.js
CHANGED
|
@@ -30,7 +30,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
30
30
|
}
|
|
31
31
|
return t;
|
|
32
32
|
};
|
|
33
|
-
// type SwitchSize = 'large' | 'middle' | 'small'
|
|
34
33
|
var SwitchSizes = (0, _type.tuple)('large', 'small');
|
|
35
34
|
exports.SwitchSizes = SwitchSizes;
|
|
36
35
|
var Switch = function Switch(props) {
|
|
@@ -74,19 +73,18 @@ var Switch = function Switch(props) {
|
|
|
74
73
|
}
|
|
75
74
|
return afterChangedChecked;
|
|
76
75
|
}
|
|
77
|
-
// ref
|
|
78
76
|
var switchClasses = (0, _classnames.default)(switchPrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(switchPrefixCls, "-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames, "".concat(switchPrefixCls, "-disabled"), disabled || loading), (0, _defineProperty2.default)(_classNames, "".concat(switchPrefixCls, "-loading"), loading), (0, _defineProperty2.default)(_classNames, "".concat(switchPrefixCls, "-checked"), newChecked), _classNames));
|
|
79
|
-
var loadingIcon = loading ?
|
|
77
|
+
var loadingIcon = loading ? _react.default.createElement("span", {
|
|
80
78
|
className: "".concat(switchPrefixCls, "-loading-icon")
|
|
81
|
-
},
|
|
79
|
+
}, _react.default.createElement(_icon.default, {
|
|
82
80
|
type: "loadding-circle",
|
|
83
81
|
spin: true
|
|
84
82
|
})) : null;
|
|
85
|
-
return
|
|
83
|
+
return _react.default.createElement("span", (0, _extends2.default)({
|
|
86
84
|
className: switchClasses
|
|
87
85
|
}, others, {
|
|
88
86
|
onClick: handleClick
|
|
89
|
-
}),
|
|
87
|
+
}), _react.default.createElement("div", {
|
|
90
88
|
className: "".concat(switchPrefixCls, "-inner")
|
|
91
89
|
}, loadingIcon, newChecked ? checkedChildren : unCheckedChildren));
|
|
92
90
|
};
|
package/lib/table/api.js
CHANGED
|
@@ -23,19 +23,10 @@ function getApi(pipelineRef) {
|
|
|
23
23
|
var _a;
|
|
24
24
|
return (_a = pipelineRef.current.getFooterDataSource) === null || _a === void 0 ? void 0 : _a.bind(pipelineRef.current)();
|
|
25
25
|
}
|
|
26
|
-
/**
|
|
27
|
-
* 清除范围选中内容
|
|
28
|
-
*/
|
|
29
26
|
function clearRangeSelection() {
|
|
30
27
|
var pipeline = pipelineRef.current;
|
|
31
28
|
pipeline.setStateAtKey(_rangeSelection.rangeSelectionKey, null);
|
|
32
29
|
}
|
|
33
|
-
/**
|
|
34
|
-
* 将目标行滚动到可视位置
|
|
35
|
-
* @param rowIndex 行索引
|
|
36
|
-
* @param position 目标行滚动到的位置,不传则根据目标行相对视口的位置滚动到底部或顶部,可取值为'top' | 'middle' | 'bottom'
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
30
|
function ensureRowIndexVisible(rowIndex, position) {
|
|
40
31
|
var _a, _b;
|
|
41
32
|
var pipeline = pipelineRef.current;
|
|
@@ -68,21 +59,14 @@ function getApi(pipelineRef) {
|
|
|
68
59
|
} else if (position === 'middle') {
|
|
69
60
|
newScrollPosition = pxMiddle;
|
|
70
61
|
} else if (rowBelowViewport) {
|
|
71
|
-
// 目标行在视口之上,则向上滚动到顶部
|
|
72
62
|
newScrollPosition = pxTop;
|
|
73
63
|
} else if (rowAboveViewport) {
|
|
74
|
-
// 目标行在视口之下,则向下滚动到底部
|
|
75
64
|
newScrollPosition = pxBottom;
|
|
76
65
|
}
|
|
77
66
|
if (newScrollPosition !== null) {
|
|
78
67
|
tableBodyContainer.scrollTop = newScrollPosition;
|
|
79
68
|
}
|
|
80
69
|
}
|
|
81
|
-
/**
|
|
82
|
-
* 将目标列滚动到可视位置
|
|
83
|
-
* @param code 列标识
|
|
84
|
-
* @returns
|
|
85
|
-
*/
|
|
86
70
|
function ensureColumnVisible(code) {
|
|
87
71
|
var _a, _b, _c, _d;
|
|
88
72
|
var pipeline = pipelineRef.current;
|
|
@@ -95,7 +79,6 @@ function getApi(pipelineRef) {
|
|
|
95
79
|
var index = (0, _findIndex.default)(columnNodes).call(columnNodes, function (col) {
|
|
96
80
|
return col.code === code;
|
|
97
81
|
});
|
|
98
|
-
// 固定列也不需要重置滚动条
|
|
99
82
|
if (!column || !tableBodyContainer || (column === null || column === void 0 ? void 0 : column.lock)) return;
|
|
100
83
|
var colLeft = (0, _slice.default)(columnNodes).call(columnNodes, 0, index).reduce(function (acc, col) {
|
|
101
84
|
return acc + col.width;
|
|
@@ -116,16 +99,16 @@ function getApi(pipelineRef) {
|
|
|
116
99
|
break;
|
|
117
100
|
}
|
|
118
101
|
}
|
|
119
|
-
var colLeftPixel = colLeft;
|
|
102
|
+
var colLeftPixel = colLeft;
|
|
120
103
|
var colRightPixel = colLeftPixel + column.width;
|
|
121
|
-
var viewportWidth = tableBodyContainer.clientWidth;
|
|
122
|
-
var scrollPosition = tableScroll.scrollLeft;
|
|
104
|
+
var viewportWidth = tableBodyContainer.clientWidth;
|
|
105
|
+
var scrollPosition = tableScroll.scrollLeft;
|
|
123
106
|
var vScrollLeft = scrollPosition;
|
|
124
107
|
var vScrollRight = scrollPosition + viewportWidth;
|
|
125
108
|
var pxLeft = colLeftPixel - lockColumnLeft;
|
|
126
109
|
var pxRight = colRightPixel - viewportWidth + lockColumnRight;
|
|
127
|
-
var colBeforeViewport = vScrollLeft > colLeftPixel;
|
|
128
|
-
var colPastViewport = vScrollRight < colRightPixel;
|
|
110
|
+
var colBeforeViewport = vScrollLeft > colLeftPixel;
|
|
111
|
+
var colPastViewport = vScrollRight < colRightPixel;
|
|
129
112
|
var colToSmallForViewport = viewportWidth < column.width;
|
|
130
113
|
var alignColToLeft = colBeforeViewport || colToSmallForViewport;
|
|
131
114
|
var alignColToRight = colPastViewport;
|
package/lib/table/table.js
CHANGED
|
@@ -36,7 +36,7 @@ var _useRowDrag = _interopRequireDefault(require("./feature/useRowDrag"));
|
|
|
36
36
|
var _api = _interopRequireDefault(require("./api"));
|
|
37
37
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
38
38
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
|
-
var Table =
|
|
39
|
+
var Table = (0, _react.forwardRef)(function (props, ref) {
|
|
40
40
|
var columns = props.columns,
|
|
41
41
|
dataSource = props.dataSource,
|
|
42
42
|
columnDrag = props.columnDrag,
|
|
@@ -92,19 +92,11 @@ var Table = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
92
92
|
});
|
|
93
93
|
var pipelineRef = (0, _react.useRef)(pipeline);
|
|
94
94
|
pipelineRef.current = pipeline;
|
|
95
|
-
// if (footerDataSource) {
|
|
96
|
-
// // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
97
|
-
// // @ts-ignore
|
|
98
|
-
// pipeline.footerDataSource(footerDataSource)
|
|
99
|
-
// }
|
|
100
95
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
101
96
|
return {
|
|
102
97
|
api: (0, _api.default)(pipelineRef)
|
|
103
98
|
};
|
|
104
99
|
});
|
|
105
|
-
/* -------------------------------------------------------------------------- */
|
|
106
|
-
/* features */
|
|
107
|
-
/* -------------------------------------------------------------------------- */
|
|
108
100
|
(0, _filter2.default)(pipeline, filter);
|
|
109
101
|
(0, _sort2.default)(pipeline, sort);
|
|
110
102
|
(0, _rowSelection.default)(pipeline, rowSelection);
|
|
@@ -119,9 +111,6 @@ var Table = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
119
111
|
(0, _mergeCellHover.default)(pipeline);
|
|
120
112
|
(0, _useFooterDataSource.default)(pipeline, footerDataSource);
|
|
121
113
|
(0, _useRowDrag.default)(pipeline, rowDrag, estimatedRowHeight);
|
|
122
|
-
/* -------------------------------------------------------------------------- */
|
|
123
|
-
/* after useTablePipeline, merge pipeline.getProps result */
|
|
124
|
-
/* -------------------------------------------------------------------------- */
|
|
125
114
|
if (typeof getRowProps === 'function') {
|
|
126
115
|
pipeline.appendRowPropsGetter(getRowProps);
|
|
127
116
|
} else {
|
|
@@ -133,18 +122,18 @@ var Table = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
133
122
|
} else {
|
|
134
123
|
(0, _devwarning.default)(getTableProps !== undefined, 'table', "parameter 'getTableProps' should be a function but here it is ".concat(getTableProps));
|
|
135
124
|
}
|
|
136
|
-
return
|
|
125
|
+
return _react.default.createElement(_table.Table, (0, _extends2.default)({}, pipeline.getProps(), {
|
|
137
126
|
className: tableCls,
|
|
138
127
|
style: style,
|
|
139
128
|
isLoading: isLoading,
|
|
140
129
|
components: {
|
|
141
130
|
LoadingIcon: (components === null || components === void 0 ? void 0 : components.LoadingIcon) || function () {
|
|
142
|
-
return
|
|
131
|
+
return _react.default.createElement(_index3.Spin, {
|
|
143
132
|
type: "container"
|
|
144
133
|
});
|
|
145
134
|
},
|
|
146
135
|
EmptyContent: (components === null || components === void 0 ? void 0 : components.EmptyContent) || function () {
|
|
147
|
-
return
|
|
136
|
+
return _react.default.createElement(_index3.Empty, null);
|
|
148
137
|
}
|
|
149
138
|
},
|
|
150
139
|
useVirtual: useVirtual,
|
package/lib/tabs/active-line.js
CHANGED
|
@@ -21,16 +21,12 @@ var Line = function Line(props) {
|
|
|
21
21
|
width = props.width,
|
|
22
22
|
className = props.className;
|
|
23
23
|
var activeLinePrefixCls = getPrefixCls(prefixCls, 'active-line');
|
|
24
|
-
var activeLineClasses = (0, _classnames.default)(activeLinePrefixCls, className, {
|
|
25
|
-
// [`${tabPanePrefixCls}-size-${size}`]: size, // 尺寸样式
|
|
26
|
-
// [`${tabPanePrefixCls}-disabled`]: disabled || loadingDisabled, // 禁用态样式
|
|
27
|
-
// [`${tabPanePrefixCls}-loading`]: loading, // 加载中样式
|
|
28
|
-
});
|
|
24
|
+
var activeLineClasses = (0, _classnames.default)(activeLinePrefixCls, className, {});
|
|
29
25
|
var activeLineStyle = {
|
|
30
26
|
left: "".concat(left, "px"),
|
|
31
27
|
width: "".concat(width, "px")
|
|
32
28
|
};
|
|
33
|
-
return
|
|
29
|
+
return _react.default.createElement("span", {
|
|
34
30
|
className: activeLineClasses,
|
|
35
31
|
style: activeLineStyle
|
|
36
32
|
});
|
package/lib/tabs/arrow-button.js
CHANGED
|
@@ -29,12 +29,12 @@ var ArrowButton = function ArrowButton(props) {
|
|
|
29
29
|
onClick = props.onClick;
|
|
30
30
|
var arrowButtonPrefixCls = getPrefixCls(prefixCls, 'arrow-button');
|
|
31
31
|
var arrowButtonClasses = (0, _classnames.default)(arrowButtonPrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(arrowButtonPrefixCls, "-dynamic"), (context === null || context === void 0 ? void 0 : context.type) === 'dynamic'), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(arrowButtonPrefixCls, "-")).call(_context, direction), direction), (0, _defineProperty2.default)(_classNames, "".concat(arrowButtonPrefixCls, "-line"), (context === null || context === void 0 ? void 0 : context.type) === 'line'), (0, _defineProperty2.default)(_classNames, "".concat(arrowButtonPrefixCls, "-disabled"), disabled), _classNames));
|
|
32
|
-
return
|
|
32
|
+
return _react.default.createElement("span", {
|
|
33
33
|
className: arrowButtonClasses,
|
|
34
34
|
onClick: onClick
|
|
35
|
-
}, direction === 'left' ?
|
|
35
|
+
}, direction === 'left' ? _react.default.createElement(_icon.default, {
|
|
36
36
|
type: "arrow-left"
|
|
37
|
-
}) :
|
|
37
|
+
}) : _react.default.createElement(_icon.default, {
|
|
38
38
|
type: "arrow-right"
|
|
39
39
|
}));
|
|
40
40
|
};
|
package/lib/tabs/context.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.default = exports.TabsContextProvider = void 0;
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
-
var TabsContext =
|
|
13
|
+
var TabsContext = React.createContext(null);
|
|
14
14
|
var TabsContextProvider = TabsContext.Provider;
|
|
15
15
|
exports.TabsContextProvider = TabsContextProvider;
|
|
16
16
|
var _default = TabsContext;
|
package/lib/tabs/index.js
CHANGED
package/lib/tabs/tab-pane.js
CHANGED
|
@@ -62,7 +62,7 @@ var TabPane = function TabPane(props) {
|
|
|
62
62
|
var event = function event() {
|
|
63
63
|
op.props.onClick && op.props.onClick(id);
|
|
64
64
|
};
|
|
65
|
-
return
|
|
65
|
+
return _react.default.createElement("span", {
|
|
66
66
|
key: index,
|
|
67
67
|
onClick: event
|
|
68
68
|
}, op);
|
|
@@ -74,22 +74,22 @@ var TabPane = function TabPane(props) {
|
|
|
74
74
|
context === null || context === void 0 ? void 0 : context.getTriggerKey(id);
|
|
75
75
|
};
|
|
76
76
|
if (tabPaneProps.type !== 'dynamic') {
|
|
77
|
-
return
|
|
77
|
+
return _react.default.createElement("span", {
|
|
78
78
|
ref: tabPaneRef,
|
|
79
79
|
className: tabPaneBoxClasses,
|
|
80
80
|
onClick: handleClick
|
|
81
|
-
},
|
|
81
|
+
}, _react.default.createElement("span", {
|
|
82
82
|
className: tabPaneTextClasses
|
|
83
83
|
}, tab));
|
|
84
84
|
}
|
|
85
|
-
return
|
|
85
|
+
return _react.default.createElement("span", {
|
|
86
86
|
className: tabPaneBoxClasses,
|
|
87
87
|
onContextMenu: handleContextMenu
|
|
88
|
-
},
|
|
88
|
+
}, _react.default.createElement("span", {
|
|
89
89
|
ref: tabPaneRef,
|
|
90
90
|
className: tabPaneTextClasses,
|
|
91
91
|
onClick: handleClick
|
|
92
|
-
}, tab),
|
|
92
|
+
}, tab), _react.default.createElement("span", {
|
|
93
93
|
className: operationsClasses
|
|
94
94
|
}, renderOperations()));
|
|
95
95
|
};
|