@kdcloudjs/kdesign 1.7.32 → 1.7.33-stable.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1704 -0
- package/dist/kdesign-complete.less +19 -13
- package/dist/kdesign.css +9 -6
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +2219 -2977
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +2 -2
- package/dist/kdesign.min.js +7 -7
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/usePopper.d.ts +1 -1
- package/es/carousel/slidebar.d.ts +2 -2
- package/es/config-provider/compDefaultProps.d.ts +3 -3
- package/es/date-picker/calendar.d.ts +2 -2
- package/es/date-picker/date-panel.d.ts +1 -1
- package/es/date-picker/panel/date-time/date-time.d.ts +1 -1
- package/es/date-picker/panel/header/header.d.ts +1 -1
- package/es/date-picker/panel/month/month.d.ts +2 -2
- package/es/date-picker/panel/quarter/quarter.d.ts +2 -2
- package/es/date-picker/panel/time/time-column.d.ts +1 -1
- package/es/date-picker/panel/time/time.d.ts +2 -2
- package/es/date-picker/panel/week/week.d.ts +2 -2
- package/es/date-picker/panel/year/year.d.ts +2 -2
- package/es/date-picker/utils/get-extra-footer.d.ts +1 -1
- package/es/date-picker/utils/get-ranges.d.ts +2 -2
- package/es/empty/defaultEmptyImg.d.ts +2 -2
- package/es/empty/illustrationEmptyImg.d.ts +2 -2
- package/es/input/TextArea.js +16 -8
- package/es/input/style/index.css +3 -0
- package/es/input/style/index.less +9 -5
- package/es/input-number/inputNumber.js +20 -14
- package/es/input-number/useSelectionRange.d.ts +2 -1
- package/es/input-number/useSelectionRange.js +3 -2
- package/es/select/select.js +0 -6
- package/es/select/style/index.css +5 -5
- package/es/select/style/index.less +10 -8
- package/es/slider/marks.d.ts +1 -1
- package/es/slider/steps.d.ts +1 -1
- package/es/slider/track.d.ts +2 -2
- package/es/table/feature/useRowDrag.d.ts +3 -0
- package/es/table/feature/useRowDrag.js +10 -0
- package/es/table/interface.d.ts +3 -1
- package/es/table/table.js +4 -1
- package/es/transfer/operation.d.ts +1 -1
- package/es/tree-select/tree-select.js +2 -2
- package/lib/_utils/KeyCode.js +2 -1
- package/lib/_utils/arrayUtil.js +5 -3
- package/lib/_utils/index.js +3 -2
- package/lib/_utils/raf.js +4 -2
- package/lib/_utils/reactNode.js +2 -1
- package/lib/_utils/resizeObserver.js +2 -1
- package/lib/_utils/type.js +5 -3
- package/lib/_utils/usePopper.d.ts +1 -1
- package/lib/_utils/usePopper.js +6 -3
- package/lib/alert/alert.js +6 -3
- package/lib/alert/index.js +2 -1
- package/lib/anchor/anchor-link.js +2 -1
- package/lib/anchor/anchor.js +4 -2
- package/lib/anchor/context.js +2 -1
- package/lib/anchor/index.js +2 -1
- package/lib/avatar/avatar.js +6 -3
- package/lib/avatar/index.js +2 -1
- package/lib/badge/badge.js +6 -3
- package/lib/badge/index.js +2 -1
- package/lib/base-data/base-data.js +2 -1
- package/lib/base-data/index.js +2 -1
- package/lib/base-data/interface.js +2 -1
- package/lib/button/button.js +12 -6
- package/lib/button/group.js +4 -2
- package/lib/button/index.js +2 -1
- package/lib/card/card.js +2 -1
- package/lib/card/index.js +2 -1
- package/lib/carousel/carousel.js +6 -3
- package/lib/carousel/displayList.js +3 -2
- package/lib/carousel/fadeList.js +3 -2
- package/lib/carousel/index.js +2 -1
- package/lib/carousel/slideList.js +3 -2
- package/lib/carousel/slidebar.d.ts +2 -2
- package/lib/carousel/slidebar.js +3 -2
- package/lib/cascader/cascader.js +4 -2
- package/lib/cascader/index.js +2 -1
- package/lib/cascader/util.js +24 -12
- package/lib/checkbox/checkbox.js +2 -1
- package/lib/checkbox/group.js +8 -7
- package/lib/checkbox/index.js +2 -1
- package/lib/city-picker/city-picker.js +2 -1
- package/lib/city-picker/index.js +2 -1
- package/lib/city-picker/interface.js +4 -2
- package/lib/city-picker/option.js +2 -1
- package/lib/collapse/collapse.js +4 -2
- package/lib/collapse/index.js +2 -1
- package/lib/collapse/panel.js +2 -1
- package/lib/color-picker/color-picker-panel.js +2 -1
- package/lib/color-picker/color-picker.js +2 -1
- package/lib/color-picker/constant/colorTypes.js +3 -2
- package/lib/color-picker/constant/defaultColor.js +2 -1
- package/lib/color-picker/constant/systemPresetColor.js +2 -1
- package/lib/color-picker/index.js +2 -1
- package/lib/color-picker/interface.js +4 -2
- package/lib/color-picker/utils/colorFormat.js +13 -7
- package/lib/color-picker/utils/hooks/useOnClickOutside.js +2 -1
- package/lib/config-provider/ConfigContext.js +2 -1
- package/lib/config-provider/SizeContext.js +4 -2
- package/lib/config-provider/compDefaultProps.d.ts +3 -3
- package/lib/config-provider/compDefaultProps.js +2 -1
- package/lib/config-provider/configProvider.js +2 -1
- package/lib/config-provider/defaultConfig.js +2 -1
- package/lib/config-provider/index.js +2 -1
- package/lib/date-picker/calendar.d.ts +2 -2
- package/lib/date-picker/calendar.js +2 -1
- package/lib/date-picker/context.js +2 -1
- package/lib/date-picker/date-panel.d.ts +1 -1
- package/lib/date-picker/date-panel.js +2 -1
- package/lib/date-picker/date-picker.js +2 -1
- package/lib/date-picker/index.js +2 -1
- package/lib/date-picker/locale/zh_CN.js +2 -1
- package/lib/date-picker/panel/date-time/date-time.d.ts +1 -1
- package/lib/date-picker/panel/date-time/date-time.js +2 -1
- package/lib/date-picker/panel/header/header.d.ts +1 -1
- package/lib/date-picker/panel/header/header.js +2 -1
- package/lib/date-picker/panel/month/month.d.ts +2 -2
- package/lib/date-picker/panel/month/month.js +2 -1
- package/lib/date-picker/panel/quarter/quarter.d.ts +2 -2
- package/lib/date-picker/panel/quarter/quarter.js +2 -1
- package/lib/date-picker/panel/time/time-column.d.ts +1 -1
- package/lib/date-picker/panel/time/time-column.js +8 -8
- package/lib/date-picker/panel/time/time.d.ts +2 -2
- package/lib/date-picker/panel/time/time.js +2 -1
- package/lib/date-picker/panel/week/week.d.ts +2 -2
- package/lib/date-picker/panel/week/week.js +2 -1
- package/lib/date-picker/panel/year/year.d.ts +2 -2
- package/lib/date-picker/panel/year/year.js +2 -1
- package/lib/date-picker/popper.js +2 -1
- package/lib/date-picker/range/input-range.js +2 -1
- package/lib/date-picker/range-picker.js +2 -1
- package/lib/date-picker/single/input-date.js +2 -1
- package/lib/date-picker/utils/date-fns.js +8 -9
- package/lib/date-picker/utils/get-extra-footer.d.ts +1 -1
- package/lib/date-picker/utils/get-ranges.d.ts +2 -2
- package/lib/date-picker/utils/index.js +7 -4
- package/lib/drawer/drawer.js +4 -2
- package/lib/drawer/index.js +2 -1
- package/lib/dropdown/dropdown.js +2 -1
- package/lib/dropdown/index.js +2 -1
- package/lib/dropdown/menu.js +4 -2
- package/lib/empty/defaultEmptyImg.d.ts +2 -2
- package/lib/empty/defaultEmptyImg.js +2 -1
- package/lib/empty/empty.js +2 -1
- package/lib/empty/illustrationEmptyImg.d.ts +2 -2
- package/lib/empty/illustrationEmptyImg.js +2 -1
- package/lib/empty/index.js +2 -1
- package/lib/filter/condition.js +2 -1
- package/lib/filter/filter.js +2 -1
- package/lib/filter/index.js +2 -1
- package/lib/filter/scheme.js +2 -1
- package/lib/form/Field.js +4 -2
- package/lib/form/FieldContext.js +2 -1
- package/lib/form/FieldLabel.js +2 -1
- package/lib/form/FieldWrapper.js +2 -1
- package/lib/form/Form.js +2 -1
- package/lib/form/FormContext.js +4 -2
- package/lib/form/hooks/useForceUpdate.js +2 -1
- package/lib/form/hooks/useForm.js +4 -2
- package/lib/form/index.js +2 -1
- package/lib/grid/col.js +2 -1
- package/lib/grid/row.js +4 -2
- package/lib/icon/icon.js +2 -1
- package/lib/icon/index.js +2 -1
- package/lib/icon/interface.js +6 -3
- package/lib/image/image.js +2 -1
- package/lib/image/index.js +2 -1
- package/lib/image/preview-group.js +2 -1
- package/lib/image/preview.js +2 -1
- package/lib/image-cropper/cropper.js +4 -2
- package/lib/image-cropper/image-cropper.js +2 -1
- package/lib/image-cropper/index.js +2 -1
- package/lib/image-cropper/operation-bar.js +2 -1
- package/lib/input/ClearableLabeledInput.js +2 -1
- package/lib/input/TextArea.js +18 -9
- package/lib/input/index.js +2 -1
- package/lib/input/input.js +6 -3
- package/lib/input/style/index.css +3 -0
- package/lib/input/style/index.less +9 -5
- package/lib/input-number/index.js +2 -1
- package/lib/input-number/inputNumber.js +22 -15
- package/lib/input-number/useSelectionRange.d.ts +2 -1
- package/lib/input-number/useSelectionRange.js +3 -2
- package/lib/layout/index.js +2 -1
- package/lib/layout/layout.js +10 -5
- package/lib/layout/sider.js +12 -11
- package/lib/link/index.js +2 -1
- package/lib/link/link.js +4 -2
- package/lib/locale/index.js +2 -1
- package/lib/locale/locale.js +7 -4
- package/lib/locale/zh-CN.js +2 -1
- package/lib/menu/index.js +2 -1
- package/lib/menu/menu.js +2 -1
- package/lib/menu/menuItem.js +4 -2
- package/lib/menu/subMenu.js +2 -1
- package/lib/menu/util.js +16 -8
- package/lib/message/content.js +2 -1
- package/lib/message/index.js +2 -1
- package/lib/modal/index.js +2 -1
- package/lib/modal/modal.js +6 -3
- package/lib/notification/content.js +2 -1
- package/lib/notification/index.js +2 -1
- package/lib/notification-base/index.js +2 -1
- package/lib/notification-base/notice.js +4 -2
- package/lib/notification-base/notification.js +2 -1
- package/lib/pagination/index.js +2 -1
- package/lib/pagination/pagination.js +6 -3
- package/lib/popconfirm/index.js +2 -1
- package/lib/popconfirm/popconfirm.js +2 -1
- package/lib/progress/circle.js +2 -1
- package/lib/progress/index.js +2 -1
- package/lib/progress/line.js +2 -1
- package/lib/progress/progress.js +6 -3
- package/lib/progress/utils.js +5 -3
- package/lib/radio/context.js +4 -2
- package/lib/radio/group.js +2 -1
- package/lib/radio/index.js +2 -1
- package/lib/radio/radio-button.js +2 -1
- package/lib/radio/radio.js +2 -1
- package/lib/rate/index.js +2 -1
- package/lib/rate/rate.js +4 -2
- package/lib/search/index.js +2 -1
- package/lib/search/interface.js +6 -3
- package/lib/search/option.js +2 -1
- package/lib/search/quick-search.js +2 -1
- package/lib/search/search-panel.js +2 -1
- package/lib/search/search.js +2 -1
- package/lib/select/index.js +2 -1
- package/lib/select/interface.js +6 -3
- package/lib/select/option.js +2 -1
- package/lib/select/select.js +2 -7
- package/lib/select/style/index.css +5 -5
- package/lib/select/style/index.less +10 -8
- package/lib/slider/index.js +2 -1
- package/lib/slider/marks.d.ts +1 -1
- package/lib/slider/marks.js +2 -1
- package/lib/slider/slider.js +2 -1
- package/lib/slider/sliderTooltip.js +2 -1
- package/lib/slider/steps.d.ts +1 -1
- package/lib/slider/steps.js +2 -1
- package/lib/slider/track.d.ts +2 -2
- package/lib/slider/track.js +2 -1
- package/lib/space/index.js +2 -1
- package/lib/space/space.js +2 -1
- package/lib/spin/index.js +2 -1
- package/lib/spin/spin.js +4 -2
- package/lib/split-panel/index.js +2 -1
- package/lib/split-panel/split-panel.js +4 -2
- package/lib/split-panel/trigger.js +2 -1
- package/lib/stepper/index.js +2 -1
- package/lib/stepper/stepper.js +4 -2
- package/lib/steps/Step.js +2 -1
- package/lib/steps/Steps.js +2 -1
- package/lib/steps/index.js +2 -1
- package/lib/steps/interface.js +6 -3
- package/lib/switch/index.js +2 -1
- package/lib/switch/switch.js +4 -2
- package/lib/table/feature/autoRowSpan.js +2 -1
- package/lib/table/feature/colGroupExtendable.js +2 -1
- package/lib/table/feature/columnDrag.js +2 -1
- package/lib/table/feature/columnResize.js +2 -1
- package/lib/table/feature/contextMenu.js +2 -1
- package/lib/table/feature/filter.js +2 -1
- package/lib/table/feature/mergeCellHover.js +2 -1
- package/lib/table/feature/rowDetail.js +2 -1
- package/lib/table/feature/rowSelection.js +2 -1
- package/lib/table/feature/sort.js +2 -1
- package/lib/table/feature/treeMode.js +2 -1
- package/lib/table/feature/useFooterDataSource.js +2 -1
- package/lib/table/feature/useRangeSelection.js +2 -1
- package/lib/table/feature/useRowDrag.d.ts +3 -0
- package/lib/table/feature/useRowDrag.js +18 -0
- package/lib/table/index.js +2 -1
- package/lib/table/interface.d.ts +3 -1
- package/lib/table/table.js +6 -2
- package/lib/tabs/active-line.js +2 -1
- package/lib/tabs/arrow-button.js +2 -1
- package/lib/tabs/context.js +4 -2
- package/lib/tabs/index.js +2 -1
- package/lib/tabs/tab-pane.js +4 -2
- package/lib/tabs/tabs.js +10 -5
- package/lib/tag/index.js +2 -1
- package/lib/tag/tag.js +8 -4
- package/lib/timeline/Timeline.js +2 -1
- package/lib/timeline/TimelineItem.js +2 -1
- package/lib/timeline/index.js +2 -1
- package/lib/tooltip/index.js +2 -1
- package/lib/tooltip/tooltip.js +2 -1
- package/lib/transfer/index.js +2 -1
- package/lib/transfer/list-body.js +4 -2
- package/lib/transfer/list-item.js +2 -1
- package/lib/transfer/list.js +2 -1
- package/lib/transfer/operation.d.ts +1 -1
- package/lib/transfer/operation.js +2 -1
- package/lib/transfer/search.js +2 -1
- package/lib/transfer/transfer.js +2 -1
- package/lib/tree/index.js +2 -1
- package/lib/tree/tree.js +2 -1
- package/lib/tree/treeHooks.js +15 -8
- package/lib/tree/treeNode.js +2 -1
- package/lib/tree/utils/treeUtils.js +49 -25
- package/lib/tree-select/index.js +2 -1
- package/lib/tree-select/interface.js +6 -3
- package/lib/tree-select/tree-select.js +6 -5
- package/lib/typography/base.js +4 -2
- package/lib/typography/index.js +2 -1
- package/lib/typography/paragraph.js +2 -1
- package/lib/typography/text.js +2 -1
- package/lib/typography/title.js +4 -2
- package/lib/typography/typography.js +2 -1
- package/lib/upload/dragger.js +2 -1
- package/lib/upload/index.js +2 -1
- package/lib/upload/scan-files.js +2 -1
- package/lib/upload/upload.js +2 -1
- package/lib/upload/verify-file.js +3 -2
- package/lib/view-container/context.js +4 -2
- package/lib/view-container/index.js +2 -1
- package/lib/view-container/view-container.js +2 -1
- package/lib/virtual-list/Filler.js +2 -1
- package/lib/virtual-list/index.js +2 -1
- package/lib/virtual-list/utils/itemUtil.js +2 -1
- package/lib/virtual-list/virtual-list.js +2 -1
- package/package.json +3 -3
package/es/_utils/usePopper.d.ts
CHANGED
|
@@ -27,5 +27,5 @@ export interface PopperProps {
|
|
|
27
27
|
getPopupContainer?: (locatorNode: HTMLElement) => HTMLElement;
|
|
28
28
|
onTransitionEnd?: (e: React.TransitionEvent) => void;
|
|
29
29
|
}
|
|
30
|
-
declare function usePopper(locatorElement: React.ReactElement, popperElement: React.ReactElement, props: PopperProps):
|
|
30
|
+
declare function usePopper(locatorElement: React.ReactElement, popperElement: React.ReactElement, props: PopperProps): JSX.Element;
|
|
31
31
|
export default usePopper;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export interface slideProps {
|
|
3
3
|
currentIndex: number;
|
|
4
4
|
dotPosition?: string;
|
|
@@ -10,4 +10,4 @@ export interface slideProps {
|
|
|
10
10
|
parentPrefixCls?: string;
|
|
11
11
|
onClick: (index: number) => void;
|
|
12
12
|
}
|
|
13
|
-
export declare const Slidebar: (props: slideProps) =>
|
|
13
|
+
export declare const Slidebar: (props: slideProps) => JSX.Element;
|
|
@@ -245,7 +245,7 @@ declare const compDefaultProps: {
|
|
|
245
245
|
RadioGroup: {};
|
|
246
246
|
Rate: {
|
|
247
247
|
allowHalf: boolean;
|
|
248
|
-
icon: () =>
|
|
248
|
+
icon: () => JSX.Element;
|
|
249
249
|
count: number;
|
|
250
250
|
defaultValue: number;
|
|
251
251
|
disabled: boolean;
|
|
@@ -333,7 +333,7 @@ declare const compDefaultProps: {
|
|
|
333
333
|
disabled: boolean;
|
|
334
334
|
draggable: boolean;
|
|
335
335
|
virtual: boolean;
|
|
336
|
-
switcherIcon: () =>
|
|
336
|
+
switcherIcon: () => JSX.Element;
|
|
337
337
|
estimatedItemSize: number;
|
|
338
338
|
expandOnClickNode: boolean;
|
|
339
339
|
};
|
|
@@ -444,7 +444,7 @@ declare const compDefaultProps: {
|
|
|
444
444
|
treeExpandOnClickNode: boolean;
|
|
445
445
|
onlyExpandOnClickIcon: boolean;
|
|
446
446
|
showSearch: boolean;
|
|
447
|
-
switcherIcon: () =>
|
|
447
|
+
switcherIcon: () => JSX.Element;
|
|
448
448
|
expandOnClickNode: boolean;
|
|
449
449
|
listHeight: number;
|
|
450
450
|
virtual: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { DateType, PickerMode, SharedTimeProps } from './interface';
|
|
3
3
|
import { RangeShowTimeObject } from './range-picker';
|
|
4
4
|
export interface CalendarProps {
|
|
@@ -9,5 +9,5 @@ export interface CalendarProps {
|
|
|
9
9
|
showTime?: boolean | SharedTimeProps | RangeShowTimeObject;
|
|
10
10
|
disabledDate?: (date: DateType) => boolean;
|
|
11
11
|
}
|
|
12
|
-
declare function Calendar(props: CalendarProps):
|
|
12
|
+
declare function Calendar(props: CalendarProps): JSX.Element;
|
|
13
13
|
export default Calendar;
|
|
@@ -49,5 +49,5 @@ declare type OmitType = Omit<PickerPanelBaseProps, 'picker'> & Omit<PickerPanelD
|
|
|
49
49
|
interface MergedPickerPanelProps extends OmitType {
|
|
50
50
|
picker?: PickerMode;
|
|
51
51
|
}
|
|
52
|
-
declare function Panel(props: MergedPickerPanelProps):
|
|
52
|
+
declare function Panel(props: MergedPickerPanelProps): JSX.Element;
|
|
53
53
|
export default Panel;
|
|
@@ -8,5 +8,5 @@ export interface DatetimePanelProps extends PanelSharedProps, Omit<CalendarProps
|
|
|
8
8
|
showTime?: boolean | SharedTimeProps;
|
|
9
9
|
defaultValue?: DateType;
|
|
10
10
|
}
|
|
11
|
-
declare function DatetimePanel(props: DatetimePanelProps):
|
|
11
|
+
declare function DatetimePanel(props: DatetimePanelProps): JSX.Element;
|
|
12
12
|
export default DatetimePanel;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { DateType } from '../../interface';
|
|
3
3
|
export interface MonthProps {
|
|
4
4
|
showFullMonth?: boolean;
|
|
5
5
|
disabledDate?(date: DateType): boolean;
|
|
6
6
|
}
|
|
7
|
-
declare function Month(props: MonthProps):
|
|
7
|
+
declare function Month(props: MonthProps): JSX.Element;
|
|
8
8
|
export default Month;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { DateType } from '../../interface';
|
|
3
3
|
interface QuarterProps {
|
|
4
4
|
disabledDate?: (date: DateType) => boolean;
|
|
5
5
|
}
|
|
6
|
-
declare function Quarter(props: QuarterProps):
|
|
6
|
+
declare function Quarter(props: QuarterProps): JSX.Element;
|
|
7
7
|
export default Quarter;
|
|
@@ -13,5 +13,5 @@ export interface TimeUnitColumnProps {
|
|
|
13
13
|
hideDisabledOptions?: boolean;
|
|
14
14
|
onSelect?: (value: number) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function TimeUnitColumn(props: TimeUnitColumnProps):
|
|
16
|
+
declare function TimeUnitColumn(props: TimeUnitColumnProps): JSX.Element;
|
|
17
17
|
export default TimeUnitColumn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { DateType, DisabledTimes, PanelSharedProps, PickerMode } from '../../interface';
|
|
3
3
|
export interface SharedTimeProps extends DisabledTimes {
|
|
4
4
|
format?: string;
|
|
@@ -17,5 +17,5 @@ export interface TimePanelProps extends PanelSharedProps, SharedTimeProps {
|
|
|
17
17
|
format?: string;
|
|
18
18
|
picker?: PickerMode;
|
|
19
19
|
}
|
|
20
|
-
declare function TimePanel(props: TimePanelProps):
|
|
20
|
+
declare function TimePanel(props: TimePanelProps): JSX.Element;
|
|
21
21
|
export default TimePanel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { DateType, PickerMode } from '../../interface';
|
|
3
3
|
export interface WeekProps {
|
|
4
4
|
day: DateType;
|
|
@@ -7,5 +7,5 @@ export interface WeekProps {
|
|
|
7
7
|
showTime?: boolean;
|
|
8
8
|
disabledDate?: (date: DateType) => boolean;
|
|
9
9
|
}
|
|
10
|
-
declare function Week(props: WeekProps):
|
|
10
|
+
declare function Week(props: WeekProps): JSX.Element;
|
|
11
11
|
export default Week;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { DateType, PickerMode } from '../../interface';
|
|
3
3
|
export interface YearProps {
|
|
4
4
|
yearItemNumber: number;
|
|
@@ -7,5 +7,5 @@ export interface YearProps {
|
|
|
7
7
|
disabledDate?: (date: DateType) => boolean;
|
|
8
8
|
picker?: PickerMode;
|
|
9
9
|
}
|
|
10
|
-
declare function Year(props: YearProps):
|
|
10
|
+
declare function Year(props: YearProps): JSX.Element;
|
|
11
11
|
export default Year;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PanelMode } from '../interface';
|
|
3
|
-
export default function getExtraFooter(prefixCls: string, mode: PanelMode, renderExtraFooter?: (mode: PanelMode) => React.ReactNode):
|
|
3
|
+
export default function getExtraFooter(prefixCls: string, mode: PanelMode, renderExtraFooter?: (mode: PanelMode) => React.ReactNode): JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { Components, RangeList, InnerLocale } from '../interface';
|
|
3
3
|
export interface RangesProps {
|
|
4
4
|
prefixCls: string;
|
|
@@ -11,4 +11,4 @@ export interface RangesProps {
|
|
|
11
11
|
showNow?: boolean;
|
|
12
12
|
locale: InnerLocale;
|
|
13
13
|
}
|
|
14
|
-
export default function getRanges({ prefixCls, rangeList, components, needConfirmButton, onNow, onOk, okDisabled, showNow, locale, }: RangesProps):
|
|
14
|
+
export default function getRanges({ prefixCls, rangeList, components, needConfirmButton, onNow, onOk, okDisabled, showNow, locale, }: RangesProps): JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare function DefaultEmptyImg(props: any):
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare function DefaultEmptyImg(props: any): JSX.Element;
|
|
3
3
|
export default DefaultEmptyImg;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare function IllustrationEmptyImg(props: any):
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare function IllustrationEmptyImg(props: any): JSX.Element;
|
|
3
3
|
export default IllustrationEmptyImg;
|
package/es/input/TextArea.js
CHANGED
|
@@ -70,6 +70,10 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
70
70
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
71
71
|
showNumberMark = _useState6[0],
|
|
72
72
|
setShowNumberMark = _useState6[1];
|
|
73
|
+
var _useState7 = useState(false),
|
|
74
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
75
|
+
numberMarkError = _useState8[0],
|
|
76
|
+
setNumberMarkError = _useState8[1];
|
|
73
77
|
var resizeTextarea = useCallback(function () {
|
|
74
78
|
if (!autoSize || !textareaRef.current) {
|
|
75
79
|
return;
|
|
@@ -117,21 +121,25 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
117
121
|
onChange && onChange(event);
|
|
118
122
|
};
|
|
119
123
|
var renderNumberMark = function renderNumberMark() {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
if (count && showNumberMark && !disabled && maxLength !== '' && maxLength >= 0) {
|
|
125
|
-
var countClass = classNames("".concat(textAreaPrefixCls, "-textarea-mark"), _defineProperty({}, "".concat(textAreaPrefixCls, "-textarea-mark-inner"), countPosition === 'inner'));
|
|
124
|
+
if (count && (showNumberMark || numberMarkError) && !disabled && maxLength !== '' && maxLength >= 0) {
|
|
125
|
+
var _classNames;
|
|
126
|
+
var countClass = classNames("".concat(textAreaPrefixCls, "-textarea-mark"), (_classNames = {}, _defineProperty(_classNames, "".concat(textAreaPrefixCls, "-textarea-mark-inner"), countPosition === 'inner'), _defineProperty(_classNames, "".concat(textAreaPrefixCls, "-textarea-mark-error"), numberMarkError), _classNames));
|
|
126
127
|
return /*#__PURE__*/React.createElement("div", {
|
|
127
128
|
className: countClass
|
|
128
|
-
},
|
|
129
|
+
}, value ? value.length : 0, "/", maxLength);
|
|
129
130
|
}
|
|
130
131
|
return null;
|
|
131
132
|
};
|
|
132
133
|
useEffect(function () {
|
|
133
134
|
resizeTextarea();
|
|
134
135
|
}, [value, resizeTextarea]);
|
|
136
|
+
useEffect(function () {
|
|
137
|
+
if (value && maxLength && value.length > maxLength) {
|
|
138
|
+
setNumberMarkError(true);
|
|
139
|
+
} else {
|
|
140
|
+
setNumberMarkError(false);
|
|
141
|
+
}
|
|
142
|
+
}, [value]);
|
|
135
143
|
useEffect(function () {
|
|
136
144
|
if (propsValue !== undefined) {
|
|
137
145
|
setValue(propsValue);
|
|
@@ -173,7 +181,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
173
181
|
ref: textareaRef,
|
|
174
182
|
disabled: disabled,
|
|
175
183
|
style: _extends({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
|
|
176
|
-
className: classNames("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _defineProperty(_classNames2, "".concat(prefixCls, "-error"), status === 'error'), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2), _defineProperty({}, className, className && !allowClear && !hadCount)),
|
|
184
|
+
className: classNames("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _defineProperty(_classNames2, "".concat(prefixCls, "-error"), status === 'error' || numberMarkError), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2), _defineProperty({}, className, className && !allowClear && !hadCount)),
|
|
177
185
|
onChange: handleChange,
|
|
178
186
|
onFocus: !disabled ? handleFocus : undefined,
|
|
179
187
|
onBlur: !disabled ? handleBlur : undefined,
|
package/es/input/style/index.css
CHANGED
|
@@ -43,12 +43,16 @@ textarea {
|
|
|
43
43
|
font-size: @input-small-font-size-inner;
|
|
44
44
|
line-height: 18px;
|
|
45
45
|
background-color: #fff;
|
|
46
|
-
}
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
&-inner {
|
|
48
|
+
top: auto;
|
|
49
|
+
bottom: 5px;
|
|
50
|
+
right: 8px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&-error {
|
|
54
|
+
color: @input-error-color;
|
|
55
|
+
}
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -58,6 +58,10 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
|
|
|
58
58
|
_useState2 = _slicedToArray(_useState, 2),
|
|
59
59
|
inputValue = _useState2[0],
|
|
60
60
|
setInputValue = _useState2[1];
|
|
61
|
+
var _useState3 = useState(1),
|
|
62
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
+
forceUpdate = _useState4[0],
|
|
64
|
+
setForceUpdate = _useState4[1];
|
|
61
65
|
var inputStatus = useRef({
|
|
62
66
|
isHandleChange: false,
|
|
63
67
|
inputFocused: false
|
|
@@ -109,10 +113,11 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
|
|
|
109
113
|
var handleChange = function handleChange(event) {
|
|
110
114
|
inputStatus.current.isHandleChange = true;
|
|
111
115
|
var legalNumber = verifiValue(event.target.value);
|
|
116
|
+
updateSelectionRangePosition(event);
|
|
112
117
|
if (legalNumber === false) {
|
|
118
|
+
setForceUpdate(forceUpdate + 1);
|
|
113
119
|
return false;
|
|
114
120
|
}
|
|
115
|
-
updateSelectionRangePosition(event);
|
|
116
121
|
value === undefined && setInputValue(legalNumber);
|
|
117
122
|
onChange && onChange(handleEventAttachValue(event, numberMode ? Number(legalNumber) : legalNumber));
|
|
118
123
|
};
|
|
@@ -151,23 +156,23 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
|
|
|
151
156
|
if (decimalValueLength <= decimalLength && integerValueLength <= digitLength - decimalLength) {
|
|
152
157
|
resultNumerical = numerical;
|
|
153
158
|
} else if (integerValueLength > digitLength - decimalLength) {
|
|
154
|
-
var _context;
|
|
155
|
-
resultNumerical = _concatInstanceProperty(_context = "".concat(sign)).call(
|
|
159
|
+
var _context, _context2;
|
|
160
|
+
resultNumerical = mustInPrecisionScope ? inputValue : _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = "".concat(sign)).call(_context2, integerValue.substr(0, digitLength - decimalLength))).call(_context, decimalValue ? '.' + decimalValue : '');
|
|
156
161
|
} else if (decimalValueLength > decimalLength) {
|
|
157
|
-
var
|
|
158
|
-
resultNumerical = _concatInstanceProperty(
|
|
162
|
+
var _context3, _context4;
|
|
163
|
+
resultNumerical = mustInPrecisionScope ? inputValue : _concatInstanceProperty(_context3 = _concatInstanceProperty(_context4 = "".concat(sign)).call(_context4, integerValue, ".")).call(_context3, decimalValue.substr(0, decimalLength));
|
|
159
164
|
}
|
|
160
165
|
} else if (typeof decimalLength !== 'number' && typeof digitLength === 'number') {
|
|
161
166
|
if (integerValueLength >= digitLength) {
|
|
162
|
-
var
|
|
163
|
-
resultNumerical = _concatInstanceProperty(
|
|
167
|
+
var _context5;
|
|
168
|
+
resultNumerical = _concatInstanceProperty(_context5 = "".concat(sign)).call(_context5, integerValue.substr(0, digitLength));
|
|
164
169
|
} else {
|
|
165
|
-
var
|
|
166
|
-
resultNumerical = decimalValueLength ? _concatInstanceProperty(
|
|
170
|
+
var _context6, _context7, _context8;
|
|
171
|
+
resultNumerical = decimalValueLength ? _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = "".concat(sign)).call(_context7, integerValue, ".")).call(_context6, decimalValue.substr(0, digitLength - integerValueLength)) : _concatInstanceProperty(_context8 = "".concat(sign)).call(_context8, integerValue);
|
|
167
172
|
}
|
|
168
173
|
} else if (typeof decimalLength === 'number' && typeof digitLength !== 'number') {
|
|
169
|
-
var
|
|
170
|
-
resultNumerical = decimalValueLength ? _concatInstanceProperty(
|
|
174
|
+
var _context9, _context10, _context11;
|
|
175
|
+
resultNumerical = decimalValueLength ? _concatInstanceProperty(_context9 = _concatInstanceProperty(_context10 = "".concat(sign)).call(_context10, integerValue, ".")).call(_context9, decimalValue.substr(0, decimalLength)) : _concatInstanceProperty(_context11 = "".concat(sign)).call(_context11, integerValue);
|
|
171
176
|
} else {
|
|
172
177
|
resultNumerical = numerical;
|
|
173
178
|
}
|
|
@@ -197,13 +202,13 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
|
|
|
197
202
|
});
|
|
198
203
|
};
|
|
199
204
|
var handleKeyDown = function handleKeyDown(event) {
|
|
200
|
-
var
|
|
205
|
+
var _context12;
|
|
201
206
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
|
|
202
207
|
if (!stepOption || props.disabled || props.readOnly) {
|
|
203
208
|
return;
|
|
204
209
|
}
|
|
205
210
|
var keyCode = event.keyCode;
|
|
206
|
-
if (_includesInstanceProperty(
|
|
211
|
+
if (_includesInstanceProperty(_context12 = [38, 40]).call(_context12, keyCode)) {
|
|
207
212
|
event.preventDefault();
|
|
208
213
|
handleStepChang(keyCode === 38 ? 'plus' : 'minus');
|
|
209
214
|
}
|
|
@@ -310,7 +315,8 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
|
|
|
310
315
|
}, [inputValue, formatter]);
|
|
311
316
|
var updateSelectionRangePosition = useSelectionRange({
|
|
312
317
|
inputElement: (_a = inputNumberRef.current) === null || _a === void 0 ? void 0 : _a.input,
|
|
313
|
-
inputValue: displayedInputValue
|
|
318
|
+
inputValue: displayedInputValue,
|
|
319
|
+
forceUpdate: forceUpdate
|
|
314
320
|
});
|
|
315
321
|
return /*#__PURE__*/React.createElement(Input, _extends({}, others, {
|
|
316
322
|
ref: inputNumberRef,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export default function useSelectionRange({ inputElement, inputValue, }: {
|
|
1
|
+
export default function useSelectionRange({ inputElement, inputValue, forceUpdate, }: {
|
|
2
2
|
inputElement: HTMLInputElement;
|
|
3
3
|
inputValue: string;
|
|
4
|
+
forceUpdate: number;
|
|
4
5
|
}): (event: any) => void;
|
|
@@ -2,7 +2,8 @@ import { useRef, useLayoutEffect } from 'react';
|
|
|
2
2
|
import isNumber from 'lodash/isNumber';
|
|
3
3
|
export default function useSelectionRange(_ref) {
|
|
4
4
|
var inputElement = _ref.inputElement,
|
|
5
|
-
inputValue = _ref.inputValue
|
|
5
|
+
inputValue = _ref.inputValue,
|
|
6
|
+
forceUpdate = _ref.forceUpdate;
|
|
6
7
|
var refSelectionPosition = useRef();
|
|
7
8
|
useLayoutEffect(function () {
|
|
8
9
|
var position = refSelectionPosition.current;
|
|
@@ -10,7 +11,7 @@ export default function useSelectionRange(_ref) {
|
|
|
10
11
|
var start = Math.max(0, inputValue.length - position);
|
|
11
12
|
inputElement.setSelectionRange(start, start);
|
|
12
13
|
}
|
|
13
|
-
}, [inputValue]);
|
|
14
|
+
}, [inputValue, forceUpdate]);
|
|
14
15
|
return function (event) {
|
|
15
16
|
var _event$target = event.target,
|
|
16
17
|
end = _event$target.selectionEnd,
|
package/es/select/select.js
CHANGED
|
@@ -778,12 +778,6 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
778
778
|
_spliceInstanceProperty(selectMulOpts).call(selectMulOpts, -1, 1);
|
|
779
779
|
setMulOptions(_toConsumableArray(selectMulOpts));
|
|
780
780
|
onChange && onChange(labelInValue ? selectMulOpts : selectedVal, selectMulOpts);
|
|
781
|
-
// !isMultiple
|
|
782
|
-
} else if (which === KeyCode.BACKSPACE && allowClear && !isMultiple) {
|
|
783
|
-
setInitValue('');
|
|
784
|
-
onClear && onClear('');
|
|
785
|
-
setSearchValue('');
|
|
786
|
-
onChange && onChange(undefined);
|
|
787
781
|
}
|
|
788
782
|
// optionsList: up、down、enter
|
|
789
783
|
if (optionShow) {
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
width: 100%;
|
|
690
690
|
padding: 0 12px;
|
|
691
691
|
height: 40px;
|
|
692
|
-
line-height:
|
|
692
|
+
line-height: 30px;
|
|
693
693
|
border-top: 1px solid #d9d9d9;
|
|
694
694
|
-webkit-box-sizing: border-box;
|
|
695
695
|
box-sizing: border-box;
|
|
@@ -702,10 +702,10 @@
|
|
|
702
702
|
color: var(--kd-c-select-footer-color-text-selected, #0e5fd8);
|
|
703
703
|
padding: 0 2px;
|
|
704
704
|
}
|
|
705
|
-
.kd-select.topLeft.hidden,
|
|
706
|
-
.kd-select.bottomLeft.hidden,
|
|
707
|
-
.kd-select.topRight.hidden,
|
|
708
|
-
.kd-select.bottomRight.hidden {
|
|
705
|
+
.kd-select-dropdown-panel.topLeft.hidden,
|
|
706
|
+
.kd-select-dropdown-panel.bottomLeft.hidden,
|
|
707
|
+
.kd-select-dropdown-panel.topRight.hidden,
|
|
708
|
+
.kd-select-dropdown-panel.bottomRight.hidden {
|
|
709
709
|
opacity: 0;
|
|
710
710
|
visibility: hidden;
|
|
711
711
|
-webkit-transition: all calc(0.3s - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
width: 100%;
|
|
425
425
|
padding: 0 12px;
|
|
426
426
|
height: 40px;
|
|
427
|
-
line-height:
|
|
427
|
+
line-height: 30px;
|
|
428
428
|
border-top: 1px solid #d9d9d9;
|
|
429
429
|
box-sizing: border-box;
|
|
430
430
|
|
|
@@ -439,12 +439,14 @@
|
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
442
|
+
&-dropdown-panel {
|
|
443
|
+
&.topLeft.hidden,
|
|
444
|
+
&.bottomLeft.hidden,
|
|
445
|
+
&.topRight.hidden,
|
|
446
|
+
&.bottomRight.hidden {
|
|
447
|
+
opacity: 0;
|
|
448
|
+
visibility: hidden;
|
|
449
|
+
transition: all calc(@transition-duration - 0.1s) @ease;
|
|
450
|
+
}
|
|
449
451
|
}
|
|
450
452
|
}
|
package/es/slider/marks.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ export interface marksProps {
|
|
|
13
13
|
bound: number;
|
|
14
14
|
onClickLabel: (e: React.MouseEvent | React.TouchEvent, point: React.ReactNode | markObjProps) => void;
|
|
15
15
|
}
|
|
16
|
-
declare function Marks(props: marksProps):
|
|
16
|
+
declare function Marks(props: marksProps): JSX.Element;
|
|
17
17
|
export default Marks;
|
package/es/slider/steps.d.ts
CHANGED
package/es/slider/track.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
interface trackProps {
|
|
3
3
|
prefixCls: string;
|
|
4
4
|
vertical: boolean;
|
|
@@ -7,5 +7,5 @@ interface trackProps {
|
|
|
7
7
|
min: number;
|
|
8
8
|
max: number;
|
|
9
9
|
}
|
|
10
|
-
declare function Track(props: trackProps):
|
|
10
|
+
declare function Track(props: trackProps): JSX.Element;
|
|
11
11
|
export default Track;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import { features } from '@kdcloudjs/table';
|
|
3
|
+
function useRowDrag(pipeline, rowDrag, estimatedRowHeight) {
|
|
4
|
+
if (rowDrag) {
|
|
5
|
+
pipeline.use(features.rowDrag(_extends({
|
|
6
|
+
rowHeight: estimatedRowHeight
|
|
7
|
+
}, rowDrag)));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export default useRowDrag;
|
package/es/table/interface.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TableProps as BaseTableProps, TablePipeline as TP, ArtColumnStaticPart } from '@kdcloudjs/table';
|
|
3
|
-
import { SortFeatureOptions, RowDetailFeatureOptions, FilterFeatureOptions, TreeModeFeatureOptions, ColumnDragOptions, ColumnResizeOptions, ContextMenuFeatureOptions, RangeSelectionFeatureOptions, colGroupExtendOption } from '@kdcloudjs/table/es/table/pipeline/features';
|
|
3
|
+
import { SortFeatureOptions, RowDetailFeatureOptions, FilterFeatureOptions, TreeModeFeatureOptions, ColumnDragOptions, ColumnResizeOptions, ContextMenuFeatureOptions, RangeSelectionFeatureOptions, colGroupExtendOption, RowDragFeatureOptions } from '@kdcloudjs/table/es/table/pipeline/features';
|
|
4
4
|
declare type TablePropsOfComponents = Pick<BaseTableProps, 'components'> & {
|
|
5
5
|
components?: {
|
|
6
6
|
/** 复选框 */
|
|
@@ -35,6 +35,7 @@ export interface TableProps extends TablePropsOfExtend, TablePropsOfComponents {
|
|
|
35
35
|
contextMenu?: IContextMenu;
|
|
36
36
|
rangeSelection?: TableRangeSelection;
|
|
37
37
|
columnGroupExtend?: colGroupExtendOption;
|
|
38
|
+
rowDrag?: TableRowDrag;
|
|
38
39
|
}
|
|
39
40
|
export declare type RowSelectionType = 'checkbox' | 'radio';
|
|
40
41
|
export declare type RowSelectionFixed = 'start' | 'end';
|
|
@@ -58,4 +59,5 @@ export declare type TableTreeMode = TreeModeFeatureOptions;
|
|
|
58
59
|
export declare type TablePipeline = TP;
|
|
59
60
|
export declare type IContextMenu = boolean | ContextMenuFeatureOptions;
|
|
60
61
|
export declare type TableRangeSelection = RangeSelectionFeatureOptions;
|
|
62
|
+
export declare type TableRowDrag = RowDragFeatureOptions;
|
|
61
63
|
export {};
|
package/es/table/table.js
CHANGED
|
@@ -22,6 +22,7 @@ import useMergeCellHover from './feature/mergeCellHover';
|
|
|
22
22
|
import devWarning from '../_utils/devwarning';
|
|
23
23
|
import useFooterDataSource from './feature/useFooterDataSource';
|
|
24
24
|
import usecolGroupExtendable from './feature/colGroupExtendable';
|
|
25
|
+
import useRowDrag from './feature/useRowDrag';
|
|
25
26
|
import getApi from './api';
|
|
26
27
|
var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
27
28
|
var columns = props.columns,
|
|
@@ -56,7 +57,8 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
56
57
|
scrollbarWidth = props.scrollbarWidth,
|
|
57
58
|
scrollLoad = props.scrollLoad,
|
|
58
59
|
_props$columnGroupExt = props.columnGroupExtend,
|
|
59
|
-
columnGroupExtend = _props$columnGroupExt === void 0 ? {} : _props$columnGroupExt
|
|
60
|
+
columnGroupExtend = _props$columnGroupExt === void 0 ? {} : _props$columnGroupExt,
|
|
61
|
+
rowDrag = props.rowDrag;
|
|
60
62
|
var _useContext = useContext(ConfigContext),
|
|
61
63
|
getPrefixCls = _useContext.getPrefixCls,
|
|
62
64
|
prefixCls = _useContext.prefixCls,
|
|
@@ -104,6 +106,7 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
104
106
|
useRangeSelection(pipeline, rangeSelection);
|
|
105
107
|
useMergeCellHover(pipeline);
|
|
106
108
|
useFooterDataSource(pipeline, footerDataSource);
|
|
109
|
+
useRowDrag(pipeline, rowDrag, estimatedRowHeight);
|
|
107
110
|
/* -------------------------------------------------------------------------- */
|
|
108
111
|
/* after useTablePipeline, merge pipeline.getProps result */
|
|
109
112
|
/* -------------------------------------------------------------------------- */
|
|
@@ -12,5 +12,5 @@ export interface TransferOperationProps {
|
|
|
12
12
|
direction?: 'ltr' | 'rtl';
|
|
13
13
|
oneWay?: boolean;
|
|
14
14
|
}
|
|
15
|
-
declare const Operation: ({ disabled, moveToLeft, moveToRight, leftArrowText, rightArrowText, leftActive, rightActive, className, style, direction, oneWay, }: TransferOperationProps) =>
|
|
15
|
+
declare const Operation: ({ disabled, moveToLeft, moveToRight, leftArrowText, rightArrowText, leftActive, rightActive, className, style, direction, oneWay, }: TransferOperationProps) => JSX.Element;
|
|
16
16
|
export default Operation;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _typeof from "@babel/runtime-corejs3/helpers/typeof";
|
|
2
1
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
3
2
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
4
3
|
import _toConsumableArray from "@babel/runtime-corejs3/helpers/toConsumableArray";
|
|
@@ -173,7 +172,8 @@ var InternalTreeSelect = function InternalTreeSelect(props, ref) {
|
|
|
173
172
|
if (TreeMap.has(initValue)) {
|
|
174
173
|
arr.push(TreeMap.get(initValue));
|
|
175
174
|
} else {
|
|
176
|
-
|
|
175
|
+
;
|
|
176
|
+
(initValue !== null && initValue !== void 0 ? initValue : '') !== '' && arr.push({
|
|
177
177
|
key: initValue,
|
|
178
178
|
title: initValue
|
|
179
179
|
});
|
package/lib/_utils/KeyCode.js
CHANGED
package/lib/_utils/arrayUtil.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.isArrayValueRepeat = exports.getStringToArray = void 0;
|
|
|
8
8
|
* 检查数组value的值是否唯一
|
|
9
9
|
* @param value 需要检查值是否唯一的数组
|
|
10
10
|
*/
|
|
11
|
-
var isArrayValueRepeat =
|
|
11
|
+
var isArrayValueRepeat = function isArrayValueRepeat(value) {
|
|
12
12
|
var hash = {};
|
|
13
13
|
for (var i in value) {
|
|
14
14
|
if (hash[value[i]]) {
|
|
@@ -22,7 +22,8 @@ var isArrayValueRepeat = exports.isArrayValueRepeat = function isArrayValueRepea
|
|
|
22
22
|
* 将字符串转为数组
|
|
23
23
|
* @param { string } val - 字符串
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
exports.isArrayValueRepeat = isArrayValueRepeat;
|
|
26
|
+
var getStringToArray = function getStringToArray(val) {
|
|
26
27
|
if (val) {
|
|
27
28
|
var result = [];
|
|
28
29
|
val.split(' ').forEach(function (item) {
|
|
@@ -33,4 +34,5 @@ var getStringToArray = exports.getStringToArray = function getStringToArray(val)
|
|
|
33
34
|
return result;
|
|
34
35
|
}
|
|
35
36
|
return [];
|
|
36
|
-
};
|
|
37
|
+
};
|
|
38
|
+
exports.getStringToArray = getStringToArray;
|
package/lib/_utils/index.js
CHANGED
|
@@ -14,8 +14,9 @@ var _compDefaultProps = _interopRequireDefault(require("../config-provider/compD
|
|
|
14
14
|
* @param {any} userDefaultProps 用户自定义组件默认属性
|
|
15
15
|
* @param {any} compProps 组件接收到的属性
|
|
16
16
|
*/
|
|
17
|
-
var getCompProps =
|
|
17
|
+
var getCompProps = function getCompProps(compName, userDefaultProps, compProps) {
|
|
18
18
|
var defaultProps = _compDefaultProps.default[compName];
|
|
19
19
|
var userProps = userDefaultProps && userDefaultProps[compName] || {};
|
|
20
20
|
return (0, _extends2.default)({}, defaultProps, userProps, compProps || {});
|
|
21
|
-
};
|
|
21
|
+
};
|
|
22
|
+
exports.getCompProps = getCompProps;
|