cloud-b2b 1.1.85 → 1.1.87

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 (82) hide show
  1. package/es/Area/Area.js +48 -23
  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 +112 -114
  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 +139 -94
  31. package/es/SuperTable/SuperTable.less +11 -0
  32. package/es/SuperTable2/SuperTable2.js +89 -92
  33. package/es/SuperTable2/SuperTableCell.js +27 -30
  34. package/es/SuperTable3/FilterDropDown.js +11 -14
  35. package/es/SuperTable3/SuperTable.js +58 -61
  36. package/es/SuperToolbar/SuperToolbar.js +12 -15
  37. package/es/SuperUpload/SuperUpload.js +38 -38
  38. package/es/Viewer/ImageViews.js +16 -19
  39. package/es/Viewer/Viewer.js +11 -14
  40. package/es/helper.js +18 -17
  41. package/lib/Area/Area.js +49 -25
  42. package/lib/CodeInput/CodeInput.js +16 -19
  43. package/lib/Enhance/Dialogs.js +11 -14
  44. package/lib/Enhance/Loading.js +15 -18
  45. package/lib/Header/Header.js +17 -20
  46. package/lib/Header/Vertical.js +11 -14
  47. package/lib/ImageView/ImageView.js +10 -13
  48. package/lib/InpurCascader/InputCascader.js +11 -14
  49. package/lib/InputEditor/InputEditor.js +16 -18
  50. package/lib/InputSearch/InputSearch.js +20 -23
  51. package/lib/InputSelect/InputSelect.js +14 -17
  52. package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
  53. package/lib/InputWriting/InputWriting.js +12 -15
  54. package/lib/Layout/Layout.js +14 -17
  55. package/lib/LayoutLink/LayoutLink.js +1 -2
  56. package/lib/Link/Link.js +7 -10
  57. package/lib/NumberInput/NumberInput.js +13 -16
  58. package/lib/Search/Search.js +53 -57
  59. package/lib/Search2/Search.js +84 -88
  60. package/lib/Search2/Search.less +64 -64
  61. package/lib/Search2/package.json +6 -6
  62. package/lib/Sidebar/Sidebar.js +11 -14
  63. package/lib/Sidebar2/Sidebar.js +13 -16
  64. package/lib/SuperForm/SuperForm.js +75 -81
  65. package/lib/SuperForm2/SuperForm.js +113 -116
  66. package/lib/SuperPagination/SuperPagination.js +8 -11
  67. package/lib/SuperTab/SuperTab.js +12 -15
  68. package/lib/SuperTab2/SuperTab2.js +13 -16
  69. package/lib/SuperTable/DragSortRow.js +12 -15
  70. package/lib/SuperTable/FilterDropDown.js +11 -14
  71. package/lib/SuperTable/SuperTable.js +139 -94
  72. package/lib/SuperTable/SuperTable.less +11 -0
  73. package/lib/SuperTable2/SuperTable2.js +90 -94
  74. package/lib/SuperTable2/SuperTableCell.js +27 -30
  75. package/lib/SuperTable3/FilterDropDown.js +11 -14
  76. package/lib/SuperTable3/SuperTable.js +58 -61
  77. package/lib/SuperToolbar/SuperToolbar.js +12 -15
  78. package/lib/SuperUpload/SuperUpload.js +39 -40
  79. package/lib/Viewer/ImageViews.js +16 -19
  80. package/lib/Viewer/Viewer.js +11 -14
  81. package/lib/helper.js +18 -17
  82. package/package.json +1 -1
@@ -1,17 +1,16 @@
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 _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
10
9
  import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
11
10
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
12
11
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
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 React from 'react';
16
15
  import PropTypes from 'prop-types';
17
16
  import Link from '../Link';
