cloud-b2b 1.1.56 → 1.1.57

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.
Files changed (74) hide show
  1. package/es/Area/Area.js +8 -11
  2. package/es/CodeInput/CodeInput.js +16 -19
  3. package/es/Enhance/Dialogs.js +11 -14
  4. package/es/Enhance/Loading.js +15 -18
  5. package/es/Header/Header.js +17 -20
  6. package/es/Header/Vertical.js +11 -14
  7. package/es/ImageView/ImageView.js +10 -13
  8. package/es/InpurCascader/InputCascader.js +26 -20
  9. package/es/InputEditor/InputEditor.js +16 -18
  10. package/es/InputSearch/InputSearch.js +19 -22
  11. package/es/InputSelect/InputSelect.js +14 -17
  12. package/es/InputTreeSelect/InputTreeSelect.js +10 -13
  13. package/es/InputWriting/InputWriting.js +12 -15
  14. package/es/Layout/Layout.js +14 -17
  15. package/es/Link/Link.js +7 -10
  16. package/es/NumberInput/NumberInput.js +13 -16
  17. package/es/Search/Search.js +52 -55
  18. package/es/Sidebar/Sidebar.js +11 -14
  19. package/es/Sidebar2/Sidebar.js +13 -16
  20. package/es/SuperForm/SuperForm.js +74 -79
  21. package/es/SuperForm2/SuperForm.js +95 -100
  22. package/es/SuperPagination/SuperPagination.js +8 -11
  23. package/es/SuperTab/SuperTab.js +12 -15
  24. package/es/SuperTab2/SuperTab2.js +13 -16
  25. package/es/SuperTable/DragSortRow.js +12 -15
  26. package/es/SuperTable/FilterDropDown.js +11 -14
  27. package/es/SuperTable/SuperTable.js +68 -71
  28. package/es/SuperTable2/SuperTable2.js +85 -88
  29. package/es/SuperTable2/SuperTableCell.js +39 -29
  30. package/es/SuperTable3/FilterDropDown.js +11 -14
  31. package/es/SuperTable3/SuperTable.js +58 -61
  32. package/es/SuperToolbar/SuperToolbar.js +11 -14
  33. package/es/SuperUpload/SuperUpload.js +74 -74
  34. package/es/Viewer/ImageViews.js +16 -19
  35. package/es/Viewer/Viewer.js +11 -14
  36. package/es/helper.js +18 -17
  37. package/lib/Area/Area.js +8 -11
  38. package/lib/CodeInput/CodeInput.js +16 -19
  39. package/lib/Enhance/Dialogs.js +11 -14
  40. package/lib/Enhance/Loading.js +15 -18
  41. package/lib/Header/Header.js +17 -20
  42. package/lib/Header/Vertical.js +11 -14
  43. package/lib/ImageView/ImageView.js +10 -13
  44. package/lib/InpurCascader/InputCascader.js +26 -20
  45. package/lib/InputEditor/InputEditor.js +16 -18
  46. package/lib/InputSearch/InputSearch.js +19 -22
  47. package/lib/InputSelect/InputSelect.js +14 -17
  48. package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
  49. package/lib/InputWriting/InputWriting.js +12 -15
  50. package/lib/Layout/Layout.js +14 -17
  51. package/lib/LayoutLink/LayoutLink.js +1 -2
  52. package/lib/Link/Link.js +7 -10
  53. package/lib/NumberInput/NumberInput.js +13 -16
  54. package/lib/Search/Search.js +53 -57
  55. package/lib/Sidebar/Sidebar.js +11 -14
  56. package/lib/Sidebar2/Sidebar.js +13 -16
  57. package/lib/SuperForm/SuperForm.js +75 -81
  58. package/lib/SuperForm2/SuperForm.js +96 -102
  59. package/lib/SuperPagination/SuperPagination.js +8 -11
  60. package/lib/SuperTab/SuperTab.js +12 -15
  61. package/lib/SuperTab2/SuperTab2.js +13 -16
  62. package/lib/SuperTable/DragSortRow.js +12 -15
  63. package/lib/SuperTable/FilterDropDown.js +11 -14
  64. package/lib/SuperTable/SuperTable.js +68 -71
  65. package/lib/SuperTable2/SuperTable2.js +86 -90
  66. package/lib/SuperTable2/SuperTableCell.js +39 -29
  67. package/lib/SuperTable3/FilterDropDown.js +11 -14
  68. package/lib/SuperTable3/SuperTable.js +58 -61
  69. package/lib/SuperToolbar/SuperToolbar.js +11 -14
  70. package/lib/SuperUpload/SuperUpload.js +75 -76
  71. package/lib/Viewer/ImageViews.js +16 -19
  72. package/lib/Viewer/Viewer.js +11 -14
  73. package/lib/helper.js +18 -17
  74. package/package.json +1 -1
