shineout 1.10.8-beta.3 → 1.10.8

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.
@@ -58,6 +58,7 @@
58
58
  -ms-flex: 1;
59
59
  flex: 1;
60
60
  padding: 0 6px;
61
+ min-width: 0;
61
62
  }
62
63
  .so-form-item .so-form-control:first-child {
63
64
  padding-left: 0;
@@ -211,7 +211,7 @@ function (_PureComponent) {
211
211
  var res = result.reduce(function (acc, cur) {
212
212
  var r = getResultContent(cur, renderResult, renderUnmatched);
213
213
 
214
- if (r !== undefined && r !== '') {
214
+ if (!(0, _is.isEmpty)(r)) {
215
215
  acc.push(cur);
216
216
  }
217
217
 
@@ -123,6 +123,14 @@ function (_PureComponent) {
123
123
  return this.props.text[key] || (0, _locale.getLocale)(key);
124
124
  };
125
125
 
126
+ _proto.getDisabledStatus = function getDisabledStatus() {
127
+ if (typeof this.props.disabled == 'function') {
128
+ return this.props.disabled;
129
+ } else {
130
+ return !!this.props.disabled;
131
+ }
132
+ };
133
+
126
134
  _proto.getFocusSelected = function getFocusSelected() {
127
135
  var _this$props = this.props,
128
136
  reFocus = _this$props.reFocus,
@@ -204,7 +212,7 @@ function (_PureComponent) {
204
212
  };
205
213
 
206
214
  _proto.handleState = function handleState(focus, e) {
207
- if (this.props.disabled === true) return;
215
+ if (this.getDisabledStatus() === true) return;
208
216
  if (focus === this.state.focus) return; // click close icon
209
217
 
210
218
  if (focus && e && e.target.classList.contains((0, _styles.selectClass)('close'))) return;
@@ -239,13 +247,12 @@ function (_PureComponent) {
239
247
  var _this$props4 = this.props,
240
248
  datum = _this$props4.datum,
241
249
  multiple = _this$props4.multiple,
242
- disabled = _this$props4.disabled,
243
250
  emptyAfterSelect = _this$props4.emptyAfterSelect,
244
251
  onFilter = _this$props4.onFilter,
245
252
  filterText = _this$props4.filterText,
246
253
  onCreate = _this$props4.onCreate,
247
254
  reFocus = _this$props4.reFocus;
248
- if (disabled === true) return; // if click option, ignore blur event
255
+ if (this.getDisabledStatus() === true) return; // if click option, ignore blur event
249
256
 
250
257
  if (this.inputBlurTimer) {
251
258
  this.lastChangeIsOptionClick = true;
@@ -591,7 +598,6 @@ function (_PureComponent) {
591
598
  placeholder = _this$props12.placeholder,
592
599
  multiple = _this$props12.multiple,
593
600
  clearable = _this$props12.clearable,
594
- disabled = _this$props12.disabled,
595
601
  size = _this$props12.size,
596
602
  onFilter = _this$props12.onFilter,
597
603
  datum = _this$props12.datum,
@@ -608,6 +614,7 @@ function (_PureComponent) {
608
614
  innerTitle = _this$props12.innerTitle,
609
615
  keygen = _this$props12.keygen,
610
616
  data = _this$props12.data;
617
+ var disabled = this.getDisabledStatus();
611
618
  var className = (0, _styles.selectClass)('inner', size, this.state.focus && 'focus', this.state.position, multiple && 'multiple', disabled === true && (0, _classname.getDirectionClass)('disabled'), !trim && 'pre');
612
619
  return _react.default.createElement("div", {
613
620
  // eslint-disable-next-line
@@ -252,7 +252,7 @@ function (_PureComponent) {
252
252
  key: "more",
253
253
  className: (0, _styles.treeSelectClass)((0, _classname.getDirectionClass)('item'), 'item-compressed'),
254
254
  popoverClassName: (0, _styles.treeSelectClass)('popover'),
255
- contentClassName: (0, _classname.getDirectionClass)('result'),
255
+ contentClassName: (0, _styles.treeSelectClass)((0, _classname.getDirectionClass)('result')),
256
256
  compressed: compressed,
257
257
  data: items,
258
258
  cls: _styles.treeSelectClass,
package/css/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.10.8-beta.3' }
4
+ export default { utils, version: '1.10.8' }
5
5
  export { utils }
6
6
  export { setLocale } from './locale'
7
7
  export { color, style } from './utils/expose'
package/css/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.10.8-beta.3'
227
+ version: '1.10.8'
228
228
  };
229
229
  exports.default = _default;
package/dist/shineout.js CHANGED
@@ -37329,7 +37329,7 @@ function (_PureComponent) {
37329
37329
  var res = result.reduce(function (acc, cur) {
37330
37330
  var r = getResultContent(cur, renderResult, renderUnmatched);
37331
37331
 
37332
- if (r !== undefined && r !== '') {
37332
+ if (!Object(_utils_is__WEBPACK_IMPORTED_MODULE_12__["isEmpty"])(r)) {
37333
37333
  acc.push(cur);
37334
37334
  }
37335
37335
 
@@ -37868,6 +37868,15 @@ function (_PureComponent) {
37868
37868
  value: function getText(key) {
37869
37869
  return this.props.text[key] || Object(_locale__WEBPACK_IMPORTED_MODULE_16__["getLocale"])(key);
37870
37870
  }
37871
+ }, {
37872
+ key: "getDisabledStatus",
37873
+ value: function getDisabledStatus() {
37874
+ if (typeof this.props.disabled == 'function') {
37875
+ return this.props.disabled;
37876
+ } else {
37877
+ return !!this.props.disabled;
37878
+ }
37879
+ }
37871
37880
  }, {
37872
37881
  key: "getFocusSelected",
37873
37882
  value: function getFocusSelected() {
@@ -37961,7 +37970,7 @@ function (_PureComponent) {
37961
37970
  }, {
37962
37971
  key: "handleState",
37963
37972
  value: function handleState(focus, e) {
37964
- if (this.props.disabled === true) return;
37973
+ if (this.getDisabledStatus() === true) return;
37965
37974
  if (focus === this.state.focus) return; // click close icon
37966
37975
 
37967
37976
  if (focus && e && e.target.classList.contains(Object(_styles__WEBPACK_IMPORTED_MODULE_14__["selectClass"])('close'))) return;
@@ -37998,13 +38007,12 @@ function (_PureComponent) {
37998
38007
  var _this$props4 = this.props,
37999
38008
  datum = _this$props4.datum,
38000
38009
  multiple = _this$props4.multiple,
38001
- disabled = _this$props4.disabled,
38002
38010
  emptyAfterSelect = _this$props4.emptyAfterSelect,
38003
38011
  onFilter = _this$props4.onFilter,
38004
38012
  filterText = _this$props4.filterText,
38005
38013
  onCreate = _this$props4.onCreate,
38006
38014
  reFocus = _this$props4.reFocus;
38007
- if (disabled === true) return; // if click option, ignore blur event
38015
+ if (this.getDisabledStatus() === true) return; // if click option, ignore blur event
38008
38016
 
38009
38017
  if (this.inputBlurTimer) {
38010
38018
  this.lastChangeIsOptionClick = true;
@@ -38289,7 +38297,7 @@ function (_PureComponent) {
38289
38297
  __self: this,
38290
38298
  __source: {
38291
38299
  fileName: _jsxFileName,
38292
- lineNumber: 415,
38300
+ lineNumber: 423,
38293
38301
  columnNumber: 46
38294
38302
  }
38295
38303
  }, header)
@@ -38330,7 +38338,7 @@ function (_PureComponent) {
38330
38338
  __self: this,
38331
38339
  __source: {
38332
38340
  fileName: _jsxFileName,
38333
- lineNumber: 449,
38341
+ lineNumber: 457,
38334
38342
  columnNumber: 7
38335
38343
  }
38336
38344
  }))
@@ -38380,7 +38388,7 @@ function (_PureComponent) {
38380
38388
  __self: this,
38381
38389
  __source: {
38382
38390
  fileName: _jsxFileName,
38383
- lineNumber: 496,
38391
+ lineNumber: 504,
38384
38392
  columnNumber: 7
38385
38393
  }
38386
38394
  }))
@@ -38400,7 +38408,6 @@ function (_PureComponent) {
38400
38408
  placeholder = _this$props12.placeholder,
38401
38409
  multiple = _this$props12.multiple,
38402
38410
  clearable = _this$props12.clearable,
38403
- disabled = _this$props12.disabled,
38404
38411
  size = _this$props12.size,
38405
38412
  onFilter = _this$props12.onFilter,
38406
38413
  datum = _this$props12.datum,
@@ -38417,6 +38424,7 @@ function (_PureComponent) {
38417
38424
  innerTitle = _this$props12.innerTitle,
38418
38425
  keygen = _this$props12.keygen,
38419
38426
  data = _this$props12.data;
38427
+ var disabled = this.getDisabledStatus();
38420
38428
  var className = Object(_styles__WEBPACK_IMPORTED_MODULE_14__["selectClass"])('inner', size, this.state.focus && 'focus', this.state.position, multiple && 'multiple', disabled === true && Object(_utils_classname__WEBPACK_IMPORTED_MODULE_25__["getDirectionClass"])('disabled'), !trim && 'pre');
38421
38429
  return (
38422
38430
  /*#__PURE__*/
@@ -38433,7 +38441,7 @@ function (_PureComponent) {
38433
38441
  __self: this,
38434
38442
  __source: {
38435
38443
  fileName: _jsxFileName,
38436
- lineNumber: 559,
38444
+ lineNumber: 567,
38437
38445
  columnNumber: 7
38438
38446
  }
38439
38447
  },
@@ -38470,7 +38478,7 @@ function (_PureComponent) {
38470
38478
  __self: this,
38471
38479
  __source: {
38472
38480
  fileName: _jsxFileName,
38473
- lineNumber: 570,
38481
+ lineNumber: 578,
38474
38482
  columnNumber: 9
38475
38483
  }
38476
38484
  }), this.renderOptions())
@@ -53631,7 +53639,7 @@ function (_PureComponent) {
53631
53639
  key: "more",
53632
53640
  className: Object(_styles__WEBPACK_IMPORTED_MODULE_10__["treeSelectClass"])(Object(_utils_classname__WEBPACK_IMPORTED_MODULE_19__["getDirectionClass"])('item'), 'item-compressed'),
53633
53641
  popoverClassName: Object(_styles__WEBPACK_IMPORTED_MODULE_10__["treeSelectClass"])('popover'),
53634
- contentClassName: Object(_utils_classname__WEBPACK_IMPORTED_MODULE_19__["getDirectionClass"])('result'),
53642
+ contentClassName: Object(_styles__WEBPACK_IMPORTED_MODULE_10__["treeSelectClass"])(Object(_utils_classname__WEBPACK_IMPORTED_MODULE_19__["getDirectionClass"])('result')),
53635
53643
  compressed: compressed,
53636
53644
  data: items,
53637
53645
  cls: _styles__WEBPACK_IMPORTED_MODULE_10__["treeSelectClass"],
@@ -61352,7 +61360,7 @@ __webpack_require__.r(__webpack_exports__);
61352
61360
 
61353
61361
  /* harmony default export */ __webpack_exports__["default"] = ({
61354
61362
  utils: _utils__WEBPACK_IMPORTED_MODULE_0__,
61355
- version: '1.10.8-beta.3'
61363
+ version: '1.10.8'
61356
61364
  });
61357
61365
 
61358
61366