@@ -29,8 +28,6 @@ var ITEM_TYPE = {
29
28
  * url:url优先级高于item中的href
30
29
  */
31
30
  var Vertical = /*#__PURE__*/function (_React$Component) {
32
- _inherits(Vertical, _React$Component);
33
- var _super = _createSuper(Vertical);
34
31
  function Vertical() {
35
32
  var _context;
36
33
  var _this;
@@ -38,17 +35,17 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
38
35
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
39
36
  args[_key] = arguments[_key];
40
37
  }
41
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
42
- _defineProperty(_assertThisInitialized(_this), "state", {
38
+ _this = _callSuper(this, Vertical, _concatInstanceProperty(_context = []).call(_context, args));
39
+ _defineProperty(_this, "state", {
43
40
  id: ''
44
41
  });
45
- _defineProperty(_assertThisInitialized(_this), "isSelect", function (item) {
42
+ _defineProperty(_this, "isSelect", function (item) {
46
43
  return item.key === _this.props.selectKey;
47
44
  });
48
- _defineProperty(_assertThisInitialized(_this), "getUrl", function (item) {
45
+ _defineProperty(_this, "getUrl", function (item) {
49
46
  return _this.props.url[item.key] || item.href;
50
47
  });
51
- _defineProperty(_assertThisInitialized(_this), "onClick", function (selectKey) {
48
+ _defineProperty(_this, "onClick", function (selectKey) {
52
49
  _this.props.onSelectKey && _this.props.onSelectKey(selectKey);
53
50
  if (_this.state.id) {
54
51
  clearTimeout(_this.state.id);
@@ -61,7 +58,7 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
61
58
  }, 500)
62
59
  });
63
60
  });
64
- _defineProperty(_assertThisInitialized(_this), "toItem", function (item) {
61
+ _defineProperty(_this, "toItem", function (item) {
65
62
  if (!item.jumpOut) {
66
63
  var _context2;
67
64
  return /*#__PURE__*/React.createElement(Link, {
@@ -85,7 +82,8 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
85
82
  });
86
83
  return _this;
87
84
  }
88
- _createClass(Vertical, [{
85
+ _inherits(Vertical, _React$Component);
86
+ return _createClass(Vertical, [{
89
87
  key: "render",
90
88
  value: function render() {
91
89
  var _context3;
@@ -95,7 +93,6 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
95
93
  }, _mapInstanceProperty(_context3 = this.props.items).call(_context3, this.toItem));
96
94
  }
97
95
  }]);
98
- return Vertical;
99
96
  }(React.Component);
100
97
  _defineProperty(Vertical, "propTypes", {
101
98
  selectKey: PropTypes.string,
@@ -2,30 +2,27 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
2
2
  import _Empty from "antd/es/empty";
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";
7
5
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
8
6
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
7
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
9
8
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
10
9
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
11
- 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); }; }
12
- 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; })(); }
13
12
  import React from 'react';
14
13
  import { ModalWithDrag, Title } from '../index';
15
14
  import variables from '../variables';
16
15
  var ImageView = /*#__PURE__*/function (_React$Component) {
17
- _inherits(ImageView, _React$Component);
18
- var _super = _createSuper(ImageView);
19
16
  function ImageView(_props) {
20
17
  var _this;
21
18
  _classCallCheck(this, ImageView);
22
- _this = _super.call(this, _props);
23
- _defineProperty(_assertThisInitialized(_this), "ClosePreview", function () {
19
+ _this = _callSuper(this, ImageView, [_props]);
20
+ _defineProperty(_this, "ClosePreview", function () {
24
21
  _this.setState({
25
22
  previewVisible: false
26
23
  });
27
24
  });
28
- _defineProperty(_assertThisInitialized(_this), "showBigImg", function () {
25
+ _defineProperty(_this, "showBigImg", function () {
29
26
  var imgList = _this.props.imgList;
30
27
  var _this$state = _this.state,
31
28
  previewVisible = _this$state.previewVisible,
@@ -46,14 +43,14 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
46
43
  src: imgList[index].fileUrl
47
44
  }));
48
45
  });
49
- _defineProperty(_assertThisInitialized(_this), "toSeeImg", function (e) {
46
+ _defineProperty(_this, "toSeeImg", function (e) {
50
47
  if (_this.props.toSeeImg) {
51
48
  _this.props.toSeeImg(e);
52
49
  } else {
53
50
  _this.myClick(e.index);
54
51
  }
55
52
  });
56
- _defineProperty(_assertThisInitialized(_this), "myClick", function (index) {
53
+ _defineProperty(_this, "myClick", function (index) {
57
54
  _this.setState({
58
55
  previewVisible: true,
59
56
  index: index
@@ -65,7 +62,8 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
65
62
  };
66
63
  return _this;
67
64
  }
68
- _createClass(ImageView, [{
65
+ _inherits(ImageView, _React$Component);
66
+ return _createClass(ImageView, [{
69
67
  key: "render",
70
68
  value: function render() {
71
69
  var _this2 = this;
@@ -95,6 +93,5 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
95
93
  }), toSeeImg ? null : this.showBigImg());
96
94
  }
97
95
  }]);
98
- return ImageView;
99
96
  }(React.Component);
100
97
  export default ImageView;
@@ -10,15 +10,14 @@ 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";
15
13
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
16
14
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
15
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
17
16
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
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; }
19
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; }
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; } }
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; })(); }
22
21
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
23
22
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
24
23
  import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
@@ -46,21 +45,19 @@ var PROPS = {
46
45
  };
47
46
  var PROPS_KEYS = _Object$keys(PROPS);
48
47
  var InputCascader = /*#__PURE__*/function (_React$Component) {
49
- _inherits(InputCascader, _React$Component);
50
- var _super = _createSuper(InputCascader);
51
48
  function InputCascader(_props) {
52
49
  var _this;
53
50
  _classCallCheck(this, InputCascader);
54
- _this = _super.call(this, _props);
55
- _defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
51
+ _this = _callSuper(this, InputCascader, [_props]);
52
+ _defineProperty(_this, "onChange", function (value) {
56
53
  var onChange = _this.props.onChange;
57
54
  onChange && onChange(value);
58
55
  });
59
- _defineProperty(_assertThisInitialized(_this), "loadData", function (selectedOptions) {
56
+ _defineProperty(_this, "loadData", function (selectedOptions) {
60
57
  var onSearch = _this.props.onSearch;
61
58
  onSearch && onSearch(selectedOptions[0]);
62
59
  });
63
- _defineProperty(_assertThisInitialized(_this), "getOptions", function (options) {
60
+ _defineProperty(_this, "getOptions", function (options) {
64
61
  return _mapInstanceProperty(options).call(options, function (option) {
65
62
  var obj = _objectSpread(_objectSpread({}, option), {}, {
66
63
  label: option.title
@@ -71,13 +68,13 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
71
68
  return obj;
72
69
  });
73
70
  });
74
- _defineProperty(_assertThisInitialized(_this), "showSearch", function (inputValue, path) {
71
+ _defineProperty(_this, "showSearch", function (inputValue, path) {
75
72
  return _someInstanceProperty(path).call(path, function (option) {
76
73
  var _context;
77
74
  return _indexOfInstanceProperty(_context = option.label.toLowerCase()).call(_context, inputValue.toLowerCase()) > -1;
78
75
  });
79
76
  });
80
- _defineProperty(_assertThisInitialized(_this), "getProps", function () {
77
+ _defineProperty(_this, "getProps", function () {
81
78
  var _this$props = _this.props,
82
79
  _this$props$options = _this$props.options,
83
80
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -106,7 +103,8 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
106
103
  });
107
104
  return _this;
108
105
  }
109
- _createClass(InputCascader, [{
106
+ _inherits(InputCascader, _React$Component);
107
+ return _createClass(InputCascader, [{
110
108
  key: "render",
111
109
  value: function render() {
112
110
  return /*#__PURE__*/React.createElement(_Cascader, _extends({}, this.getProps(), {
@@ -116,7 +114,6 @@ var InputCascader = /*#__PURE__*/function (_React$Component) {
116
114
  }));
117
115
  }
118
116
  }]);
119
- return InputCascader;
120
117
  }(React.Component);
121
118
  _defineProperty(InputCascader, "propTypes", PROPS);
122
119
  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) {
@@ -269,7 +267,6 @@ var InputSearch = /*#__PURE__*/function (_React$Component) {
269
267
  })));
270
268
  }
271
269
  }]);
272
- return InputSearch;
273
270
  }(React.Component);
274
271
  _defineProperty(InputSearch, "propTypes", PROPS);
275
272
  export default InputSearch;
@@ -10,10 +10,9 @@ 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";
15
13
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
16
14
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
15
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
17
16
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
18
17
  import _Select from "antd/es/select";
19
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; }
@@ -25,8 +24,8 @@ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
25
24
  import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
26
25
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
27
26
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
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; } }
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; })(); }
30
29
  import React from 'react';
31
30
  var SelectOption = _Select.Option;
32
31
  var OPTION_STYLE = {
@@ -37,8 +36,6 @@ var OPTION_STYLE = {
37
36
  whiteSpace: 'pre-wrap'
38
37
  };
39
38
  var InputSelect = /*#__PURE__*/function (_React$Component) {
40
- _inherits(InputSelect, _React$Component);
41
- var _super = _createSuper(InputSelect);
42
39
  function InputSelect() {
43
40
  var _context;
44
41
  var _this;
@@ -46,8 +43,8 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
46
43
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
47
44
  args[_key] = arguments[_key];
48
45
  }
49
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
50
- _defineProperty(_assertThisInitialized(_this), "onClick", function (e) {
46
+ _this = _callSuper(this, InputSelect, _concatInstanceProperty(_context = []).call(_context, args));
47
+ _defineProperty(_this, "onClick", function (e) {
51
48
  var _this$props = _this.props,
52
49
  _this$props$options = _this$props.options,
53
50
  options = _this$props$options === void 0 ? [] : _this$props$options,
@@ -61,21 +58,21 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
61
58
  onSearch(e.target.value);
62
59
  }
63
60
  });
64
- _defineProperty(_assertThisInitialized(_this), "onSearch", function (value) {
61
+ _defineProperty(_this, "onSearch", function (value) {
65
62
  var onSearch = _this.props.onSearch;
66
63
  onSearch && onSearch(value);
67
64
  });
68
- _defineProperty(_assertThisInitialized(_this), "isMatch", function (inputValue, option) {
65
+ _defineProperty(_this, "isMatch", function (inputValue, option) {
69
66
  var _context2;
70
67
  return _indexOfInstanceProperty(_context2 = option.props.children).call(_context2, inputValue) !== -1;
71
68
  });
72
- _defineProperty(_assertThisInitialized(_this), "isMatchRemark", function (inputValue, option) {
69
+ _defineProperty(_this, "isMatchRemark", function (inputValue, option) {
73
70
  var _option$props = option.props,
74
71
  text = _option$props.text,
75
72
  remark = _option$props.remark;
76
73
  return _indexOfInstanceProperty(text).call(text, inputValue) > -1 || _indexOfInstanceProperty(remark).call(remark, inputValue) > -1;
77
74
  });
78
- _defineProperty(_assertThisInitialized(_this), "toRemarkOption", function (option, index) {
75
+ _defineProperty(_this, "toRemarkOption", function (option, index) {
79
76
  return /*#__PURE__*/React.createElement(SelectOption, {
80
77
  key: index,
81
78
  value: String(option.value),
@@ -86,14 +83,14 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
86
83
  style: OPTION_STYLE
87
84
  }, option.remark || ''));
88
85
  });
89
- _defineProperty(_assertThisInitialized(_this), "toOption", function (option, index) {
86
+ _defineProperty(_this, "toOption", function (option, index) {
90
87
  return /*#__PURE__*/React.createElement(SelectOption, {
91
88
  key: index,
92
89
  value: String(option.value),
93
90
  disabled: option.disabled || false
94
91
  }, option.title);
95
92
  });
96
- _defineProperty(_assertThisInitialized(_this), "onChange", function (options, keyValue) {
93
+ _defineProperty(_this, "onChange", function (options, keyValue) {
97
94
  var onChange = _this.props.onChange;
98
95
  var objValue = keyValue.length > 0 ? _mapInstanceProperty(keyValue).call(keyValue, function (item) {
99
96
  return _objectSpread(_objectSpread({}, _filterInstanceProperty(options).call(options, function (o) {
@@ -105,7 +102,7 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
105
102
  }) : [];
106
103
  onChange && onChange(objValue);
107
104
  });
108
- _defineProperty(_assertThisInitialized(_this), "getValue", function () {
105
+ _defineProperty(_this, "getValue", function () {
109
106
  var value = _this.props.value;
110
107
  if (_typeof(value) === 'object' && _Array$isArray(value)) {
111
108
  return _mapInstanceProperty(value).call(value, function (item) {
@@ -120,7 +117,8 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
120
117
  });
121
118
  return _this;
122
119
  }
123
- _createClass(InputSelect, [{
120
+ _inherits(InputSelect, _React$Component);
121
+ return _createClass(InputSelect, [{
124
122
  key: "render",
125
123
  value: function render() {
126
124
  var _context3, _context4;
@@ -160,6 +158,5 @@ var InputSelect = /*#__PURE__*/function (_React$Component) {
160
158
  }), this.props.remark ? _mapInstanceProperty(allOptions).call(allOptions, this.toRemarkOption) : _mapInstanceProperty(allOptions).call(allOptions, this.toOption)));
161
159
  }
162
160
  }]);
163
- return InputSelect;
164
161
  }(React.Component);
165
162
  export default InputSelect;