@qsxy/element-plus-react 1.0.0-next.1 → 1.0.0-next.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/README.md +31 -0
- package/dist/Badge/Badge.js +4 -5
- package/dist/Badge/typings.d.ts +10 -0
- package/dist/Breadcrumb/Breadcrumb.js +1 -4
- package/dist/Breadcrumb/typings.d.ts +4 -0
- package/dist/Button/Button.d.ts +0 -1
- package/dist/Button/Button.js +21 -9
- package/dist/Button/typings.d.ts +28 -0
- package/dist/Calendar/Calendar.js +1 -2
- package/dist/Calendar/CalendarContext.d.ts +10 -0
- package/dist/Calendar/Footer.js +1 -2
- package/dist/Calendar/Header.js +3 -8
- package/dist/Calendar/ShortCuts.d.ts +2 -0
- package/dist/Calendar/typings.d.ts +18 -0
- package/dist/Card/typings.d.ts +4 -0
- package/dist/Cascader/Cascader.js +26 -25
- package/dist/Cascader/CascaderDropdown.d.ts +1 -0
- package/dist/Cascader/CascaderMenu.d.ts +7 -0
- package/dist/Cascader/typings.d.ts +80 -0
- package/dist/Cascader/useCascader.d.ts +72 -0
- package/dist/Checkbox/Checkbox.js +2 -6
- package/dist/Checkbox/CheckboxButton.js +2 -6
- package/dist/Checkbox/typings.d.ts +11 -0
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +4 -0
- package/dist/CheckboxGroup/CheckboxGroupContext.d.ts +1 -0
- package/dist/Col/Col.js +1 -8
- package/dist/Col/typings.d.ts +10 -0
- package/dist/Collapse/CollapseContext.d.ts +3 -0
- package/dist/Collapse/CollapseItem.js +9 -7
- package/dist/Collapse/CollapseTransition.d.ts +7 -6
- package/dist/Collapse/CollapseTransition.js +49 -31
- package/dist/Collapse/typings.d.ts +7 -0
- package/dist/ColorPicker/AlphaSlider.d.ts +7 -0
- package/dist/ColorPicker/AlphaSlider.js +0 -1
- package/dist/ColorPicker/ColorPicker.js +0 -1
- package/dist/ColorPicker/HueSlider.d.ts +7 -0
- package/dist/ColorPicker/HueSlider.js +0 -1
- package/dist/ColorPicker/Predefine.d.ts +7 -0
- package/dist/ColorPicker/Predefine.js +0 -1
- package/dist/ColorPicker/SvPanel.d.ts +7 -0
- package/dist/ColorPicker/SvPanel.js +0 -1
- package/dist/ColorPicker/typings.d.ts +9 -0
- package/dist/ConfigProvider/ConfigProvider.d.ts +5 -0
- package/dist/DatePicker/DatePicker.js +19 -8
- package/dist/DatePicker/DateRangePicker.js +11 -10
- package/dist/DatePicker/typings.d.ts +69 -0
- package/dist/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +10 -8
- package/dist/DateTimePicker/typings.d.ts +1 -0
- package/dist/Descriptions/Descriptions.js +1 -5
- package/dist/Descriptions/DescriptionsContext.d.ts +2 -0
- package/dist/Descriptions/typings.d.ts +13 -0
- package/dist/Dialog/Dialog.d.ts +0 -1
- package/dist/Dialog/Dialog.js +3 -6
- package/dist/Dialog/DialogBody.js +0 -3
- package/dist/Dialog/DialogContext.d.ts +8 -0
- package/dist/Dialog/DialogHeader.js +1 -4
- package/dist/Dialog/typings.d.ts +36 -0
- package/dist/Divider/Divider.d.ts +4 -0
- package/dist/Divider/Divider.js +1 -6
- package/dist/Drawer/Drawer.js +10 -5
- package/dist/Drawer/DrawerBody.js +1 -4
- package/dist/Drawer/DrawerContext.d.ts +10 -0
- package/dist/Drawer/DrawerHeader.js +1 -4
- package/dist/Drawer/typings.d.ts +16 -0
- package/dist/Dropdown/Dropdown.js +11 -7
- package/dist/Dropdown/DropdownContext.d.ts +2 -0
- package/dist/Dropdown/typings.d.ts +15 -0
- package/dist/Empty/Empty.js +1 -4
- package/dist/Form/Form.js +10 -6
- package/dist/Form/FormItem.d.ts +12 -0
- package/dist/Form/FormItem.js +3 -1
- package/dist/Form/typings.d.ts +55 -0
- package/dist/Form/useForm.d.ts +22 -0
- package/dist/Form/utils/NameMap.d.ts +3 -0
- package/dist/Form/utils/validateUtil.d.ts +4 -0
- package/dist/Form/utils/valueUtil.d.ts +17 -0
- package/dist/Icon/Icon.js +1 -4
- package/dist/Icon/typings.d.ts +7 -0
- package/dist/Input/Input.js +16 -9
- package/dist/Input/InputRange.js +11 -8
- package/dist/Input/TextArea.js +8 -4
- package/dist/Input/typings.d.ts +61 -0
- package/dist/InputNumber/InputNumber.js +10 -7
- package/dist/InputNumber/typings.d.ts +21 -0
- package/dist/Link/Link.js +1 -4
- package/dist/Link/typings.d.ts +6 -1
- package/dist/Loading/Loading.js +3 -5
- package/dist/Loading/typings.d.ts +5 -0
- package/dist/Message/Main.d.ts +7 -0
- package/dist/Message/Message.js +11 -8
- package/dist/Message/index.d.ts +8 -0
- package/dist/Message/typings.d.ts +11 -0
- package/dist/MessageBox/Main.js +3 -1
- package/dist/MessageBox/index.d.ts +17 -3
- package/dist/MessageBox/index.js +1 -1
- package/dist/MessageBox/typings.d.ts +50 -0
- package/dist/Notification/Main.d.ts +7 -0
- package/dist/Notification/Notification.js +17 -14
- package/dist/Notification/index.d.ts +15 -0
- package/dist/Notification/typings.d.ts +13 -0
- package/dist/Pagination/Pagination.js +15 -11
- package/dist/Pagination/typings.d.ts +28 -0
- package/dist/Popconfirm/Popconfirm.js +13 -9
- package/dist/Popconfirm/typings.d.ts +10 -0
- package/dist/Popover/Popover.js +12 -8
- package/dist/Popover/typings.d.ts +12 -0
- package/dist/Popper/Popper.js +15 -11
- package/dist/Popper/typings.d.ts +7 -1
- package/dist/Progress/Progress.js +12 -8
- package/dist/Progress/typings.d.ts +12 -0
- package/dist/Radio/typings.d.ts +7 -0
- package/dist/RadioGroup/typings.d.ts +1 -0
- package/dist/Row/Row.js +8 -5
- package/dist/Row/RowContext.d.ts +1 -0
- package/dist/Row/typings.d.ts +4 -0
- package/dist/Scrollbar/Scrollbar.js +13 -9
- package/dist/Scrollbar/Thumb.js +1 -1
- package/dist/Scrollbar/typings.d.ts +20 -0
- package/dist/Select/SelectCore.js +17 -14
- package/dist/Select/typings.d.ts +33 -0
- package/dist/Skeleton/PlaceholderGraph.d.ts +4 -0
- package/dist/Skeleton/PlaceholderGrid.d.ts +4 -0
- package/dist/Skeleton/PlaceholderGrid.js +0 -4
- package/dist/Skeleton/PlaceholderParagraph.d.ts +4 -0
- package/dist/Skeleton/PlaceholderParagraph.js +0 -4
- package/dist/Switch/Switch.js +13 -10
- package/dist/Switch/typings.d.ts +15 -0
- package/dist/Table/Colgroup.d.ts +1 -0
- package/dist/Table/Table.js +13 -9
- package/dist/Table/TableBody.js +10 -41
- package/dist/Table/TableCell.js +0 -5
- package/dist/Table/TableColumn.js +0 -4
- package/dist/Table/TableContext.d.ts +8 -0
- package/dist/Table/hooks/useSelection.d.ts +17 -0
- package/dist/Table/hooks/useTable.d.ts +7 -0
- package/dist/Table/treeUtil.d.ts +39 -0
- package/dist/Table/typings.d.ts +137 -1
- package/dist/Table/util.d.ts +10 -0
- package/dist/Tabs/Tabs.js +1 -4
- package/dist/Tabs/typings.d.ts +38 -0
- package/dist/Tag/Tag.d.ts +1 -1
- package/dist/Tag/Tag.js +7 -8
- package/dist/Tag/typings.d.ts +10 -0
- package/dist/TimeLine/TimeLineItem.js +7 -4
- package/dist/TimeLine/typings.d.ts +9 -0
- package/dist/TimePicker/TimePicker.js +14 -11
- package/dist/TimePicker/TimePickerRange.js +15 -12
- package/dist/TimePicker/TimeSpinnerPanel.js +1 -4
- package/dist/TimePicker/typings.d.ts +13 -0
- package/dist/TimePicker/useTimePicker.d.ts +7 -0
- package/dist/Tooltip/Tooltip.js +8 -15
- package/dist/Tooltip/TooltipContext.d.ts +1 -0
- package/dist/Tooltip/typings.d.ts +14 -1
- package/dist/Transfer/List.js +12 -8
- package/dist/Transfer/ListItem.d.ts +1 -0
- package/dist/Transfer/Transfer.js +11 -7
- package/dist/Transfer/typings/index.d.ts +27 -0
- package/dist/Transfer/typings/list.d.ts +25 -0
- package/dist/Transfer/typings/listBody.d.ts +1 -0
- package/dist/Transition/Transition.d.ts +16 -3
- package/dist/Transition/Transition.js +6 -4
- package/dist/Transition/TransitionGroup.d.ts +59 -0
- package/dist/Transition/childMapping.d.ts +23 -0
- package/dist/Tree/NodeList.d.ts +3 -0
- package/dist/Tree/RCTree.d.ts +15 -0
- package/dist/Tree/Tree.d.ts +15 -0
- package/dist/Tree/TreeNode.d.ts +7 -0
- package/dist/Tree/TreeNode.js +1 -4
- package/dist/Tree/contextTypes.d.ts +4 -0
- package/dist/Tree/typings.d.ts +3 -0
- package/dist/Tree/util.d.ts +17 -0
- package/dist/Tree/utils/KeyCode.d.ts +326 -0
- package/dist/Tree/utils/conductUtil.d.ts +6 -0
- package/dist/Tree/utils/dictUtil.d.ts +1 -0
- package/dist/Tree/utils/pickAttrs.d.ts +5 -0
- package/dist/Tree/utils/treeUtil.d.ts +25 -1
- package/dist/TreeSelect/TreeSelect.js +14 -13
- package/dist/TreeSelect/Utils.d.ts +1 -0
- package/dist/TreeSelect/typings.d.ts +19 -0
- package/dist/Upload/Upload.js +9 -8
- package/dist/Upload/UploadList.js +2 -1
- package/dist/Upload/typings.d.ts +34 -0
- package/dist/Upload/use-handlers.d.ts +1 -0
- package/dist/Upload/use-handlers.js +1 -1
- package/dist/Util/Math.d.ts +34 -0
- package/dist/Util/base.d.ts +22 -0
- package/dist/Util/base.js +5 -0
- package/dist/Util/shallowEqual.d.ts +11 -0
- package/dist/Util/treeUtils.d.ts +8 -0
- package/dist/VirtualList/Filler.d.ts +5 -0
- package/dist/VirtualList/VirtualList.d.ts +3 -0
- package/dist/VirtualList/hooks/useLayoutEffect.d.ts +3 -0
- package/dist/VirtualList/utils/algorithmUtil.d.ts +17 -0
- package/dist/VirtualList/utils/findDOMNode.d.ts +3 -0
- package/dist/hooks/animationPropsUtils.d.ts +12 -0
- package/dist/hooks/htmlPropsUtils.d.ts +8 -0
- package/dist/hooks/popperPropsUtils.d.ts +12 -0
- package/dist/hooks/treePropsUtils.d.ts +12 -0
- package/dist/hooks/useChildrenInstance.d.ts +11 -0
- package/dist/hooks/useClassNames.d.ts +78 -0
- package/dist/hooks/useControlled.d.ts +8 -0
- package/dist/hooks/useForceUpdate.d.ts +1 -0
- package/dist/index.css +72 -45422
- package/dist/index.d.ts +1 -0
- package/dist/theme-chalk/build.scss +64 -0
- package/dist/theme-chalk/icon/fonts.scss +8 -0
- package/dist/theme-chalk/icon/index.scss +0 -9
- package/dist/theme-chalk/index.scss +1 -0
- package/dist/theme-chalk/link/index.scss +0 -85
- package/dist/types/common.d.ts +24 -0
- package/dist/types/type.d.ts +5 -0
- package/package.json +1 -1
|
@@ -48,6 +48,21 @@ var import_TimeRangePanel = __toESM(require("./TimeRangePanel"));
|
|
|
48
48
|
var import_useTimePicker = require("./useTimePicker");
|
|
49
49
|
var import_util = require("./util");
|
|
50
50
|
var TimePickerRange = (0, import_react.forwardRef)((props, ref) => {
|
|
51
|
+
props = (0, import_Util.mergeDefaultProps)(
|
|
52
|
+
{
|
|
53
|
+
format: "HH:mm:ss",
|
|
54
|
+
disabledHours: () => [],
|
|
55
|
+
disabledMinutes: () => [],
|
|
56
|
+
disabledSeconds: () => [],
|
|
57
|
+
isoWeek: true,
|
|
58
|
+
clearable: true,
|
|
59
|
+
disabled: false,
|
|
60
|
+
startPlaceholder: "开始时间",
|
|
61
|
+
endPlaceholder: "结束时间",
|
|
62
|
+
rangeSeparator: "到"
|
|
63
|
+
},
|
|
64
|
+
props
|
|
65
|
+
);
|
|
51
66
|
const {
|
|
52
67
|
name,
|
|
53
68
|
clearable,
|
|
@@ -346,17 +361,5 @@ var TimePickerRange = (0, import_react.forwardRef)((props, ref) => {
|
|
|
346
361
|
)
|
|
347
362
|
));
|
|
348
363
|
});
|
|
349
|
-
TimePickerRange.defaultProps = {
|
|
350
|
-
format: "HH:mm:ss",
|
|
351
|
-
disabledHours: () => [],
|
|
352
|
-
disabledMinutes: () => [],
|
|
353
|
-
disabledSeconds: () => [],
|
|
354
|
-
isoWeek: true,
|
|
355
|
-
clearable: true,
|
|
356
|
-
disabled: false,
|
|
357
|
-
startPlaceholder: "开始时间",
|
|
358
|
-
endPlaceholder: "结束时间",
|
|
359
|
-
rangeSeparator: "到"
|
|
360
|
-
};
|
|
361
364
|
TimePickerRange.displayName = "TimePicker";
|
|
362
365
|
var TimePickerRange_default = (0, import_react.memo)(TimePickerRange);
|
|
@@ -41,7 +41,7 @@ var import_hooks = require("../hooks");
|
|
|
41
41
|
var import_useTimePicker = require("./useTimePicker");
|
|
42
42
|
var TimeSpinnerPanel = (0, import_react.memo)(
|
|
43
43
|
(0, import_react.forwardRef)((props, ref) => {
|
|
44
|
-
const { classPrefix = "time", showSeconds, value: valueProp, onChange } = props;
|
|
44
|
+
const { classPrefix = "time", showSeconds = true, value: valueProp, onChange } = props;
|
|
45
45
|
const { b, be, is } = (0, import_hooks.useClassNames)(classPrefix);
|
|
46
46
|
const spinnerDate = (0, import_react.useRef)(valueProp);
|
|
47
47
|
const isScrolling = (0, import_react.useRef)(false);
|
|
@@ -270,8 +270,5 @@ var TimeSpinnerPanel = (0, import_react.memo)(
|
|
|
270
270
|
})));
|
|
271
271
|
})
|
|
272
272
|
);
|
|
273
|
-
TimeSpinnerPanel.defaultProps = {
|
|
274
|
-
showSeconds: true
|
|
275
|
-
};
|
|
276
273
|
TimeSpinnerPanel.displayName = "TimeSpinnerPanel";
|
|
277
274
|
var TimeSpinnerPanel_default = TimeSpinnerPanel;
|
|
@@ -36,8 +36,11 @@ export type TimePickerProps = Omit<DatePickerProps, 'type' | 'instance'> & {
|
|
|
36
36
|
disabledHours?: DisabledHours;
|
|
37
37
|
disabledMinutes?: DisabledMinutes;
|
|
38
38
|
disabledSeconds?: DisabledSeconds;
|
|
39
|
+
/** 等价于原生 name 属性 */
|
|
39
40
|
name?: string;
|
|
41
|
+
/** 选中项绑定值 */
|
|
40
42
|
value?: string;
|
|
43
|
+
/** 默认值 */
|
|
41
44
|
defaultValue?: string;
|
|
42
45
|
};
|
|
43
46
|
export type TimePickerRangeProps = Omit<DatePickerRangeProps, 'type' | 'instance'> & {
|
|
@@ -47,26 +50,36 @@ export type TimePickerRangeProps = Omit<DatePickerRangeProps, 'type' | 'instance
|
|
|
47
50
|
instance?: RefObject<TimePickerRangeRef>;
|
|
48
51
|
};
|
|
49
52
|
export interface TimeSpinnerProps extends BaseProps, NativeProps, AnimationEventProps {
|
|
53
|
+
/** 值 */
|
|
50
54
|
value: Dayjs;
|
|
51
55
|
disabledHours?: DisabledHours;
|
|
52
56
|
disabledMinutes?: DisabledMinutes;
|
|
53
57
|
disabledSeconds?: DisabledSeconds;
|
|
54
58
|
showSeconds?: boolean;
|
|
55
59
|
role?: RoleType;
|
|
60
|
+
/** 单选框提交数据方法 */
|
|
56
61
|
onChange: (value: Dayjs, params?: ChangeParams) => void;
|
|
57
62
|
setSelectionRange?: (start: number, end: number, pos?: 'min' | 'max') => void;
|
|
58
63
|
}
|
|
59
64
|
export interface TimePanelProps extends BaseProps, NativeProps, AnimationEventProps, TimeSpinnerProps {
|
|
65
|
+
/** 是否显示 */
|
|
60
66
|
visible?: boolean;
|
|
67
|
+
/** */
|
|
61
68
|
referenceElement: RefObject<HTMLElement> | (() => RefObject<HTMLElement>);
|
|
69
|
+
/** 关闭时回调函数 */
|
|
62
70
|
onDestroy: () => void;
|
|
71
|
+
/** 单选框提交数据方法 */
|
|
63
72
|
onOk: () => void;
|
|
64
73
|
}
|
|
65
74
|
export interface TimeRangePanelProps extends BaseProps, NativeProps, AnimationEventProps, Omit<TimeSpinnerProps, 'value' | 'onChange'>, Omit<TimePickerRangeProps, 'instance' | 'value' | 'onChange'> {
|
|
66
75
|
value: ValueRagne;
|
|
67
76
|
onChange: (value: ValueRagne, params?: ChangeParams) => void;
|
|
77
|
+
/** 是否显示 */
|
|
68
78
|
visible: boolean;
|
|
79
|
+
/** */
|
|
80
|
+
/** 关闭时回调函数 */
|
|
69
81
|
onDestroy?: () => void;
|
|
82
|
+
/** 单选框提交数据方法 */
|
|
70
83
|
onOk: () => void;
|
|
71
84
|
}
|
|
72
85
|
export interface TimePanelRef {
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Element Plus
|
|
3
|
+
* @CreateTime 2022/4/1 09:09:12
|
|
4
|
+
* @LastEditor Parker
|
|
5
|
+
* @ModifyTime 2022/4/6 14:44:01
|
|
6
|
+
* @Description Element Plus 时间选择面板工具类,见https://github.com/element-plus/element-plus
|
|
7
|
+
*/
|
|
1
8
|
import { Compare, DisabledHours, DisabledMinutes, DisabledSeconds, RoleType } from './typings';
|
|
2
9
|
export declare const getTimeLists: (disabledHours: DisabledHours, disabledMinutes: DisabledMinutes, disabledSeconds: DisabledSeconds) => {
|
|
3
10
|
getHoursList: (role: RoleType, compare?: Compare) => boolean[];
|
package/dist/Tooltip/Tooltip.js
CHANGED
|
@@ -42,13 +42,13 @@ var import_TooltipContext = require("./TooltipContext");
|
|
|
42
42
|
var Tooltip = (0, import_react.forwardRef)((props, ref) => {
|
|
43
43
|
const {
|
|
44
44
|
classPrefix = "tooltip",
|
|
45
|
-
effect
|
|
46
|
-
trigger,
|
|
45
|
+
effect = "dark",
|
|
46
|
+
trigger = "hover",
|
|
47
47
|
content,
|
|
48
48
|
disabled,
|
|
49
|
-
enterable,
|
|
50
|
-
showAfter,
|
|
51
|
-
hideAfter,
|
|
49
|
+
enterable = true,
|
|
50
|
+
showAfter = 0,
|
|
51
|
+
hideAfter = 200,
|
|
52
52
|
onMouseEnter,
|
|
53
53
|
onMouseLeave,
|
|
54
54
|
onEnter,
|
|
@@ -56,6 +56,7 @@ var Tooltip = (0, import_react.forwardRef)((props, ref) => {
|
|
|
56
56
|
contentSlot,
|
|
57
57
|
virtualTriggering,
|
|
58
58
|
virtualRef,
|
|
59
|
+
unmountOnExit = true,
|
|
59
60
|
...rest
|
|
60
61
|
} = props;
|
|
61
62
|
const [popperProps] = (0, import_hooks.partitionPopperPropsUtils)(rest);
|
|
@@ -181,8 +182,8 @@ var Tooltip = (0, import_react.forwardRef)((props, ref) => {
|
|
|
181
182
|
},
|
|
182
183
|
onMouseEnter: enterable && trigger === "hover" ? handleMouseEnter : import_noop.default,
|
|
183
184
|
onMouseLeave: enterable && trigger === "hover" ? handleMouseLeave : import_noop.default,
|
|
184
|
-
className: (0, import_classnames.default)(is(
|
|
185
|
-
unmountOnExit
|
|
185
|
+
className: (0, import_classnames.default)(is(effect), props.popperClass, { [e`popper`]: classPrefix === "tooltip" }),
|
|
186
|
+
unmountOnExit,
|
|
186
187
|
...popperProps,
|
|
187
188
|
...transitionProps
|
|
188
189
|
},
|
|
@@ -202,13 +203,5 @@ var Tooltip = (0, import_react.forwardRef)((props, ref) => {
|
|
|
202
203
|
)
|
|
203
204
|
));
|
|
204
205
|
});
|
|
205
|
-
Tooltip.defaultProps = {
|
|
206
|
-
effect: "dark",
|
|
207
|
-
showArrow: true,
|
|
208
|
-
showAfter: 0,
|
|
209
|
-
hideAfter: 200,
|
|
210
|
-
trigger: "hover",
|
|
211
|
-
unmountOnExit: true
|
|
212
|
-
};
|
|
213
206
|
Tooltip.displayName = "Tooltip";
|
|
214
207
|
var Tooltip_default = Tooltip;
|
|
@@ -11,21 +11,34 @@ export type TooltipRef = {
|
|
|
11
11
|
hide: () => void;
|
|
12
12
|
};
|
|
13
13
|
export interface TooltipProps extends BaseProps<React.ReactNode>, NativeProps, PopperOptions, AnimationEventProps, Omit<TransitionProps, 'children'> {
|
|
14
|
+
/** class 前缀 */
|
|
14
15
|
classPrefix?: string;
|
|
16
|
+
/** 指示 Tooltip 的内容将附加在哪一个网页元素上 */
|
|
15
17
|
appendTo?: HTMLElement;
|
|
16
|
-
|
|
18
|
+
/** 默认提供的主题 */
|
|
19
|
+
effect?: 'light' | 'dark' | string;
|
|
20
|
+
/** 显示的内容 */
|
|
17
21
|
content?: string | React.ReactNode;
|
|
22
|
+
/** 触发下拉的行为 */
|
|
18
23
|
trigger?: 'hover' | 'click' | 'contextmenu';
|
|
24
|
+
/** 状态是否可见 */
|
|
19
25
|
visible?: boolean;
|
|
26
|
+
/** 初始值 */
|
|
20
27
|
defaultVisible?: boolean;
|
|
28
|
+
/** Tooltip 是否可用 */
|
|
21
29
|
disabled?: boolean;
|
|
30
|
+
/** 鼠标是否可进入到 tooltip 中 */
|
|
22
31
|
enterable?: boolean;
|
|
32
|
+
/** 延迟出现,单位毫秒 */
|
|
23
33
|
showAfter?: number;
|
|
34
|
+
/** Tooltip 出现后自动隐藏延时,单位毫秒,为 0 则不会自动隐藏 */
|
|
24
35
|
hideAfter?: number;
|
|
25
36
|
onMouseEnter?: (e?: React.MouseEvent<any>) => void;
|
|
26
37
|
onMouseLeave?: (e?: React.MouseEvent<any>) => void;
|
|
27
38
|
triggerRef?: React.ReactElement;
|
|
39
|
+
/** 用来标识虚拟触发是否被启用 */
|
|
28
40
|
virtualTriggering?: boolean;
|
|
41
|
+
/** 标识虚拟触发时的触发元素 */
|
|
29
42
|
virtualRef?: VirtualElement;
|
|
30
43
|
contentSlot?: ComponentChildren;
|
|
31
44
|
}
|
package/dist/Transfer/List.js
CHANGED
|
@@ -38,11 +38,23 @@ var import_react = __toESM(require("react"));
|
|
|
38
38
|
var import_Checkbox = require("../Checkbox");
|
|
39
39
|
var import_Dropdown = require("../Dropdown");
|
|
40
40
|
var import_Icon = require("../Icon");
|
|
41
|
+
var import_Util = require("../Util");
|
|
41
42
|
var import_hooks = require("../hooks");
|
|
42
43
|
var import_ListBody = __toESM(require("./ListBody"));
|
|
43
44
|
var import_search = __toESM(require("./search"));
|
|
44
45
|
var import_listBody = require("./typings/listBody");
|
|
45
46
|
var TransferList = (props) => {
|
|
47
|
+
props = (0, import_Util.mergeDefaultProps)(
|
|
48
|
+
{
|
|
49
|
+
data: [],
|
|
50
|
+
titleText: "",
|
|
51
|
+
showSearch: false,
|
|
52
|
+
itemsUnit: "项",
|
|
53
|
+
itemUnit: "项",
|
|
54
|
+
searchPlaceholder: "请输入搜索内容"
|
|
55
|
+
},
|
|
56
|
+
props
|
|
57
|
+
);
|
|
46
58
|
const {
|
|
47
59
|
classPrefix = "transfer-list",
|
|
48
60
|
data,
|
|
@@ -249,12 +261,4 @@ var TransferList = (props) => {
|
|
|
249
261
|
const dropdown = /* @__PURE__ */ import_react.default.createElement(import_Dropdown.Dropdown, { className: b`header-dropdown`, menu, disabled, onClick: onDropdownClick }, /* @__PURE__ */ import_react.default.createElement(import_Icon.Icon, { name: "angle-down" }));
|
|
250
262
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(b(), { [b`with-pagination`]: !!pagination, [b`with-footer`]: !!footerDom }), style }, /* @__PURE__ */ import_react.default.createElement("div", { className: b`header` }, showSelectAll ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, checkAllCheckbox, dropdown) : null, /* @__PURE__ */ import_react.default.createElement("span", { className: b`header-title` }, getSelectAllLabel)), listBody, listFooter);
|
|
251
263
|
};
|
|
252
|
-
TransferList.defaultProps = {
|
|
253
|
-
data: [],
|
|
254
|
-
titleText: "",
|
|
255
|
-
showSearch: false,
|
|
256
|
-
itemsUnit: "项",
|
|
257
|
-
itemUnit: "项",
|
|
258
|
-
searchPlaceholder: "请输入搜索内容"
|
|
259
|
-
};
|
|
260
264
|
var List_default = TransferList;
|
|
@@ -9,6 +9,7 @@ type ListItemProps<RecordType> = {
|
|
|
9
9
|
onClick: (item: RecordType) => void;
|
|
10
10
|
onRemove?: (item: RecordType) => void;
|
|
11
11
|
item: RecordType;
|
|
12
|
+
/** 数据源的字段别名 */
|
|
12
13
|
fieldNames: FieldNames;
|
|
13
14
|
};
|
|
14
15
|
declare const ListItem: <RecordType extends KeyWiseTransferItem>(props: ListItemProps<RecordType>) => React.JSX.Element;
|
|
@@ -35,10 +35,21 @@ module.exports = __toCommonJS(Transfer_exports);
|
|
|
35
35
|
var import_classnames = __toESM(require("classnames"));
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var import_Empty = require("../Empty");
|
|
38
|
+
var import_Util = require("../Util");
|
|
38
39
|
var import_hooks = require("../hooks");
|
|
39
40
|
var import_List = __toESM(require("./List"));
|
|
40
41
|
var import_operation = __toESM(require("./operation"));
|
|
41
42
|
var Transfer = (props) => {
|
|
43
|
+
props = (0, import_Util.mergeDefaultProps)(
|
|
44
|
+
{
|
|
45
|
+
data: [],
|
|
46
|
+
titles: ["Source", "Target"],
|
|
47
|
+
locale: {},
|
|
48
|
+
filterable: false,
|
|
49
|
+
listStyle: {}
|
|
50
|
+
},
|
|
51
|
+
props
|
|
52
|
+
);
|
|
42
53
|
const {
|
|
43
54
|
className,
|
|
44
55
|
disabled,
|
|
@@ -292,12 +303,5 @@ var Transfer = (props) => {
|
|
|
292
303
|
}
|
|
293
304
|
));
|
|
294
305
|
};
|
|
295
|
-
Transfer.defaultProps = {
|
|
296
|
-
data: [],
|
|
297
|
-
titles: ["Source", "Target"],
|
|
298
|
-
locale: {},
|
|
299
|
-
filterable: false,
|
|
300
|
-
listStyle: {}
|
|
301
|
-
};
|
|
302
306
|
Transfer.displayName = "Transfer";
|
|
303
307
|
var Transfer_default = Transfer;
|
|
@@ -20,6 +20,7 @@ export type TransferRender<RecordType> = (item: RecordType) => RenderResult;
|
|
|
20
20
|
export interface ListStyle {
|
|
21
21
|
direction: TransferDirection;
|
|
22
22
|
}
|
|
23
|
+
/** 自定义顶部多选框标题的集合 */
|
|
23
24
|
export type SelectAllLabel = React.ReactElement<any> | ((info: {
|
|
24
25
|
selectedCount: number;
|
|
25
26
|
totalCount: number;
|
|
@@ -39,32 +40,58 @@ export interface TransferLocale {
|
|
|
39
40
|
removeCurrent?: string;
|
|
40
41
|
}
|
|
41
42
|
export interface TransferProps<RecordType extends TransferItem = TransferItem> extends Omit<BaseProps, 'children'>, NativeProps {
|
|
43
|
+
/** 是否禁用 */
|
|
42
44
|
disabled?: boolean;
|
|
45
|
+
/** 数据源,其中的数据将会被渲染到左边一栏中,targetKeys 中指定的除外 */
|
|
43
46
|
data: RecordType[];
|
|
47
|
+
/** 默认显示在右侧框数据的 key 集合 */
|
|
44
48
|
defaultValue?: (string | number)[];
|
|
49
|
+
/** 显示在右侧框数据的 key 集合(控制模式) */
|
|
45
50
|
value?: (string | number)[];
|
|
51
|
+
/** 设置哪些项应该被选中 */
|
|
46
52
|
selectedKeys?: (string | number)[];
|
|
53
|
+
/** 每行数据渲染函数,该函数的入参为 dataSource 中的项,返回值为 ReactElement。或者返回一个普通对象,其中 label 字段为 ReactElement,value 字段为 title */
|
|
47
54
|
render?: TransferRender<RecordType>;
|
|
55
|
+
/** 选项在两栏之间转移时的回调函数 */
|
|
48
56
|
onChange?: (targetKeys: (string | number)[], direction: TransferDirection, moveKeys: (string | number)[]) => void;
|
|
57
|
+
/** 选中项发生改变时的回调函数 */
|
|
49
58
|
onSelectChange?: (sourceSelectedKeys: (string | number)[], targetSelectedKeys: (string | number)[]) => void;
|
|
59
|
+
/** 两个穿梭框的自定义样式 */
|
|
50
60
|
listStyle?: ((style: ListStyle) => React.CSSProperties) | React.CSSProperties;
|
|
61
|
+
/** 操作栏的自定义样式 */
|
|
51
62
|
operationStyle?: React.CSSProperties;
|
|
63
|
+
/** 标题集合,顺序从左至右 */
|
|
52
64
|
titles?: (React.ReactElement | string)[];
|
|
65
|
+
/** 操作文案集合,顺序从上至下 */
|
|
53
66
|
operations?: string[];
|
|
67
|
+
/** 是否显示搜索框 */
|
|
54
68
|
filterable?: boolean;
|
|
69
|
+
/** 接收 inputValue option 两个参数,当 option 符合筛选条件时,应返回 true,反之则返回 false */
|
|
55
70
|
filterMethod?: (inputValue: string, item: RecordType) => boolean;
|
|
71
|
+
/** */
|
|
56
72
|
locale?: Partial<TransferLocale>;
|
|
73
|
+
/** 底部渲染函数 */
|
|
57
74
|
footer?: (props: TransferListProps<RecordType>, extra: {
|
|
58
75
|
direction: TransferDirection;
|
|
59
76
|
}) => React.ReactElement;
|
|
77
|
+
/** 搜索框内容时改变时的回调函数 */
|
|
60
78
|
onSearch?: (direction: TransferDirection, value: string) => void;
|
|
79
|
+
/** 选项列表滚动时的回调函数 */
|
|
61
80
|
onScroll?: (direction: TransferDirection, e: any) => void;
|
|
81
|
+
/** */
|
|
62
82
|
children?: (props: TransferListBodyProps<RecordType>) => React.ReactElement;
|
|
83
|
+
/** 是否展示全选勾选框 */
|
|
63
84
|
showSelectAll?: boolean;
|
|
85
|
+
/** 自定义顶部多选框标题的集合 */
|
|
64
86
|
selectAllLabels?: SelectAllLabel[];
|
|
87
|
+
/** 展示为单向样式 */
|
|
65
88
|
oneWay?: boolean;
|
|
89
|
+
/** 使用分页样式,自定义渲染列表下无效 */
|
|
66
90
|
pagination?: PaginationType;
|
|
91
|
+
/** 数据源的字段别名 */
|
|
67
92
|
fieldNames?: FieldNames;
|
|
93
|
+
/** 表单校验错误提示 */
|
|
68
94
|
error?: boolean;
|
|
95
|
+
/** 表单校验警告提示 */
|
|
69
96
|
warning?: boolean;
|
|
70
97
|
}
|
|
@@ -10,30 +10,55 @@ export interface RenderedItem<RecordType> {
|
|
|
10
10
|
}
|
|
11
11
|
export type RenderListFunction<T> = (props: TransferListBodyProps<T>) => React.ReactElement;
|
|
12
12
|
export interface TransferListProps<RecordType> extends TransferLocale, BaseProps, NativeProps {
|
|
13
|
+
/** 标题 */
|
|
13
14
|
titleText?: string | React.ReactElement;
|
|
15
|
+
/** 数据源 */
|
|
14
16
|
data: RecordType[];
|
|
17
|
+
/** */
|
|
15
18
|
filterOption?: (filterText: string, item: RecordType) => boolean;
|
|
19
|
+
/** */
|
|
16
20
|
checkedKeys: (string | number)[];
|
|
21
|
+
/** */
|
|
17
22
|
handleFilter: (e: any) => void;
|
|
23
|
+
/** */
|
|
18
24
|
onItemSelect: (key: string | number, check: boolean) => void;
|
|
25
|
+
/** */
|
|
19
26
|
onItemSelectAll: (data: (string | number)[], checkAll: boolean, overWrite?: boolean) => void;
|
|
27
|
+
/** */
|
|
20
28
|
onItemRemove?: (keys: (string | number)[]) => void;
|
|
29
|
+
/** */
|
|
21
30
|
handleClear: () => void;
|
|
31
|
+
/** */
|
|
22
32
|
render?: (item: RecordType) => RenderResult;
|
|
33
|
+
/** */
|
|
23
34
|
showSearch?: boolean;
|
|
35
|
+
/** */
|
|
24
36
|
searchPlaceholder?: string;
|
|
37
|
+
/** */
|
|
25
38
|
itemUnit?: string;
|
|
39
|
+
/** */
|
|
26
40
|
itemsUnit?: string;
|
|
41
|
+
/** */
|
|
27
42
|
renderList?: RenderListFunction<RecordType>;
|
|
43
|
+
/** */
|
|
28
44
|
footer?: (props: TransferListProps<RecordType>, info?: {
|
|
29
45
|
direction: TransferDirection;
|
|
30
46
|
}) => React.ReactElement;
|
|
47
|
+
/** */
|
|
31
48
|
onScroll: (e: any) => void;
|
|
49
|
+
/** */
|
|
32
50
|
disabled?: boolean;
|
|
51
|
+
/** */
|
|
33
52
|
direction: TransferDirection;
|
|
53
|
+
/** 是否展示全选勾选框 */
|
|
34
54
|
showSelectAll?: boolean;
|
|
55
|
+
/** */
|
|
56
|
+
/** 自定义顶部多选框标题 */
|
|
35
57
|
selectAllLabel?: SelectAllLabel;
|
|
58
|
+
/** */
|
|
36
59
|
showRemove?: boolean;
|
|
60
|
+
/** 分页 */
|
|
37
61
|
pagination?: PaginationType;
|
|
62
|
+
/** 数据源的字段别名 */
|
|
38
63
|
fieldNames: FieldNames;
|
|
39
64
|
}
|
|
@@ -12,6 +12,7 @@ export interface TransferListBodyProps<RecordType> extends PartialTransferListPr
|
|
|
12
12
|
filteredItems: RecordType[];
|
|
13
13
|
filteredRenderItems: RenderedItem<RecordType>[];
|
|
14
14
|
selectedKeys: (string | number)[];
|
|
15
|
+
/** 数据源的字段别名 */
|
|
15
16
|
fieldNames: FieldNames;
|
|
16
17
|
}
|
|
17
18
|
export {};
|
|
@@ -9,25 +9,38 @@ export declare enum STATUS {
|
|
|
9
9
|
LEAVE = 5,
|
|
10
10
|
AFTER_LEAVE = 6
|
|
11
11
|
}
|
|
12
|
+
interface ExtraProps {
|
|
13
|
+
nodeRef: RefObject<HTMLElement> | (() => RefObject<HTMLElement>);
|
|
14
|
+
}
|
|
12
15
|
export interface TransitionProps extends AnimationEventProps {
|
|
13
16
|
animation?: boolean;
|
|
17
|
+
/** Primary content */
|
|
14
18
|
children?: ComponentChildren;
|
|
19
|
+
/** Additional classes */
|
|
15
20
|
className?: string;
|
|
16
21
|
name?: string;
|
|
17
22
|
display?: string;
|
|
23
|
+
/** Show the component; triggers the enter or exit animation */
|
|
18
24
|
visible?: boolean;
|
|
25
|
+
/** Unmount the component (remove it from the DOM) when it is not shown */
|
|
19
26
|
unmountOnExit?: boolean;
|
|
27
|
+
/** Run the enter animation when the component mounts, if it is initially shown */
|
|
20
28
|
transitionAppear?: boolean;
|
|
29
|
+
/** A Timeout for the animation */
|
|
21
30
|
duration?: number;
|
|
31
|
+
/** CSS class or classes applied when the component is exited */
|
|
22
32
|
exitedClassName?: string;
|
|
33
|
+
/** CSS class or classes applied while the component is exiting */
|
|
23
34
|
exitingClassName?: string;
|
|
35
|
+
/** CSS class or classes applied when the component is entered */
|
|
24
36
|
enteredClassName?: string;
|
|
37
|
+
/** CSS class or classes applied while the component is entering */
|
|
25
38
|
enteringClassName?: string;
|
|
26
39
|
}
|
|
27
40
|
interface TransitionState {
|
|
28
41
|
status?: number;
|
|
29
42
|
}
|
|
30
|
-
declare class Transition extends Component<TransitionProps, TransitionState> {
|
|
43
|
+
declare class Transition extends Component<TransitionProps & ExtraProps, TransitionState> {
|
|
31
44
|
static displayName: string;
|
|
32
45
|
static defaultProps: {
|
|
33
46
|
duration: number;
|
|
@@ -37,7 +50,7 @@ declare class Transition extends Component<TransitionProps, TransitionState> {
|
|
|
37
50
|
nextCallback: any;
|
|
38
51
|
needsUpdate: any;
|
|
39
52
|
childRef: RefObject<any>;
|
|
40
|
-
constructor(props: TransitionProps);
|
|
53
|
+
constructor(props: TransitionProps & ExtraProps);
|
|
41
54
|
static getDerivedStateFromProps(nextProps: TransitionProps, prevState: TransitionState): {
|
|
42
55
|
status: STATUS;
|
|
43
56
|
};
|
|
@@ -47,7 +60,7 @@ declare class Transition extends Component<TransitionProps, TransitionState> {
|
|
|
47
60
|
componentWillUnmount(): void;
|
|
48
61
|
onTransitionEnd(node: HTMLElement, handler: any): void;
|
|
49
62
|
setNextCallback(callback: any): any;
|
|
50
|
-
getChildElement():
|
|
63
|
+
getChildElement(): HTMLElement;
|
|
51
64
|
performEnter(props: TransitionProps): void;
|
|
52
65
|
performExit(props: TransitionProps): void;
|
|
53
66
|
cancelNextCallback(): void;
|
|
@@ -154,10 +154,11 @@ var Transition = class extends import_react.Component {
|
|
|
154
154
|
return this.nextCallback;
|
|
155
155
|
}
|
|
156
156
|
getChildElement() {
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
var _a, _b, _c, _d, _e;
|
|
158
|
+
if (((_a = this.props) == null ? void 0 : _a.nodeRef) instanceof Function) {
|
|
159
|
+
return (_c = (_b = this.props) == null ? void 0 : _b.nodeRef()) == null ? void 0 : _c.current;
|
|
159
160
|
}
|
|
160
|
-
return (0
|
|
161
|
+
return (_e = (_d = this.props) == null ? void 0 : _d.nodeRef) == null ? void 0 : _e.current;
|
|
161
162
|
}
|
|
162
163
|
performEnter(props) {
|
|
163
164
|
const { beforeEnter, onEnter, afterEnter } = props || this.props;
|
|
@@ -218,7 +219,8 @@ var Transition = class extends import_react.Component {
|
|
|
218
219
|
"afterEnter",
|
|
219
220
|
"beforeLeave",
|
|
220
221
|
"onLeave",
|
|
221
|
-
"afterLeave"
|
|
222
|
+
"afterLeave",
|
|
223
|
+
"nodeRef"
|
|
222
224
|
]);
|
|
223
225
|
let transitionClassName;
|
|
224
226
|
if (name) {
|
|
@@ -1,10 +1,55 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
export interface TransitionGroupProps {
|
|
3
|
+
/**
|
|
4
|
+
* `<TransitionGroup>` renders a `<div>` by default. You can change this
|
|
5
|
+
* behavior by providing a `component` prop.
|
|
6
|
+
* If you use React v16+ and would like to avoid a wrapping `<div>` element
|
|
7
|
+
* you can pass in `component={null}`. This is useful if the wrapping div
|
|
8
|
+
* borks your css styles.
|
|
9
|
+
*/
|
|
3
10
|
component: any;
|
|
11
|
+
/**
|
|
12
|
+
* A set of `<Transition>` components, that are toggled `in` and out as they
|
|
13
|
+
* leave. the `<TransitionGroup>` will inject specific transition props, so
|
|
14
|
+
* remember to spread them through if you are wrapping the `<Transition>` as
|
|
15
|
+
* with our `<Fade>` example.
|
|
16
|
+
*
|
|
17
|
+
* While this component is meant for multiple `Transition` or `CSSTransition`
|
|
18
|
+
* children, sometimes you may want to have a single transition child with
|
|
19
|
+
* content that you want to be transitioned out and in when you change it
|
|
20
|
+
* (e.g. routes, images etc.) In that case you can change the `key` prop of
|
|
21
|
+
* the transition child as you change its content, this will cause
|
|
22
|
+
* `TransitionGroup` to transition the child out and back in.
|
|
23
|
+
*/
|
|
4
24
|
children: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* A convenience prop that enables or disables transitionAppear animations
|
|
27
|
+
* for all children. Note that specifying this will override any defaults set
|
|
28
|
+
* on individual children Transitions.
|
|
29
|
+
*/
|
|
5
30
|
transitionAppear: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* A convenience prop that enables or disables enter animations
|
|
33
|
+
* for all children. Note that specifying this will override any defaults set
|
|
34
|
+
* on individual children Transitions.
|
|
35
|
+
*/
|
|
6
36
|
enter: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* A convenience prop that enables or disables exit animations
|
|
39
|
+
* for all children. Note that specifying this will override any defaults set
|
|
40
|
+
* on individual children Transitions.
|
|
41
|
+
*/
|
|
7
42
|
exit: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* You may need to apply reactive updates to a child as it is exiting.
|
|
45
|
+
* This is generally done by using `cloneElement` however in the case of an exiting
|
|
46
|
+
* child the element has already been removed and not accessible to the consumer.
|
|
47
|
+
*
|
|
48
|
+
* If you do need to update a child as it leaves you can provide a `childFactory`
|
|
49
|
+
* to wrap every child, even the ones that are leaving.
|
|
50
|
+
*
|
|
51
|
+
* @type Function(child: ReactElement) -> ReactElement
|
|
52
|
+
*/
|
|
8
53
|
childFactory: (child: React.ReactNode) => React.ReactNode;
|
|
9
54
|
}
|
|
10
55
|
interface State {
|
|
@@ -15,6 +60,20 @@ interface State {
|
|
|
15
60
|
handleExited?: (child: any, node: any) => void;
|
|
16
61
|
firstRender?: boolean;
|
|
17
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* The `<TransitionGroup>` component manages a set of transition components
|
|
65
|
+
* (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition
|
|
66
|
+
* components, `<TransitionGroup>` is a state machine for managing the mounting
|
|
67
|
+
* and unmounting of components over time.
|
|
68
|
+
*
|
|
69
|
+
* Consider the example below. As items are removed or added to the TodoList the
|
|
70
|
+
* `in` prop is toggled automatically by the `<TransitionGroup>`.
|
|
71
|
+
*
|
|
72
|
+
* Note that `<TransitionGroup>` does not define any animation behavior!
|
|
73
|
+
* Exactly _how_ a list item animates is up to the individual transition
|
|
74
|
+
* component. This means you can mix and match animations across different list
|
|
75
|
+
* items.
|
|
76
|
+
*/
|
|
18
77
|
declare class TransitionGroup extends Component<TransitionGroupProps, State> {
|
|
19
78
|
mounted: boolean | undefined;
|
|
20
79
|
static defaultProps: {
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Given `this.props.children`, return an object mapping key to child.
|
|
4
|
+
*
|
|
5
|
+
* @param {*} children `this.props.children`
|
|
6
|
+
* @return {object} Mapping of key to child
|
|
7
|
+
*/
|
|
2
8
|
export declare function getChildMapping(children: React.ReactElement<any>[] | React.ReactElement<any>, mapFn?: (child: React.ReactElement<any>) => React.ReactNode): any;
|
|
9
|
+
/**
|
|
10
|
+
* When you're adding or removing children some may be added or removed in the
|
|
11
|
+
* same render pass. We want to show *both* since we want to simultaneously
|
|
12
|
+
* animate elements in and out. This function takes a previous set of keys
|
|
13
|
+
* and a new set of keys and merges them with its best guess of the correct
|
|
14
|
+
* ordering. In the future we may expose some of the utilities in
|
|
15
|
+
* ReactMultiChild to make this easy, but for now React itself does not
|
|
16
|
+
* directly have this concept of the union of prevChildren and nextChildren
|
|
17
|
+
* so we implement it here.
|
|
18
|
+
*
|
|
19
|
+
* @param {object} prev prev children as returned from
|
|
20
|
+
* `ReactTransitionChildMapping.getChildMapping()`.
|
|
21
|
+
* @param {object} next next children as returned from
|
|
22
|
+
* `ReactTransitionChildMapping.getChildMapping()`.
|
|
23
|
+
* @return {object} a key set that contains all keys in `prev` and all keys
|
|
24
|
+
* in `next` in a reasonable order.
|
|
25
|
+
*/
|
|
3
26
|
export declare function mergeChildMappings(prev: any, next: any): {};
|
|
4
27
|
export declare function getInitialChildMapping(props: any, afterLeave: any): any;
|
|
5
28
|
export declare function getNextChildMapping(nextProps: any, prevChildMapping: any, afterLeave: any): {};
|
package/dist/Tree/NodeList.d.ts
CHANGED
|
@@ -38,6 +38,9 @@ interface NodeListProps {
|
|
|
38
38
|
onListChangeStart: () => void;
|
|
39
39
|
onListChangeEnd: () => void;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* We only need get visible content items to play the animation.
|
|
43
|
+
*/
|
|
41
44
|
export declare function getMinimumRangeTransitionRange(list: FlattenNode[], virtual: boolean, height: number, itemHeight: number): FlattenNode[];
|
|
42
45
|
declare const NodeList: FC<NodeListProps>;
|
|
43
46
|
export default NodeList;
|