@douyinfe/semi-ui 2.10.2 → 2.10.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/cascader/index.tsx +4 -2
- package/dist/css/semi.css +1 -0
- package/dist/umd/semi-ui.js +5047 -3487
- 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/cascader/index.js +4 -2
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/modal/confirm.d.ts +5 -5
- package/lib/cjs/table/Table.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/cascader/index.js +4 -2
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/modal/confirm.d.ts +5 -5
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +2 -2
|
@@ -800,13 +800,15 @@ class Cascader extends _baseComponent.default {
|
|
|
800
800
|
if ((0, _isArray.default)(realValue)) {
|
|
801
801
|
normallizedValue = (0, _isArray.default)(realValue[0]) ? realValue : [realValue];
|
|
802
802
|
} else {
|
|
803
|
-
|
|
803
|
+
if (realValue !== undefined) {
|
|
804
|
+
normallizedValue = [[realValue]];
|
|
805
|
+
}
|
|
804
806
|
} // formatValuePath is used to save value of valuePath
|
|
805
807
|
|
|
806
808
|
|
|
807
809
|
const formatValuePath = [];
|
|
808
810
|
(0, _forEach.default)(normallizedValue).call(normallizedValue, valueItem => {
|
|
809
|
-
const formatItem = onChangeWithObject ? (0, _map.default)(valueItem).call(valueItem, i => i.value) : valueItem;
|
|
811
|
+
const formatItem = onChangeWithObject ? (0, _map.default)(valueItem).call(valueItem, i => i === null || i === void 0 ? void 0 : i.value) : valueItem;
|
|
810
812
|
formatValuePath.push(formatItem);
|
|
811
813
|
}); // formatKeys is used to save key of value
|
|
812
814
|
|
|
@@ -125,7 +125,7 @@ declare class Form extends BaseComponent<BaseFormProps, BaseFormState> {
|
|
|
125
125
|
onBlur?: (e: React.FocusEvent<Element, Element>) => void;
|
|
126
126
|
onListScroll?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
|
|
127
127
|
children?: React.ReactNode;
|
|
128
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
128
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
129
129
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
130
130
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
|
|
131
131
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/cjs/form/field.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
73
73
|
onBlur?: (e: import("react").FocusEvent<Element, Element>) => void;
|
|
74
74
|
onListScroll?: (e: import("react").UIEvent<HTMLDivElement, UIEvent>) => void;
|
|
75
75
|
children?: import("react").ReactNode;
|
|
76
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
76
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
77
77
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
|
|
78
78
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
79
79
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
|
|
@@ -15,7 +15,7 @@ export declare function withInfo(props: ModalReactProps): {
|
|
|
15
15
|
bodyStyle?: React.CSSProperties;
|
|
16
16
|
maskStyle?: React.CSSProperties;
|
|
17
17
|
style?: React.CSSProperties;
|
|
18
|
-
icon:
|
|
18
|
+
icon: React.ReactNode | JSX.Element;
|
|
19
19
|
closeIcon?: React.ReactNode;
|
|
20
20
|
title?: React.ReactNode;
|
|
21
21
|
content?: React.ReactNode;
|
|
@@ -57,7 +57,7 @@ export declare function withSuccess(props: ModalReactProps): {
|
|
|
57
57
|
bodyStyle?: React.CSSProperties;
|
|
58
58
|
maskStyle?: React.CSSProperties;
|
|
59
59
|
style?: React.CSSProperties;
|
|
60
|
-
icon:
|
|
60
|
+
icon: React.ReactNode | JSX.Element;
|
|
61
61
|
closeIcon?: React.ReactNode;
|
|
62
62
|
title?: React.ReactNode;
|
|
63
63
|
content?: React.ReactNode;
|
|
@@ -99,7 +99,7 @@ export declare function withWarning(props: ModalReactProps): {
|
|
|
99
99
|
bodyStyle?: React.CSSProperties;
|
|
100
100
|
maskStyle?: React.CSSProperties;
|
|
101
101
|
style?: React.CSSProperties;
|
|
102
|
-
icon:
|
|
102
|
+
icon: React.ReactNode | JSX.Element;
|
|
103
103
|
closeIcon?: React.ReactNode;
|
|
104
104
|
title?: React.ReactNode;
|
|
105
105
|
content?: React.ReactNode;
|
|
@@ -141,7 +141,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
141
141
|
bodyStyle?: React.CSSProperties;
|
|
142
142
|
maskStyle?: React.CSSProperties;
|
|
143
143
|
style?: React.CSSProperties;
|
|
144
|
-
icon:
|
|
144
|
+
icon: React.ReactNode | JSX.Element;
|
|
145
145
|
closeIcon?: React.ReactNode;
|
|
146
146
|
title?: React.ReactNode;
|
|
147
147
|
content?: React.ReactNode;
|
|
@@ -183,7 +183,7 @@ export declare function withConfirm(props: ModalReactProps): {
|
|
|
183
183
|
bodyStyle?: React.CSSProperties;
|
|
184
184
|
maskStyle?: React.CSSProperties;
|
|
185
185
|
style?: React.CSSProperties;
|
|
186
|
-
icon:
|
|
186
|
+
icon: React.ReactNode | JSX.Element;
|
|
187
187
|
closeIcon?: React.ReactNode;
|
|
188
188
|
title?: React.ReactNode;
|
|
189
189
|
content?: React.ReactNode;
|
package/lib/cjs/table/Table.d.ts
CHANGED
|
@@ -294,7 +294,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
294
294
|
defaultCurrentPage?: number;
|
|
295
295
|
onPageChange?: (currentPage: number) => void;
|
|
296
296
|
onPageSizeChange?: (newPageSize: number) => void;
|
|
297
|
-
onChange: (currentPage: number, pageSize: number) => void;
|
|
297
|
+
onChange: ((currentPage: number, pageSize: number) => void) | ((currentPage: number, currentPageSize: number) => void);
|
|
298
298
|
prevText?: React.ReactNode;
|
|
299
299
|
nextText?: React.ReactNode;
|
|
300
300
|
showSizeChanger?: boolean;
|
|
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
37
37
|
underline: PropTypes.Requireable<boolean>;
|
|
38
38
|
strong: PropTypes.Requireable<boolean>;
|
|
39
39
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
40
|
-
heading: PropTypes.Requireable<
|
|
40
|
+
heading: PropTypes.Requireable<4 | 2 | 1 | 3 | 5 | 6>;
|
|
41
41
|
style: PropTypes.Requireable<object>;
|
|
42
42
|
className: PropTypes.Requireable<string>;
|
|
43
43
|
component: PropTypes.Requireable<string>;
|
package/lib/es/cascader/index.js
CHANGED
|
@@ -741,14 +741,16 @@ class Cascader extends BaseComponent {
|
|
|
741
741
|
if (_Array$isArray(realValue)) {
|
|
742
742
|
normallizedValue = _Array$isArray(realValue[0]) ? realValue : [realValue];
|
|
743
743
|
} else {
|
|
744
|
-
|
|
744
|
+
if (realValue !== undefined) {
|
|
745
|
+
normallizedValue = [[realValue]];
|
|
746
|
+
}
|
|
745
747
|
} // formatValuePath is used to save value of valuePath
|
|
746
748
|
|
|
747
749
|
|
|
748
750
|
const formatValuePath = [];
|
|
749
751
|
|
|
750
752
|
_forEachInstanceProperty(normallizedValue).call(normallizedValue, valueItem => {
|
|
751
|
-
const formatItem = onChangeWithObject ? _mapInstanceProperty(valueItem).call(valueItem, i => i.value) : valueItem;
|
|
753
|
+
const formatItem = onChangeWithObject ? _mapInstanceProperty(valueItem).call(valueItem, i => i === null || i === void 0 ? void 0 : i.value) : valueItem;
|
|
752
754
|
formatValuePath.push(formatItem);
|
|
753
755
|
}); // formatKeys is used to save key of value
|
|
754
756
|
|
|
@@ -125,7 +125,7 @@ declare class Form extends BaseComponent<BaseFormProps, BaseFormState> {
|
|
|
125
125
|
onBlur?: (e: React.FocusEvent<Element, Element>) => void;
|
|
126
126
|
onListScroll?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
|
|
127
127
|
children?: React.ReactNode;
|
|
128
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
128
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
129
129
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
130
130
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
|
|
131
131
|
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
|
@@ -73,7 +73,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
73
73
|
onBlur?: (e: import("react").FocusEvent<Element, Element>) => void;
|
|
74
74
|
onListScroll?: (e: import("react").UIEvent<HTMLDivElement, UIEvent>) => void;
|
|
75
75
|
children?: import("react").ReactNode;
|
|
76
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
76
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
77
77
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
|
|
78
78
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
79
79
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps>;
|
|
@@ -15,7 +15,7 @@ export declare function withInfo(props: ModalReactProps): {
|
|
|
15
15
|
bodyStyle?: React.CSSProperties;
|
|
16
16
|
maskStyle?: React.CSSProperties;
|
|
17
17
|
style?: React.CSSProperties;
|
|
18
|
-
icon:
|
|
18
|
+
icon: React.ReactNode | JSX.Element;
|
|
19
19
|
closeIcon?: React.ReactNode;
|
|
20
20
|
title?: React.ReactNode;
|
|
21
21
|
content?: React.ReactNode;
|
|
@@ -57,7 +57,7 @@ export declare function withSuccess(props: ModalReactProps): {
|
|
|
57
57
|
bodyStyle?: React.CSSProperties;
|
|
58
58
|
maskStyle?: React.CSSProperties;
|
|
59
59
|
style?: React.CSSProperties;
|
|
60
|
-
icon:
|
|
60
|
+
icon: React.ReactNode | JSX.Element;
|
|
61
61
|
closeIcon?: React.ReactNode;
|
|
62
62
|
title?: React.ReactNode;
|
|
63
63
|
content?: React.ReactNode;
|
|
@@ -99,7 +99,7 @@ export declare function withWarning(props: ModalReactProps): {
|
|
|
99
99
|
bodyStyle?: React.CSSProperties;
|
|
100
100
|
maskStyle?: React.CSSProperties;
|
|
101
101
|
style?: React.CSSProperties;
|
|
102
|
-
icon:
|
|
102
|
+
icon: React.ReactNode | JSX.Element;
|
|
103
103
|
closeIcon?: React.ReactNode;
|
|
104
104
|
title?: React.ReactNode;
|
|
105
105
|
content?: React.ReactNode;
|
|
@@ -141,7 +141,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
141
141
|
bodyStyle?: React.CSSProperties;
|
|
142
142
|
maskStyle?: React.CSSProperties;
|
|
143
143
|
style?: React.CSSProperties;
|
|
144
|
-
icon:
|
|
144
|
+
icon: React.ReactNode | JSX.Element;
|
|
145
145
|
closeIcon?: React.ReactNode;
|
|
146
146
|
title?: React.ReactNode;
|
|
147
147
|
content?: React.ReactNode;
|
|
@@ -183,7 +183,7 @@ export declare function withConfirm(props: ModalReactProps): {
|
|
|
183
183
|
bodyStyle?: React.CSSProperties;
|
|
184
184
|
maskStyle?: React.CSSProperties;
|
|
185
185
|
style?: React.CSSProperties;
|
|
186
|
-
icon:
|
|
186
|
+
icon: React.ReactNode | JSX.Element;
|
|
187
187
|
closeIcon?: React.ReactNode;
|
|
188
188
|
title?: React.ReactNode;
|
|
189
189
|
content?: React.ReactNode;
|
package/lib/es/table/Table.d.ts
CHANGED
|
@@ -294,7 +294,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
294
294
|
defaultCurrentPage?: number;
|
|
295
295
|
onPageChange?: (currentPage: number) => void;
|
|
296
296
|
onPageSizeChange?: (newPageSize: number) => void;
|
|
297
|
-
onChange: (currentPage: number, pageSize: number) => void;
|
|
297
|
+
onChange: ((currentPage: number, pageSize: number) => void) | ((currentPage: number, currentPageSize: number) => void);
|
|
298
298
|
prevText?: React.ReactNode;
|
|
299
299
|
nextText?: React.ReactNode;
|
|
300
300
|
showSizeChanger?: boolean;
|
|
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
37
37
|
underline: PropTypes.Requireable<boolean>;
|
|
38
38
|
strong: PropTypes.Requireable<boolean>;
|
|
39
39
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
40
|
-
heading: PropTypes.Requireable<
|
|
40
|
+
heading: PropTypes.Requireable<4 | 2 | 1 | 3 | 5 | 6>;
|
|
41
41
|
style: PropTypes.Requireable<object>;
|
|
42
42
|
className: PropTypes.Requireable<string>;
|
|
43
43
|
component: PropTypes.Requireable<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "ef532c5e54c212bad8b8ff90f824544beaa0ff64",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|