cloud-b2b 1.1.64 → 1.1.65

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