cloud-b2b 1.1.77 → 1.1.79

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 +13 -10
  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 +23 -20
  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 +86 -83
  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 +114 -108
  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 +73 -70
  31. package/es/SuperTable2/SuperTable2.js +92 -89
  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 +68 -26
  36. package/es/SuperUpload/SuperUpload.js +63 -53
  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 +13 -10
  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 +23 -20
  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 +88 -84
  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 +116 -109
  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 +73 -70
  71. package/lib/SuperTable2/SuperTable2.js +94 -90
  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 +67 -26
  76. package/lib/SuperUpload/SuperUpload.js +65 -54
  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
@@ -10,14 +10,15 @@ import _Cascader from "antd/es/cascader";
10
10
  import _extends from "@babel/runtime-corejs3/helpers/extends";
11
11
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
12
12
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
13
+ import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
14
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
13
15
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
14
16
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
15
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
17
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
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; }
18
19
  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 _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
20
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
20
+ 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); }; }
21
+ 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; } }
21
22
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
22
23
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
23
24
  import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
@@ -45,19 +46,21 @@ var PROPS = {
45
46
  };
46
47
  var PROPS_KEYS = _Object$keys(PROPS);
47
48
  var InputCascader = /*#__PURE__*/function (_React$Component) {
49
+ _inherits(InputCascader, _React$Component);
50
+ var _super = _createSuper(InputCascader);
48
51
  function InputCascader(_props) {
49
52
  var _this;
50
53
  _classCallCheck(this, InputCascader);
51
- _this = _callSuper(this, InputCascader, [_props]);
52
- _defineProperty(_this, "onChange", function (value) {
54
+ _this = _super.call(this, _props);
55
+ _defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
53
56
  var onChange = _this.props.onChange;
54
57
  onChange && onChange(value);
55
58
  });
56
- _defineProperty(_this, "loadData", function (selectedOptions) {
59
+ _defineProperty(_assertThisInitialized(_this), "loadData", function (selectedOptions) {
57
60
  var onSearch = _this.props.onSearch;
58
61
  onSearch && onSearch(selectedOptions[0]);
59
62
  });
60
- _defineProperty(_this, "getOptions", function (options) {
63
+ _defineProperty(_assertThisInitialized(_this), "getOptions", function (options) {
61
64
  return _mapInstanceProperty(options).call(options, function (option) {
62
65
  var obj = _objectSpread(_objectSpread({}, option), {}, {
63
66
  label: option.title
@@ -68,13 +71,13 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
68
71
  return obj;
69
72
  });
70
73
  });
71
- _defineProperty(_this, "showSearch", function (inputValue, path) {
74
+ _defineProperty(_assertThisInitialized(_this), "showSearch", function (inputValue, path) {
72
75
  return _someInstanceProperty(path).call(path, function (option) {
73
76
  var _context;
74
77
  return _indexOfInstanceProperty(_context = option.label.toLowerCase()).call(_context, inputValue.toLowerCase()) > -1;
75
78
  });
76
79
  });
77
- _defineProperty(_this, "getProps", function () {
80
+ _defineProperty(_assertThisInitialized(_this), "getProps", function () {
78
81
  var _this$props = _this.props,
79
82
  _this$props$options = _this$props.options,
80
83
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -103,8 +106,7 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
103
106
  });
104
107
  return _this;
105
108
  }
106
- _inherits(InputCascader, _React$Component);
107
- return _createClass(InputCascader, [{
109
+ _createClass(InputCascader, [{
108
110
  key: "render",
109
111
  value: function render() {
110
112
  return /*#__PURE__*/React.createElement(_Cascader, _extends({}, this.getProps(), {
@@ -114,6 +116,7 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
114
116
  }));
115
117
  }
116
118
  }]);
119
+ return InputCascader;
117
120
  }(React.Component);
118
121
  _defineProperty(InputCascader, "propTypes", PROPS);
119
122
  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,23 +67,25 @@ 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({value});
75
78
  var _this$props = _this.props,
76
79
  onSearch = _this$props.onSearch,
77
80
  noSearchWhenTypo = _this$props.noSearchWhenTypo;
78
81
  !noSearchWhenTypo && onSearch && onSearch(value);
79
82
  });
80
- _defineProperty(_this, "onChange", function (value) {
83
+ _defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
81
84
  _this.setState({
82
85
  value: value
83
86
  });
84
87
  });
85
- _defineProperty(_this, "onBlur", function () {
88
+ _defineProperty(_assertThisInitialized(_this), "onBlur", function () {
86
89
  var _this$props2 = _this.props,
87
90
  _this$props2$autoAdd = _this$props2.autoAdd,
88
91
  autoAdd = _this$props2$autoAdd === void 0 ? false : _this$props2$autoAdd,
@@ -118,7 +121,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
118
121
  onBlur && onBlur(_this.props.value);
119
122
  }
120
123
  });
121
- _defineProperty(_this, "onSelect", function (value) {
124
+ _defineProperty(_assertThisInitialized(_this), "onSelect", function (value) {
122
125
  var _this$props3 = _this.props,
123
126
  onChange = _this$props3.onChange,
124
127
  _this$props3$options = _this$props3.options,
@@ -133,7 +136,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
133
136
  onChange && onChange(options[index]);
134
137
  }
135
138
  });
136
- _defineProperty(_this, "onClick", function (e) {
139
+ _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
137
140
  var _this$props4 = _this.props,
138
141
  _this$props4$options = _this$props4.options,
139
142
  options = _this$props4$options === void 0 ? [] : _this$props4$options,
@@ -144,20 +147,20 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
144
147
  onSearch(e.target.value);
145
148
  }
146
149
  });
147
- _defineProperty(_this, "makeValueValid", function (value) {
150
+ _defineProperty(_assertThisInitialized(_this), "makeValueValid", function (value) {
148
151
  var _context;
149
152
  return _includesInstanceProperty(_context = [NaN, undefined, null]).call(_context, value) ? '' : value;
150
153
  });
151
- _defineProperty(_this, "getValue", function () {
154
+ _defineProperty(_assertThisInitialized(_this), "getValue", function () {
152
155
  var value = _this.state.value;
153
156
  return String(_this.makeValueValid(_typeof(value) === 'object' ? value.value : value));
154
157
  });
155
- _defineProperty(_this, "isMatch", function (inputValue, option) {
158
+ _defineProperty(_assertThisInitialized(_this), "isMatch", function (inputValue, option) {
156
159
  var _context2;
157
160
  // return option.props.children && option.props.children.indexOf(inputValue) !== -1;
158
161
  return option.props.children && _indexOfInstanceProperty(_context2 = option.props.children.toUpperCase()).call(_context2, inputValue.toUpperCase()) !== -1;
159
162
  });
160
- _defineProperty(_this, "isMatchRemark", function (inputValue, option) {
163
+ _defineProperty(_assertThisInitialized(_this), "isMatchRemark", function (inputValue, option) {
161
164
  var _option$props = option.props,
162
165
  _option$props$text = _option$props.text,
163
166
  text = _option$props$text === void 0 ? '' : _option$props$text,
@@ -165,12 +168,12 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
165
168
  remark = _option$props$remark === void 0 ? '' : _option$props$remark;
166
169
  return _indexOfInstanceProperty(text).call(text, inputValue) > -1 || _indexOfInstanceProperty(remark).call(remark, inputValue) > -1;
167
170
  });
168
- _defineProperty(_this, "isValidValue", function (value) {
171
+ _defineProperty(_assertThisInitialized(_this), "isValidValue", function (value) {
169
172
  var _context3;
170
173
  // value必须为对象,且有属性value的值不等''或undefined
171
174
  return value && !_includesInstanceProperty(_context3 = ['', undefined]).call(_context3, value.value);
172
175
  });
173
- _defineProperty(_this, "getOptions", function () {
176
+ _defineProperty(_assertThisInitialized(_this), "getOptions", function () {
174
177
  var value = _this.state.value;
175
178
  var options = _this.props.options;
176
179
  if (options && options.length) {
@@ -187,7 +190,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
187
190
  return [];
188
191
  }
189
192
  });
190
- _defineProperty(_this, "getDataSource", function () {
193
+ _defineProperty(_assertThisInitialized(_this), "getDataSource", function () {
191
194
  var _context4;
192
195
  return _mapInstanceProperty(_context4 = _this.getOptions()).call(_context4, function (option) {
193
196
  return {
@@ -196,7 +199,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
196
199
  };
197
200
  });
198
201
  });
199
- _defineProperty(_this, "getDataSourceRemark", function () {
202
+ _defineProperty(_assertThisInitialized(_this), "getDataSourceRemark", function () {
200
203
  var _context5;
201
204
  return _mapInstanceProperty(_context5 = _this.getOptions()).call(_context5, function (option, index) {
202
205
  return /*#__PURE__*/React.createElement(SelectOption, {
@@ -211,7 +214,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
211
214
  }, option.description || ''));
212
215
  });
213
216
  });
214
- _defineProperty(_this, "getProps", function () {
217
+ _defineProperty(_assertThisInitialized(_this), "getProps", function () {
215
218
  var _this$props5 = _this.props,
216
219
  inputRef = _this$props5.inputRef,
217
220
  _this$props5$filter = _filterInstanceProperty(_this$props5),
@@ -243,8 +246,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
243
246
  };
244
247
  return _this;
245
248
  }
246
- _inherits(InputSearch, _React$Component);
247
- return _createClass(InputSearch, [{
249
+ _createClass(InputSearch, [{
248
250
  key: "componentWillReceiveProps",
249
251
  value: function componentWillReceiveProps(props) {
250
252
  if (props.value !== this.props.value) {
@@ -266,6 +268,7 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
266
268
  })));
267
269
  }
268
270
  }]);
271
+ return InputSearch;
269
272
  }(React.Component);
270
273
  _defineProperty(InputSearch, "propTypes", PROPS);
271
274
  export default InputSearch;
@@ -10,9 +10,10 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
10
10
  import _typeof from "@babel/runtime-corejs3/helpers/typeof";
11
11
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
12
12
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
13
+ import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
14
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
13
15
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
14
16
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
15
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
17
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
17
18
  import _Select from "antd/es/select";
18
19
  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 +25,8 @@ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
24
25
  import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
25
26
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
26
27
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
27
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
28
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
+ 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); }; }
29
+ 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; } }
29
30
  import React from 'react';
30
31
  var SelectOption = _Select.Option;
31
32
  var OPTION_STYLE = {
@@ -36,6 +37,8 @@ var OPTION_STYLE = {
36
37
  whiteSpace: 'pre-wrap'
37
38
  };
38
39
  var InputSelect = /*#__PURE__*/function (_React$Component) {
40
+ _inherits(InputSelect, _React$Component);
41
+ var _super = _createSuper(InputSelect);
39
42
  function InputSelect() {
40
43
  var _context;
41
44
  var _this;
@@ -43,8 +46,8 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
43
46
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
44
47
  args[_key] = arguments[_key];
45
48
  }
46
- _this = _callSuper(this, InputSelect, _concatInstanceProperty(_context = []).call(_context, args));
47
- _defineProperty(_this, "onClick", function (e) {
49
+ _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
50
+ _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
48
51
  var _this$props = _this.props,
49
52
  _this$props$options = _this$props.options,
50
53
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -58,21 +61,21 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
58
61
  onSearch(e.target.value);
59
62
  }
60
63
  });
61
- _defineProperty(_this, "onSearch", function (value) {
64
+ _defineProperty(_assertThisInitialized(_this), "onSearch", function (value) {
62
65
  var onSearch = _this.props.onSearch;
63
66
  onSearch && onSearch(value);
64
67
  });
65
- _defineProperty(_this, "isMatch", function (inputValue, option) {
68
+ _defineProperty(_assertThisInitialized(_this), "isMatch", function (inputValue, option) {
66
69
  var _context2;
67
70
  return _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
68
71
  });
69
- _defineProperty(_this, "isMatchRemark", function (inputValue, option) {
72
+ _defineProperty(_assertThisInitialized(_this), "isMatchRemark", function (inputValue, option) {
70
73
  var _option$props = option.props,
71
74
  text = _option$props.text,
72
75
  remark = _option$props.remark;
73
76
  return _indexOfInstanceProperty(text).call(text, inputValue) > -1 || _indexOfInstanceProperty(remark).call(remark, inputValue) > -1;
74
77
  });
75
- _defineProperty(_this, "toRemarkOption", function (option, index) {
78
+ _defineProperty(_assertThisInitialized(_this), "toRemarkOption", function (option, index) {
76
79
  return /*#__PURE__*/React.createElement(SelectOption, {
77
80
  key: index,
78
81
  value: String(option.value),
@@ -83,14 +86,14 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
83
86
  style: OPTION_STYLE
84
87
  }, option.remark || ''));
85
88
  });
86
- _defineProperty(_this, "toOption", function (option, index) {
89
+ _defineProperty(_assertThisInitialized(_this), "toOption", function (option, index) {
87
90
  return /*#__PURE__*/React.createElement(SelectOption, {
88
91
  key: index,
89
92
  value: String(option.value),
90
93
  disabled: option.disabled || false
91
94
  }, option.title);
92
95
  });
93
- _defineProperty(_this, "onChange", function (options, keyValue) {
96
+ _defineProperty(_assertThisInitialized(_this), "onChange", function (options, keyValue) {
94
97
  var onChange = _this.props.onChange;
95
98
  var objValue = keyValue.length > 0 ? _mapInstanceProperty(keyValue).call(keyValue, function (item) {
96
99
  return _objectSpread(_objectSpread({}, _filterInstanceProperty(options).call(options, function (o) {
@@ -102,7 +105,7 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
102
105
  }) : [];
103
106
  onChange && onChange(objValue);
104
107
  });
105
- _defineProperty(_this, "getValue", function () {
108
+ _defineProperty(_assertThisInitialized(_this), "getValue", function () {
106
109
  var value = _this.props.value;
107
110
  if (_typeof(value) === 'object' && _Array$isArray(value)) {
108
111
  return _mapInstanceProperty(value).call(value, function (item) {
@@ -117,8 +120,7 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
117
120
  });
118
121
  return _this;
119
122
  }
120
- _inherits(InputSelect, _React$Component);
121
- return _createClass(InputSelect, [{
123
+ _createClass(InputSelect, [{
122
124
  key: "render",
123
125
  value: function render() {
124
126
  var _context3, _context4;
@@ -158,5 +160,6 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
158
160
  }), this.props.remark ? _mapInstanceProperty(allOptions).call(allOptions, this.toRemarkOption) : _mapInstanceProperty(allOptions).call(allOptions, this.toOption)));
159
161
  }
160
162
  }]);
163
+ return InputSelect;
161
164
  }(React.Component);
162
165
  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;
@@ -2,18 +2,21 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
2
2
  import _extends from "@babel/runtime-corejs3/helpers/extends";
3
3
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
+ import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
6
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
5
7
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
6
8
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
7
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
8
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
9
10
  import _Select from "antd/es/select";
10
11
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
11
12
  import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
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 React from 'react';
15
16
  var Option = _Select.Option;
16
17
  var InputWriting = /*#__PURE__*/function (_React$Component) {
18
+ _inherits(InputWriting, _React$Component);
19
+ var _super = _createSuper(InputWriting);
17
20
  function InputWriting() {
18
21
  var _context;
19
22
  var _this;
@@ -21,13 +24,13 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
21
24
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
22
25
  args[_key] = arguments[_key];
23
26
  }
24
- _this = _callSuper(this, InputWriting, _concatInstanceProperty(_context = []).call(_context, args));
25
- _defineProperty(_this, "state", {
27
+ _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
28
+ _defineProperty(_assertThisInitialized(_this), "state", {
26
29
  options: [],
27
30
  value: [],
28
31
  fetching: false
29
32
  });
30
- _defineProperty(_this, "onClick", function (e) {
33
+ _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
31
34
  var _this$props = _this.props,
32
35
  _this$props$options = _this$props.options,
33
36
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -37,21 +40,21 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
37
40
  onSearch(e.target.value);
38
41
  }
39
42
  });
40
- _defineProperty(_this, "onSearch", function (value) {
43
+ _defineProperty(_assertThisInitialized(_this), "onSearch", function (value) {
41
44
  var onSearch = _this.props.onSearch;
42
45
  onSearch && onSearch(value);
43
46
  });
44
- _defineProperty(_this, "isMatch", function (inputValue, option) {
47
+ _defineProperty(_assertThisInitialized(_this), "isMatch", function (inputValue, option) {
45
48
  var _context2;
46
49
  return _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
47
50
  });
48
- _defineProperty(_this, "toOption", function (option, index) {
51
+ _defineProperty(_assertThisInitialized(_this), "toOption", function (option, index) {
49
52
  return /*#__PURE__*/React.createElement(SelectOption, {
50
53
  key: index,
51
54
  value: String(option.value)
52
55
  }, option.title);
53
56
  });
54
- _defineProperty(_this, "onChange", function (keyValue) {
57
+ _defineProperty(_assertThisInitialized(_this), "onChange", function (keyValue) {
55
58
  var _this$props2 = _this.props,
56
59
  onChange = _this$props2.onChange,
57
60
  value = _this$props2.value;
@@ -59,8 +62,7 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
59
62
  });
60
63
  return _this;
61
64
  }
62
- _inherits(InputWriting, _React$Component);
63
- return _createClass(InputWriting, [{
65
+ _createClass(InputWriting, [{
64
66
  key: "render",
65
67
  value: function render() {
66
68
  var value = this.props.value;
@@ -83,5 +85,6 @@ var InputWriting = /*#__PURE__*/function (_React$Component) {
83
85
  })));
84
86
  }
85
87
  }]);
88
+ return InputWriting;
86
89
  }(React.Component);
87
90
  export default InputWriting;