shineout 1.9.2 → 1.9.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/es/Datum/hoc.js CHANGED
@@ -85,13 +85,6 @@ export default curry(function (options, Origin) {
85
85
  if (prevProps.onChange !== this.props.onChange) {
86
86
  this.datum.onChange = this.props.onChange;
87
87
  }
88
-
89
- var values = this.props[key];
90
-
91
- if (values !== this.prevValues) {
92
- this.setValue(this.props.initValidate ? undefined : IGNORE_VALIDATE);
93
- this.prevValues = values;
94
- }
95
88
  };
96
89
 
97
90
  _proto.setValue = function setValue(t) {
@@ -111,6 +104,13 @@ export default curry(function (options, Origin) {
111
104
  this.datum.setDisabled(props.disabled);
112
105
  }
113
106
 
107
+ var values = this.props[key];
108
+
109
+ if (values !== this.prevValues) {
110
+ this.setValue(this.props.initValidate ? undefined : IGNORE_VALIDATE);
111
+ this.prevValues = values;
112
+ }
113
+
114
114
  if (type === 'list') this.setValue(WITH_OUT_DISPATCH); // delete props[key]
115
115
 
116
116
  return React.createElement(Origin, _extends({}, props, {
@@ -32,7 +32,7 @@ function (_PureComponent) {
32
32
  var _this$props = this.props,
33
33
  total = _this$props.total,
34
34
  pageSize = _this$props.pageSize;
35
- return Math.ceil(total / pageSize);
35
+ return Math.ceil(total / pageSize) || 1;
36
36
  };
37
37
 
38
38
  _proto.handleKeyDown = function handleKeyDown(e) {
@@ -108,7 +108,9 @@ function (_PureComponent) {
108
108
  var colgroup = [];
109
109
 
110
110
  var _loop = function _loop(i, count) {
111
- var width = tds[i].offsetWidth;
111
+ var _tds$i$getBoundingCli = tds[i].getBoundingClientRect(),
112
+ width = _tds$i$getBoundingCli.width;
113
+
112
114
  var colSpan = parseInt(tds[i].getAttribute('colspan'), 10);
113
115
 
114
116
  if (colSpan > 1) {
@@ -296,6 +296,15 @@ export interface TreeSelectProps<Value, Data> extends StandardProps,
296
296
  * default: -
297
297
  */
298
298
  innerTitle?: ReactNode;
299
+
300
+ /**
301
+ * 点击父节点后展开节点
302
+ *
303
+ * Click on the parent node to expand the node
304
+ *
305
+ * default: -
306
+ */
307
+ parentClickExpand?: boolean
299
308
  }
300
309
 
301
310
 
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.2' }
4
+ export default { utils, version: '1.9.5' }
5
5
  export { utils }
6
6
  export { setLocale } from './locale'
7
7
  export { color, style } from './utils/expose'
package/es/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import * as utils from './utils';
3
3
  export default {
4
4
  utils: utils,
5
- version: '1.9.2'
5
+ version: '1.9.5'
6
6
  };
7
7
  export { utils };
8
8
  export { setLocale } from './locale';
package/es/utils/zoom.js CHANGED
@@ -19,9 +19,15 @@ var updatePixelRatio = function updatePixelRatio(e) {
19
19
  dispatch(pr);
20
20
  }
21
21
 
22
- window.matchMedia("(resolution: " + pr + "dppx)").addEventListener('change', updatePixelRatio, {
23
- once: true
24
- });
22
+ if (window.matchMedia) {
23
+ var media = window.matchMedia("(resolution: " + pr + "dppx)");
24
+
25
+ if (media.addEventListener) {
26
+ media.addEventListener('change', updatePixelRatio, {
27
+ once: true
28
+ });
29
+ }
30
+ }
25
31
  };
26
32
 
27
33
  updatePixelRatio();
package/lib/Datum/hoc.js CHANGED
@@ -105,13 +105,6 @@ var _default = (0, _func.curry)(function (options, Origin) {
105
105
  if (prevProps.onChange !== this.props.onChange) {
106
106
  this.datum.onChange = this.props.onChange;
107
107
  }
108
-
109
- var values = this.props[key];
110
-
111
- if (values !== this.prevValues) {
112
- this.setValue(this.props.initValidate ? undefined : _types.IGNORE_VALIDATE);
113
- this.prevValues = values;
114
- }
115
108
  };
116
109
 
117
110
  _proto.setValue = function setValue(t) {
@@ -130,6 +123,13 @@ var _default = (0, _func.curry)(function (options, Origin) {
130
123
  this.datum.setDisabled(props.disabled);
131
124
  }
132
125
 
126
+ var values = this.props[key];
127
+
128
+ if (values !== this.prevValues) {
129
+ this.setValue(this.props.initValidate ? undefined : _types.IGNORE_VALIDATE);
130
+ this.prevValues = values;
131
+ }
132
+
133
133
  if (type === 'list') this.setValue(_types.WITH_OUT_DISPATCH); // delete props[key]
134
134
 
135
135
  return _react.default.createElement(Origin, (0, _extends2.default)({}, props, {
@@ -48,7 +48,7 @@ function (_PureComponent) {
48
48
  var _this$props = this.props,
49
49
  total = _this$props.total,
50
50
  pageSize = _this$props.pageSize;
51
- return Math.ceil(total / pageSize);
51
+ return Math.ceil(total / pageSize) || 1;
52
52
  };
53
53
 
54
54
  _proto.handleKeyDown = function handleKeyDown(e) {
@@ -129,7 +129,9 @@ function (_PureComponent) {
129
129
  var colgroup = [];
130
130
 
131
131
  var _loop = function _loop(i, count) {
132
- var width = tds[i].offsetWidth;
132
+ var _tds$i$getBoundingCli = tds[i].getBoundingClientRect(),
133
+ width = _tds$i$getBoundingCli.width;
134
+
133
135
  var colSpan = parseInt(tds[i].getAttribute('colspan'), 10);
134
136
 
135
137
  if (colSpan > 1) {
@@ -296,6 +296,15 @@ export interface TreeSelectProps<Value, Data> extends StandardProps,
296
296
  * default: -
297
297
  */
298
298
  innerTitle?: ReactNode;
299
+
300
+ /**
301
+ * 点击父节点后展开节点
302
+ *
303
+ * Click on the parent node to expand the node
304
+ *
305
+ * default: -
306
+ */
307
+ parentClickExpand?: boolean
299
308
  }
300
309
 
301
310
 
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.2' }
4
+ export default { utils, version: '1.9.5' }
5
5
  export { utils }
6
6
  export { setLocale } from './locale'
7
7
  export { color, style } from './utils/expose'
package/lib/index.js CHANGED
@@ -224,6 +224,6 @@ exports.Upload = _Upload.default;
224
224
  // Created by scripts/src-index.js.
225
225
  var _default = {
226
226
  utils: utils,
227
- version: '1.9.2'
227
+ version: '1.9.5'
228
228
  };
229
229
  exports.default = _default;
package/lib/utils/zoom.js CHANGED
@@ -29,9 +29,15 @@ var updatePixelRatio = function updatePixelRatio(e) {
29
29
  dispatch(pr);
30
30
  }
31
31
 
32
- window.matchMedia("(resolution: " + pr + "dppx)").addEventListener('change', updatePixelRatio, {
33
- once: true
34
- });
32
+ if (window.matchMedia) {
33
+ var media = window.matchMedia("(resolution: " + pr + "dppx)");
34
+
35
+ if (media.addEventListener) {
36
+ media.addEventListener('change', updatePixelRatio, {
37
+ once: true
38
+ });
39
+ }
40
+ }
35
41
  };
36
42
 
37
43
  updatePixelRatio();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shineout",
3
- "version": "1.9.2",
3
+ "version": "1.9.5",
4
4
  "description": "Shein 前端组件库",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",