@douyinfe/semi-ui 2.51.1 → 2.51.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/dist/umd/semi-ui.js +97 -112
- 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/image/interface.d.ts +1 -1
- package/lib/cjs/image/previewInner.d.ts +1 -1
- package/lib/cjs/image/previewInner.js +2 -2
- package/lib/cjs/input/textarea.js +12 -23
- package/lib/cjs/table/Body/BaseRow.d.ts +44 -0
- package/lib/cjs/table/Body/BaseRow.js +47 -42
- package/lib/cjs/table/Body/SectionRow.d.ts +24 -0
- package/lib/cjs/table/Body/SectionRow.js +27 -22
- package/lib/cjs/table/Body/index.js +6 -4
- package/lib/es/image/interface.d.ts +1 -1
- package/lib/es/image/previewInner.d.ts +1 -1
- package/lib/es/image/previewInner.js +2 -2
- package/lib/es/input/textarea.js +12 -23
- package/lib/es/table/Body/BaseRow.d.ts +44 -0
- package/lib/es/table/Body/BaseRow.js +45 -41
- package/lib/es/table/Body/SectionRow.d.ts +24 -0
- package/lib/es/table/Body/SectionRow.js +25 -21
- package/lib/es/table/Body/index.js +4 -4
- package/package.json +8 -8
|
@@ -24,6 +24,30 @@ export interface SectionRowProps {
|
|
|
24
24
|
store?: Store;
|
|
25
25
|
rowKey?: RowKey<any>;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* avoid affected by https://www.npmjs.com/package/babel-plugin-transform-react-remove-prop-types
|
|
29
|
+
*/
|
|
30
|
+
export declare const sectionRowPropTypes: {
|
|
31
|
+
record: PropTypes.Requireable<object>;
|
|
32
|
+
index: PropTypes.Requireable<number>;
|
|
33
|
+
columns: PropTypes.Requireable<any[]>;
|
|
34
|
+
group: PropTypes.Validator<object>;
|
|
35
|
+
groupKey: PropTypes.Validator<NonNullable<NonNullable<string | number>>>;
|
|
36
|
+
data: PropTypes.Requireable<any[]>;
|
|
37
|
+
renderGroupSection: PropTypes.Requireable<(...args: any[]) => any>;
|
|
38
|
+
onGroupedRow: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
|
+
clickGroupedRowToExpand: PropTypes.Requireable<boolean>;
|
|
40
|
+
components: PropTypes.Requireable<object>;
|
|
41
|
+
expanded: PropTypes.Requireable<boolean>;
|
|
42
|
+
prefixCls: PropTypes.Requireable<string>;
|
|
43
|
+
onExpand: PropTypes.Requireable<(...args: any[]) => any>;
|
|
44
|
+
virtualized: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
45
|
+
style: PropTypes.Requireable<object>;
|
|
46
|
+
renderExpandIcon: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
|
+
className: PropTypes.Requireable<string>;
|
|
48
|
+
store: PropTypes.Requireable<object>;
|
|
49
|
+
rowKey: PropTypes.Requireable<NonNullable<string | number | ((...args: any[]) => any)>>;
|
|
50
|
+
};
|
|
27
51
|
/**
|
|
28
52
|
* Grouping component title row
|
|
29
53
|
*/
|
|
@@ -15,6 +15,30 @@ import { cssClasses, strings } from '@douyinfe/semi-foundation/lib/es/table/cons
|
|
|
15
15
|
import { filterColumns } from '@douyinfe/semi-foundation/lib/es/table/utils';
|
|
16
16
|
import BaseRow from './BaseRow';
|
|
17
17
|
import TableContext from '../table-context';
|
|
18
|
+
/**
|
|
19
|
+
* avoid affected by https://www.npmjs.com/package/babel-plugin-transform-react-remove-prop-types
|
|
20
|
+
*/
|
|
21
|
+
export const sectionRowPropTypes = {
|
|
22
|
+
record: PropTypes.object,
|
|
23
|
+
index: PropTypes.number,
|
|
24
|
+
columns: PropTypes.array,
|
|
25
|
+
group: PropTypes.object.isRequired,
|
|
26
|
+
groupKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
27
|
+
data: PropTypes.array,
|
|
28
|
+
renderGroupSection: PropTypes.func,
|
|
29
|
+
onGroupedRow: PropTypes.func,
|
|
30
|
+
clickGroupedRowToExpand: PropTypes.bool,
|
|
31
|
+
components: PropTypes.object,
|
|
32
|
+
expanded: PropTypes.bool,
|
|
33
|
+
prefixCls: PropTypes.string,
|
|
34
|
+
onExpand: PropTypes.func,
|
|
35
|
+
virtualized: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
36
|
+
style: PropTypes.object,
|
|
37
|
+
renderExpandIcon: PropTypes.func,
|
|
38
|
+
className: PropTypes.string,
|
|
39
|
+
store: PropTypes.object,
|
|
40
|
+
rowKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func])
|
|
41
|
+
};
|
|
18
42
|
/**
|
|
19
43
|
* Grouping component title row
|
|
20
44
|
*/
|
|
@@ -145,27 +169,7 @@ class SectionRow extends PureComponent {
|
|
|
145
169
|
}
|
|
146
170
|
}
|
|
147
171
|
SectionRow.contextType = TableContext;
|
|
148
|
-
SectionRow.propTypes =
|
|
149
|
-
record: PropTypes.object,
|
|
150
|
-
index: PropTypes.number,
|
|
151
|
-
columns: PropTypes.array,
|
|
152
|
-
group: PropTypes.object.isRequired,
|
|
153
|
-
groupKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
154
|
-
data: PropTypes.array,
|
|
155
|
-
renderGroupSection: PropTypes.func,
|
|
156
|
-
onGroupedRow: PropTypes.func,
|
|
157
|
-
clickGroupedRowToExpand: PropTypes.bool,
|
|
158
|
-
components: PropTypes.object,
|
|
159
|
-
expanded: PropTypes.bool,
|
|
160
|
-
prefixCls: PropTypes.string,
|
|
161
|
-
onExpand: PropTypes.func,
|
|
162
|
-
virtualized: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
163
|
-
style: PropTypes.object,
|
|
164
|
-
renderExpandIcon: PropTypes.func,
|
|
165
|
-
className: PropTypes.string,
|
|
166
|
-
store: PropTypes.object,
|
|
167
|
-
rowKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.func])
|
|
168
|
-
};
|
|
172
|
+
SectionRow.propTypes = sectionRowPropTypes;
|
|
169
173
|
SectionRow.defaultProps = {
|
|
170
174
|
prefixCls: cssClasses.PREFIX,
|
|
171
175
|
components: {
|
|
@@ -24,9 +24,9 @@ import { strings } from '@douyinfe/semi-foundation/lib/es/table/constants';
|
|
|
24
24
|
import BaseComponent from '../../_base/baseComponent';
|
|
25
25
|
import { logger } from '../utils';
|
|
26
26
|
import ColGroup from '../ColGroup';
|
|
27
|
-
import BaseRow from './BaseRow';
|
|
27
|
+
import BaseRow, { baseRowPropTypes } from './BaseRow';
|
|
28
28
|
import ExpandedRow from './ExpandedRow';
|
|
29
|
-
import SectionRow from './SectionRow';
|
|
29
|
+
import SectionRow, { sectionRowPropTypes } from './SectionRow';
|
|
30
30
|
import TableHeader from '../TableHeader';
|
|
31
31
|
import TableContext from '../table-context';
|
|
32
32
|
class Body extends BaseComponent {
|
|
@@ -271,7 +271,7 @@ class Body extends BaseComponent {
|
|
|
271
271
|
groupKey,
|
|
272
272
|
index
|
|
273
273
|
} = props;
|
|
274
|
-
const sectionRowPickKeys = Object.keys(
|
|
274
|
+
const sectionRowPickKeys = Object.keys(sectionRowPropTypes);
|
|
275
275
|
const sectionRowProps = _pick(props, sectionRowPickKeys);
|
|
276
276
|
const {
|
|
277
277
|
handleRowExpanded
|
|
@@ -595,7 +595,7 @@ class Body extends BaseComponent {
|
|
|
595
595
|
disabledRowKeysSet,
|
|
596
596
|
expandRowByClick
|
|
597
597
|
} = props;
|
|
598
|
-
const baseRowPickKeys = Object.keys(
|
|
598
|
+
const baseRowPickKeys = Object.keys(baseRowPropTypes);
|
|
599
599
|
const baseRowProps = _pick(props, baseRowPickKeys);
|
|
600
600
|
let key = getRecordKey(record, rowKey);
|
|
601
601
|
if (key == null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.51.
|
|
3
|
+
"version": "2.51.3",
|
|
4
4
|
"description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@dnd-kit/core": "^6.0.8",
|
|
21
21
|
"@dnd-kit/sortable": "^7.0.2",
|
|
22
22
|
"@dnd-kit/utilities": "^3.2.1",
|
|
23
|
-
"@douyinfe/semi-animation": "2.51.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.51.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.51.
|
|
26
|
-
"@douyinfe/semi-icons": "2.51.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.51.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.51.
|
|
23
|
+
"@douyinfe/semi-animation": "2.51.3",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.51.3",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.51.3",
|
|
26
|
+
"@douyinfe/semi-icons": "2.51.3",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.51.3",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.51.3",
|
|
29
29
|
"async-validator": "^3.5.0",
|
|
30
30
|
"classnames": "^2.2.6",
|
|
31
31
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
],
|
|
76
76
|
"author": "",
|
|
77
77
|
"license": "MIT",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "d39b89cf05ae9bed8f2a18f6d73026b915db87a4",
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
81
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|