cloud-b2b 1.1.70 → 1.1.71

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 (80) 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 +11 -14
  9. package/es/InputEditor/InputEditor.js +16 -18
  10. package/es/InputSearch/InputSearch.js +20 -23
  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/Search2/Search.js +83 -86
  19. package/es/Search2/Search.less +64 -64
  20. package/es/Search2/package.json +6 -6
  21. package/es/Sidebar/Sidebar.js +11 -14
  22. package/es/Sidebar2/Sidebar.js +13 -16
  23. package/es/SuperForm/SuperForm.js +74 -79
  24. package/es/SuperForm2/SuperForm.js +101 -103
  25. package/es/SuperPagination/SuperPagination.js +8 -11
  26. package/es/SuperTab/SuperTab.js +12 -15
  27. package/es/SuperTab2/SuperTab2.js +13 -16
  28. package/es/SuperTable/DragSortRow.js +12 -15
  29. package/es/SuperTable/FilterDropDown.js +11 -14
  30. package/es/SuperTable/SuperTable.js +70 -73
  31. package/es/SuperTable2/SuperTable2.js +89 -92
  32. package/es/SuperTable2/SuperTableCell.js +27 -30
  33. package/es/SuperTable3/FilterDropDown.js +11 -14
  34. package/es/SuperTable3/SuperTable.js +58 -61
  35. package/es/SuperToolbar/SuperToolbar.js +11 -14
  36. package/es/SuperUpload/SuperUpload.js +74 -74
  37. package/es/Viewer/ImageViews.js +16 -19
  38. package/es/Viewer/Viewer.js +11 -14
  39. package/es/helper.js +18 -17
  40. package/lib/Area/Area.js +8 -11
  41. package/lib/CodeInput/CodeInput.js +16 -19
  42. package/lib/Enhance/Dialogs.js +11 -14
  43. package/lib/Enhance/Loading.js +15 -18
  44. package/lib/Header/Header.js +17 -20
  45. package/lib/Header/Vertical.js +11 -14
  46. package/lib/ImageView/ImageView.js +10 -13
  47. package/lib/InpurCascader/InputCascader.js +11 -14
  48. package/lib/InputEditor/InputEditor.js +16 -18
  49. package/lib/InputSearch/InputSearch.js +20 -23
  50. package/lib/InputSelect/InputSelect.js +14 -17
  51. package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
  52. package/lib/InputWriting/InputWriting.js +12 -15
  53. package/lib/Layout/Layout.js +14 -17
  54. package/lib/LayoutLink/LayoutLink.js +1 -2
  55. package/lib/Link/Link.js +7 -10
  56. package/lib/NumberInput/NumberInput.js +13 -16
  57. package/lib/Search/Search.js +53 -57
  58. package/lib/Search2/Search.js +84 -88
  59. package/lib/Search2/Search.less +64 -64
  60. package/lib/Search2/package.json +6 -6
  61. package/lib/Sidebar/Sidebar.js +11 -14
  62. package/lib/Sidebar2/Sidebar.js +13 -16
  63. package/lib/SuperForm/SuperForm.js +75 -81
  64. package/lib/SuperForm2/SuperForm.js +102 -105
  65. package/lib/SuperPagination/SuperPagination.js +8 -11
  66. package/lib/SuperTab/SuperTab.js +12 -15
  67. package/lib/SuperTab2/SuperTab2.js +13 -16
  68. package/lib/SuperTable/DragSortRow.js +12 -15
  69. package/lib/SuperTable/FilterDropDown.js +11 -14
  70. package/lib/SuperTable/SuperTable.js +70 -73
  71. package/lib/SuperTable2/SuperTable2.js +90 -94
  72. package/lib/SuperTable2/SuperTableCell.js +27 -30
  73. package/lib/SuperTable3/FilterDropDown.js +11 -14
  74. package/lib/SuperTable3/SuperTable.js +58 -61
  75. package/lib/SuperToolbar/SuperToolbar.js +11 -14
  76. package/lib/SuperUpload/SuperUpload.js +75 -76
  77. package/lib/Viewer/ImageViews.js +16 -19
  78. package/lib/Viewer/Viewer.js +11 -14
  79. package/lib/helper.js +18 -17
  80. package/package.json +1 -1
@@ -9,15 +9,14 @@ 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
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; }
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 _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
@@ -45,21 +44,19 @@ var PROPS = {
45
44
  };
