@apdesign/web-react 1.5.0 → 1.5.1
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/arco-icon.min.js +1 -1
- package/dist/arco.development.js +4 -4
- package/dist/arco.min.js +2 -2
- package/es/DatePicker/picker-range.d.ts +1 -1
- package/es/Menu/context.d.ts +1 -1
- package/es/Table/table.d.ts +2 -0
- package/es/Table/table.js +1 -0
- package/es/Typography/base.d.ts +1 -1
- package/es/_class/VirtualList/index.d.ts +1 -0
- package/es/_class/VirtualList/index.js +7 -0
- package/es/_util/constant.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/Table/table.d.ts +2 -0
- package/lib/Table/table.js +1 -0
- package/lib/_class/VirtualList/index.d.ts +1 -0
- package/lib/_class/VirtualList/index.js +7 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RangePickerHandle } from './interface';
|
|
3
|
-
declare const PickerComponent: React.ForwardRefExoticComponent<import("./interface").BaseRangePickerProps & import("../_util/type").Omit<import("./interface").PickerProps, "onChange" | "onSelect" | "
|
|
3
|
+
declare const PickerComponent: React.ForwardRefExoticComponent<import("./interface").BaseRangePickerProps & import("../_util/type").Omit<import("./interface").PickerProps, "onChange" | "onSelect" | "inputProps" | "onOk" | "defaultPickerValue" | "pickerValue" | "onPickerValueChange"> & React.RefAttributes<RangePickerHandle>>;
|
|
4
4
|
export default PickerComponent;
|
package/es/Menu/context.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare type HotkeyInfo = {
|
|
|
6
6
|
type: 'sibling' | 'generation' | 'enter';
|
|
7
7
|
};
|
|
8
8
|
export declare type ResetHotkeyInfo = (activeKey?: string) => void;
|
|
9
|
-
declare const MenuContext: import("react").Context<Pick<MenuProps, "collapse" | "
|
|
9
|
+
declare const MenuContext: import("react").Context<Pick<MenuProps, "collapse" | "mode" | "triggerProps" | "inDropdown" | "theme" | "levelIndent" | "icons" | "autoScrollIntoView" | "selectedKeys" | "openKeys" | "scrollConfig" | "tooltipProps"> & {
|
|
10
10
|
id?: string;
|
|
11
11
|
prefixCls?: string;
|
|
12
12
|
onClickMenuItem?: (key: string, event: any) => void;
|
package/es/Table/table.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableProps } from './interface';
|
|
3
|
+
import { VirtualListHandle } from '../_class/VirtualList';
|
|
3
4
|
export interface TableInstance {
|
|
4
5
|
getRootDomElement: () => HTMLDivElement;
|
|
5
6
|
scrollIntoView: (dataIndex: React.Key) => void;
|
|
7
|
+
refVirtualList: React.MutableRefObject<VirtualListHandle>;
|
|
6
8
|
}
|
|
7
9
|
declare const _default: <T>(props: TableProps<T> & {
|
|
8
10
|
ref?: React.Ref<TableInstance>;
|
package/es/Table/table.js
CHANGED
package/es/Typography/base.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypographyParagraphProps, TypographyTitleProps } from './interface';
|
|
3
3
|
declare const _default: React.ForwardRefExoticComponent<TypographyParagraphProps & TypographyTitleProps & import("./interface").CommonProps & {
|
|
4
|
-
componentType: "
|
|
4
|
+
componentType: "Paragraph" | "Title" | "Text";
|
|
5
5
|
} & React.RefAttributes<unknown>>;
|
|
6
6
|
export default _default;
|
|
@@ -34,6 +34,7 @@ export declare type VirtualListHandle = {
|
|
|
34
34
|
key: Key;
|
|
35
35
|
options?: ScrollIntoViewOptions;
|
|
36
36
|
}) => void;
|
|
37
|
+
virtualListScrollHandler: (event: UIEvent<HTMLElement> | null, isInit?: boolean) => void;
|
|
37
38
|
};
|
|
38
39
|
declare const VirtualList: React.ForwardRefExoticComponent<VirtualListProps<any> & React.RefAttributes<VirtualListHandle>>;
|
|
39
40
|
export default VirtualList;
|
|
@@ -427,7 +427,14 @@ var VirtualList = React.forwardRef(function (props, ref) {
|
|
|
427
427
|
}
|
|
428
428
|
});
|
|
429
429
|
},
|
|
430
|
+
virtualListScrollHandler: virtualListScrollHandler,
|
|
430
431
|
}); }, [data, itemHeight, state]);
|
|
432
|
+
useEffect(function () {
|
|
433
|
+
// 用于触发虚拟列表重计算定位时机
|
|
434
|
+
if (state.status === 'MEASURE_DONE') {
|
|
435
|
+
window.dispatchEvent(new Event('VIRTUAL_LIST_MEASURE_DONE'));
|
|
436
|
+
}
|
|
437
|
+
}, [state.status]);
|
|
431
438
|
var renderChildren = function (list, startIndex) {
|
|
432
439
|
return list.map(function (item, index) {
|
|
433
440
|
var originIndex = startIndex + index;
|
package/es/_util/constant.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const NOOP: () => void;
|
|
2
2
|
export declare function newArray(length: number): any;
|
|
3
|
-
export declare function pickTriggerPropsFromRest(rest: any): Pick<any, "
|
|
3
|
+
export declare function pickTriggerPropsFromRest(rest: any): Pick<any, "onFocus" | "onBlur" | "onClick" | "tabIndex" | "onContextMenu" | "onMouseEnter" | "onMouseLeave" | "onMouseMove">;
|
package/es/index.d.ts
CHANGED
|
@@ -139,4 +139,4 @@ export type { WatermarkProps } from './Watermark/interface';
|
|
|
139
139
|
export { default as Watermark } from './Watermark';
|
|
140
140
|
export type { ImageProps, ImagePreviewProps, ImagePreviewActionProps, ImagePreviewGroupProps } from './Image/interface';
|
|
141
141
|
export { default as Image } from './Image';
|
|
142
|
-
export declare const version = "1.5.
|
|
142
|
+
export declare const version = "1.5.1";
|
package/es/index.js
CHANGED
package/lib/Table/table.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableProps } from './interface';
|
|
3
|
+
import { VirtualListHandle } from '../_class/VirtualList';
|
|
3
4
|
export interface TableInstance {
|
|
4
5
|
getRootDomElement: () => HTMLDivElement;
|
|
5
6
|
scrollIntoView: (dataIndex: React.Key) => void;
|
|
7
|
+
refVirtualList: React.MutableRefObject<VirtualListHandle>;
|
|
6
8
|
}
|
|
7
9
|
declare const _default: <T>(props: TableProps<T> & {
|
|
8
10
|
ref?: React.Ref<TableInstance>;
|
package/lib/Table/table.js
CHANGED
|
@@ -34,6 +34,7 @@ export declare type VirtualListHandle = {
|
|
|
34
34
|
key: Key;
|
|
35
35
|
options?: ScrollIntoViewOptions;
|
|
36
36
|
}) => void;
|
|
37
|
+
virtualListScrollHandler: (event: UIEvent<HTMLElement> | null, isInit?: boolean) => void;
|
|
37
38
|
};
|
|
38
39
|
declare const VirtualList: React.ForwardRefExoticComponent<VirtualListProps<any> & React.RefAttributes<VirtualListHandle>>;
|
|
39
40
|
export default VirtualList;
|
|
@@ -449,7 +449,14 @@ var VirtualList = react_1.default.forwardRef(function (props, ref) {
|
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
451
|
},
|
|
452
|
+
virtualListScrollHandler: virtualListScrollHandler,
|
|
452
453
|
}); }, [data, itemHeight, state]);
|
|
454
|
+
(0, react_1.useEffect)(function () {
|
|
455
|
+
// 用于触发虚拟列表重计算定位时机
|
|
456
|
+
if (state.status === 'MEASURE_DONE') {
|
|
457
|
+
window.dispatchEvent(new Event('VIRTUAL_LIST_MEASURE_DONE'));
|
|
458
|
+
}
|
|
459
|
+
}, [state.status]);
|
|
453
460
|
var renderChildren = function (list, startIndex) {
|
|
454
461
|
return list.map(function (item, index) {
|
|
455
462
|
var originIndex = startIndex + index;
|
package/lib/index.d.ts
CHANGED
|
@@ -139,4 +139,4 @@ export type { WatermarkProps } from './Watermark/interface';
|
|
|
139
139
|
export { default as Watermark } from './Watermark';
|
|
140
140
|
export type { ImageProps, ImagePreviewProps, ImagePreviewActionProps, ImagePreviewGroupProps } from './Image/interface';
|
|
141
141
|
export { default as Image } from './Image';
|
|
142
|
-
export declare const version = "1.5.
|
|
142
|
+
export declare const version = "1.5.1";
|
package/lib/index.js
CHANGED
|
@@ -147,4 +147,4 @@ var Watermark_1 = require("./Watermark");
|
|
|
147
147
|
Object.defineProperty(exports, "Watermark", { enumerable: true, get: function () { return __importDefault(Watermark_1).default; } });
|
|
148
148
|
var Image_1 = require("./Image");
|
|
149
149
|
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return __importDefault(Image_1).default; } });
|
|
150
|
-
exports.version = '1.5.
|
|
150
|
+
exports.version = '1.5.1';
|