shineout 1.8.2 → 1.8.6
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/css/Alert/index.d.ts +15 -15
- package/css/Alert/styles/alert.css +8 -4
- package/css/AnimationList/AbsoluteList.js +1 -1
- package/css/Button/Button.js +1 -1
- package/css/DataList/List.js +6 -3
- package/css/Form/Field.js +11 -6
- package/css/Menu/Item.js +9 -1
- package/css/Popover/Confirm.js +1 -1
- package/css/Popover/Content.js +22 -0
- package/css/Popover/Panel.js +5 -3
- package/css/Popover/index.d.ts +9 -2
- package/css/Popover/index.js +3 -0
- package/css/Popover/styles/popover.css +0 -3
- package/css/Scroll/Scroll.js +31 -11
- package/css/Select/Input.js +16 -3
- package/css/Table/SeperateTable.js +5 -3
- package/css/Table/SimpleTable.js +13 -7
- package/css/Table/Table.js +3 -1
- package/css/Table/resizable.js +1 -1
- package/css/Table/styles/table.css +8 -8
- package/css/TreeSelect/TreeSelect.js +5 -2
- package/css/icons/index.js +2 -1
- package/css/index.d.ts +1 -1
- package/css/index.js +1 -1
- package/css/utils/proptypes.js +1 -1
- package/css/utils/validate/index.js +6 -1
- package/dist/shineout.js +224 -112
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/theme.antd.css +1 -1
- package/dist/theme.antd2.css +1 -1
- package/dist/theme.default.css +1 -1
- package/dist/theme.shineout.css +1 -1
- package/es/Alert/index.d.ts +15 -15
- package/es/Alert/styles/alert.less +2 -1
- package/es/AnimationList/AbsoluteList.js +1 -1
- package/es/Button/Button.js +1 -1
- package/es/DataList/List.js +6 -3
- package/es/Form/Field.js +11 -6
- package/es/Menu/Item.js +9 -1
- package/es/Popover/Confirm.js +1 -1
- package/es/Popover/Content.js +12 -0
- package/es/Popover/Panel.js +5 -3
- package/es/Popover/index.d.ts +9 -2
- package/es/Popover/index.js +2 -0
- package/es/Popover/styles/popover.less +0 -4
- package/es/Scroll/Scroll.js +31 -11
- package/es/Select/Input.js +16 -3
- package/es/Table/SeperateTable.js +5 -3
- package/es/Table/SimpleTable.js +13 -7
- package/es/Table/Table.js +3 -1
- package/es/Table/resizable.js +1 -1
- package/es/Table/styles/table.less +1 -1
- package/es/TreeSelect/TreeSelect.js +5 -2
- package/es/icons/index.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/styles/themes/shineout.less +1 -1
- package/es/utils/proptypes.js +1 -1
- package/es/utils/validate/index.js +5 -1
- package/lib/Alert/index.d.ts +15 -15
- package/lib/Alert/styles/alert.less +2 -1
- package/lib/AnimationList/AbsoluteList.js +1 -1
- package/lib/Button/Button.js +1 -1
- package/lib/DataList/List.js +6 -3
- package/lib/Form/Field.js +11 -6
- package/lib/Menu/Item.js +9 -1
- package/lib/Popover/Confirm.js +1 -1
- package/lib/Popover/Content.js +22 -0
- package/lib/Popover/Panel.js +5 -3
- package/lib/Popover/index.d.ts +9 -2
- package/lib/Popover/index.js +3 -0
- package/lib/Popover/styles/popover.less +0 -4
- package/lib/Scroll/Scroll.js +31 -11
- package/lib/Select/Input.js +16 -3
- package/lib/Table/SeperateTable.js +5 -3
- package/lib/Table/SimpleTable.js +13 -7
- package/lib/Table/Table.js +3 -1
- package/lib/Table/resizable.js +1 -1
- package/lib/Table/styles/table.less +1 -1
- package/lib/TreeSelect/TreeSelect.js +5 -2
- package/lib/icons/index.js +2 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/styles/themes/shineout.less +1 -1
- package/lib/utils/proptypes.js +1 -1
- package/lib/utils/validate/index.js +6 -1
- package/package.json +1 -1
package/css/Alert/index.d.ts
CHANGED
|
@@ -5,59 +5,59 @@ export interface AlertProps extends StandardProps {
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Content, text or react component
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* 内容,文字或react组件
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* default: -
|
|
12
12
|
*/
|
|
13
13
|
children?: React.ReactNode;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* When the type is true, the status icon is displayed according to the type property. If you need to display a custom icon, pass in ReactElement.
|
|
17
|
-
*
|
|
17
|
+
*
|
|
18
18
|
* 为true时,根据type属性显示状态图标。如果需要显示自定义图标,传入ReactElement。
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
20
|
* default: -
|
|
21
21
|
*/
|
|
22
22
|
icon?: React.ReactElement | boolean;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* The size for icon
|
|
26
|
-
*
|
|
26
|
+
*
|
|
27
27
|
* icon 的尺寸
|
|
28
|
-
*
|
|
28
|
+
*
|
|
29
29
|
* default: 14
|
|
30
30
|
*/
|
|
31
31
|
iconSize?: number;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* When onClose is empty, no close is displayed. If you need to close and do not need to handle callbacks, set it true.
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
* 当 onClose 为空时,不显示关闭。如果需要关闭又不需要处理回调,设置为true即可
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
38
|
* default: -
|
|
39
39
|
*/
|
|
40
40
|
onClose?: (() => void) | boolean;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* types
|
|
44
|
-
*
|
|
44
|
+
*
|
|
45
45
|
* 类型
|
|
46
|
-
*
|
|
46
|
+
*
|
|
47
47
|
* default: *warning*
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
49
|
*/
|
|
50
|
-
type?: 'success' | 'info' | 'warning' | 'danger' | 'error';
|
|
50
|
+
type?: 'success' | 'info' | 'warning' | 'danger' | 'error' | 'confirmwarning';
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* show close button
|
|
54
|
-
*
|
|
54
|
+
*
|
|
55
55
|
* 是否隐藏关闭按钮
|
|
56
|
-
*
|
|
56
|
+
*
|
|
57
57
|
* default: false
|
|
58
58
|
*/
|
|
59
59
|
hideClose?: boolean,
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
declare class Alert extends React.Component<AlertProps> {}
|
|
63
|
-
export default Alert
|
|
63
|
+
export default Alert
|
|
@@ -134,7 +134,8 @@
|
|
|
134
134
|
fill: var(--success-color, #00cc66);
|
|
135
135
|
}
|
|
136
136
|
.so-alert-danger,
|
|
137
|
-
.so-alert-error
|
|
137
|
+
.so-alert-error,
|
|
138
|
+
.so-alert-confirmwarning {
|
|
138
139
|
border-color: var(--alert-danger-border-color, #ebccd1);
|
|
139
140
|
background-color: var(--alert-danger-bg, #f2dede);
|
|
140
141
|
color: var(--alert-danger-text-color, #a94442);
|
|
@@ -142,14 +143,17 @@
|
|
|
142
143
|
box-shadow: var(--alert-danger-box-shadow, 'none');
|
|
143
144
|
}
|
|
144
145
|
.so-alert-danger hr,
|
|
145
|
-
.so-alert-error hr
|
|
146
|
+
.so-alert-error hr,
|
|
147
|
+
.so-alert-confirmwarning hr {
|
|
146
148
|
border-top-color: var(--alert-danger-border-darken-5-color, #e4b9c0);
|
|
147
149
|
}
|
|
148
150
|
.so-alert-danger .alert-link,
|
|
149
|
-
.so-alert-error .alert-link
|
|
151
|
+
.so-alert-error .alert-link,
|
|
152
|
+
.so-alert-confirmwarning .alert-link {
|
|
150
153
|
color: var(--alert-danger-text-darken-10-color, #843534);
|
|
151
154
|
}
|
|
152
155
|
.so-alert-danger .so-alert-icon path,
|
|
153
|
-
.so-alert-error .so-alert-icon path
|
|
156
|
+
.so-alert-error .so-alert-icon path,
|
|
157
|
+
.so-alert-confirmwarning .so-alert-icon path {
|
|
154
158
|
fill: var(--danger-color, #f85555);
|
|
155
159
|
}
|
|
@@ -115,8 +115,8 @@ function _default(List) {
|
|
|
115
115
|
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
116
116
|
var _this2 = this;
|
|
117
117
|
|
|
118
|
-
if ((0, _shallowEqual.default)(prevProps.value, this.props.value)) return;
|
|
119
118
|
if (!this.props.focus) this.ajustdoc = false;
|
|
119
|
+
if ((0, _shallowEqual.default)(prevProps.value, this.props.value)) return;
|
|
120
120
|
setTimeout(function () {
|
|
121
121
|
_this2.forceUpdate();
|
|
122
122
|
});
|
package/css/Button/Button.js
CHANGED
package/css/DataList/List.js
CHANGED
|
@@ -133,7 +133,8 @@ function (_Component) {
|
|
|
133
133
|
keygen = _this$props2.keygen,
|
|
134
134
|
fixed = _this$props2.fixed,
|
|
135
135
|
rowsInView = _this$props2.rowsInView,
|
|
136
|
-
lineHeight = _this$props2.lineHeight
|
|
136
|
+
lineHeight = _this$props2.lineHeight,
|
|
137
|
+
value = _this$props2.value;
|
|
137
138
|
if (isEmpty) return _react.default.createElement("div", {
|
|
138
139
|
className: (0, _styles.listClass)('item', 'empty')
|
|
139
140
|
}, empty || (0, _locale.getLocale)('noData'));
|
|
@@ -143,7 +144,8 @@ function (_Component) {
|
|
|
143
144
|
data: data,
|
|
144
145
|
keygen: keygen,
|
|
145
146
|
renderItem: this.renderItem,
|
|
146
|
-
itemsInView: rowsInView
|
|
147
|
+
itemsInView: rowsInView,
|
|
148
|
+
force: value
|
|
147
149
|
});
|
|
148
150
|
};
|
|
149
151
|
|
|
@@ -210,7 +212,8 @@ Index.propTypes = {
|
|
|
210
212
|
fixed: _propTypes.default.bool,
|
|
211
213
|
rowsInView: _propTypes.default.number,
|
|
212
214
|
height: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
213
|
-
lineHeight: _propTypes.default.number
|
|
215
|
+
lineHeight: _propTypes.default.number,
|
|
216
|
+
value: _propTypes.default.array
|
|
214
217
|
};
|
|
215
218
|
Index.defaultProps = {
|
|
216
219
|
size: 'default',
|
package/css/Form/Field.js
CHANGED
|
@@ -64,13 +64,18 @@ function (_Component) {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
var cloneProps = {
|
|
68
|
+
value: value,
|
|
69
|
+
error: error,
|
|
70
|
+
onChange: this.handleChange
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
if (disabled !== undefined) {
|
|
74
|
+
cloneProps.disabled = disabled;
|
|
75
|
+
}
|
|
76
|
+
|
|
67
77
|
if ((0, _react.isValidElement)(children)) {
|
|
68
|
-
return (0, _react.cloneElement)(children,
|
|
69
|
-
value: value,
|
|
70
|
-
error: error,
|
|
71
|
-
onChange: this.handleChange,
|
|
72
|
-
disabled: disabled
|
|
73
|
-
});
|
|
78
|
+
return (0, _react.cloneElement)(children, cloneProps);
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
console.error(new Error('Form.Field expect a single ReactElement or a function.'));
|
package/css/Menu/Item.js
CHANGED
|
@@ -57,7 +57,9 @@ function (_PureComponent) {
|
|
|
57
57
|
|
|
58
58
|
var key = _this.getKey(props);
|
|
59
59
|
|
|
60
|
-
var
|
|
60
|
+
var noop = function noop() {};
|
|
61
|
+
|
|
62
|
+
var _props$bindItem = props.bindItem(_this.id, noop, noop, noop),
|
|
61
63
|
activeUpdate = _props$bindItem[0],
|
|
62
64
|
openUpdate = _props$bindItem[1],
|
|
63
65
|
inPathUpdate = _props$bindItem[2];
|
|
@@ -79,6 +81,12 @@ function (_PureComponent) {
|
|
|
79
81
|
|
|
80
82
|
var _proto = Item.prototype;
|
|
81
83
|
|
|
84
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
85
|
+
_PureComponent.prototype.componentDidMount.call(this);
|
|
86
|
+
|
|
87
|
+
this.props.bindItem(this.id, this.update.bind(this), this.updateOpen.bind(this), this.updateInPath.bind(this));
|
|
88
|
+
};
|
|
89
|
+
|
|
82
90
|
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
83
91
|
_PureComponent.prototype.componentWillUnmount.call(this);
|
|
84
92
|
|
package/css/Popover/Confirm.js
CHANGED
|
@@ -138,7 +138,7 @@ Confirm.propTypes = (0, _objectSpread2.default)({}, (0, _proptypes.getProps)(_pr
|
|
|
138
138
|
icon: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.node])
|
|
139
139
|
});
|
|
140
140
|
Confirm.defaultProps = {
|
|
141
|
-
type: '
|
|
141
|
+
type: 'confirmwarning',
|
|
142
142
|
icon: true,
|
|
143
143
|
okType: 'danger'
|
|
144
144
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _Panel = _interopRequireDefault(require("./Panel"));
|
|
13
|
+
|
|
14
|
+
function Content(props) {
|
|
15
|
+
// eslint-disable-next-line
|
|
16
|
+
return _react.default.createElement(_Panel.default, (0, _extends2.default)({}, props, {
|
|
17
|
+
useTextStyle: true
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var _default = Content;
|
|
22
|
+
exports.default = _default;
|
package/css/Popover/Panel.js
CHANGED
|
@@ -295,7 +295,8 @@ function (_Component) {
|
|
|
295
295
|
children = _this$props4.children,
|
|
296
296
|
type = _this$props4.type,
|
|
297
297
|
visible = _this$props4.visible,
|
|
298
|
-
showArrow = _this$props4.showArrow
|
|
298
|
+
showArrow = _this$props4.showArrow,
|
|
299
|
+
useTextStyle = _this$props4.useTextStyle;
|
|
299
300
|
var show = typeof visible === 'boolean' ? visible : this.state.show;
|
|
300
301
|
|
|
301
302
|
if (!this.isRendered && !show || !this.parentElement || !children) {
|
|
@@ -329,7 +330,7 @@ function (_Component) {
|
|
|
329
330
|
|
|
330
331
|
this.element.className = (0, _classnames.default)((0, _styles.popoverClass)('_', position, type), this.props.className, this.id);
|
|
331
332
|
var childrened = (0, _is.isFunc)(children) ? children(this.handleHide) : children;
|
|
332
|
-
if (typeof childrened === 'string') childrened = _react.default.createElement("span", {
|
|
333
|
+
if (typeof childrened === 'string' || useTextStyle) childrened = _react.default.createElement("span", {
|
|
333
334
|
className: (0, _styles.popoverClass)('text')
|
|
334
335
|
}, childrened);
|
|
335
336
|
return _reactDom.default.createPortal([showArrow && _react.default.createElement("div", {
|
|
@@ -373,7 +374,8 @@ Panel.propTypes = {
|
|
|
373
374
|
showArrow: _propTypes.default.bool,
|
|
374
375
|
bindChain: _propTypes.default.func,
|
|
375
376
|
zIndex: _propTypes.default.number,
|
|
376
|
-
clickToCancelDelay: _propTypes.default.bool
|
|
377
|
+
clickToCancelDelay: _propTypes.default.bool,
|
|
378
|
+
useTextStyle: _propTypes.default.bool
|
|
377
379
|
};
|
|
378
380
|
Panel.defaultProps = {
|
|
379
381
|
background: '',
|
package/css/Popover/index.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ export interface PopoverProps extends StandardProps {
|
|
|
131
131
|
*
|
|
132
132
|
* default: none
|
|
133
133
|
*/
|
|
134
|
-
type?: 'success' | 'info' | 'warning' | 'danger';
|
|
134
|
+
type?: 'success' | 'info' | 'warning' | 'danger' | 'confirmwarning';
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* Old API, out of date
|
|
@@ -232,8 +232,15 @@ declare class PopoverConfirm extends React.Component<PopoverConfirmProps, {}> {
|
|
|
232
232
|
render(): JSX.Element;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
declare class
|
|
235
|
+
declare class PopoverContent extends React.Component<PopoverProps, {}> {
|
|
236
|
+
render(): JSX.Element;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export type ContentProps = Omit<PopoverProps, 'content'>;
|
|
240
|
+
|
|
241
|
+
declare class Popover extends React.Component<ContentProps, {}> {
|
|
236
242
|
static Confirm: typeof PopoverConfirm;
|
|
243
|
+
static Content: typeof PopoverContent;
|
|
237
244
|
|
|
238
245
|
render(): JSX.Element;
|
|
239
246
|
}
|
package/css/Popover/index.js
CHANGED
|
@@ -17,6 +17,8 @@ var _Panel = _interopRequireDefault(require("./Panel"));
|
|
|
17
17
|
|
|
18
18
|
var _Confirm = _interopRequireDefault(require("./Confirm"));
|
|
19
19
|
|
|
20
|
+
var _Content = _interopRequireDefault(require("./Content"));
|
|
21
|
+
|
|
20
22
|
var Component = (0, _Container.default)(events);
|
|
21
23
|
|
|
22
24
|
function Popover(props) {
|
|
@@ -28,5 +30,6 @@ function Popover(props) {
|
|
|
28
30
|
Popover.displayName = 'ShineoutPopover';
|
|
29
31
|
Popover.Confirm = _Confirm.default;
|
|
30
32
|
Popover.Confirm.displayName = 'ShineoutPopoverConfirm';
|
|
33
|
+
Popover.Content = _Content.default;
|
|
31
34
|
var _default = Popover;
|
|
32
35
|
exports.default = _default;
|
|
@@ -308,9 +308,6 @@
|
|
|
308
308
|
margin-bottom: 8px;
|
|
309
309
|
font-size: var(--font-size-base, 14px);
|
|
310
310
|
}
|
|
311
|
-
.so-popover-confirm .so-popover-mention .so-alert-warning .so-alert-icon path {
|
|
312
|
-
fill: var(--danger-color, #f85555);
|
|
313
|
-
}
|
|
314
311
|
.so-popover-text {
|
|
315
312
|
display: inline-block;
|
|
316
313
|
max-width: var(--popover-text-max-width, 320px);
|
package/css/Scroll/Scroll.js
CHANGED
|
@@ -67,6 +67,7 @@ function (_PureComponent) {
|
|
|
67
67
|
_this.handleTouchStart = _this.handleTouchStart.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
68
68
|
_this.handleTouchMove = _this.handleTouchMove.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
69
69
|
_this.setStartPoint = _this.setStartPoint.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
70
|
+
_this.handleInnerScroll = _this.handleInnerScroll.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
70
71
|
return _this;
|
|
71
72
|
}
|
|
72
73
|
|
|
@@ -85,6 +86,7 @@ function (_PureComponent) {
|
|
|
85
86
|
this.wheelElement.addEventListener('touchmove', this.handleTouchMove, {
|
|
86
87
|
passive: false
|
|
87
88
|
});
|
|
89
|
+
this.inner.addEventListener('scroll', this.handleInnerScroll);
|
|
88
90
|
};
|
|
89
91
|
|
|
90
92
|
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
@@ -101,6 +103,7 @@ function (_PureComponent) {
|
|
|
101
103
|
this.wheelElement.removeEventListener('wheel', this.handleWheel);
|
|
102
104
|
this.wheelElement.removeEventListener('touchstart', this.handleTouchStart);
|
|
103
105
|
this.wheelElement.removeEventListener('touchmove', this.handleTouchMove);
|
|
106
|
+
this.inner.removeEventListener('scroll', this.handleInnerScroll);
|
|
104
107
|
};
|
|
105
108
|
|
|
106
109
|
_proto.getWheelRect = function getWheelRect() {
|
|
@@ -280,22 +283,39 @@ function (_PureComponent) {
|
|
|
280
283
|
|
|
281
284
|
this.setStartPoint(position);
|
|
282
285
|
this.boundleScroll();
|
|
283
|
-
}
|
|
286
|
+
} // inner scroll
|
|
287
|
+
;
|
|
284
288
|
|
|
285
|
-
_proto.
|
|
289
|
+
_proto.handleInnerScroll = function handleInnerScroll(e) {
|
|
290
|
+
var target = e.target;
|
|
286
291
|
var _this$props6 = this.props,
|
|
287
|
-
children = _this$props6.children,
|
|
288
|
-
scrollWidth = _this$props6.scrollWidth,
|
|
289
|
-
scrollHeight = _this$props6.scrollHeight,
|
|
290
292
|
left = _this$props6.left,
|
|
291
|
-
|
|
292
|
-
scrollX = _this$props6.scrollX,
|
|
293
|
-
scrollY = _this$props6.scrollY,
|
|
294
|
-
style = _this$props6.style;
|
|
293
|
+
scrollWidth = _this$props6.scrollWidth;
|
|
295
294
|
|
|
296
295
|
var _this$getWheelRect2 = this.getWheelRect(),
|
|
297
|
-
width = _this$getWheelRect2.width
|
|
298
|
-
|
|
296
|
+
width = _this$getWheelRect2.width;
|
|
297
|
+
|
|
298
|
+
if (target.scrollLeft) {
|
|
299
|
+
this.handleScroll(left + target.scrollLeft / (scrollWidth - width), this.props.top, undefined, 0);
|
|
300
|
+
target.scrollLeft = 0;
|
|
301
|
+
target.scrollTop = 0;
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
_proto.render = function render() {
|
|
306
|
+
var _this$props7 = this.props,
|
|
307
|
+
children = _this$props7.children,
|
|
308
|
+
scrollWidth = _this$props7.scrollWidth,
|
|
309
|
+
scrollHeight = _this$props7.scrollHeight,
|
|
310
|
+
left = _this$props7.left,
|
|
311
|
+
top = _this$props7.top,
|
|
312
|
+
scrollX = _this$props7.scrollX,
|
|
313
|
+
scrollY = _this$props7.scrollY,
|
|
314
|
+
style = _this$props7.style;
|
|
315
|
+
|
|
316
|
+
var _this$getWheelRect3 = this.getWheelRect(),
|
|
317
|
+
width = _this$getWheelRect3.width,
|
|
318
|
+
height = _this$getWheelRect3.height;
|
|
299
319
|
|
|
300
320
|
var rtl = (0, _config.isRTL)();
|
|
301
321
|
var className = (0, _classnames.default)((0, _styles.scrollClass)('_', scrollX && 'show-x', scrollY && 'show-y', rtl && 'rtl'), this.props.className);
|
package/css/Select/Input.js
CHANGED
|
@@ -46,7 +46,9 @@ function (_Component) {
|
|
|
46
46
|
_this.handleBlur = _this.handleBlur.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
47
47
|
_this.geHandleMax = _this.geHandleMax.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
48
48
|
_this.handlePaste = _this.handlePaste.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
49
|
-
_this.focusInput = _this.focusInput.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
49
|
+
_this.focusInput = _this.focusInput.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
50
|
+
_this.handleCompositionStart = _this.handleCompositionStart.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
51
|
+
_this.handleCompositionEnd = _this.handleCompositionEnd.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this))); // for mutiple select
|
|
50
52
|
|
|
51
53
|
_this.props.setInputReset(_this.reset.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)))); // set focus func to Select
|
|
52
54
|
|
|
@@ -98,7 +100,7 @@ function (_Component) {
|
|
|
98
100
|
_proto.geHandleMax = function geHandleMax(e) {
|
|
99
101
|
var maxLength = this.props.maxLength;
|
|
100
102
|
|
|
101
|
-
if (!maxLength) {
|
|
103
|
+
if (!maxLength || this.composition) {
|
|
102
104
|
return true;
|
|
103
105
|
}
|
|
104
106
|
|
|
@@ -219,6 +221,15 @@ function (_Component) {
|
|
|
219
221
|
this.props.onInputBlur(text);
|
|
220
222
|
};
|
|
221
223
|
|
|
224
|
+
_proto.handleCompositionStart = function handleCompositionStart() {
|
|
225
|
+
this.composition = true;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
_proto.handleCompositionEnd = function handleCompositionEnd(e) {
|
|
229
|
+
this.composition = false;
|
|
230
|
+
this.handleInput(e);
|
|
231
|
+
};
|
|
232
|
+
|
|
222
233
|
_proto.render = function render() {
|
|
223
234
|
var _this$props = this.props,
|
|
224
235
|
text = _this$props.text,
|
|
@@ -233,7 +244,9 @@ function (_Component) {
|
|
|
233
244
|
contentEditable: focus || this.state.editable,
|
|
234
245
|
onFocus: handleFocus,
|
|
235
246
|
onBlur: this.handleBlur,
|
|
236
|
-
title: !focus && (0, _is.isString)(value) ? value : null
|
|
247
|
+
title: !focus && (0, _is.isString)(value) ? value : null,
|
|
248
|
+
onCompositionStart: this.handleCompositionStart,
|
|
249
|
+
onCompositionEnd: this.handleCompositionEnd
|
|
237
250
|
};
|
|
238
251
|
|
|
239
252
|
if ((0, _react.isValidElement)(value)) {
|
|
@@ -635,7 +635,8 @@ function (_PureComponent) {
|
|
|
635
635
|
rowHeight = _this$props7.rowHeight,
|
|
636
636
|
columnResizable = _this$props7.columnResizable,
|
|
637
637
|
innerScrollAttr = _this$props7.innerScrollAttr,
|
|
638
|
-
|
|
638
|
+
bordered = _this$props7.bordered,
|
|
639
|
+
others = (0, _objectWithoutPropertiesLoose2.default)(_this$props7, ["data", "rowsInView", "columns", "width", "fixed", "rowHeight", "columnResizable", "innerScrollAttr", "bordered"]);
|
|
639
640
|
var _this$state3 = this.state,
|
|
640
641
|
colgroup = _this$state3.colgroup,
|
|
641
642
|
scrollTop = _this$state3.scrollTop,
|
|
@@ -681,7 +682,7 @@ function (_PureComponent) {
|
|
|
681
682
|
height: prevHeight
|
|
682
683
|
}
|
|
683
684
|
}), _react.default.createElement("table", {
|
|
684
|
-
className: (0, _styles.tableClass)(!colgroup && minWidthSup && 'init'),
|
|
685
|
+
className: (0, _styles.tableClass)(!colgroup && minWidthSup && 'init', bordered && 'table-bordered'),
|
|
685
686
|
style: {
|
|
686
687
|
width: width
|
|
687
688
|
},
|
|
@@ -724,7 +725,8 @@ function (_PureComponent) {
|
|
|
724
725
|
style: {
|
|
725
726
|
width: width
|
|
726
727
|
},
|
|
727
|
-
ref: this.bindThead
|
|
728
|
+
ref: this.bindThead,
|
|
729
|
+
className: (0, _styles.tableClass)('table-bordered')
|
|
728
730
|
}, _react.default.createElement(_Colgroup.default, {
|
|
729
731
|
colgroup: colgroup,
|
|
730
732
|
columns: columns,
|
package/css/Table/SimpleTable.js
CHANGED
|
@@ -166,7 +166,8 @@ function (_PureComponent) {
|
|
|
166
166
|
data = _this$props2.data,
|
|
167
167
|
onResize = _this$props2.onResize,
|
|
168
168
|
columnResizable = _this$props2.columnResizable,
|
|
169
|
-
sticky = _this$props2.sticky
|
|
169
|
+
sticky = _this$props2.sticky,
|
|
170
|
+
bordered = _this$props2.bordered;
|
|
170
171
|
var _this$state = this.state,
|
|
171
172
|
colgroup = _this$state.colgroup,
|
|
172
173
|
scrollAble = _this$state.scrollAble;
|
|
@@ -174,7 +175,8 @@ function (_PureComponent) {
|
|
|
174
175
|
var inner = _react.default.createElement("table", {
|
|
175
176
|
style: {
|
|
176
177
|
width: width
|
|
177
|
-
}
|
|
178
|
+
},
|
|
179
|
+
className: (0, _styles.tableClass)(bordered && 'table-bordered')
|
|
178
180
|
}, _react.default.createElement(_Colgroup.default, {
|
|
179
181
|
colgroup: colgroup,
|
|
180
182
|
columns: columns,
|
|
@@ -214,7 +216,8 @@ function (_PureComponent) {
|
|
|
214
216
|
width = _this$props3.width,
|
|
215
217
|
fixed = _this$props3.fixed,
|
|
216
218
|
columnResizable = _this$props3.columnResizable,
|
|
217
|
-
|
|
219
|
+
bordered = _this$props3.bordered,
|
|
220
|
+
others = (0, _objectWithoutPropertiesLoose2.default)(_this$props3, ["columns", "width", "fixed", "columnResizable", "bordered"]);
|
|
218
221
|
var _this$state2 = this.state,
|
|
219
222
|
colgroup = _this$state2.colgroup,
|
|
220
223
|
resize = _this$state2.resize;
|
|
@@ -230,7 +233,7 @@ function (_PureComponent) {
|
|
|
230
233
|
style: {
|
|
231
234
|
width: width
|
|
232
235
|
},
|
|
233
|
-
className: (0, _styles.tableClass)(!colgroup && minWidthSup && 'init')
|
|
236
|
+
className: (0, _styles.tableClass)(!colgroup && minWidthSup && 'init', bordered && 'table-bordered')
|
|
234
237
|
}, _react.default.createElement(_Colgroup.default, {
|
|
235
238
|
colgroup: colgroup,
|
|
236
239
|
columns: columns,
|
|
@@ -250,11 +253,13 @@ function (_PureComponent) {
|
|
|
250
253
|
columns = _this$props4.columns,
|
|
251
254
|
width = _this$props4.width,
|
|
252
255
|
children = _this$props4.children,
|
|
253
|
-
hideHeader = _this$props4.hideHeader
|
|
256
|
+
hideHeader = _this$props4.hideHeader,
|
|
257
|
+
bordered = _this$props4.bordered;
|
|
254
258
|
if (!columns || columns.length === 0) return _react.default.createElement("table", {
|
|
255
259
|
style: {
|
|
256
260
|
width: width
|
|
257
|
-
}
|
|
261
|
+
},
|
|
262
|
+
className: (0, _styles.tableClass)(bordered && 'table-bordered')
|
|
258
263
|
}, children);
|
|
259
264
|
return [hideHeader ? null : this.renderHeader(), this.renderBody(), children];
|
|
260
265
|
};
|
|
@@ -273,7 +278,8 @@ SimpleTable.propTypes = {
|
|
|
273
278
|
dataChangeResize: _propTypes.default.bool,
|
|
274
279
|
columnResizable: _propTypes.default.bool,
|
|
275
280
|
sticky: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.bool]),
|
|
276
|
-
hideHeader: _propTypes.default.bool
|
|
281
|
+
hideHeader: _propTypes.default.bool,
|
|
282
|
+
bordered: _propTypes.default.bool
|
|
277
283
|
};
|
|
278
284
|
SimpleTable.defaultProps = {
|
|
279
285
|
data: undefined,
|
package/css/Table/Table.js
CHANGED
|
@@ -163,7 +163,9 @@ function (_Component) {
|
|
|
163
163
|
className: className,
|
|
164
164
|
ref: this.bindTable,
|
|
165
165
|
style: newStyle
|
|
166
|
-
}, events), _react.default.createElement(RenderTable,
|
|
166
|
+
}, events), _react.default.createElement(RenderTable, (0, _extends2.default)({}, props, {
|
|
167
|
+
bordered: bordered
|
|
168
|
+
})), loading && _react.default.createElement("div", {
|
|
167
169
|
className: (0, _styles.tableClass)('loading')
|
|
168
170
|
}, typeof loading === 'boolean' ? _react.default.createElement(_Spin.default, {
|
|
169
171
|
size: 40
|
package/css/Table/resizable.js
CHANGED
|
@@ -79,7 +79,7 @@ var _default = function _default(Table) {
|
|
|
79
79
|
var onColumnResize = this.props.onColumnResize;
|
|
80
80
|
var changed = (0, _immer.default)(this.state, function (draft) {
|
|
81
81
|
var column = draft.columns[index];
|
|
82
|
-
draft.delta += parseFloat(width - (column.width || 0));
|
|
82
|
+
draft.delta += parseFloat(width - (column.width || colgroup[index] || 0));
|
|
83
83
|
colgroup[index] = width;
|
|
84
84
|
draft.columns.forEach(function (col, i) {
|
|
85
85
|
var w = colgroup[i];
|
|
@@ -237,19 +237,19 @@ table > thead > tr > th.so-table-condensed {
|
|
|
237
237
|
.so-table-bordered .so-table-head table {
|
|
238
238
|
border-bottom-width: 1px;
|
|
239
239
|
}
|
|
240
|
-
.so-table-bordered table > thead > tr > th,
|
|
241
|
-
.so-table-bordered table > tbody > tr > th,
|
|
242
|
-
.so-table-bordered table > tfoot > tr > th,
|
|
243
|
-
.so-table-bordered table > thead > tr > td,
|
|
244
|
-
.so-table-bordered table > tbody > tr > td,
|
|
245
|
-
.so-table-bordered table > tfoot > tr > td {
|
|
240
|
+
.so-table-bordered .so-table-table-bordered > thead > tr > th,
|
|
241
|
+
.so-table-bordered .so-table-table-bordered > tbody > tr > th,
|
|
242
|
+
.so-table-bordered .so-table-table-bordered > tfoot > tr > th,
|
|
243
|
+
.so-table-bordered .so-table-table-bordered > thead > tr > td,
|
|
244
|
+
.so-table-bordered .so-table-table-bordered > tbody > tr > td,
|
|
245
|
+
.so-table-bordered .so-table-table-bordered > tfoot > tr > td {
|
|
246
246
|
border-right: 1px solid var(--table-border-color, #ddd);
|
|
247
247
|
border-bottom-width: 1px;
|
|
248
248
|
}
|
|
249
|
-
.so-table-bordered table > tbody > tr > td.so-table-ignore-bottom-border {
|
|
249
|
+
.so-table-bordered .so-table-table-bordered > tbody > tr > td.so-table-ignore-bottom-border {
|
|
250
250
|
border-bottom: none;
|
|
251
251
|
}
|
|
252
|
-
.so-table-bordered table > thead + tbody > tr:first-child > td {
|
|
252
|
+
.so-table-bordered .so-table-table-bordered > thead + tbody > tr:first-child > td {
|
|
253
253
|
border-top-width: 1px;
|
|
254
254
|
}
|
|
255
255
|
.so-table-bordered .so-table-body table {
|
|
@@ -294,7 +294,9 @@ function (_PureComponent) {
|
|
|
294
294
|
data = _this$props7.data,
|
|
295
295
|
absolute = _this$props7.absolute,
|
|
296
296
|
height = _this$props7.height,
|
|
297
|
-
zIndex = _this$props7.zIndex
|
|
297
|
+
zIndex = _this$props7.zIndex,
|
|
298
|
+
compressed = _this$props7.compressed,
|
|
299
|
+
value = _this$props7.value;
|
|
298
300
|
var props = {};
|
|
299
301
|
['mode', 'data', 'datum', 'defaultExpanded', 'defaultExpandAll', 'disabled', 'expanded', 'keygen', 'loader', 'onExpand', 'renderItem', 'line', 'parentClickExpand', 'childrenKey', 'expandIcons'].forEach(function (k) {
|
|
300
302
|
props[k] = _this3.props[k];
|
|
@@ -331,7 +333,8 @@ function (_PureComponent) {
|
|
|
331
333
|
overflowY: 'auto'
|
|
332
334
|
},
|
|
333
335
|
fixed: "min",
|
|
334
|
-
zIndex: zIndex
|
|
336
|
+
zIndex: zIndex,
|
|
337
|
+
value: multiple && !compressed ? value : undefined
|
|
335
338
|
}, _react.default.createElement("div", {
|
|
336
339
|
className: (0, _styles.treeSelectClass)('tree-wrapper')
|
|
337
340
|
}, content));
|
package/css/icons/index.js
CHANGED
package/css/index.d.ts
CHANGED
package/css/index.js
CHANGED
package/css/utils/proptypes.js
CHANGED
|
@@ -15,7 +15,7 @@ function getProps(PropTypes) {
|
|
|
15
15
|
grid: PropTypes.oneOfType([PropTypes.number, PropTypes.object]),
|
|
16
16
|
placeholder: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.func]),
|
|
17
17
|
size: PropTypes.oneOf(['small', 'default', 'large']),
|
|
18
|
-
type: PropTypes.oneOf(['primary', 'default', 'secondary', 'success', 'info', 'warning', 'error', 'danger', 'link'])
|
|
18
|
+
type: PropTypes.oneOf(['primary', 'default', 'secondary', 'success', 'info', 'warning', 'error', 'danger', 'link', 'confirmwarning'])
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|