@@ -9,17 +9,18 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
9
9
  import _Cascader from "antd/es/cascader";
10
10
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
11
11
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
12
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
13
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
14
12
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
15
13
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
14
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
15
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
17
16
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
19
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
20
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
17
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
18
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
19
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
20
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
22
21
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
22
+ import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
23
+ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
23
24
  import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
24
25
  //级联选择input
25
26
  import React from 'react';
@@ -43,21 +44,19 @@ var PROPS = {
43
44
  };
44
45
  var PROPS_KEYS = _Object$keys(PROPS);
45
46
  var InputCascader = /*#__PURE__*/function (_React$Component) {
46
- _inherits(InputCascader, _React$Component);
47
- var _super = _createSuper(InputCascader);
48
47
  function InputCascader(_props) {
49
48
  var _this;
50
49
  _classCallCheck(this, InputCascader);
51
- _this = _super.call(this, _props);
52
- _defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
50
+ _this = _callSuper(this, InputCascader, [_props]);
51
+ _defineProperty(_this, "onChange", function (value) {
53
52
  var onChange = _this.props.onChange;
54
53
  onChange && onChange(value);
55
54
  });
56
- _defineProperty(_assertThisInitialized(_this), "loadData", function (selectedOptions) {
55
+ _defineProperty(_this, "loadData", function (selectedOptions) {
57
56
  var onSearch = _this.props.onSearch;
58
57
  onSearch && onSearch(selectedOptions[0]);
59
58
  });
60
- _defineProperty(_assertThisInitialized(_this), "getOptions", function (options) {
59
+ _defineProperty(_this, "getOptions", function (options) {
61
60
  return _mapInstanceProperty(options).call(options, function (option) {
62
61
  var obj = _objectSpread(_objectSpread({}, option), {}, {
63
62
  label: option.title
@@ -68,8 +67,13 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
68
67
  return obj;
69
68
  });
70
69
  });
71
- _defineProperty(_assertThisInitialized(_this), "showSearch", function (inputValue, path) {});
72
- _defineProperty(_assertThisInitialized(_this), "getProps", function () {
70
+ _defineProperty(_this, "showSearch", function (inputValue, path) {
71
+ return _someInstanceProperty(path).call(path, function (option) {
72
+ var _context;
73
+ return _indexOfInstanceProperty(_context = option.label.toLowerCase()).call(_context, inputValue.toLowerCase()) > -1;
74
+ });
75
+ });
76
+ _defineProperty(_this, "getProps", function () {
73
77
  var _this$props = _this.props,
74
78
  _this$props$options = _this$props.options,
75
79
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -77,32 +81,34 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
77
81
  size = _this$props.size,
78
82
  value = _this$props.value,
79
83
  loadData = _this$props.loadData,
80
- showSearch = _this$props.showSearch;
84
+ showSearch = _this$props.showSearch,
85
+ _this$props$changeOnS = _this$props.changeOnSelect,
86
+ changeOnSelect = _this$props$changeOnS === void 0 ? true : _this$props$changeOnS;
81
87
  var props = _Object$assign(getObjectExclude({}, PROPS_KEYS), {
82
88
  onChange: _this.onChange,
83
89
  value: value,
84
90
  options: _this.getOptions(options),
85
- changeOnSelect: true,
91
+ changeOnSelect: changeOnSelect,
86
92
  placeholder: placeholder,
87
93
  size: size
88
94
  });
89
95
  //动态加载 ps:loadData 与 showSearch 无法一起使用
90
- if (loadData) {
96
+ if (showSearch) {
97
+ props.showSearch = true;
98
+ } else if (loadData) {
91
99
  props.loadData = _this.loadData;
92
- } else if (showSearch) {
93
- props.showSearch = _this.showSearch;
94
100
  }
95
101
  return props;
96
102
  });
97
103
  return _this;
98
104
  }
99
- _createClass(InputCascader, [{
105
+ _inherits(InputCascader, _React$Component);
106
+ return _createClass(InputCascader, [{
100
107
  key: "render",
101
108
  value: function render() {
102
109
  return /*#__PURE__*/React.createElement(_Cascader, this.getProps());
103
110
  }
104
111
  }]);
105
- return InputCascader;
106
112
  }(React.Component);
107
113
  _defineProperty(InputCascader, "propTypes", PROPS);
108
114
  export default InputCascader;
@@ -2,13 +2,13 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
2
2
  import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
3
3
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
6
5
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
7
6
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
7
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
8
8
  import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
9
9
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
10
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  import React from 'react';
13
13
  import variables from '../variables';
14
14
  import helper from "../helper";
@@ -47,13 +47,12 @@ var defaultMenus = ['head',
47
47
  'video' // 插入视频
48
48
  ];
49
49
  var InputEditor = /*#__PURE__*/function (_React$Component) {
50
- _inherits(InputEditor, _React$Component);
51
- var _super = _createSuper(InputEditor);
52
50
  function InputEditor() {
53
51
  _classCallCheck(this, InputEditor);
54
- return _super.apply(this, arguments);
52
+ return _callSuper(this, InputEditor, arguments);
55
53
  }
56
- _createClass(InputEditor, [{
54
+ _inherits(InputEditor, _React$Component);
55
+ return _createClass(InputEditor, [{
57
56
  key: "componentDidMount",
58
57
  value: function componentDidMount() {
59
58
  var _this$props = this.props,
@@ -91,38 +90,38 @@ var InputEditor = /*#__PURE__*/function (_React$Component) {
91
90
  // 自定义视频插入回调
92
91
  this[inputKey].config.uploadVideoHooks = {
93
92
  customInsert: function () {
94
- var _customInsert = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(insertVideo, results) {
93
+ var _customInsert = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(insertVideo, results) {
95
94
  var _context, _context2, URL_DOWNLOAD, _yield$helper$fetchJs, returnCode, result, returnMsg, currentOrigin, videoUrl;
96
- return _regeneratorRuntime.wrap(function _callee$(_context3) {
95
+ return _regeneratorRuntime.wrap(function (_context3) {
97
96
  while (1) switch (_context3.prev = _context3.next) {
98
97
  case 0:
99
98
  console.log(results);
100
99
  if (!(results.returnCode === 0 && results.result)) {
101
- _context3.next = 16;
100
+ _context3.next = 3;
102
101
  break;
103
102
  }
104
103
  URL_DOWNLOAD = '/api/standard/download'; // 点击下载
105
- _context3.next = 5;
104
+ _context3.next = 1;
106
105
  return helper.fetchJson(_concatInstanceProperty(_context = "".concat(URL_DOWNLOAD, "/")).call(_context, results.result));
107
- case 5:
106
+ case 1:
108
107
  _yield$helper$fetchJs = _context3.sent;
109
108
  returnCode = _yield$helper$fetchJs.returnCode;
110
109
  result = _yield$helper$fetchJs.result;
111
110
  returnMsg = _yield$helper$fetchJs.returnMsg;
112
111
  if (!(returnCode !== 0)) {
113
- _context3.next = 11;
112
+ _context3.next = 2;
114
113
  break;
115
114
  }
116
115
  return _context3.abrupt("return", helper.showError(returnMsg));
117
- case 11:
116
+ case 2:
118
117
  currentOrigin = window.location.origin; // 获取当前页面的协议+域名+端口
119
118
  videoUrl = _concatInstanceProperty(_context2 = "".concat(currentOrigin, "/api/proxy/base-server-service/file/url/documents/open/")).call(_context2, results.result);
120
119
  insertVideo(videoUrl);
121
- _context3.next = 17;
120
+ _context3.next = 4;
122
121
  break;
123
- case 16:
122
+ case 3:
124
123
  alert('视频上传失败: ' + (results.message || '未知错误'));
125
- case 17:
124
+ case 4:
126
125
  case "end":
127
126
  return _context3.stop();
128
127
  }
@@ -168,6 +167,5 @@ var InputEditor = /*#__PURE__*/function (_React$Component) {
168
167
  }));
169
168
  }
170
169
  }]);
171
- return InputEditor;
172
170
  }(React.Component);
173
171
  export default InputEditor;
@@ -3,15 +3,14 @@ import _Input from "antd/es/input";
3
3
  import _typeof from "@babel/runtime-corejs3/helpers/typeof";
4
4
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
5
5
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
6
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
7
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
8
6
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
9
7
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
8
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
10
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
11
10
  import _Icon from "antd/es/icon";
12
11
  import _AutoComplete from "antd/es/auto-complete";
13
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
14
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
13
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
15
14
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
16
15
  import _findIndexInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find-index";
17
16
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
@@ -67,13 +66,11 @@ var PROPS = {
67
66
  };
68
67
  var PROPS_KEYS = _Object$keys(PROPS);
69
68
  var InputSearch = /*#__PURE__*/function (_React$Component) {
70
- _inherits(InputSearch, _React$Component);
71
- var _super = _createSuper(InputSearch);
72
69
  function InputSearch(_props) {
73
70
  var _this;
74
71
  _classCallCheck(this, InputSearch);
75
- _this = _super.call(this, _props);
76
- _defineProperty(_assertThisInitialized(_this), "onSearch", function (value) {
72
+ _this = _callSuper(this, InputSearch, [_props]);
73
+ _defineProperty(_this, "onSearch", function (value) {
77
74
  _this.setState({
78
75
  value: value
79
76
  });
@@ -82,7 +79,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
82
79
  noSearchWhenTypo = _this$props.noSearchWhenTypo;
83
80
  !noSearchWhenTypo && onSearch && onSearch(value);
84
81
  });
85
- _defineProperty(_assertThisInitialized(_this), "onBlur", function () {
82
+ _defineProperty(_this, "onBlur", function () {
86
83
  var _this$props2 = _this.props,
87
84
  _this$props2$autoAdd = _this$props2.autoAdd,
88
85
  autoAdd = _this$props2$autoAdd === void 0 ? false : _this$props2$autoAdd,
@@ -118,7 +115,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
118
115
  onBlur && onBlur(_this.props.value);
119
116
  }
120
117
  });
121
- _defineProperty(_assertThisInitialized(_this), "onSelect", function (value) {
118
+ _defineProperty(_this, "onSelect", function (value) {
122
119
  var _this$props3 = _this.props,
123
120
  onChange = _this$props3.onChange,
124
121
  _this$props3$options = _this$props3.options,
@@ -133,7 +130,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
133
130
  onChange && onChange(options[index]);
134
131
  }
135
132
  });
136
- _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
133
+ _defineProperty(_this, "onClick", function (e) {
137
134
  var _this$props4 = _this.props,
138
135
  _this$props4$options = _this$props4.options,
139
136
  options = _this$props4$options === void 0 ? [] : _this$props4$options,
@@ -144,19 +141,19 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
144
141
  onSearch(e.target.value);
145
142
  }
146
143
  });
147
- _defineProperty(_assertThisInitialized(_this), "makeValueValid", function (value) {
144
+ _defineProperty(_this, "makeValueValid", function (value) {
148
145
  var _context;
149
146
  return _includesInstanceProperty(_context = [NaN, undefined, null]).call(_context, value) ? '' : value;
150
147
  });
151
- _defineProperty(_assertThisInitialized(_this), "getValue", function () {
148
+ _defineProperty(_this, "getValue", function () {
152
149
  var value = _this.state.value;
153
150
  return String(_this.makeValueValid(_typeof(value) === 'object' ? value.value : value));
154
151
  });
155
- _defineProperty(_assertThisInitialized(_this), "isMatch", function (inputValue, option) {
152
+ _defineProperty(_this, "isMatch", function (inputValue, option) {
156
153
  var _context2;
157
154
  return option.props.children && _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
158
155
  });
159
- _defineProperty(_assertThisInitialized(_this), "isMatchRemark", function (inputValue, option) {
156
+ _defineProperty(_this, "isMatchRemark", function (inputValue, option) {
160
157
  var _option$props = option.props,
161
158
  _option$props$text = _option$props.text,
162
159
  text = _option$props$text === void 0 ? '' : _option$props$text,
@@ -164,12 +161,12 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
164
161
  remark = _option$props$remark === void 0 ? '' : _option$props$remark;
165
162
  return _indexOfInstanceProperty(text).call(text, inputValue) > -1 || _indexOfInstanceProperty(remark).call(remark, inputValue) > -1;
166
163
  });
167
- _defineProperty(_assertThisInitialized(_this), "isValidValue", function (value) {
164
+ _defineProperty(_this, "isValidValue", function (value) {
168
165
  var _context3;
169
166
  // value必须为对象,且有属性value的值不等''或undefined
170
167
  return value && !_includesInstanceProperty(_context3 = ['', undefined]).call(_context3, value.value);
171
168
  });
172
- _defineProperty(_assertThisInitialized(_this), "getOptions", function () {
169
+ _defineProperty(_this, "getOptions", function () {
173
170
  var value = _this.state.value;
174
171
  var options = _this.props.options;
175
172
  if (options && options.length) {
@@ -186,7 +183,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
186
183
  return [];
187
184
  }
188
185
  });
189
- _defineProperty(_assertThisInitialized(_this), "getDataSource", function () {
186
+ _defineProperty(_this, "getDataSource", function () {
190
187
  var _context4;
191
188
  return _mapInstanceProperty(_context4 = _this.getOptions()).call(_context4, function (option) {
192
189
  return {
@@ -195,7 +192,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
195
192
  };
196
193
  });
197
194
  });
198
- _defineProperty(_assertThisInitialized(_this), "getDataSourceRemark", function () {
195
+ _defineProperty(_this, "getDataSourceRemark", function () {
199
196
  var _context5;
200
197
  return _mapInstanceProperty(_context5 = _this.getOptions()).call(_context5, function (option, index) {
201
198
  return /*#__PURE__*/React.createElement(SelectOption, {
@@ -210,7 +207,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
210
207
  }, option.description || ''));
211
208
  });
212
209
  });
213
- _defineProperty(_assertThisInitialized(_this), "getProps", function () {
210
+ _defineProperty(_this, "getProps", function () {
214
211
  var _this$props5 = _this.props,
215
212
  inputRef = _this$props5.inputRef,
216
213
  _this$props5$filter = _filterInstanceProperty(_this$props5),
@@ -241,7 +238,8 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
241
238
  };
242
239
  return _this;
243
240
  }
244
- _createClass(InputSearch, [{
241
+ _inherits(InputSearch, _React$Component);
242
+ return _createClass(InputSearch, [{
245
243
  key: "componentWillReceiveProps",
246
244
  value: function componentWillReceiveProps(props) {
247
245
  if (props.value !== this.props.value) {
@@ -260,7 +258,6 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
260
258
  })));
261
259
  }
262
260
  }]);
263
- return InputSearch;
264
261
  }(React.Component);
265
262
  _defineProperty(InputSearch, "propTypes", PROPS);
266
263
  export default InputSearch;
@@ -9,10 +9,9 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
9
9
  import _typeof from "@babel/runtime-corejs3/helpers/typeof";
10
10
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
11
11
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
12
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
13
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
14
12
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
15
13
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
14
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
15
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
17
16
  import _Select from "antd/es/select";
18
17
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -24,8 +23,8 @@ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
24
23
  import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
25
24
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
26
25
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
27
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
28
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
26
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
27
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
29
28
  import React from 'react';
30
29
  var SelectOption = _Select.Option;
31
30
  var OPTION_STYLE = {
@@ -36,8 +35,6 @@ var OPTION_STYLE = {
36
35
  whiteSpace: 'pre-wrap'
37
36
  };
38
37
  var InputSelect = /*#__PURE__*/function (_React$Component) {
39
- _inherits(InputSelect, _React$Component);
40
- var _super = _createSuper(InputSelect);
41
38
  function InputSelect() {
42
39
  var _context;
43
40
  var _this;
@@ -45,8 +42,8 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
45
42
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
46
43
  args[_key] = arguments[_key];
47
44
  }
48
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
49
- _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
45
+ _this = _callSuper(this, InputSelect, _concatInstanceProperty(_context = []).call(_context, args));
46
+ _defineProperty(_this, "onClick", function (e) {
50
47
  var _this$props = _this.props,
51
48
  _this$props$options = _this$props.options,
52
49
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -60,21 +57,21 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
60
57
  onSearch(e.target.value);
61
58
  }
62
59
  });
63
- _defineProperty(_assertThisInitialized(_this), "onSearch", function (value) {
60
+ _defineProperty(_this, "onSearch", function (value) {
64
61
  var onSearch = _this.props.onSearch;
65
62
  onSearch && onSearch(value);
66
63
  });
67
- _defineProperty(_assertThisInitialized(_this), "isMatch", function (inputValue, option) {
64
+ _defineProperty(_this, "isMatch", function (inputValue, option) {
68
65
  var _context2;
69
66
  return _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
70
67
  });
71
- _defineProperty(_assertThisInitialized(_this), "isMatchRemark", function (inputValue, option) {
68
+ _defineProperty(_this, "isMatchRemark", function (inputValue, option) {
72
69
  var _option$props = option.props,
73
70
  text = _option$props.text,
74
71
  remark = _option$props.remark;
75
72
  return _indexOfInstanceProperty(text).call(text, inputValue) > -1 || _indexOfInstanceProperty(remark).call(remark, inputValue) > -1;
76
73
  });
77
- _defineProperty(_assertThisInitialized(_this), "toRemarkOption", function (option, index) {
74
+ _defineProperty(_this, "toRemarkOption", function (option, index) {
78
75
  return /*#__PURE__*/React.createElement(SelectOption, {
79
76
  key: index,
80
77
  value: String(option.value),
@@ -85,14 +82,14 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
85
82
  style: OPTION_STYLE
86
83
  }, option.remark || ''));
87
84
  });
88
- _defineProperty(_assertThisInitialized(_this), "toOption", function (option, index) {
85
+ _defineProperty(_this, "toOption", function (option, index) {
89
86
  return /*#__PURE__*/React.createElement(SelectOption, {
90
87
  key: index,
91
88
  value: String(option.value),
92
89
  disabled: option.disabled || false
93
90
  }, option.title);
94
91
  });
95
- _defineProperty(_assertThisInitialized(_this), "onChange", function (options, keyValue) {
92
+ _defineProperty(_this, "onChange", function (options, keyValue) {
96
93
  var onChange = _this.props.onChange;
97
94
  var objValue = keyValue.length > 0 ? _mapInstanceProperty(keyValue).call(keyValue, function (item) {
98
95
  return _objectSpread(_objectSpread({}, _filterInstanceProperty(options).call(options, function (o) {
@@ -104,7 +101,7 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
104
101
  }) : [];
105
102
  onChange && onChange(objValue);
106
103
  });
107
- _defineProperty(_assertThisInitialized(_this), "getValue", function () {
104
+ _defineProperty(_this, "getValue", function () {
108
105
  var value = _this.props.value;
109
106
  if (_typeof(value) === 'object' && _Array$isArray(value)) {
110
107
  return _mapInstanceProperty(value).call(value, function (item) {
@@ -119,7 +116,8 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
119
116
  });
120
117
  return _this;
121
118
  }
122
- _createClass(InputSelect, [{
119
+ _inherits(InputSelect, _React$Component);
120
+ return _createClass(InputSelect, [{
123
121
  key: "render",
124
122
  value: function render() {
125
123
  var _context3, _context4;
@@ -155,6 +153,5 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
155
153
  }, /*#__PURE__*/React.createElement(_Select, props, this.props.remark ? _mapInstanceProperty(allOptions).call(allOptions, this.toRemarkOption) : _mapInstanceProperty(allOptions).call(allOptions, this.toOption)));
156
154
  }
157
155
  }]);
158
- return InputSelect;
159
156
  }(React.Component);
160
157
  export default InputSelect;
@@ -9,15 +9,14 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
9
9
  import _TreeSelect from "antd/es/tree-select";
10
10
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
11
11
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
12
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
13
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
14
12
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
15
13
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
14
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
15
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
17
16
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
19
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
20
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
18
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
19
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
20
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
22
21
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
23
22
  import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
@@ -48,21 +47,19 @@ var PROPS = {
48
47
  };
49
48
  var PROPS_KEYS = _Object$keys(PROPS);
50
49
  var InputTreeSelect = /*#__PURE__*/function (_React$Component) {
51
- _inherits(InputTreeSelect, _React$Component);
52
- var _super = _createSuper(InputTreeSelect);
53
50
  function InputTreeSelect(_props) {
54
51
  var _this;
55
52
  _classCallCheck(this, InputTreeSelect);
56
- _this = _super.call(this, _props);
57
- _defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
53
+ _this = _callSuper(this, InputTreeSelect, [_props]);
54
+ _defineProperty(_this, "onChange", function (value) {
58
55
  var onChange = _this.props.onChange;
59
56
  onChange && onChange(value);
60
57
  });
61
- _defineProperty(_assertThisInitialized(_this), "loadData", function (selectedOptions) {
58
+ _defineProperty(_this, "loadData", function (selectedOptions) {
62
59
  var onSearch = _this.props.onSearch;
63
60
  onSearch && onSearch(selectedOptions[0]);
64
61
  });
65
- _defineProperty(_assertThisInitialized(_this), "getOptions", function (options) {
62
+ _defineProperty(_this, "getOptions", function (options) {
66
63
  return _mapInstanceProperty(options).call(options, function (option) {
67
64
  var obj = _objectSpread(_objectSpread({}, option), {}, {
68
65
  label: option.title
@@ -73,7 +70,7 @@ var InputTreeSelect = /*#__PURE__*/function (_React$Component) {
73
70
  return obj;
74
71
  });
75
72
  });
76
- _defineProperty(_assertThisInitialized(_this), "getProps", function () {
73
+ _defineProperty(_this, "getProps", function () {
77
74
  var _this$props = _this.props,
78
75
  _this$props$options = _this$props.options,
79
76
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -109,13 +106,13 @@ var InputTreeSelect = /*#__PURE__*/function (_React$Component) {
109
106
  });
110
107
  return _this;
111
108
  }
112
- _createClass(InputTreeSelect, [{
109
+ _inherits(InputTreeSelect, _React$Component);
110
+ return _createClass(InputTreeSelect, [{
113
111
  key: "render",
114
112
  value: function render() {
115
113
  return /*#__PURE__*/React.createElement(_TreeSelect, this.getProps());
116
114
  }
117
115
  }]);
118
- return InputTreeSelect;
119
116
  }(React.Component);
120
117
  _defineProperty(InputTreeSelect, "propTypes", PROPS);
121
118
  export default InputTreeSelect;
@@ -1,21 +1,18 @@
1
1
  import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
2
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
9
8
  import _Select from "antd/es/select";
10
9
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
11
10
  import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
12
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
13
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
11
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
14
13
  import React from 'react';
15
14
  var Option = _Select.Option;
16
15
  var InputWriting = /*#__PURE__*/function (_React$Component) {
17
- _inherits(InputWriting, _React$Component);
18
- var _super = _createSuper(InputWriting);
19
16
  function InputWriting() {
20
17
  var _context;
21
18
  var _this;
@@ -23,13 +20,13 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
23
20
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24
21
  args[_key] = arguments[_key];
25
22
  }
26
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
27
- _defineProperty(_assertThisInitialized(_this), "state", {
23
+ _this = _callSuper(this, InputWriting, _concatInstanceProperty(_context = []).call(_context, args));
24
+ _defineProperty(_this, "state", {
28
25
  options: [],
29
26
  value: [],
30
27
  fetching: false
31
28
  });
32
- _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
29
+ _defineProperty(_this, "onClick", function (e) {
33
30
  var _this$props = _this.props,
34
31
  _this$props$options = _this$props.options,
35
32
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -39,21 +36,21 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
39
36
  onSearch(e.target.value);
40
37
  }
41
38
  });
42
- _defineProperty(_assertThisInitialized(_this), "onSearch", function (value) {
39
+ _defineProperty(_this, "onSearch", function (value) {
43
40
  var onSearch = _this.props.onSearch;
44
41
  onSearch && onSearch(value);
45
42
  });
46
- _defineProperty(_assertThisInitialized(_this), "isMatch", function (inputValue, option) {
43
+ _defineProperty(_this, "isMatch", function (inputValue, option) {
47
44
  var _context2;
48
45
  return _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
49
46
  });
50
- _defineProperty(_assertThisInitialized(_this), "toOption", function (option, index) {
47
+ _defineProperty(_this, "toOption", function (option, index) {
51
48
  return /*#__PURE__*/React.createElement(SelectOption, {
52
49
  key: index,
53
50
  value: String(option.value)
54
51
  }, option.title);
55
52
  });
56
- _defineProperty(_assertThisInitialized(_this), "onChange", function (keyValue) {
53
+ _defineProperty(_this, "onChange", function (keyValue) {
57
54
  var _this$props2 = _this.props,
58
55
  onChange = _this$props2.onChange,
59
56
  value = _this$props2.value;
@@ -61,7 +58,8 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
61
58
  });
62
59
  return _this;
63
60
  }
64
- _createClass(InputWriting, [{
61
+ _inherits(InputWriting, _React$Component);
62
+ return _createClass(InputWriting, [{
65
63
  key: "render",
66
64
  value: function render() {
67
65
  var value = this.props.value;
@@ -80,6 +78,5 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
80
78
  }, /*#__PURE__*/React.createElement(_Select, props));
81
79
  }
82
80
  }]);
83
- return InputWriting;
84
81
  }(React.Component);
85
82
  export default InputWriting;