46
45
  var PROPS_KEYS = _Object$keys(PROPS);
47
46
  var InputCascader = /*#__PURE__*/function (_React$Component) {
48
- _inherits(InputCascader, _React$Component);
49
- var _super = _createSuper(InputCascader);
50
47
  function InputCascader(_props) {
51
48
  var _this;
52
49
  _classCallCheck(this, InputCascader);
53
- _this = _super.call(this, _props);
54
- _defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
50
+ _this = _callSuper(this, InputCascader, [_props]);
51
+ _defineProperty(_this, "onChange", function (value) {
55
52
  var onChange = _this.props.onChange;
56
53
  onChange && onChange(value);
57
54
  });
58
- _defineProperty(_assertThisInitialized(_this), "loadData", function (selectedOptions) {
55
+ _defineProperty(_this, "loadData", function (selectedOptions) {
59
56
  var onSearch = _this.props.onSearch;
60
57
  onSearch && onSearch(selectedOptions[0]);
61
58
  });
62
- _defineProperty(_assertThisInitialized(_this), "getOptions", function (options) {
59
+ _defineProperty(_this, "getOptions", function (options) {
63
60
  return _mapInstanceProperty(options).call(options, function (option) {
64
61
  var obj = _objectSpread(_objectSpread({}, option), {}, {
65
62
  label: option.title
@@ -70,13 +67,13 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
70
67
  return obj;
71
68
  });
72
69
  });
73
- _defineProperty(_assertThisInitialized(_this), "showSearch", function (inputValue, path) {
70
+ _defineProperty(_this, "showSearch", function (inputValue, path) {
74
71
  return _someInstanceProperty(path).call(path, function (option) {
75
72
  var _context;
76
73
  return _indexOfInstanceProperty(_context = option.label.toLowerCase()).call(_context, inputValue.toLowerCase()) > -1;
77
74
  });
78
75
  });
79
- _defineProperty(_assertThisInitialized(_this), "getProps", function () {
76
+ _defineProperty(_this, "getProps", function () {
80
77
  var _this$props = _this.props,
81
78
  _this$props$options = _this$props.options,
82
79
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -105,13 +102,13 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
105
102
  });
106
103
  return _this;
107
104
  }
108
- _createClass(InputCascader, [{
105
+ _inherits(InputCascader, _React$Component);
106
+ return _createClass(InputCascader, [{
109
107
  key: "render",
110
108
  value: function render() {
111
109
  return /*#__PURE__*/React.createElement(_Cascader, this.getProps());
112
110
  }
113
111
  }]);
114
- return InputCascader;
115
112
  }(React.Component);
116
113
  _defineProperty(InputCascader, "propTypes", PROPS);
117
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,25 +66,23 @@ 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({value});
78
75
  var _this$props = _this.props,
79
76
  onSearch = _this$props.onSearch,
80
77
  noSearchWhenTypo = _this$props.noSearchWhenTypo;
81
78
  !noSearchWhenTypo && onSearch && onSearch(value);
82
79
  });
83
- _defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
80
+ _defineProperty(_this, "onChange", function (value) {
84
81
  _this.setState({
85
82
  value: value
86
83
  });
87
84
  });
88
- _defineProperty(_assertThisInitialized(_this), "onBlur", function () {
85
+ _defineProperty(_this, "onBlur", function () {
89
86
  var _this$props2 = _this.props,
90
87
  _this$props2$autoAdd = _this$props2.autoAdd,
91
88
  autoAdd = _this$props2$autoAdd === void 0 ? false : _this$props2$autoAdd,
@@ -121,7 +118,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
121
118
  onBlur && onBlur(_this.props.value);
122
119
  }
123
120
  });
124
- _defineProperty(_assertThisInitialized(_this), "onSelect", function (value) {
121
+ _defineProperty(_this, "onSelect", function (value) {
125
122
  var _this$props3 = _this.props,
126
123
  onChange = _this$props3.onChange,
127
124
  _this$props3$options = _this$props3.options,
@@ -136,7 +133,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
136
133
  onChange && onChange(options[index]);
137
134
  }
138
135
  });
139
- _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
136
+ _defineProperty(_this, "onClick", function (e) {
140
137
  var _this$props4 = _this.props,
141
138
  _this$props4$options = _this$props4.options,
142
139
  options = _this$props4$options === void 0 ? [] : _this$props4$options,
@@ -147,20 +144,20 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
147
144
  onSearch(e.target.value);
148
145
  }
149
146
  });
150
- _defineProperty(_assertThisInitialized(_this), "makeValueValid", function (value) {
147
+ _defineProperty(_this, "makeValueValid", function (value) {
151
148
  var _context;
152
149
  return _includesInstanceProperty(_context = [NaN, undefined, null]).call(_context, value) ? '' : value;
153
150
  });
154
- _defineProperty(_assertThisInitialized(_this), "getValue", function () {
151
+ _defineProperty(_this, "getValue", function () {
155
152
  var value = _this.state.value;
156
153
  return String(_this.makeValueValid(_typeof(value) === 'object' ? value.value : value));
157
154
  });
158
- _defineProperty(_assertThisInitialized(_this), "isMatch", function (inputValue, option) {
155
+ _defineProperty(_this, "isMatch", function (inputValue, option) {
159
156
  var _context2;
160
157
  // return option.props.children && option.props.children.indexOf(inputValue) !== -1;
161
158
  return option.props.children && _indexOfInstanceProperty(_context2 = option.props.children.toUpperCase()).call(_context2, inputValue.toUpperCase()) !== -1;
162
159
  });
163
- _defineProperty(_assertThisInitialized(_this), "isMatchRemark", function (inputValue, option) {
160
+ _defineProperty(_this, "isMatchRemark", function (inputValue, option) {
164
161
  var _option$props = option.props,
165
162
  _option$props$text = _option$props.text,
166
163
  text = _option$props$text === void 0 ? '' : _option$props$text,
@@ -168,12 +165,12 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
168
165
  remark = _option$props$remark === void 0 ? '' : _option$props$remark;
169
166
  return _indexOfInstanceProperty(text).call(text, inputValue) > -1 || _indexOfInstanceProperty(remark).call(remark, inputValue) > -1;
170
167
  });
171
- _defineProperty(_assertThisInitialized(_this), "isValidValue", function (value) {
168
+ _defineProperty(_this, "isValidValue", function (value) {
172
169
  var _context3;
173
170
  // value必须为对象,且有属性value的值不等''或undefined
174
171
  return value && !_includesInstanceProperty(_context3 = ['', undefined]).call(_context3, value.value);
175
172
  });
176
- _defineProperty(_assertThisInitialized(_this), "getOptions", function () {
173
+ _defineProperty(_this, "getOptions", function () {
177
174
  var value = _this.state.value;
178
175
  var options = _this.props.options;
179
176
  if (options && options.length) {
@@ -190,7 +187,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
190
187
  return [];
191
188
  }
192
189
  });
193
- _defineProperty(_assertThisInitialized(_this), "getDataSource", function () {
190
+ _defineProperty(_this, "getDataSource", function () {
194
191
  var _context4;
195
192
  return _mapInstanceProperty(_context4 = _this.getOptions()).call(_context4, function (option) {
196
193
  return {
@@ -199,7 +196,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
199
196
  };
200
197
  });
201
198
  });
202
- _defineProperty(_assertThisInitialized(_this), "getDataSourceRemark", function () {
199
+ _defineProperty(_this, "getDataSourceRemark", function () {
203
200
  var _context5;
204
201
  return _mapInstanceProperty(_context5 = _this.getOptions()).call(_context5, function (option, index) {
205
202
  return /*#__PURE__*/React.createElement(SelectOption, {
@@ -214,7 +211,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
214
211
  }, option.description || ''));
215
212
  });
216
213
  });
217
- _defineProperty(_assertThisInitialized(_this), "getProps", function () {
214
+ _defineProperty(_this, "getProps", function () {
218
215
  var _this$props5 = _this.props,
219
216
  inputRef = _this$props5.inputRef,
220
217
  _this$props5$filter = _filterInstanceProperty(_this$props5),
@@ -246,7 +243,8 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
246
243
  };
247
244
  return _this;
248
245
  }
249
- _createClass(InputSearch, [{
246
+ _inherits(InputSearch, _React$Component);
247
+ return _createClass(InputSearch, [{
250
248
  key: "componentWillReceiveProps",
251
249
  value: function componentWillReceiveProps(props) {
252
250
  if (props.value !== this.props.value) {
@@ -266,7 +264,6 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
266
264
  })));
267
265
  }
268
266
  }]);
269
- return InputSearch;
270
267
  }(React.Component);
271
268
  _defineProperty(InputSearch, "propTypes", PROPS);
272
269
  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;