shineout 1.9.1 → 1.9.2
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/Cascader/Input.js +4 -13
- package/css/Checkbox/index.d.ts +0 -11
- package/css/Input/index.d.ts +0 -10
- package/css/InputTitle/styles/inputTitle.css +4 -0
- package/css/Radio/index.d.ts +0 -2
- package/css/Rate/Rate.js +1 -3
- package/css/Select/styles/select.css +2 -2
- package/css/TreeSelect/index.d.ts +0 -10
- package/css/index.d.ts +1 -1
- package/css/index.js +1 -1
- package/dist/shineout.js +790 -242
- 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/@types/common.d.ts +19 -0
- package/es/Cascader/Input.js +5 -14
- package/es/Checkbox/index.d.ts +0 -11
- package/es/Input/index.d.ts +0 -10
- package/es/InputTitle/styles/inputTitle.less +4 -0
- package/es/Radio/index.d.ts +0 -2
- package/es/Rate/Rate.js +1 -2
- package/es/Select/styles/select.less +2 -2
- package/es/TreeSelect/index.d.ts +0 -10
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/@types/common.d.ts +19 -0
- package/lib/Cascader/Input.js +4 -13
- package/lib/Checkbox/index.d.ts +0 -11
- package/lib/Input/index.d.ts +0 -10
- package/lib/InputTitle/styles/inputTitle.less +4 -0
- package/lib/Radio/index.d.ts +0 -2
- package/lib/Rate/Rate.js +1 -3
- package/lib/Select/styles/select.less +2 -2
- package/lib/TreeSelect/index.d.ts +0 -10
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/es/@types/common.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
+
import { RuleParamsType } from '../Rule'
|
|
2
3
|
|
|
3
4
|
export interface StandardProps {
|
|
4
5
|
/**
|
|
@@ -79,6 +80,24 @@ export interface FormItemStandardProps<Value = any> {
|
|
|
79
80
|
* default: false
|
|
80
81
|
*/
|
|
81
82
|
filterSameChange?: boolean;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Validation rules
|
|
86
|
+
*
|
|
87
|
+
* 校验规则
|
|
88
|
+
*
|
|
89
|
+
* default: -
|
|
90
|
+
*/
|
|
91
|
+
rules?: RuleParamsType<Value>;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Binding validation field name. When the value changes, the bound field validation is triggered.
|
|
95
|
+
*
|
|
96
|
+
* 绑定校验字段名。当值变化后,触发绑定的字段校验。
|
|
97
|
+
*
|
|
98
|
+
* default: -
|
|
99
|
+
*/
|
|
100
|
+
bind?: string[];
|
|
82
101
|
}
|
|
83
102
|
export interface ListItemStandardProps<Item = any, Value = any> {
|
|
84
103
|
/**
|
package/es/Cascader/Input.js
CHANGED
|
@@ -3,7 +3,7 @@ import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized
|
|
|
3
3
|
import React, { Component } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { cascaderClass } from './styles';
|
|
6
|
-
import { focusElement, getCursorOffset } from '../utils/dom/element';
|
|
6
|
+
import { focusElement, getCursorOffset, preventPasteFile } from '../utils/dom/element';
|
|
7
7
|
|
|
8
8
|
var handleFocus = function handleFocus(e) {
|
|
9
9
|
e.stopPropagation();
|
|
@@ -83,24 +83,15 @@ function (_Component) {
|
|
|
83
83
|
this.lastCursorOffset = getCursorOffset(text.length);
|
|
84
84
|
var t = this.getProcessedValue(text);
|
|
85
85
|
this.props.onFilter(t);
|
|
86
|
-
}
|
|
86
|
+
} // eslint-disable-next-line class-methods-use-this
|
|
87
|
+
;
|
|
87
88
|
|
|
88
89
|
_proto.handlePaste = function handlePaste(e) {
|
|
89
|
-
|
|
90
|
-
if (!text) return;
|
|
91
|
-
e.preventDefault();
|
|
92
|
-
document.execCommand('insertText', false, text);
|
|
93
|
-
this.handleInput({
|
|
94
|
-
target: {
|
|
95
|
-
innerText: text
|
|
96
|
-
}
|
|
97
|
-
});
|
|
90
|
+
preventPasteFile(e);
|
|
98
91
|
};
|
|
99
92
|
|
|
100
93
|
_proto.render = function render() {
|
|
101
|
-
var
|
|
102
|
-
focus = _this$props.focus,
|
|
103
|
-
filterText = _this$props.filterText;
|
|
94
|
+
var focus = this.props.focus;
|
|
104
95
|
var props = {
|
|
105
96
|
className: cascaderClass('input', !focus && 'ellipsis'),
|
|
106
97
|
ref: this.bindElement,
|
package/es/Checkbox/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import { RuleParamsType } from '../Rule'
|
|
3
2
|
import { StandardProps, FormItemStandardProps, ListItemStandardProps } from '../@types/common'
|
|
4
3
|
|
|
5
4
|
type ReactNode = React.ReactNode;
|
|
@@ -33,16 +32,6 @@ export interface CheckboxProps<T> extends StandardProps, FormItemStandardProps<T
|
|
|
33
32
|
*/
|
|
34
33
|
htmlValue?: any;
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Validation rules
|
|
39
|
-
*
|
|
40
|
-
* 校验规则
|
|
41
|
-
*
|
|
42
|
-
* default: -
|
|
43
|
-
*/
|
|
44
|
-
rules?: RuleParamsType<T, CheckboxProps<T>>
|
|
45
|
-
|
|
46
35
|
}
|
|
47
36
|
|
|
48
37
|
// attention: checkbox group value is array
|
package/es/Input/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { PopoverProps } from '../Popover'
|
|
3
|
-
import { RuleParamsType } from '../Rule'
|
|
4
3
|
import { StandardProps, RegularAttributes, FormItemStandardProps, CommonProps } from '../@types/common'
|
|
5
4
|
|
|
6
5
|
type ReactNode = React.ReactNode;
|
|
@@ -144,15 +143,6 @@ FormItemStandardProps<Value> {
|
|
|
144
143
|
*/
|
|
145
144
|
maxLength?: number;
|
|
146
145
|
|
|
147
|
-
/**
|
|
148
|
-
* Validation rules
|
|
149
|
-
*
|
|
150
|
-
* 校验规则
|
|
151
|
-
*
|
|
152
|
-
* default: -
|
|
153
|
-
*/
|
|
154
|
-
rules?: RuleParamsType<Value, InputProps<Value>>;
|
|
155
|
-
|
|
156
146
|
/**
|
|
157
147
|
* get input element
|
|
158
148
|
*
|
package/es/Radio/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import { RuleParamsType } from '../Rule'
|
|
3
2
|
import { StandardProps, StructDataStandardProps, ListItemStandardProps, FormItemStandardProps } from '../@types/common'
|
|
4
3
|
|
|
5
|
-
type ReactNode = React.ReactNode;
|
|
6
4
|
|
|
7
5
|
export interface RadioProps<Item = any> extends StandardProps {
|
|
8
6
|
|
package/es/Rate/Rate.js
CHANGED
|
@@ -6,7 +6,6 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import classnames from 'classnames';
|
|
7
7
|
import { PureComponent } from '../component';
|
|
8
8
|
import { range } from '../utils/numbers';
|
|
9
|
-
import { getParent } from '../utils/dom/element';
|
|
10
9
|
import { getProps, defaultProps } from '../utils/proptypes';
|
|
11
10
|
import { rateClass } from './styles';
|
|
12
11
|
import getDataset from '../utils/dom/getDataset';
|
|
@@ -91,7 +90,7 @@ function (_PureComponent) {
|
|
|
91
90
|
clearable = _this$props2.clearable,
|
|
92
91
|
allowHalf = _this$props2.allowHalf;
|
|
93
92
|
|
|
94
|
-
if (allowHalf &&
|
|
93
|
+
if (allowHalf && e.target.parentElement.querySelector("." + rateClass('allow-half'))) {
|
|
95
94
|
value -= 0.5;
|
|
96
95
|
}
|
|
97
96
|
|
|
@@ -335,8 +335,8 @@
|
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
&.@{select-prefix}-selected {
|
|
338
|
-
background-color: @primary-color-fade-
|
|
339
|
-
color:
|
|
338
|
+
background-color: @primary-color-fade-10;
|
|
339
|
+
color: @colors-primary;
|
|
340
340
|
}
|
|
341
341
|
&.@{select-prefix}-disabled {
|
|
342
342
|
padding-right: @select-result-space;
|
package/es/TreeSelect/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import { RuleParamsType } from '../Rule'
|
|
3
2
|
import { CommonProps, StandardProps } from '../@types/common'
|
|
4
3
|
|
|
5
4
|
type ReactNode = React.ReactNode;
|
|
@@ -280,15 +279,6 @@ export interface TreeSelectProps<Value, Data> extends StandardProps,
|
|
|
280
279
|
*/
|
|
281
280
|
onCollapse?: (collapse: boolean) => void;
|
|
282
281
|
|
|
283
|
-
/**
|
|
284
|
-
* Validation rules
|
|
285
|
-
*
|
|
286
|
-
* 校验规则
|
|
287
|
-
*
|
|
288
|
-
* default: -
|
|
289
|
-
*/
|
|
290
|
-
rules?: RuleParamsType<Value, TreeSelectProps<Value, Data>>;
|
|
291
|
-
|
|
292
282
|
/**
|
|
293
283
|
* render unmatch value
|
|
294
284
|
*
|
package/es/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Created by scripts/src-index.js.
|
|
2
2
|
import * as utils from './utils'
|
|
3
3
|
|
|
4
|
-
export default { utils, version: '1.9.
|
|
4
|
+
export default { utils, version: '1.9.2' }
|
|
5
5
|
export { utils }
|
|
6
6
|
export { setLocale } from './locale'
|
|
7
7
|
export { color, style } from './utils/expose'
|
package/es/index.js
CHANGED
package/lib/@types/common.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
+
import { RuleParamsType } from '../Rule'
|
|
2
3
|
|
|
3
4
|
export interface StandardProps {
|
|
4
5
|
/**
|
|
@@ -79,6 +80,24 @@ export interface FormItemStandardProps<Value = any> {
|
|
|
79
80
|
* default: false
|
|
80
81
|
*/
|
|
81
82
|
filterSameChange?: boolean;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Validation rules
|
|
86
|
+
*
|
|
87
|
+
* 校验规则
|
|
88
|
+
*
|
|
89
|
+
* default: -
|
|
90
|
+
*/
|
|
91
|
+
rules?: RuleParamsType<Value>;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Binding validation field name. When the value changes, the bound field validation is triggered.
|
|
95
|
+
*
|
|
96
|
+
* 绑定校验字段名。当值变化后,触发绑定的字段校验。
|
|
97
|
+
*
|
|
98
|
+
* default: -
|
|
99
|
+
*/
|
|
100
|
+
bind?: string[];
|
|
82
101
|
}
|
|
83
102
|
export interface ListItemStandardProps<Item = any, Value = any> {
|
|
84
103
|
/**
|
package/lib/Cascader/Input.js
CHANGED
|
@@ -97,24 +97,15 @@ function (_Component) {
|
|
|
97
97
|
this.lastCursorOffset = (0, _element.getCursorOffset)(text.length);
|
|
98
98
|
var t = this.getProcessedValue(text);
|
|
99
99
|
this.props.onFilter(t);
|
|
100
|
-
}
|
|
100
|
+
} // eslint-disable-next-line class-methods-use-this
|
|
101
|
+
;
|
|
101
102
|
|
|
102
103
|
_proto.handlePaste = function handlePaste(e) {
|
|
103
|
-
|
|
104
|
-
if (!text) return;
|
|
105
|
-
e.preventDefault();
|
|
106
|
-
document.execCommand('insertText', false, text);
|
|
107
|
-
this.handleInput({
|
|
108
|
-
target: {
|
|
109
|
-
innerText: text
|
|
110
|
-
}
|
|
111
|
-
});
|
|
104
|
+
(0, _element.preventPasteFile)(e);
|
|
112
105
|
};
|
|
113
106
|
|
|
114
107
|
_proto.render = function render() {
|
|
115
|
-
var
|
|
116
|
-
focus = _this$props.focus,
|
|
117
|
-
filterText = _this$props.filterText;
|
|
108
|
+
var focus = this.props.focus;
|
|
118
109
|
var props = {
|
|
119
110
|
className: (0, _styles.cascaderClass)('input', !focus && 'ellipsis'),
|
|
120
111
|
ref: this.bindElement,
|
package/lib/Checkbox/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import { RuleParamsType } from '../Rule'
|
|
3
2
|
import { StandardProps, FormItemStandardProps, ListItemStandardProps } from '../@types/common'
|
|
4
3
|
|
|
5
4
|
type ReactNode = React.ReactNode;
|
|
@@ -33,16 +32,6 @@ export interface CheckboxProps<T> extends StandardProps, FormItemStandardProps<T
|
|
|
33
32
|
*/
|
|
34
33
|
htmlValue?: any;
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Validation rules
|
|
39
|
-
*
|
|
40
|
-
* 校验规则
|
|
41
|
-
*
|
|
42
|
-
* default: -
|
|
43
|
-
*/
|
|
44
|
-
rules?: RuleParamsType<T, CheckboxProps<T>>
|
|
45
|
-
|
|
46
35
|
}
|
|
47
36
|
|
|
48
37
|
// attention: checkbox group value is array
|
package/lib/Input/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { PopoverProps } from '../Popover'
|
|
3
|
-
import { RuleParamsType } from '../Rule'
|
|
4
3
|
import { StandardProps, RegularAttributes, FormItemStandardProps, CommonProps } from '../@types/common'
|
|
5
4
|
|
|
6
5
|
type ReactNode = React.ReactNode;
|
|
@@ -144,15 +143,6 @@ FormItemStandardProps<Value> {
|
|
|
144
143
|
*/
|
|
145
144
|
maxLength?: number;
|
|
146
145
|
|
|
147
|
-
/**
|
|
148
|
-
* Validation rules
|
|
149
|
-
*
|
|
150
|
-
* 校验规则
|
|
151
|
-
*
|
|
152
|
-
* default: -
|
|
153
|
-
*/
|
|
154
|
-
rules?: RuleParamsType<Value, InputProps<Value>>;
|
|
155
|
-
|
|
156
146
|
/**
|
|
157
147
|
* get input element
|
|
158
148
|
*
|
package/lib/Radio/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import { RuleParamsType } from '../Rule'
|
|
3
2
|
import { StandardProps, StructDataStandardProps, ListItemStandardProps, FormItemStandardProps } from '../@types/common'
|
|
4
3
|
|
|
5
|
-
type ReactNode = React.ReactNode;
|
|
6
4
|
|
|
7
5
|
export interface RadioProps<Item = any> extends StandardProps {
|
|
8
6
|
|
package/lib/Rate/Rate.js
CHANGED
|
@@ -21,8 +21,6 @@ var _component = require("../component");
|
|
|
21
21
|
|
|
22
22
|
var _numbers = require("../utils/numbers");
|
|
23
23
|
|
|
24
|
-
var _element = require("../utils/dom/element");
|
|
25
|
-
|
|
26
24
|
var _proptypes = require("../utils/proptypes");
|
|
27
25
|
|
|
28
26
|
var _styles = require("./styles");
|
|
@@ -110,7 +108,7 @@ function (_PureComponent) {
|
|
|
110
108
|
clearable = _this$props2.clearable,
|
|
111
109
|
allowHalf = _this$props2.allowHalf;
|
|
112
110
|
|
|
113
|
-
if (allowHalf &&
|
|
111
|
+
if (allowHalf && e.target.parentElement.querySelector("." + (0, _styles.rateClass)('allow-half'))) {
|
|
114
112
|
value -= 0.5;
|
|
115
113
|
}
|
|
116
114
|
|
|
@@ -335,8 +335,8 @@
|
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
&.@{select-prefix}-selected {
|
|
338
|
-
background-color: @primary-color-fade-
|
|
339
|
-
color:
|
|
338
|
+
background-color: @primary-color-fade-10;
|
|
339
|
+
color: @colors-primary;
|
|
340
340
|
}
|
|
341
341
|
&.@{select-prefix}-disabled {
|
|
342
342
|
padding-right: @select-result-space;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import { RuleParamsType } from '../Rule'
|
|
3
2
|
import { CommonProps, StandardProps } from '../@types/common'
|
|
4
3
|
|
|
5
4
|
type ReactNode = React.ReactNode;
|
|
@@ -280,15 +279,6 @@ export interface TreeSelectProps<Value, Data> extends StandardProps,
|
|
|
280
279
|
*/
|
|
281
280
|
onCollapse?: (collapse: boolean) => void;
|
|
282
281
|
|
|
283
|
-
/**
|
|
284
|
-
* Validation rules
|
|
285
|
-
*
|
|
286
|
-
* 校验规则
|
|
287
|
-
*
|
|
288
|
-
* default: -
|
|
289
|
-
*/
|
|
290
|
-
rules?: RuleParamsType<Value, TreeSelectProps<Value, Data>>;
|
|
291
|
-
|
|
292
282
|
/**
|
|
293
283
|
* render unmatch value
|
|
294
284
|
*
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Created by scripts/src-index.js.
|
|
2
2
|
import * as utils from './utils'
|
|
3
3
|
|
|
4
|
-
export default { utils, version: '1.9.
|
|
4
|
+
export default { utils, version: '1.9.2' }
|
|
5
5
|
export { utils }
|
|
6
6
|
export { setLocale } from './locale'
|
|
7
7
|
export { color, style } from './utils/expose'
|
package/lib/index.js
CHANGED