@douyinfe/semi-ui 2.20.5 → 2.20.7
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/css/semi.css +0 -7
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +11 -43
- 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/autoComplete/index.d.ts +0 -3
- package/lib/cjs/autoComplete/index.js +1 -6
- package/lib/cjs/image/image.d.ts +1 -1
- package/lib/cjs/image/image.js +2 -2
- package/lib/cjs/image/index.d.ts +1 -0
- package/lib/cjs/image/index.js +2 -0
- package/lib/cjs/image/preview.d.ts +1 -0
- package/lib/cjs/image/preview.js +2 -0
- package/lib/cjs/locale/source/fr.js +1 -1
- package/lib/cjs/table/HeadTable.js +2 -12
- package/lib/cjs/table/Table.js +3 -10
- package/lib/cjs/table/interface.d.ts +0 -4
- package/lib/cjs/upload/index.d.ts +0 -5
- package/lib/cjs/upload/index.js +0 -9
- package/lib/es/autoComplete/index.d.ts +0 -3
- package/lib/es/autoComplete/index.js +1 -6
- package/lib/es/image/image.d.ts +1 -1
- package/lib/es/image/image.js +1 -1
- package/lib/es/image/index.d.ts +1 -0
- package/lib/es/image/index.js +1 -0
- package/lib/es/image/preview.d.ts +1 -0
- package/lib/es/image/preview.js +1 -0
- package/lib/es/locale/source/fr.js +1 -1
- package/lib/es/table/HeadTable.js +2 -13
- package/lib/es/table/Table.js +3 -10
- package/lib/es/table/interface.d.ts +0 -4
- package/lib/es/upload/index.d.ts +0 -5
- package/lib/es/upload/index.js +0 -9
- package/package.json +7 -7
- package/lib/cjs/locale/source/ro.d.ts +0 -156
- package/lib/cjs/locale/source/ro.js +0 -165
- package/lib/es/locale/source/ro.d.ts +0 -156
- package/lib/es/locale/source/ro.js +0 -157
|
@@ -55,7 +55,6 @@ export interface AutoCompleteProps<T extends AutoCompleteItems> {
|
|
|
55
55
|
onChangeWithObject?: boolean;
|
|
56
56
|
onSelectWithObject?: boolean;
|
|
57
57
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
58
|
-
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
59
58
|
prefix?: React.ReactNode;
|
|
60
59
|
placeholder?: string;
|
|
61
60
|
position?: Position;
|
|
@@ -114,7 +113,6 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
114
113
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
115
114
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
116
115
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
117
|
-
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
118
116
|
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
119
117
|
placeholder: PropTypes.Requireable<string>;
|
|
120
118
|
prefix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -161,7 +159,6 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
161
159
|
validateStatus: "default";
|
|
162
160
|
autoFocus: boolean;
|
|
163
161
|
emptyContent: null;
|
|
164
|
-
onKeyDown: (...args: any[]) => void;
|
|
165
162
|
};
|
|
166
163
|
triggerRef: React.RefObject<HTMLDivElement> | null;
|
|
167
164
|
optionsRef: React.RefObject<HTMLDivElement> | null;
|
|
@@ -158,9 +158,6 @@ class AutoComplete extends _baseComponent.default {
|
|
|
158
158
|
notifyBlur: event => {
|
|
159
159
|
this.props.onBlur(event);
|
|
160
160
|
},
|
|
161
|
-
notifyKeyDown: e => {
|
|
162
|
-
this.props.onKeyDown(e);
|
|
163
|
-
},
|
|
164
161
|
rePositionDropdown: () => {
|
|
165
162
|
let {
|
|
166
163
|
rePosKey
|
|
@@ -383,7 +380,6 @@ AutoComplete.propTypes = {
|
|
|
383
380
|
onBlur: _propTypes.default.func,
|
|
384
381
|
onFocus: _propTypes.default.func,
|
|
385
382
|
onChange: _propTypes.default.func,
|
|
386
|
-
onKeyDown: _propTypes.default.func,
|
|
387
383
|
position: _propTypes.default.oneOf(positionSet),
|
|
388
384
|
placeholder: _propTypes.default.string,
|
|
389
385
|
prefix: _propTypes.default.node,
|
|
@@ -429,8 +425,7 @@ AutoComplete.defaultProps = {
|
|
|
429
425
|
maxHeight: 300,
|
|
430
426
|
validateStatus: 'default',
|
|
431
427
|
autoFocus: false,
|
|
432
|
-
emptyContent: null,
|
|
433
|
-
onKeyDown: _noop2.default // onPressEnter: () => undefined,
|
|
428
|
+
emptyContent: null // onPressEnter: () => undefined,
|
|
434
429
|
// defaultOpen: false,
|
|
435
430
|
|
|
436
431
|
};
|
package/lib/cjs/image/image.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import React from "react";
|
|
|
2
2
|
import BaseComponent from "../_base/baseComponent";
|
|
3
3
|
import { ImageProps, ImageStates } from "./interface";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import '@douyinfe/semi-foundation/lib/cjs/image/image.css';
|
|
6
5
|
import { PreviewContextProps } from "./previewContext";
|
|
7
6
|
import ImageFoundation, { ImageAdapter } from '@douyinfe/semi-foundation/lib/cjs/image/imageFoundation';
|
|
7
|
+
import '@douyinfe/semi-foundation/lib/cjs/image/image.css';
|
|
8
8
|
export default class Image extends BaseComponent<ImageProps, ImageStates> {
|
|
9
9
|
static isSemiImage: boolean;
|
|
10
10
|
static contextType: React.Context<PreviewContextProps>;
|
package/lib/cjs/image/image.js
CHANGED
|
@@ -21,8 +21,6 @@ var _semiIcons = require("@douyinfe/semi-icons");
|
|
|
21
21
|
|
|
22
22
|
var _previewInner = _interopRequireDefault(require("./previewInner"));
|
|
23
23
|
|
|
24
|
-
require("@douyinfe/semi-foundation/lib/cjs/image/image.css");
|
|
25
|
-
|
|
26
24
|
var _previewContext = require("./previewContext");
|
|
27
25
|
|
|
28
26
|
var _imageFoundation = _interopRequireDefault(require("@douyinfe/semi-foundation/lib/cjs/image/imageFoundation"));
|
|
@@ -31,6 +29,8 @@ var _localeConsumer = _interopRequireDefault(require("../locale/localeConsumer")
|
|
|
31
29
|
|
|
32
30
|
var _skeleton = _interopRequireDefault(require("../skeleton"));
|
|
33
31
|
|
|
32
|
+
require("@douyinfe/semi-foundation/lib/cjs/image/image.css");
|
|
33
|
+
|
|
34
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
35
|
|
|
36
36
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
package/lib/cjs/image/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Image from "./image";
|
|
2
2
|
import PreviewInner from "./previewInner";
|
|
3
3
|
import Preview from "./preview";
|
|
4
|
+
import '@douyinfe/semi-foundation/lib/cjs/image/image.css';
|
|
4
5
|
export default Image;
|
|
5
6
|
export { PreviewInner, Preview, };
|
|
6
7
|
export { ImageProps, PreviewImageProps, PreviewProps, } from "./interface";
|
package/lib/cjs/image/index.js
CHANGED
|
@@ -23,6 +23,8 @@ var _previewInner = _interopRequireDefault(require("./previewInner"));
|
|
|
23
23
|
|
|
24
24
|
var _preview = _interopRequireDefault(require("./preview"));
|
|
25
25
|
|
|
26
|
+
require("@douyinfe/semi-foundation/lib/cjs/image/image.css");
|
|
27
|
+
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
28
30
|
var _default = _image.default;
|
|
@@ -4,6 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import { PreviewProps, PreviewState } from "./interface";
|
|
5
5
|
import PreviewInner from "./previewInner";
|
|
6
6
|
import PreviewFoundation from '@douyinfe/semi-foundation/lib/cjs/image/previewFoundation';
|
|
7
|
+
import '@douyinfe/semi-foundation/lib/cjs/image/image.css';
|
|
7
8
|
export default class Preview extends BaseComponent<PreviewProps, PreviewState> {
|
|
8
9
|
static propTypes: {
|
|
9
10
|
style: PropTypes.Requireable<object>;
|
package/lib/cjs/image/preview.js
CHANGED
|
@@ -23,6 +23,8 @@ var _uuid = require("@douyinfe/semi-foundation/lib/cjs/utils/uuid");
|
|
|
23
23
|
|
|
24
24
|
var _constants = require("@douyinfe/semi-foundation/lib/cjs/image/constants");
|
|
25
25
|
|
|
26
|
+
require("@douyinfe/semi-foundation/lib/cjs/image/image.css");
|
|
27
|
+
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
28
30
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
@@ -128,7 +128,7 @@ const local = {
|
|
|
128
128
|
Upload: {
|
|
129
129
|
mainText: 'Cliquez pour télécharger le fichier ou faites glisser le fichier vers ici',
|
|
130
130
|
illegalTips: 'Ce type de fichier n\'est pas pris en charge',
|
|
131
|
-
legalTips: 'Libérer et commencer le
|
|
131
|
+
legalTips: 'Libérer et commencer le téléchargement',
|
|
132
132
|
retry: 'Réessayer',
|
|
133
133
|
replace: 'Remplacer le fichier',
|
|
134
134
|
clear: 'Supprimer',
|
|
@@ -46,8 +46,7 @@ class HeadTable extends _react.default.PureComponent {
|
|
|
46
46
|
onDidUpdate,
|
|
47
47
|
showHeader,
|
|
48
48
|
anyColumnFixed,
|
|
49
|
-
bodyHasScrollBar
|
|
50
|
-
sticky
|
|
49
|
+
bodyHasScrollBar
|
|
51
50
|
} = this.props;
|
|
52
51
|
|
|
53
52
|
if (!showHeader) {
|
|
@@ -78,19 +77,10 @@ class HeadTable extends _react.default.PureComponent {
|
|
|
78
77
|
onDidUpdate: onDidUpdate
|
|
79
78
|
}));
|
|
80
79
|
|
|
81
|
-
const headTableCls = (0, _classnames.default)("".concat(prefixCls, "-header"), {
|
|
82
|
-
["".concat(prefixCls, "-header-sticky")]: sticky
|
|
83
|
-
});
|
|
84
|
-
const stickyTop = (0, _get2.default)(sticky, 'top', 0);
|
|
85
|
-
|
|
86
|
-
if (typeof stickyTop === 'number') {
|
|
87
|
-
headStyle.top = stickyTop;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
80
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
91
81
|
key: "headTable",
|
|
92
82
|
style: headStyle,
|
|
93
|
-
className:
|
|
83
|
+
className: "".concat(prefixCls, "-header"),
|
|
94
84
|
ref: forwardedRef,
|
|
95
85
|
onScroll: handleBodyScroll
|
|
96
86
|
}, /*#__PURE__*/_react.default.createElement(Table, {
|
package/lib/cjs/table/Table.js
CHANGED
|
@@ -701,8 +701,7 @@ class Table extends _baseComponent.default {
|
|
|
701
701
|
rowSelection,
|
|
702
702
|
dataSource,
|
|
703
703
|
bodyHasScrollBar,
|
|
704
|
-
disabledRowKeysSet
|
|
705
|
-
sticky
|
|
704
|
+
disabledRowKeysSet
|
|
706
705
|
} = props;
|
|
707
706
|
const selectedRowKeysSet = (0, _get2.default)(rowSelection, 'selectedRowKeysSet', new Set());
|
|
708
707
|
const headTable = fixed || useFixedHeader ? /*#__PURE__*/_react.default.createElement(_HeadTable.default, {
|
|
@@ -719,8 +718,7 @@ class Table extends _baseComponent.default {
|
|
|
719
718
|
selectedRowKeysSet: selectedRowKeysSet,
|
|
720
719
|
onHeaderRow: onHeaderRow,
|
|
721
720
|
dataSource: dataSource,
|
|
722
|
-
bodyHasScrollBar: bodyHasScrollBar
|
|
723
|
-
sticky: sticky
|
|
721
|
+
bodyHasScrollBar: bodyHasScrollBar
|
|
724
722
|
}) : null;
|
|
725
723
|
|
|
726
724
|
const bodyTable = /*#__PURE__*/_react.default.createElement(_Body.default, Object.assign({}, (0, _omit2.default)(props, ['rowSelection', 'headWidths']), {
|
|
@@ -1039,18 +1037,13 @@ class Table extends _baseComponent.default {
|
|
|
1039
1037
|
isAnyColumnFixed: columns => (0, _some2.default)(this.getColumns(columns || this.props.columns, this.props.children), column => Boolean(column.fixed)),
|
|
1040
1038
|
useFixedHeader: () => {
|
|
1041
1039
|
const {
|
|
1042
|
-
scroll
|
|
1043
|
-
sticky
|
|
1040
|
+
scroll
|
|
1044
1041
|
} = this.props;
|
|
1045
1042
|
|
|
1046
1043
|
if ((0, _get2.default)(scroll, 'y')) {
|
|
1047
1044
|
return true;
|
|
1048
1045
|
}
|
|
1049
1046
|
|
|
1050
|
-
if (sticky) {
|
|
1051
|
-
return true;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
1047
|
return false;
|
|
1055
1048
|
},
|
|
1056
1049
|
setHeadWidths: function (headWidths) {
|
|
@@ -55,7 +55,6 @@ export interface TableProps<RecordType extends Record<string, any> = any> extend
|
|
|
55
55
|
onGroupedRow?: OnGroupedRow<RecordType>;
|
|
56
56
|
onHeaderRow?: OnHeaderRow<RecordType>;
|
|
57
57
|
onRow?: OnRow<RecordType>;
|
|
58
|
-
sticky?: Sticky;
|
|
59
58
|
}
|
|
60
59
|
export interface ColumnProps<RecordType extends Record<string, any> = any> {
|
|
61
60
|
[x: string]: any;
|
|
@@ -289,7 +288,4 @@ export declare type BodyScrollPosition = 'both' | 'middle' | 'left' | 'right';
|
|
|
289
288
|
export declare type TableLocale = Locale['Table'];
|
|
290
289
|
export declare type Direction = CSSDirection;
|
|
291
290
|
export declare type IncludeGroupRecord<RecordType> = BaseIncludeGroupRecord<RecordType>;
|
|
292
|
-
export declare type Sticky = boolean | {
|
|
293
|
-
top?: number;
|
|
294
|
-
};
|
|
295
291
|
export {};
|
|
@@ -184,11 +184,6 @@ declare class Upload extends BaseComponent<UploadProps, UploadState> {
|
|
|
184
184
|
* manual upload by user
|
|
185
185
|
*/
|
|
186
186
|
upload: () => void;
|
|
187
|
-
/**
|
|
188
|
-
* ref method
|
|
189
|
-
* manual open file select dialog
|
|
190
|
-
*/
|
|
191
|
-
openFileDialog: () => void;
|
|
192
187
|
renderFile: (file: FileItem, index: number, locale: Locale['Upload']) => ReactNode;
|
|
193
188
|
renderFileList: () => ReactNode;
|
|
194
189
|
renderFileListPic: () => JSX.Element;
|
package/lib/cjs/upload/index.js
CHANGED
|
@@ -114,15 +114,6 @@ class Upload extends _baseComponent.default {
|
|
|
114
114
|
} = this.state;
|
|
115
115
|
this.foundation.startUpload(fileList);
|
|
116
116
|
};
|
|
117
|
-
/**
|
|
118
|
-
* ref method
|
|
119
|
-
* manual open file select dialog
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
this.openFileDialog = () => {
|
|
124
|
-
this.onClick();
|
|
125
|
-
};
|
|
126
117
|
|
|
127
118
|
this.renderFile = (file, index, locale) => {
|
|
128
119
|
const {
|
|
@@ -55,7 +55,6 @@ export interface AutoCompleteProps<T extends AutoCompleteItems> {
|
|
|
55
55
|
onChangeWithObject?: boolean;
|
|
56
56
|
onSelectWithObject?: boolean;
|
|
57
57
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
58
|
-
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
59
58
|
prefix?: React.ReactNode;
|
|
60
59
|
placeholder?: string;
|
|
61
60
|
position?: Position;
|
|
@@ -114,7 +113,6 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
114
113
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
115
114
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
116
115
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
117
|
-
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
118
116
|
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
119
117
|
placeholder: PropTypes.Requireable<string>;
|
|
120
118
|
prefix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -161,7 +159,6 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
161
159
|
validateStatus: "default";
|
|
162
160
|
autoFocus: boolean;
|
|
163
161
|
emptyContent: null;
|
|
164
|
-
onKeyDown: (...args: any[]) => void;
|
|
165
162
|
};
|
|
166
163
|
triggerRef: React.RefObject<HTMLDivElement> | null;
|
|
167
164
|
optionsRef: React.RefObject<HTMLDivElement> | null;
|
|
@@ -134,9 +134,6 @@ class AutoComplete extends BaseComponent {
|
|
|
134
134
|
notifyBlur: event => {
|
|
135
135
|
this.props.onBlur(event);
|
|
136
136
|
},
|
|
137
|
-
notifyKeyDown: e => {
|
|
138
|
-
this.props.onKeyDown(e);
|
|
139
|
-
},
|
|
140
137
|
rePositionDropdown: () => {
|
|
141
138
|
let {
|
|
142
139
|
rePosKey
|
|
@@ -359,7 +356,6 @@ AutoComplete.propTypes = {
|
|
|
359
356
|
onBlur: PropTypes.func,
|
|
360
357
|
onFocus: PropTypes.func,
|
|
361
358
|
onChange: PropTypes.func,
|
|
362
|
-
onKeyDown: PropTypes.func,
|
|
363
359
|
position: PropTypes.oneOf(positionSet),
|
|
364
360
|
placeholder: PropTypes.string,
|
|
365
361
|
prefix: PropTypes.node,
|
|
@@ -405,8 +401,7 @@ AutoComplete.defaultProps = {
|
|
|
405
401
|
maxHeight: 300,
|
|
406
402
|
validateStatus: 'default',
|
|
407
403
|
autoFocus: false,
|
|
408
|
-
emptyContent: null,
|
|
409
|
-
onKeyDown: _noop // onPressEnter: () => undefined,
|
|
404
|
+
emptyContent: null // onPressEnter: () => undefined,
|
|
410
405
|
// defaultOpen: false,
|
|
411
406
|
|
|
412
407
|
};
|
package/lib/es/image/image.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import React from "react";
|
|
|
2
2
|
import BaseComponent from "../_base/baseComponent";
|
|
3
3
|
import { ImageProps, ImageStates } from "./interface";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
6
5
|
import { PreviewContextProps } from "./previewContext";
|
|
7
6
|
import ImageFoundation, { ImageAdapter } from '@douyinfe/semi-foundation/lib/es/image/imageFoundation';
|
|
7
|
+
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
8
8
|
export default class Image extends BaseComponent<ImageProps, ImageStates> {
|
|
9
9
|
static isSemiImage: boolean;
|
|
10
10
|
static contextType: React.Context<PreviewContextProps>;
|
package/lib/es/image/image.js
CHANGED
|
@@ -10,11 +10,11 @@ import { cssClasses } from '@douyinfe/semi-foundation/lib/es/image/constants';
|
|
|
10
10
|
import cls from "classnames";
|
|
11
11
|
import { IconUploadError, IconEyeOpened } from "@douyinfe/semi-icons";
|
|
12
12
|
import PreviewInner from "./previewInner";
|
|
13
|
-
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
14
13
|
import { PreviewContext } from "./previewContext";
|
|
15
14
|
import ImageFoundation from '@douyinfe/semi-foundation/lib/es/image/imageFoundation';
|
|
16
15
|
import LocaleConsumer from "../locale/localeConsumer";
|
|
17
16
|
import Skeleton from "../skeleton";
|
|
17
|
+
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
18
18
|
const prefixCls = cssClasses.PREFIX;
|
|
19
19
|
export default class Image extends BaseComponent {
|
|
20
20
|
constructor(props) {
|
package/lib/es/image/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Image from "./image";
|
|
2
2
|
import PreviewInner from "./previewInner";
|
|
3
3
|
import Preview from "./preview";
|
|
4
|
+
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
4
5
|
export default Image;
|
|
5
6
|
export { PreviewInner, Preview, };
|
|
6
7
|
export { ImageProps, PreviewImageProps, PreviewProps, } from "./interface";
|
package/lib/es/image/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import { PreviewProps, PreviewState } from "./interface";
|
|
5
5
|
import PreviewInner from "./previewInner";
|
|
6
6
|
import PreviewFoundation from '@douyinfe/semi-foundation/lib/es/image/previewFoundation';
|
|
7
|
+
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
7
8
|
export default class Preview extends BaseComponent<PreviewProps, PreviewState> {
|
|
8
9
|
static propTypes: {
|
|
9
10
|
style: PropTypes.Requireable<object>;
|
package/lib/es/image/preview.js
CHANGED
|
@@ -19,6 +19,7 @@ import PreviewInner from "./previewInner";
|
|
|
19
19
|
import PreviewFoundation from '@douyinfe/semi-foundation/lib/es/image/previewFoundation';
|
|
20
20
|
import { getUuidShort } from '@douyinfe/semi-foundation/lib/es/utils/uuid';
|
|
21
21
|
import { cssClasses } from '@douyinfe/semi-foundation/lib/es/image/constants';
|
|
22
|
+
import '@douyinfe/semi-foundation/lib/es/image/image.css';
|
|
22
23
|
const prefixCls = cssClasses.PREFIX;
|
|
23
24
|
export default class Preview extends BaseComponent {
|
|
24
25
|
constructor(props) {
|
|
@@ -120,7 +120,7 @@ const local = {
|
|
|
120
120
|
Upload: {
|
|
121
121
|
mainText: 'Cliquez pour télécharger le fichier ou faites glisser le fichier vers ici',
|
|
122
122
|
illegalTips: 'Ce type de fichier n\'est pas pris en charge',
|
|
123
|
-
legalTips: 'Libérer et commencer le
|
|
123
|
+
legalTips: 'Libérer et commencer le téléchargement',
|
|
124
124
|
retry: 'Réessayer',
|
|
125
125
|
replace: 'Remplacer le fichier',
|
|
126
126
|
clear: 'Supprimer',
|
|
@@ -31,8 +31,7 @@ class HeadTable extends React.PureComponent {
|
|
|
31
31
|
onDidUpdate,
|
|
32
32
|
showHeader,
|
|
33
33
|
anyColumnFixed,
|
|
34
|
-
bodyHasScrollBar
|
|
35
|
-
sticky
|
|
34
|
+
bodyHasScrollBar
|
|
36
35
|
} = this.props;
|
|
37
36
|
|
|
38
37
|
if (!showHeader) {
|
|
@@ -63,20 +62,10 @@ class HeadTable extends React.PureComponent {
|
|
|
63
62
|
components: components,
|
|
64
63
|
onDidUpdate: onDidUpdate
|
|
65
64
|
}));
|
|
66
|
-
const headTableCls = classnames("".concat(prefixCls, "-header"), {
|
|
67
|
-
["".concat(prefixCls, "-header-sticky")]: sticky
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const stickyTop = _get(sticky, 'top', 0);
|
|
71
|
-
|
|
72
|
-
if (typeof stickyTop === 'number') {
|
|
73
|
-
headStyle.top = stickyTop;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
65
|
return /*#__PURE__*/React.createElement("div", {
|
|
77
66
|
key: "headTable",
|
|
78
67
|
style: headStyle,
|
|
79
|
-
className:
|
|
68
|
+
className: "".concat(prefixCls, "-header"),
|
|
80
69
|
ref: forwardedRef,
|
|
81
70
|
onScroll: handleBodyScroll
|
|
82
71
|
}, /*#__PURE__*/React.createElement(Table, {
|
package/lib/es/table/Table.js
CHANGED
|
@@ -655,8 +655,7 @@ class Table extends BaseComponent {
|
|
|
655
655
|
rowSelection,
|
|
656
656
|
dataSource,
|
|
657
657
|
bodyHasScrollBar,
|
|
658
|
-
disabledRowKeysSet
|
|
659
|
-
sticky
|
|
658
|
+
disabledRowKeysSet
|
|
660
659
|
} = props;
|
|
661
660
|
|
|
662
661
|
const selectedRowKeysSet = _get(rowSelection, 'selectedRowKeysSet', new Set());
|
|
@@ -675,8 +674,7 @@ class Table extends BaseComponent {
|
|
|
675
674
|
selectedRowKeysSet: selectedRowKeysSet,
|
|
676
675
|
onHeaderRow: onHeaderRow,
|
|
677
676
|
dataSource: dataSource,
|
|
678
|
-
bodyHasScrollBar: bodyHasScrollBar
|
|
679
|
-
sticky: sticky
|
|
677
|
+
bodyHasScrollBar: bodyHasScrollBar
|
|
680
678
|
}) : null;
|
|
681
679
|
const bodyTable = /*#__PURE__*/React.createElement(BodyTable, Object.assign({}, _omit(props, ['rowSelection', 'headWidths']), {
|
|
682
680
|
key: "body",
|
|
@@ -995,18 +993,13 @@ class Table extends BaseComponent {
|
|
|
995
993
|
isAnyColumnFixed: columns => _some(this.getColumns(columns || this.props.columns, this.props.children), column => Boolean(column.fixed)),
|
|
996
994
|
useFixedHeader: () => {
|
|
997
995
|
const {
|
|
998
|
-
scroll
|
|
999
|
-
sticky
|
|
996
|
+
scroll
|
|
1000
997
|
} = this.props;
|
|
1001
998
|
|
|
1002
999
|
if (_get(scroll, 'y')) {
|
|
1003
1000
|
return true;
|
|
1004
1001
|
}
|
|
1005
1002
|
|
|
1006
|
-
if (sticky) {
|
|
1007
|
-
return true;
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
1003
|
return false;
|
|
1011
1004
|
},
|
|
1012
1005
|
setHeadWidths: function (headWidths) {
|
|
@@ -55,7 +55,6 @@ export interface TableProps<RecordType extends Record<string, any> = any> extend
|
|
|
55
55
|
onGroupedRow?: OnGroupedRow<RecordType>;
|
|
56
56
|
onHeaderRow?: OnHeaderRow<RecordType>;
|
|
57
57
|
onRow?: OnRow<RecordType>;
|
|
58
|
-
sticky?: Sticky;
|
|
59
58
|
}
|
|
60
59
|
export interface ColumnProps<RecordType extends Record<string, any> = any> {
|
|
61
60
|
[x: string]: any;
|
|
@@ -289,7 +288,4 @@ export declare type BodyScrollPosition = 'both' | 'middle' | 'left' | 'right';
|
|
|
289
288
|
export declare type TableLocale = Locale['Table'];
|
|
290
289
|
export declare type Direction = CSSDirection;
|
|
291
290
|
export declare type IncludeGroupRecord<RecordType> = BaseIncludeGroupRecord<RecordType>;
|
|
292
|
-
export declare type Sticky = boolean | {
|
|
293
|
-
top?: number;
|
|
294
|
-
};
|
|
295
291
|
export {};
|
package/lib/es/upload/index.d.ts
CHANGED
|
@@ -184,11 +184,6 @@ declare class Upload extends BaseComponent<UploadProps, UploadState> {
|
|
|
184
184
|
* manual upload by user
|
|
185
185
|
*/
|
|
186
186
|
upload: () => void;
|
|
187
|
-
/**
|
|
188
|
-
* ref method
|
|
189
|
-
* manual open file select dialog
|
|
190
|
-
*/
|
|
191
|
-
openFileDialog: () => void;
|
|
192
187
|
renderFile: (file: FileItem, index: number, locale: Locale['Upload']) => ReactNode;
|
|
193
188
|
renderFileList: () => ReactNode;
|
|
194
189
|
renderFileListPic: () => JSX.Element;
|
package/lib/es/upload/index.js
CHANGED
|
@@ -94,15 +94,6 @@ class Upload extends BaseComponent {
|
|
|
94
94
|
} = this.state;
|
|
95
95
|
this.foundation.startUpload(fileList);
|
|
96
96
|
};
|
|
97
|
-
/**
|
|
98
|
-
* ref method
|
|
99
|
-
* manual open file select dialog
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
this.openFileDialog = () => {
|
|
104
|
-
this.onClick();
|
|
105
|
-
};
|
|
106
97
|
|
|
107
98
|
this.renderFile = (file, index, locale) => {
|
|
108
99
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@douyinfe/semi-animation": "2.12.0",
|
|
21
|
-
"@douyinfe/semi-animation-react": "2.20.
|
|
22
|
-
"@douyinfe/semi-foundation": "2.20.
|
|
23
|
-
"@douyinfe/semi-icons": "2.20.
|
|
21
|
+
"@douyinfe/semi-animation-react": "2.20.7",
|
|
22
|
+
"@douyinfe/semi-foundation": "2.20.7",
|
|
23
|
+
"@douyinfe/semi-icons": "2.20.7",
|
|
24
24
|
"@douyinfe/semi-illustrations": "2.15.0",
|
|
25
|
-
"@douyinfe/semi-theme-default": "2.20.
|
|
25
|
+
"@douyinfe/semi-theme-default": "2.20.7",
|
|
26
26
|
"async-validator": "^3.5.0",
|
|
27
27
|
"classnames": "^2.2.6",
|
|
28
28
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "c0d0df27f122e6e57483172169baf1c23745a29a",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
76
76
|
"@babel/preset-env": "^7.15.8",
|
|
77
77
|
"@babel/preset-react": "^7.14.5",
|
|
78
|
-
"@douyinfe/semi-scss-compile": "2.20.
|
|
78
|
+
"@douyinfe/semi-scss-compile": "2.20.7",
|
|
79
79
|
"@storybook/addon-knobs": "^6.3.1",
|
|
80
80
|
"@types/lodash": "^4.14.176",
|
|
81
81
|
"@types/react": ">=16.0.0",
|