@apdesign/web-react 1.3.0 → 1.3.2
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 +3 -3
- package/dist/arco.min.js +2 -2
- package/es/Button/index.d.ts +3 -3
- package/es/DatePicker/picker-range.d.ts +1 -1
- package/es/DatePicker/util.d.ts +1 -1
- package/es/Menu/context.d.ts +1 -1
- package/es/Select/select.js +15 -3
- package/es/_util/constant.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/Select/select.js +15 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/es/Button/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import Group from './group';
|
|
3
3
|
import { ButtonProps } from './interface';
|
|
4
4
|
declare const ButtonComponent: React.ForwardRefExoticComponent<Partial<{
|
|
5
|
-
htmlType?: "button" | "
|
|
6
|
-
} & import("./interface").BaseButtonProps & Omit<React.ButtonHTMLAttributes<any>, "className" | "
|
|
5
|
+
htmlType?: "button" | "reset" | "submit";
|
|
6
|
+
} & import("./interface").BaseButtonProps & Omit<React.ButtonHTMLAttributes<any>, "className" | "onClick" | "type"> & {
|
|
7
7
|
href: string;
|
|
8
8
|
target?: string;
|
|
9
9
|
anchorProps?: React.HTMLProps<HTMLAnchorElement>;
|
|
10
|
-
} & Omit<React.AnchorHTMLAttributes<any>, "className" | "
|
|
10
|
+
} & Omit<React.AnchorHTMLAttributes<any>, "className" | "onClick" | "type">> & React.RefAttributes<unknown>> & {
|
|
11
11
|
__BYTE_BUTTON: boolean;
|
|
12
12
|
Group: typeof Group;
|
|
13
13
|
};
|
|
@@ -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/DatePicker/util.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
2
|
export declare function isTimeArrayChange(prevTime: Dayjs[], nextTime: Dayjs[]): boolean;
|
|
3
|
-
export declare function getAvailableDayjsLength(value: any):
|
|
3
|
+
export declare function getAvailableDayjsLength(value: any): 1 | 0 | 2;
|
|
4
4
|
export declare function isDisabledDate(cellDate: any, disabledDate: any, mode: any): boolean;
|
|
5
5
|
declare type WeekStartType = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
6
6
|
export declare function getDefaultWeekStart(dayjsLocale: string): WeekStartType;
|
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, "
|
|
9
|
+
declare const MenuContext: import("react").Context<Pick<MenuProps, "mode" | "triggerProps" | "collapse" | "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/Select/select.js
CHANGED
|
@@ -93,8 +93,10 @@ function Select(baseProps, ref) {
|
|
|
93
93
|
var isMultipleQuickSelectMode = isMultipleMode && isQuickSingleSelectMode;
|
|
94
94
|
// TODO: 统一 useMergeValue 函数的表现
|
|
95
95
|
var _b = __read(useState(getValidValue(props.defaultValue, isMultipleMode, labelInValue)), 2), stateValue = _b[0], setValue = _b[1];
|
|
96
|
-
var _c = __read(useState(
|
|
97
|
-
|
|
96
|
+
var _c = __read(useState('value' in props
|
|
97
|
+
? getValidValue(props.value, isMultipleMode, labelInValue)
|
|
98
|
+
: getValidValue(props.defaultValue, isMultipleMode, labelInValue)), 2), stateProxyValue = _c[0], setProxyValue = _c[1];
|
|
99
|
+
var value = 'value' in props && !isMultipleQuickSelectMode
|
|
98
100
|
? getValidValue(props.value, isMultipleMode, labelInValue)
|
|
99
101
|
: isMultipleQuickSelectMode
|
|
100
102
|
? stateProxyValue
|
|
@@ -402,7 +404,17 @@ function Select(baseProps, ref) {
|
|
|
402
404
|
if (isMultipleQuickSelectMode) {
|
|
403
405
|
tryUpdateProxySelectValue(newValue);
|
|
404
406
|
if (fromTag) {
|
|
405
|
-
|
|
407
|
+
if (popupVisible) {
|
|
408
|
+
tryUpdatePopupVisible(false);
|
|
409
|
+
var _newValue = operation === 'add'
|
|
410
|
+
? stateValue.concat(optionValue)
|
|
411
|
+
: stateValue.filter(function (v) { return v !== optionValue; });
|
|
412
|
+
tryUpdateSelectValue(_newValue);
|
|
413
|
+
setProxyValue(_newValue);
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
tryUpdateSelectValue(newValue);
|
|
417
|
+
}
|
|
406
418
|
}
|
|
407
419
|
}
|
|
408
420
|
else {
|
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.3.
|
|
142
|
+
export declare const version = "1.3.2";
|
package/es/index.js
CHANGED
package/lib/Select/select.js
CHANGED
|
@@ -117,8 +117,10 @@ function Select(baseProps, ref) {
|
|
|
117
117
|
var isMultipleQuickSelectMode = isMultipleMode && isQuickSingleSelectMode;
|
|
118
118
|
// TODO: 统一 useMergeValue 函数的表现
|
|
119
119
|
var _b = __read((0, react_1.useState)((0, utils_1.getValidValue)(props.defaultValue, isMultipleMode, labelInValue)), 2), stateValue = _b[0], setValue = _b[1];
|
|
120
|
-
var _c = __read((0, react_1.useState)(
|
|
121
|
-
|
|
120
|
+
var _c = __read((0, react_1.useState)('value' in props
|
|
121
|
+
? (0, utils_1.getValidValue)(props.value, isMultipleMode, labelInValue)
|
|
122
|
+
: (0, utils_1.getValidValue)(props.defaultValue, isMultipleMode, labelInValue)), 2), stateProxyValue = _c[0], setProxyValue = _c[1];
|
|
123
|
+
var value = 'value' in props && !isMultipleQuickSelectMode
|
|
122
124
|
? (0, utils_1.getValidValue)(props.value, isMultipleMode, labelInValue)
|
|
123
125
|
: isMultipleQuickSelectMode
|
|
124
126
|
? stateProxyValue
|
|
@@ -426,7 +428,17 @@ function Select(baseProps, ref) {
|
|
|
426
428
|
if (isMultipleQuickSelectMode) {
|
|
427
429
|
tryUpdateProxySelectValue(newValue);
|
|
428
430
|
if (fromTag) {
|
|
429
|
-
|
|
431
|
+
if (popupVisible) {
|
|
432
|
+
tryUpdatePopupVisible(false);
|
|
433
|
+
var _newValue = operation === 'add'
|
|
434
|
+
? stateValue.concat(optionValue)
|
|
435
|
+
: stateValue.filter(function (v) { return v !== optionValue; });
|
|
436
|
+
tryUpdateSelectValue(_newValue);
|
|
437
|
+
setProxyValue(_newValue);
|
|
438
|
+
}
|
|
439
|
+
else {
|
|
440
|
+
tryUpdateSelectValue(newValue);
|
|
441
|
+
}
|
|
430
442
|
}
|
|
431
443
|
}
|
|
432
444
|
else {
|
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.3.
|
|
142
|
+
export declare const version = "1.3.2";
|
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.3.
|
|
150
|
+
exports.version = '1.3.2';
|