shineout 1.7.1 → 1.7.5
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/DatePicker/utils.js +1 -1
- package/css/Form/FieldSet.js +0 -1
- package/css/Form/Form.js +3 -0
- package/css/Form/Item.js +1 -1
- package/css/Form/index.d.ts +1 -1
- package/css/Form/inputable.js +1 -1
- package/css/Menu/Root.js +5 -0
- package/css/Pagination/Jumper.js +3 -0
- package/css/Popover/Panel.js +4 -1
- package/css/Spin/styles/spin.css +1 -0
- package/css/Table/SeperateTable.js +1 -0
- package/css/TreeSelect/styles/treeSelect.css +1 -0
- package/css/index.d.ts +1 -1
- package/css/index.js +1 -1
- package/dist/shineout.js +55 -41
- 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/DatePicker/utils.js +2 -2
- package/es/Form/FieldSet.js +0 -1
- package/es/Form/Form.js +1 -0
- package/es/Form/Item.js +1 -1
- package/es/Form/index.d.ts +1 -1
- package/es/Form/inputable.js +1 -1
- package/es/Menu/Root.js +3 -0
- package/es/Pagination/Jumper.js +2 -0
- package/es/Popover/Panel.js +4 -1
- package/es/Spin/styles/spin.less +1 -0
- package/es/Table/SeperateTable.js +1 -0
- package/es/TreeSelect/styles/treeSelect.less +1 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/DatePicker/utils.js +1 -1
- package/lib/Form/FieldSet.js +0 -1
- package/lib/Form/Form.js +3 -0
- package/lib/Form/Item.js +1 -1
- package/lib/Form/index.d.ts +1 -1
- package/lib/Form/inputable.js +1 -1
- package/lib/Menu/Root.js +5 -0
- package/lib/Pagination/Jumper.js +3 -0
- package/lib/Popover/Panel.js +4 -1
- package/lib/Spin/styles/spin.less +1 -0
- package/lib/Table/SeperateTable.js +1 -0
- package/lib/TreeSelect/styles/treeSelect.less +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/es/DatePicker/utils.js
CHANGED
|
@@ -128,9 +128,9 @@ function parse(date, fmt, options) {
|
|
|
128
128
|
const year = date.slice(index, index + 5)
|
|
129
129
|
const weekIndex = fmt2.indexOf('WW')
|
|
130
130
|
const week = weekIndex >= 0 ? date.slice(weekIndex, weekIndex + 3) : 1
|
|
131
|
-
const result = dayjs(year
|
|
131
|
+
const result = dayjs(`${year}-06-15`, 'YYYY-MM-dd')
|
|
132
132
|
.locale(getDayJsLocate(options))
|
|
133
|
-
.isoWeek(week)
|
|
133
|
+
.isoWeek(Number(week))
|
|
134
134
|
.toDate()
|
|
135
135
|
return result
|
|
136
136
|
}
|
package/es/Form/FieldSet.js
CHANGED
|
@@ -123,7 +123,6 @@ class FieldSet extends Component {
|
|
|
123
123
|
result.push(empty(this.handleInsert.bind(this, 0)))
|
|
124
124
|
} else {
|
|
125
125
|
const errorList = (Array.isArray(errors) ? errors : [errors]).filter(Boolean)
|
|
126
|
-
console.log(errorList)
|
|
127
126
|
values.forEach((v, i) => {
|
|
128
127
|
result.push(
|
|
129
128
|
<Provider key={i} value={{ path: `${name}[${i}]`, val: this.validate }}>
|
package/es/Form/Form.js
CHANGED
|
@@ -27,6 +27,7 @@ class Form extends Component {
|
|
|
27
27
|
getValue: () => this.props.datum.getValue(),
|
|
28
28
|
validate: () => this.props.datum.validate(),
|
|
29
29
|
validateFields: fields => this.props.datum.validateFields(fields).catch(() => {}),
|
|
30
|
+
validateFieldsWithError: fields => this.props.datum.validateFields(fields),
|
|
30
31
|
clearValidate: () => {
|
|
31
32
|
this.props.datum.validateClear()
|
|
32
33
|
},
|
package/es/Form/Item.js
CHANGED
package/es/Form/index.d.ts
CHANGED
package/es/Form/inputable.js
CHANGED
|
@@ -93,7 +93,7 @@ export default curry(Origin =>
|
|
|
93
93
|
const { onChange, readOnly, disabled } = this.props
|
|
94
94
|
if ('value' in this.props && !onChange && disabled !== true && readOnly !== true) {
|
|
95
95
|
console.error(
|
|
96
|
-
'You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`'
|
|
96
|
+
'warning: You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly` or `disabled`'
|
|
97
97
|
)
|
|
98
98
|
}
|
|
99
99
|
const { formDatum, loopContext, name, defaultValue, bindInputToItem, popover } = this.props
|
package/es/Menu/Root.js
CHANGED
|
@@ -119,6 +119,9 @@ class Root extends React.Component {
|
|
|
119
119
|
const { active } = this.props
|
|
120
120
|
const act = typeof active === 'function' ? active(data) : id === this.state.activeKey
|
|
121
121
|
if (act) this.state.activeKey = id
|
|
122
|
+
if (!act && this.state.activeKey === id) {
|
|
123
|
+
this.state.activeKey = ''
|
|
124
|
+
}
|
|
122
125
|
return act
|
|
123
126
|
}
|
|
124
127
|
|
package/es/Pagination/Jumper.js
CHANGED
|
@@ -5,6 +5,7 @@ import { paginationClass } from './styles'
|
|
|
5
5
|
import Input from '../Input'
|
|
6
6
|
|
|
7
7
|
const inputStyle = { width: 60, display: 'inline-block' }
|
|
8
|
+
const nofunc = () => {}
|
|
8
9
|
|
|
9
10
|
class Jumper extends PureComponent {
|
|
10
11
|
constructor(props) {
|
|
@@ -63,6 +64,7 @@ class Jumper extends PureComponent {
|
|
|
63
64
|
<Input
|
|
64
65
|
key={this.renderRequire}
|
|
65
66
|
value={current}
|
|
67
|
+
onChange={nofunc}
|
|
66
68
|
autoFocus={this.autoFocus}
|
|
67
69
|
onKeyDown={this.handleKeyDown}
|
|
68
70
|
digits={0}
|
package/es/Popover/Panel.js
CHANGED
|
@@ -85,7 +85,10 @@ class Panel extends Component {
|
|
|
85
85
|
|
|
86
86
|
if (!this.container) return
|
|
87
87
|
if (this.container === getCommonContainer()) {
|
|
88
|
-
this.container.removeChild(this.element)
|
|
88
|
+
// this.container.removeChild(this.element)
|
|
89
|
+
if (this.element && this.element.parentElement) {
|
|
90
|
+
this.element.parentElement.removeChild(this.element)
|
|
91
|
+
}
|
|
89
92
|
} else {
|
|
90
93
|
this.container.parentElement.removeChild(this.container)
|
|
91
94
|
}
|
package/es/Spin/styles/spin.less
CHANGED
|
@@ -121,6 +121,7 @@ class SeperateTable extends PureComponent {
|
|
|
121
121
|
const { offsetLeft, currentIndex } = this.state
|
|
122
122
|
if (currentIndex === index && !oldHeight) {
|
|
123
123
|
this.lastScrollTop += height - this.props.rowHeight
|
|
124
|
+
if (this.lastScrollTop < 0) this.lastScrollTop = 0
|
|
124
125
|
setTranslate(this.tbody, `-${offsetLeft}px`, `-${this.lastScrollTop}px`)
|
|
125
126
|
}
|
|
126
127
|
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/lib/DatePicker/utils.js
CHANGED
|
@@ -135,7 +135,7 @@ function parse(date, fmt, options) {
|
|
|
135
135
|
var year = date.slice(index, index + 5);
|
|
136
136
|
var weekIndex = fmt2.indexOf('WW');
|
|
137
137
|
var week = weekIndex >= 0 ? date.slice(weekIndex, weekIndex + 3) : 1;
|
|
138
|
-
var result = (0, _dayjs.default)(year, 'YYYY').locale(getDayJsLocate(options)).isoWeek(week).toDate();
|
|
138
|
+
var result = (0, _dayjs.default)(year + "-06-15", 'YYYY-MM-dd').locale(getDayJsLocate(options)).isoWeek(Number(week)).toDate();
|
|
139
139
|
return result;
|
|
140
140
|
}
|
|
141
141
|
|
package/lib/Form/FieldSet.js
CHANGED
|
@@ -193,7 +193,6 @@ function (_Component) {
|
|
|
193
193
|
result.push(empty(this.handleInsert.bind(this, 0)));
|
|
194
194
|
} else {
|
|
195
195
|
var errorList = (Array.isArray(errors) ? errors : [errors]).filter(Boolean);
|
|
196
|
-
console.log(errorList);
|
|
197
196
|
values.forEach(function (v, i) {
|
|
198
197
|
result.push(_react.default.createElement(Provider, {
|
|
199
198
|
key: i,
|
package/lib/Form/Form.js
CHANGED
|
@@ -63,6 +63,9 @@ function (_Component) {
|
|
|
63
63
|
validateFields: function validateFields(fields) {
|
|
64
64
|
return _this.props.datum.validateFields(fields).catch(function () {});
|
|
65
65
|
},
|
|
66
|
+
validateFieldsWithError: function validateFieldsWithError(fields) {
|
|
67
|
+
return _this.props.datum.validateFields(fields);
|
|
68
|
+
},
|
|
66
69
|
clearValidate: function clearValidate() {
|
|
67
70
|
_this.props.datum.validateClear();
|
|
68
71
|
},
|
package/lib/Form/Item.js
CHANGED
|
@@ -227,7 +227,7 @@ Item.propTypes = (0, _objectSpread2.default)({}, (0, _proptypes.getProps)(_propT
|
|
|
227
227
|
});
|
|
228
228
|
Item.defaultProps = (0, _objectSpread2.default)({}, _proptypes.defaultProps, {
|
|
229
229
|
formItemErrors: [],
|
|
230
|
-
keepErrorHeight:
|
|
230
|
+
keepErrorHeight: false
|
|
231
231
|
});
|
|
232
232
|
var _default = Item; // eslint-disable-next-line
|
|
233
233
|
|
package/lib/Form/index.d.ts
CHANGED
package/lib/Form/inputable.js
CHANGED
|
@@ -105,7 +105,7 @@ var _default = (0, _func.curry)(function (Origin) {
|
|
|
105
105
|
disabled = _this$props.disabled;
|
|
106
106
|
|
|
107
107
|
if ('value' in this.props && !onChange && disabled !== true && readOnly !== true) {
|
|
108
|
-
console.error('You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`');
|
|
108
|
+
console.error('warning: You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly` or `disabled`');
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
var _this$props2 = this.props,
|
package/lib/Menu/Root.js
CHANGED
|
@@ -158,6 +158,11 @@ function (_React$Component) {
|
|
|
158
158
|
var active = this.props.active;
|
|
159
159
|
var act = typeof active === 'function' ? active(data) : id === this.state.activeKey;
|
|
160
160
|
if (act) this.state.activeKey = id;
|
|
161
|
+
|
|
162
|
+
if (!act && this.state.activeKey === id) {
|
|
163
|
+
this.state.activeKey = '';
|
|
164
|
+
}
|
|
165
|
+
|
|
161
166
|
return act;
|
|
162
167
|
};
|
|
163
168
|
|
package/lib/Pagination/Jumper.js
CHANGED
|
@@ -26,6 +26,8 @@ var inputStyle = {
|
|
|
26
26
|
display: 'inline-block'
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
var nofunc = function nofunc() {};
|
|
30
|
+
|
|
29
31
|
var Jumper =
|
|
30
32
|
/*#__PURE__*/
|
|
31
33
|
function (_PureComponent) {
|
|
@@ -91,6 +93,7 @@ function (_PureComponent) {
|
|
|
91
93
|
}, txt[0], _react.default.createElement(_Input.default, {
|
|
92
94
|
key: this.renderRequire,
|
|
93
95
|
value: current,
|
|
96
|
+
onChange: nofunc,
|
|
94
97
|
autoFocus: this.autoFocus,
|
|
95
98
|
onKeyDown: this.handleKeyDown,
|
|
96
99
|
digits: 0,
|
package/lib/Popover/Panel.js
CHANGED
|
@@ -125,7 +125,10 @@ function (_Component) {
|
|
|
125
125
|
if (!this.container) return;
|
|
126
126
|
|
|
127
127
|
if (this.container === (0, _popContainer.default)()) {
|
|
128
|
-
this.container.removeChild(this.element)
|
|
128
|
+
// this.container.removeChild(this.element)
|
|
129
|
+
if (this.element && this.element.parentElement) {
|
|
130
|
+
this.element.parentElement.removeChild(this.element);
|
|
131
|
+
}
|
|
129
132
|
} else {
|
|
130
133
|
this.container.parentElement.removeChild(this.container);
|
|
131
134
|
}
|
|
@@ -187,6 +187,7 @@ function (_PureComponent) {
|
|
|
187
187
|
|
|
188
188
|
if (currentIndex === index && !oldHeight) {
|
|
189
189
|
this.lastScrollTop += height - this.props.rowHeight;
|
|
190
|
+
if (this.lastScrollTop < 0) this.lastScrollTop = 0;
|
|
190
191
|
(0, _translate.setTranslate)(this.tbody, "-" + offsetLeft + "px", "-" + this.lastScrollTop + "px");
|
|
191
192
|
}
|
|
192
193
|
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED