@douyinfe/semi-ui 2.38.3-alpha.1 → 2.38.3-alpha.2-patch-table
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/umd/semi-ui.js +10 -2
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/buttonGroup.d.ts +1 -1
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +2 -2
- package/lib/cjs/datePicker/datePicker.d.ts +2 -2
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/datePicker/quickControl.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/cjs/dropdown/dropdownItem.js +2 -1
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +4 -4
- package/lib/cjs/form/field.d.ts +4 -4
- package/lib/cjs/modal/confirm.d.ts +34 -34
- package/lib/cjs/popover/index.d.ts +1 -1
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/select/index.d.ts +1 -1
- package/lib/cjs/select/option.js +2 -1
- package/lib/cjs/table/Table.d.ts +1 -1
- package/lib/cjs/table/TableCell.js +7 -1
- package/lib/cjs/table/interface.d.ts +9 -0
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/typography/numeral.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +2 -2
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/buttonGroup.d.ts +1 -1
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +2 -2
- package/lib/es/datePicker/datePicker.d.ts +2 -2
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/datePicker/quickControl.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/es/dropdown/dropdownItem.js +2 -1
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +4 -4
- package/lib/es/form/field.d.ts +4 -4
- package/lib/es/modal/confirm.d.ts +34 -34
- package/lib/es/popover/index.d.ts +1 -1
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/select/index.d.ts +1 -1
- package/lib/es/select/option.js +2 -1
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/table/TableCell.js +7 -1
- package/lib/es/table/interface.d.ts +9 -0
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/typography/numeral.d.ts +1 -1
- package/lib/es/typography/title.d.ts +2 -2
- package/package.json +8 -8
|
@@ -74,7 +74,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
74
74
|
max: PropTypes.Requireable<number>;
|
|
75
75
|
placeholder: PropTypes.Requireable<NonNullable<string | any[]>>;
|
|
76
76
|
presets: PropTypes.Requireable<any[]>;
|
|
77
|
-
presetPosition: PropTypes.Requireable<"
|
|
77
|
+
presetPosition: PropTypes.Requireable<"top" | "left" | "right" | "bottom">;
|
|
78
78
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
79
79
|
onChangeWithDateFirst: PropTypes.Requireable<boolean>;
|
|
80
80
|
weekStartsOn: PropTypes.Requireable<number>;
|
|
@@ -91,7 +91,7 @@ export default class DatePicker extends BaseComponent<DatePickerProps, DatePicke
|
|
|
91
91
|
insetLabel: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
92
92
|
insetLabelId: PropTypes.Requireable<string>;
|
|
93
93
|
zIndex: PropTypes.Requireable<number>;
|
|
94
|
-
position: PropTypes.Requireable<"
|
|
94
|
+
position: PropTypes.Requireable<"top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
95
95
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
96
96
|
onCancel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
97
97
|
onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -51,7 +51,7 @@ export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGri
|
|
|
51
51
|
onPanelChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
52
52
|
focusRecordsRef: PropTypes.Requireable<object>;
|
|
53
53
|
triggerRender: PropTypes.Requireable<(...args: any[]) => any>;
|
|
54
|
-
presetPosition: PropTypes.Requireable<"
|
|
54
|
+
presetPosition: PropTypes.Requireable<"top" | "left" | "right" | "bottom">;
|
|
55
55
|
renderQuickControls: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
56
56
|
renderDateInput: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
57
57
|
};
|
|
@@ -15,7 +15,7 @@ export interface QuickControlProps {
|
|
|
15
15
|
declare class QuickControl extends PureComponent<QuickControlProps> {
|
|
16
16
|
static propTypes: {
|
|
17
17
|
presets: PropTypes.Requireable<any[]>;
|
|
18
|
-
presetPosition: PropTypes.Requireable<"
|
|
18
|
+
presetPosition: PropTypes.Requireable<"top" | "left" | "right" | "bottom">;
|
|
19
19
|
onPresetClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
20
|
type: PropTypes.Requireable<string>;
|
|
21
21
|
insetInput: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
@@ -21,7 +21,7 @@ declare class YearAndMonth extends BaseComponent<YearAndMonthProps, YearAndMonth
|
|
|
21
21
|
noBackBtn: PropTypes.Requireable<boolean>;
|
|
22
22
|
disabledDate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
23
|
density: PropTypes.Requireable<string>;
|
|
24
|
-
presetPosition: PropTypes.Requireable<"
|
|
24
|
+
presetPosition: PropTypes.Requireable<"top" | "left" | "right" | "bottom">;
|
|
25
25
|
renderQuickControls: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
26
26
|
renderDateInput: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
27
27
|
type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
|
|
@@ -37,7 +37,8 @@ class DropdownItem extends BaseComponent {
|
|
|
37
37
|
const events = {};
|
|
38
38
|
if (!disabled) {
|
|
39
39
|
['onClick', 'onMouseEnter', 'onMouseLeave', 'onContextMenu'].forEach(eventName => {
|
|
40
|
-
|
|
40
|
+
const isInAnotherDropdown = this.context.level !== 1;
|
|
41
|
+
if (isInAnotherDropdown && eventName === "onClick") {
|
|
41
42
|
events["onMouseDown"] = e => {
|
|
42
43
|
var _a, _b;
|
|
43
44
|
if (e.button === 0) {
|
|
@@ -66,7 +66,7 @@ declare class Dropdown extends BaseComponent<DropdownProps, DropdownState> {
|
|
|
66
66
|
motion: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
67
67
|
onVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
68
|
prefixCls: PropTypes.Requireable<string>;
|
|
69
|
-
position: PropTypes.Requireable<"
|
|
69
|
+
position: PropTypes.Requireable<"top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
70
70
|
rePosKey: PropTypes.Requireable<NonNullable<string | number>>;
|
|
71
71
|
render: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
72
72
|
spacing: PropTypes.Requireable<number>;
|
|
@@ -57,9 +57,9 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
57
57
|
static Select: React.ComponentType<import("utility-types").Subtract<{
|
|
58
58
|
'aria-describedby'?: string;
|
|
59
59
|
'aria-errormessage'?: string;
|
|
60
|
-
'aria-invalid'?: boolean | "
|
|
60
|
+
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
61
61
|
'aria-labelledby'?: string;
|
|
62
|
-
'aria-required'?: boolean | "
|
|
62
|
+
'aria-required'?: boolean | "true" | "false";
|
|
63
63
|
id?: string;
|
|
64
64
|
autoFocus?: boolean;
|
|
65
65
|
autoClearSearchValue?: boolean;
|
|
@@ -83,7 +83,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
83
83
|
expandRestTagsOnClick?: boolean;
|
|
84
84
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
85
85
|
zIndex?: number;
|
|
86
|
-
position?: "
|
|
86
|
+
position?: "top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
87
87
|
onSearch?: (value: string, event: React.KeyboardEvent<Element> | React.MouseEvent<Element, MouseEvent>) => void;
|
|
88
88
|
dropdownClassName?: string;
|
|
89
89
|
dropdownStyle?: React.CSSProperties;
|
|
@@ -138,7 +138,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
|
|
|
138
138
|
preventScroll?: boolean;
|
|
139
139
|
showRestTagsPopover?: boolean;
|
|
140
140
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
141
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
141
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
142
142
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
143
143
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
144
144
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/es/form/field.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ declare const FormTextArea: import("react").ComponentType<import("utility-types"
|
|
|
5
5
|
declare const FormSelect: import("react").ComponentType<import("utility-types").Subtract<{
|
|
6
6
|
'aria-describedby'?: string;
|
|
7
7
|
'aria-errormessage'?: string;
|
|
8
|
-
'aria-invalid'?: boolean | "
|
|
8
|
+
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
9
9
|
'aria-labelledby'?: string;
|
|
10
|
-
'aria-required'?: boolean | "
|
|
10
|
+
'aria-required'?: boolean | "true" | "false";
|
|
11
11
|
id?: string;
|
|
12
12
|
autoFocus?: boolean;
|
|
13
13
|
autoClearSearchValue?: boolean;
|
|
@@ -31,7 +31,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
31
31
|
expandRestTagsOnClick?: boolean;
|
|
32
32
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
33
33
|
zIndex?: number;
|
|
34
|
-
position?: "
|
|
34
|
+
position?: "top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
35
35
|
onSearch?: (value: string, event: import("react").KeyboardEvent<Element> | import("react").MouseEvent<Element, MouseEvent>) => void;
|
|
36
36
|
dropdownClassName?: string;
|
|
37
37
|
dropdownStyle?: import("react").CSSProperties;
|
|
@@ -86,7 +86,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
86
86
|
preventScroll?: boolean;
|
|
87
87
|
showRestTagsPopover?: boolean;
|
|
88
88
|
restTagsPopoverProps?: import("../popover").PopoverProps;
|
|
89
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
89
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
90
90
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
91
91
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
92
92
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
@@ -140,26 +140,26 @@ export declare function withWarning(props: ModalReactProps): {
|
|
|
140
140
|
type: "warning";
|
|
141
141
|
};
|
|
142
142
|
export declare function withError(props: ModalReactProps): {
|
|
143
|
-
title?: React.ReactNode;
|
|
144
143
|
children?: React.ReactNode;
|
|
145
|
-
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
146
144
|
style?: React.CSSProperties;
|
|
147
145
|
className?: string;
|
|
148
|
-
motion?: boolean;
|
|
149
146
|
getPopupContainer?: () => HTMLElement;
|
|
150
147
|
footer?: React.ReactNode;
|
|
151
148
|
header?: React.ReactNode;
|
|
149
|
+
title?: React.ReactNode;
|
|
152
150
|
direction?: any;
|
|
151
|
+
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
152
|
+
motion?: boolean;
|
|
153
|
+
mask?: boolean;
|
|
154
|
+
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
153
155
|
width?: string | number;
|
|
154
156
|
height?: string | number;
|
|
155
|
-
mask?: boolean;
|
|
156
|
-
visible?: boolean;
|
|
157
157
|
content?: React.ReactNode;
|
|
158
|
-
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
159
|
-
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
160
158
|
zIndex?: number;
|
|
159
|
+
visible?: boolean;
|
|
161
160
|
closeOnEsc?: boolean;
|
|
162
161
|
preventScroll?: boolean;
|
|
162
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
163
163
|
afterClose?: () => void;
|
|
164
164
|
keepDOM?: boolean;
|
|
165
165
|
cancelText?: string;
|
|
@@ -201,16 +201,13 @@ export declare function withError(props: ModalReactProps): {
|
|
|
201
201
|
onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
|
|
202
202
|
onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
|
|
203
203
|
'aria-label'?: string;
|
|
204
|
+
value?: string | number | readonly string[];
|
|
205
|
+
form?: string;
|
|
206
|
+
slot?: string;
|
|
204
207
|
title?: string;
|
|
205
208
|
name?: string;
|
|
206
|
-
value?: string | number | readonly string[];
|
|
207
209
|
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
208
210
|
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
-
form?: string;
|
|
210
|
-
slot?: string;
|
|
211
|
-
hidden?: boolean;
|
|
212
|
-
color?: string;
|
|
213
|
-
content?: string;
|
|
214
211
|
onChange?: React.FormEventHandler<HTMLButtonElement>;
|
|
215
212
|
defaultChecked?: boolean;
|
|
216
213
|
defaultValue?: string | number | readonly string[];
|
|
@@ -224,27 +221,30 @@ export declare function withError(props: ModalReactProps): {
|
|
|
224
221
|
formNoValidate?: boolean;
|
|
225
222
|
formTarget?: string;
|
|
226
223
|
dir?: string;
|
|
227
|
-
draggable?: boolean | "
|
|
224
|
+
draggable?: boolean | "true" | "false";
|
|
225
|
+
hidden?: boolean;
|
|
228
226
|
lang?: string;
|
|
229
227
|
translate?: "no" | "yes";
|
|
230
228
|
prefix?: string;
|
|
231
229
|
role?: React.AriaRole;
|
|
232
|
-
contentEditable?: "inherit" | (boolean | "
|
|
230
|
+
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
233
231
|
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
234
232
|
nonce?: string;
|
|
235
233
|
tabIndex?: number;
|
|
234
|
+
color?: string;
|
|
235
|
+
content?: string;
|
|
236
236
|
onMouseOut?: React.MouseEventHandler<HTMLButtonElement>;
|
|
237
237
|
onMouseOver?: React.MouseEventHandler<HTMLButtonElement>;
|
|
238
238
|
onFocus?: React.FocusEventHandler<HTMLButtonElement>;
|
|
239
239
|
onBlur?: React.FocusEventHandler<HTMLButtonElement>;
|
|
240
240
|
onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
241
|
-
'aria-expanded'?: boolean | "
|
|
242
|
-
'aria-haspopup'?: boolean | "dialog" | "menu" | "
|
|
241
|
+
'aria-expanded'?: boolean | "true" | "false";
|
|
242
|
+
'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false";
|
|
243
243
|
'aria-controls'?: string;
|
|
244
244
|
'aria-describedby'?: string;
|
|
245
245
|
contextMenu?: string;
|
|
246
246
|
placeholder?: string;
|
|
247
|
-
spellCheck?: boolean | "
|
|
247
|
+
spellCheck?: boolean | "true" | "false";
|
|
248
248
|
radioGroup?: string;
|
|
249
249
|
about?: string;
|
|
250
250
|
datatype?: string;
|
|
@@ -268,42 +268,42 @@ export declare function withError(props: ModalReactProps): {
|
|
|
268
268
|
unselectable?: "on" | "off";
|
|
269
269
|
is?: string;
|
|
270
270
|
'aria-activedescendant'?: string;
|
|
271
|
-
'aria-atomic'?: boolean | "
|
|
272
|
-
'aria-autocomplete'?: "both" | "none" | "
|
|
273
|
-
'aria-busy'?: boolean | "
|
|
274
|
-
'aria-checked'?: boolean | "
|
|
271
|
+
'aria-atomic'?: boolean | "true" | "false";
|
|
272
|
+
'aria-autocomplete'?: "both" | "none" | "list" | "inline";
|
|
273
|
+
'aria-busy'?: boolean | "true" | "false";
|
|
274
|
+
'aria-checked'?: boolean | "true" | "false" | "mixed";
|
|
275
275
|
'aria-colcount'?: number;
|
|
276
276
|
'aria-colindex'?: number;
|
|
277
277
|
'aria-colspan'?: number;
|
|
278
|
-
'aria-current'?: boolean | "time" | "
|
|
278
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "location" | "page" | "step" | "date";
|
|
279
279
|
'aria-details'?: string;
|
|
280
|
-
'aria-disabled'?: boolean | "
|
|
280
|
+
'aria-disabled'?: boolean | "true" | "false";
|
|
281
281
|
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
282
282
|
'aria-errormessage'?: string;
|
|
283
283
|
'aria-flowto'?: string;
|
|
284
|
-
'aria-grabbed'?: boolean | "
|
|
285
|
-
'aria-hidden'?: boolean | "
|
|
286
|
-
'aria-invalid'?: boolean | "
|
|
284
|
+
'aria-grabbed'?: boolean | "true" | "false";
|
|
285
|
+
'aria-hidden'?: boolean | "true" | "false";
|
|
286
|
+
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
287
287
|
'aria-keyshortcuts'?: string;
|
|
288
288
|
'aria-labelledby'?: string;
|
|
289
289
|
'aria-level'?: number;
|
|
290
290
|
'aria-live'?: "off" | "assertive" | "polite";
|
|
291
|
-
'aria-modal'?: boolean | "
|
|
292
|
-
'aria-multiline'?: boolean | "
|
|
293
|
-
'aria-multiselectable'?: boolean | "
|
|
291
|
+
'aria-modal'?: boolean | "true" | "false";
|
|
292
|
+
'aria-multiline'?: boolean | "true" | "false";
|
|
293
|
+
'aria-multiselectable'?: boolean | "true" | "false";
|
|
294
294
|
'aria-orientation'?: "horizontal" | "vertical";
|
|
295
295
|
'aria-owns'?: string;
|
|
296
296
|
'aria-placeholder'?: string;
|
|
297
297
|
'aria-posinset'?: number;
|
|
298
|
-
'aria-pressed'?: boolean | "
|
|
299
|
-
'aria-readonly'?: boolean | "
|
|
298
|
+
'aria-pressed'?: boolean | "true" | "false" | "mixed";
|
|
299
|
+
'aria-readonly'?: boolean | "true" | "false";
|
|
300
300
|
'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
301
|
-
'aria-required'?: boolean | "
|
|
301
|
+
'aria-required'?: boolean | "true" | "false";
|
|
302
302
|
'aria-roledescription'?: string;
|
|
303
303
|
'aria-rowcount'?: number;
|
|
304
304
|
'aria-rowindex'?: number;
|
|
305
305
|
'aria-rowspan'?: number;
|
|
306
|
-
'aria-selected'?: boolean | "
|
|
306
|
+
'aria-selected'?: boolean | "true" | "false";
|
|
307
307
|
'aria-setsize'?: number;
|
|
308
308
|
'aria-sort'?: "none" | "ascending" | "descending" | "other";
|
|
309
309
|
'aria-valuemax'?: number;
|
|
@@ -55,7 +55,7 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
55
55
|
visible: PropTypes.Requireable<boolean>;
|
|
56
56
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
57
57
|
motion: PropTypes.Requireable<boolean>;
|
|
58
|
-
position: PropTypes.Requireable<"
|
|
58
|
+
position: PropTypes.Requireable<"top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
59
59
|
margin: PropTypes.Requireable<NonNullable<number | object>>;
|
|
60
60
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
61
61
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
package/lib/es/radio/radio.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
|
|
|
82
82
|
prefixCls?: string;
|
|
83
83
|
name?: string;
|
|
84
84
|
onChange?: (e: RadioChangeEvent) => void;
|
|
85
|
-
buttonSize?: "small" | "
|
|
85
|
+
buttonSize?: "small" | "middle" | "large";
|
|
86
86
|
isCardRadio?: boolean;
|
|
87
87
|
isPureCardRadio?: boolean;
|
|
88
88
|
};
|
|
@@ -48,7 +48,7 @@ declare class RadioGroup extends BaseComponent<RadioGroupProps, RadioGroupState>
|
|
|
48
48
|
disabled: PropTypes.Requireable<boolean>;
|
|
49
49
|
name: PropTypes.Requireable<string>;
|
|
50
50
|
options: PropTypes.Requireable<any[]>;
|
|
51
|
-
buttonSize: PropTypes.Requireable<"small" | "
|
|
51
|
+
buttonSize: PropTypes.Requireable<"small" | "middle" | "large">;
|
|
52
52
|
type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
|
|
53
53
|
value: PropTypes.Requireable<any>;
|
|
54
54
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
package/lib/es/select/index.d.ts
CHANGED
|
@@ -200,7 +200,7 @@ declare class Select extends BaseComponent<SelectProps, SelectState> {
|
|
|
200
200
|
expandRestTagsOnClick: PropTypes.Requireable<boolean>;
|
|
201
201
|
onDropdownVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
202
202
|
zIndex: PropTypes.Requireable<number>;
|
|
203
|
-
position: PropTypes.Requireable<"
|
|
203
|
+
position: PropTypes.Requireable<"top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
204
204
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
205
205
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
206
206
|
dropdownClassName: PropTypes.Requireable<string>;
|
package/lib/es/select/option.js
CHANGED
package/lib/es/table/Table.d.ts
CHANGED
|
@@ -308,7 +308,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
308
308
|
showSizeChanger?: boolean;
|
|
309
309
|
showQuickJumper?: boolean;
|
|
310
310
|
popoverZIndex?: number;
|
|
311
|
-
popoverPosition?: "
|
|
311
|
+
popoverPosition?: "top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
312
312
|
hideOnSinglePage?: boolean;
|
|
313
313
|
hoverShowPageSelect?: boolean;
|
|
314
314
|
disabled?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _merge from "lodash/merge";
|
|
2
1
|
import _isEqual from "lodash/isEqual";
|
|
2
|
+
import _merge from "lodash/merge";
|
|
3
3
|
import _omit from "lodash/omit";
|
|
4
4
|
import _set from "lodash/set";
|
|
5
5
|
import _noop from "lodash/noop";
|
|
@@ -72,6 +72,12 @@ export default class TableCell extends BaseComponent {
|
|
|
72
72
|
expandIcon
|
|
73
73
|
} = props;
|
|
74
74
|
const cellInSelectionColumn = isSelectionColumn(column);
|
|
75
|
+
const {
|
|
76
|
+
shouldCellUpdate
|
|
77
|
+
} = column;
|
|
78
|
+
if (typeof shouldCellUpdate === 'function') {
|
|
79
|
+
return shouldCellUpdate(nextProps, props);
|
|
80
|
+
}
|
|
75
81
|
// The expand button may be in a separate column or in the first data column
|
|
76
82
|
const columnHasExpandIcon = isExpandedColumn(column) || expandIcon;
|
|
77
83
|
if ((cellInSelectionColumn || columnHasExpandIcon) && !_isEqual(nextProps, this.props)) {
|
|
@@ -8,6 +8,7 @@ import { ArrayElement } from '../_base/base';
|
|
|
8
8
|
import { strings } from '@douyinfe/semi-foundation/lib/es/table/constants';
|
|
9
9
|
import { BaseRowKeyType, BaseSortOrder, BaseGroupBy, BaseGroupByFn, BaseFixed, BaseAlign, BaseChangeInfoSorter, BaseSorter, BaseFilter, BaseChangeInfoFilter, BaseIncludeGroupRecord, BaseEllipsis } from '@douyinfe/semi-foundation/lib/es/table/foundation';
|
|
10
10
|
import { ScrollDirection, CSSDirection } from 'react-window';
|
|
11
|
+
import { TableCellProps } from './TableCell';
|
|
11
12
|
export interface TableProps<RecordType extends Record<string, any> = any> extends BaseProps {
|
|
12
13
|
bordered?: boolean;
|
|
13
14
|
children?: ReactNode;
|
|
@@ -90,6 +91,10 @@ export interface ColumnProps<RecordType extends Record<string, any> = any> {
|
|
|
90
91
|
onFilterDropdownVisibleChange?: OnFilterDropdownVisibleChange;
|
|
91
92
|
onHeaderCell?: OnHeaderCell<RecordType>;
|
|
92
93
|
ellipsis?: BaseEllipsis;
|
|
94
|
+
/**
|
|
95
|
+
* self control whether to update cell for performance reasons
|
|
96
|
+
*/
|
|
97
|
+
shouldCellUpdate?: (props: TableCellProps, prevProps: TableCellProps) => boolean;
|
|
93
98
|
}
|
|
94
99
|
export type Align = BaseAlign;
|
|
95
100
|
export type SortOrder = BaseSortOrder;
|
|
@@ -211,6 +216,10 @@ export interface RowSelectionProps<RecordType> {
|
|
|
211
216
|
onChange?: RowSelectionOnChange<RecordType>;
|
|
212
217
|
onSelect?: RowSelectionOnSelect<RecordType>;
|
|
213
218
|
onSelectAll?: RowSelectionOnSelectAll<RecordType>;
|
|
219
|
+
/**
|
|
220
|
+
* self control whether to update cell for performance reasons
|
|
221
|
+
*/
|
|
222
|
+
shouldCellUpdate?: (props: TableCellProps, prevProps: TableCellProps) => boolean;
|
|
214
223
|
}
|
|
215
224
|
export type GetCheckboxProps<RecordType> = (record: RecordType) => CheckboxProps;
|
|
216
225
|
export type RowSelectionOnChange<RecordType> = (selectedRowKeys?: (string | number)[], selectedRows?: RecordType[]) => void;
|
|
@@ -88,7 +88,7 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
|
|
|
88
88
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
89
89
|
motion: PropTypes.Requireable<boolean>;
|
|
90
90
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
91
|
-
position: PropTypes.Requireable<"
|
|
91
|
+
position: PropTypes.Requireable<"top" | "topLeft" | "topRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
92
92
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
93
93
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
94
94
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
@@ -28,7 +28,7 @@ export default class Numeral extends PureComponent<NumeralProps> {
|
|
|
28
28
|
static propTypes: {
|
|
29
29
|
rule: PropTypes.Requireable<"text" | "numbers" | "bytes-decimal" | "bytes-binary" | "percentages" | "exponential">;
|
|
30
30
|
precision: PropTypes.Requireable<number>;
|
|
31
|
-
truncate: PropTypes.Requireable<"
|
|
31
|
+
truncate: PropTypes.Requireable<"ceil" | "floor" | "round">;
|
|
32
32
|
parser: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
33
|
copyable: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
34
34
|
delete: PropTypes.Requireable<boolean>;
|
|
@@ -39,11 +39,11 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
39
39
|
underline: PropTypes.Requireable<boolean>;
|
|
40
40
|
strong: PropTypes.Requireable<boolean>;
|
|
41
41
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
42
|
-
heading: PropTypes.Requireable<
|
|
42
|
+
heading: PropTypes.Requireable<4 | 2 | 1 | 3 | 5 | 6>;
|
|
43
43
|
style: PropTypes.Requireable<object>;
|
|
44
44
|
className: PropTypes.Requireable<string>;
|
|
45
45
|
component: PropTypes.Requireable<string>;
|
|
46
|
-
weight: PropTypes.Requireable<NonNullable<number | "default" | "bold" | "
|
|
46
|
+
weight: PropTypes.Requireable<NonNullable<number | "default" | "bold" | "light" | "regular" | "medium" | "semibold">>;
|
|
47
47
|
};
|
|
48
48
|
static defaultProps: {
|
|
49
49
|
copyable: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.38.3-alpha.
|
|
3
|
+
"version": "2.38.3-alpha.2-patch-table",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"lib/*"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@douyinfe/semi-animation": "2.38.3-alpha.
|
|
21
|
-
"@douyinfe/semi-animation-react": "2.38.3-alpha.
|
|
22
|
-
"@douyinfe/semi-foundation": "2.38.3-alpha.
|
|
23
|
-
"@douyinfe/semi-icons": "2.38.3-alpha.
|
|
24
|
-
"@douyinfe/semi-illustrations": "2.38.3-alpha.
|
|
25
|
-
"@douyinfe/semi-theme-default": "2.38.3-alpha.
|
|
20
|
+
"@douyinfe/semi-animation": "2.38.3-alpha.2-patch-table",
|
|
21
|
+
"@douyinfe/semi-animation-react": "2.38.3-alpha.2-patch-table",
|
|
22
|
+
"@douyinfe/semi-foundation": "2.38.3-alpha.2-patch-table",
|
|
23
|
+
"@douyinfe/semi-icons": "2.38.3-alpha.2-patch-table",
|
|
24
|
+
"@douyinfe/semi-illustrations": "2.38.3-alpha.2-patch-table",
|
|
25
|
+
"@douyinfe/semi-theme-default": "2.38.3-alpha.2-patch-table",
|
|
26
26
|
"async-validator": "^3.5.0",
|
|
27
27
|
"classnames": "^2.2.6",
|
|
28
28
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "e7ebe0a98addd752aac881ed6aece65f9c917180",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|