cloud-b2b 1.1.26 → 1.1.28

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 (105) hide show
  1. package/es/Area/Area.js +16 -45
  2. package/es/Card/Card.js +3 -4
  3. package/es/CodeInput/CodeInput.js +30 -59
  4. package/es/Control/Control.js +47 -94
  5. package/es/Control/event.js +0 -14
  6. package/es/Enhance/Dialogs.js +0 -15
  7. package/es/Enhance/Loading.js +16 -36
  8. package/es/Enhance/index.js +0 -2
  9. package/es/Header/Header.js +3 -35
  10. package/es/Header/Vertical.js +1 -24
  11. package/es/ImageView/ImageView.js +5 -22
  12. package/es/Indent/Indent.js +3 -7
  13. package/es/InpurCascader/InputCascader.js +10 -36
  14. package/es/InputEditor/InputEditor.js +55 -55
  15. package/es/InputSearch/InputSearch.js +26 -71
  16. package/es/InputSelect/InputSelect.js +17 -48
  17. package/es/InputWriting/InputWriting.js +6 -28
  18. package/es/Layout/Layout.js +28 -59
  19. package/es/LayoutLink/LayoutLink.js +11 -20
  20. package/es/Link/Link.js +4 -27
  21. package/es/Loading/Loading.js +1 -3
  22. package/es/Loading2/Loading2.js +0 -2
  23. package/es/ModalWithDrag/ModalWithDrag.js +3 -8
  24. package/es/ModalWithDrag/drag.js +12 -29
  25. package/es/NumberInput/NumberInput.js +24 -63
  26. package/es/Search/Search.js +53 -149
  27. package/es/Sidebar/Sidebar.js +13 -34
  28. package/es/Sidebar2/Sidebar.js +3 -30
  29. package/es/SuperForm/SuperForm.js +27 -150
  30. package/es/SuperForm2/SuperForm.js +31 -165
  31. package/es/SuperIcon/SuperIcon.js +3 -6
  32. package/es/SuperPagination/SuperPagination.js +15 -32
  33. package/es/SuperTab/SuperTab.js +4 -27
  34. package/es/SuperTab2/SuperTab2.js +11 -33
  35. package/es/SuperTable/DragSortRow.js +6 -34
  36. package/es/SuperTable/FilterDropDown.js +10 -34
  37. package/es/SuperTable/SuperTable.js +91 -216
  38. package/es/SuperTable/fixed.js +1 -9
  39. package/es/SuperTable2/SuperTable2.js +104 -206
  40. package/es/SuperTable2/SuperTableCell.js +16 -55
  41. package/es/SuperTable3/FilterDropDown.js +10 -34
  42. package/es/SuperTable3/SuperTable.js +57 -175
  43. package/es/SuperTable3/fixed.js +1 -9
  44. package/es/SuperToolbar/SuperToolbar.js +21 -49
  45. package/es/SuperUpload/SuperUpload.js +73 -110
  46. package/es/Title/Title.js +12 -15
  47. package/es/Viewer/ImageViews.js +7 -60
  48. package/es/Viewer/Viewer.js +7 -34
  49. package/es/WingBlank/WingBlank.js +2 -6
  50. package/es/helper.js +36 -23
  51. package/es/history.js +3 -2
  52. package/lib/Area/Area.js +16 -64
  53. package/lib/Card/Card.js +3 -13
  54. package/lib/CodeInput/CodeInput.js +30 -77
  55. package/lib/Control/Control.js +47 -135
  56. package/lib/Control/event.js +0 -16
  57. package/lib/Enhance/Dialogs.js +0 -26
  58. package/lib/Enhance/Loading.js +16 -52
  59. package/lib/Enhance/index.js +0 -9
  60. package/lib/Header/Header.js +3 -48
  61. package/lib/Header/Vertical.js +1 -36
  62. package/lib/ImageView/ImageView.js +5 -30
  63. package/lib/Indent/Indent.js +3 -13
  64. package/lib/InpurCascader/InputCascader.js +11 -50
  65. package/lib/InputEditor/InputEditor.js +55 -64
  66. package/lib/InputSearch/InputSearch.js +26 -78
  67. package/lib/InputSelect/InputSelect.js +17 -62
  68. package/lib/InputWriting/InputWriting.js +6 -35
  69. package/lib/Layout/Layout.js +28 -76
  70. package/lib/LayoutLink/LayoutLink.js +11 -38
  71. package/lib/Link/Link.js +4 -40
  72. package/lib/Loading/Loading.js +1 -9
  73. package/lib/Loading2/Loading2.js +0 -8
  74. package/lib/ModalWithDrag/ModalWithDrag.js +3 -18
  75. package/lib/ModalWithDrag/drag.js +12 -34
  76. package/lib/NumberInput/NumberInput.js +24 -76
  77. package/lib/Search/Search.js +53 -157
  78. package/lib/Sidebar/Sidebar.js +13 -46
  79. package/lib/Sidebar2/Sidebar.js +3 -42
  80. package/lib/SuperForm/SuperForm.js +27 -149
  81. package/lib/SuperForm2/SuperForm.js +31 -160
  82. package/lib/SuperIcon/SuperIcon.js +3 -14
  83. package/lib/SuperPagination/SuperPagination.js +15 -42
  84. package/lib/SuperTab/SuperTab.js +4 -34
  85. package/lib/SuperTab2/SuperTab2.js +11 -48
  86. package/lib/SuperTable/DragSortRow.js +6 -42
  87. package/lib/SuperTable/FilterDropDown.js +10 -42
  88. package/lib/SuperTable/SuperTable.js +90 -210
  89. package/lib/SuperTable/fixed.js +1 -13
  90. package/lib/SuperTable2/SuperTable2.js +104 -222
  91. package/lib/SuperTable2/SuperTableCell.js +13 -62
  92. package/lib/SuperTable3/FilterDropDown.js +10 -42
  93. package/lib/SuperTable3/SuperTable.js +56 -169
  94. package/lib/SuperTable3/fixed.js +1 -13
  95. package/lib/SuperToolbar/SuperToolbar.js +20 -64
  96. package/lib/SuperUpload/SuperUpload.js +73 -140
  97. package/lib/Title/Title.js +12 -24
  98. package/lib/Viewer/ImageViews.js +7 -63
  99. package/lib/Viewer/Viewer.js +7 -43
  100. package/lib/WingBlank/WingBlank.js +2 -14
  101. package/lib/helper.js +36 -37
  102. package/lib/history.js +0 -5
  103. package/lib/index.js +0 -76
  104. package/lib/variables.js +0 -4
  105. package/package.json +1 -1
@@ -3,13 +3,11 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
4
4
  var _excluded = ["type", "style"];
5
5
  import React from 'react';
6
-
7
6
  var SuperIcon = function SuperIcon(_ref) {
8
7
  var type = _ref.type,
9
- _ref$style = _ref.style,
10
- style = _ref$style === void 0 ? {} : _ref$style,
11
- props = _objectWithoutProperties(_ref, _excluded);
12
-
8
+ _ref$style = _ref.style,
9
+ style = _ref$style === void 0 ? {} : _ref$style,
10
+ props = _objectWithoutProperties(_ref, _excluded);
13
11
  if (!type) {
14
12
  return /*#__PURE__*/React.createElement(_Icon, _extends({
15
13
  style: style
@@ -26,5 +24,4 @@ var SuperIcon = function SuperIcon(_ref) {
26
24
  });
27
25
  }
28
26
  };
29
-
30
27
  export default SuperIcon;
@@ -9,14 +9,10 @@ import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
10
10
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
11
11
  import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
12
-
13
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); }; }
14
-
15
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; } }
16
-
17
14
  import React from 'react';
18
15
  import PropTypes from 'prop-types';
19
-
20
16
  /**
21
17
  * maxRecords: 最大记录数
22
18
  * selRecords: [可选]已选记录条数
@@ -30,56 +26,46 @@ import PropTypes from 'prop-types';
30
26
  */
31
27
  var SuperPagination = /*#__PURE__*/function (_React$Component) {
32
28
  _inherits(SuperPagination, _React$Component);
33
-
34
29
  var _super = _createSuper(SuperPagination);
35
-
36
30
  function SuperPagination() {
37
31
  var _context;
38
-
39
32
  var _this;
40
-
41
33
  _classCallCheck(this, SuperPagination);
42
-
43
34
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
44
35
  args[_key] = arguments[_key];
45
36
  }
46
-
47
37
  _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
48
-
49
38
  _defineProperty(_assertThisInitialized(_this), "onChange", function (page) {
50
39
  var _this$props$callback = _this.props.callback,
51
- callback = _this$props$callback === void 0 ? {} : _this$props$callback;
40
+ callback = _this$props$callback === void 0 ? {} : _this$props$callback;
52
41
  var onPageNumberChange = _this.props.onPageNumberChange || callback.onPageNumberChange;
53
42
  onPageNumberChange && onPageNumberChange(page);
54
43
  });
55
-
56
44
  _defineProperty(_assertThisInitialized(_this), "onShowSizeChange", function (current, size) {
57
45
  var _this$props$callback2 = _this.props.callback,
58
- callback = _this$props$callback2 === void 0 ? {} : _this$props$callback2;
46
+ callback = _this$props$callback2 === void 0 ? {} : _this$props$callback2;
59
47
  var onPageSizeChange = _this.props.onPageSizeChange || callback.onPageSizeChange;
60
48
  onPageSizeChange && onPageSizeChange(size, current || 1);
61
49
  });
62
-
63
50
  return _this;
64
51
  }
65
-
66
52
  _createClass(SuperPagination, [{
67
53
  key: "render",
68
54
  value: function render() {
69
55
  var _this$props = this.props,
70
- currentPage = _this$props.currentPage,
71
- maxRecords = _this$props.maxRecords,
72
- pageSize = _this$props.pageSize,
73
- pageSizeType = _this$props.pageSizeType,
74
- align = _this$props.align,
75
- description = _this$props.description,
76
- selRecords = _this$props.selRecords,
77
- _this$props$page = _this$props.page,
78
- page = _this$props$page === void 0 ? {} : _this$props$page,
79
- _this$props$option = _this$props.option,
80
- option = _this$props$option === void 0 ? {} : _this$props$option,
81
- _this$props$style = _this$props.style,
82
- style = _this$props$style === void 0 ? {} : _this$props$style;
56
+ currentPage = _this$props.currentPage,
57
+ maxRecords = _this$props.maxRecords,
58
+ pageSize = _this$props.pageSize,
59
+ pageSizeType = _this$props.pageSizeType,
60
+ align = _this$props.align,
61
+ description = _this$props.description,
62
+ selRecords = _this$props.selRecords,
63
+ _this$props$page = _this$props.page,
64
+ page = _this$props$page === void 0 ? {} : _this$props$page,
65
+ _this$props$option = _this$props.option,
66
+ option = _this$props$option === void 0 ? {} : _this$props$option,
67
+ _this$props$style = _this$props.style,
68
+ style = _this$props$style === void 0 ? {} : _this$props$style;
83
69
  var desp = description || (this.props.config || {}).pageDesp || '';
84
70
  var props = {
85
71
  current: currentPage || page.currentPage,
@@ -106,10 +92,8 @@ var SuperPagination = /*#__PURE__*/function (_React$Component) {
106
92
  }, /*#__PURE__*/React.createElement(_Pagination, props));
107
93
  }
108
94
  }]);
109
-
110
95
  return SuperPagination;
111
96
  }(React.Component);
112
-
113
97
  _defineProperty(SuperPagination, "propTypes", {
114
98
  maxRecords: PropTypes.number,
115
99
  selRecords: PropTypes.number,
@@ -122,5 +106,4 @@ _defineProperty(SuperPagination, "propTypes", {
122
106
  onPageNumberChange: PropTypes.func,
123
107
  onPageSizeChange: PropTypes.func
124
108
  });
125
-
126
109
  export default SuperPagination;
@@ -9,50 +9,40 @@ import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
9
9
  import _Tabs from "antd/es/tabs";
10
10
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
11
11
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
12
-
13
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); }; }
14
-
15
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; } }
16
-
17
14
  import React from 'react';
18
15
  import PropTypes from 'prop-types';
19
16
  import variables from '../variables';
20
17
  var TabPane = _Tabs.TabPane;
18
+
21
19
  /**
22
20
  * key: 唯一标识一个tab
23
21
  * title: 显示在tab上的标题
24
22
  * close: 为true则显示关闭按钮,默认为true
25
23
  */
26
-
27
24
  var TabType = {
28
25
  key: PropTypes.string.isRequired,
29
26
  title: PropTypes.string.isRequired,
30
27
  close: PropTypes.bool
31
28
  };
29
+
32
30
  /**
33
31
  * activeKey: 处于活动状态tab的key值
34
32
  * onTabChange: 切换选项卡时触发,原型为function(key)
35
33
  * onTabClose: 关闭选项卡时触发,原型为funtion(key)
36
34
  */
37
-
38
35
  var SuperTab = /*#__PURE__*/function (_React$Component) {
39
36
  _inherits(SuperTab, _React$Component);
40
-
41
37
  var _super = _createSuper(SuperTab);
42
-
43
38
  function SuperTab() {
44
39
  var _context;
45
-
46
40
  var _this;
47
-
48
41
  _classCallCheck(this, SuperTab);
49
-
50
42
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
51
43
  args[_key] = arguments[_key];
52
44
  }
53
-
54
45
  _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
55
-
56
46
  _defineProperty(_assertThisInitialized(_this), "getEvent", function (name) {
57
47
  if (_this.props[name]) {
58
48
  return _this.props[name];
@@ -62,36 +52,30 @@ var SuperTab = /*#__PURE__*/function (_React$Component) {
62
52
  return null;
63
53
  }
64
54
  });
65
-
66
55
  _defineProperty(_assertThisInitialized(_this), "callEvent", function (name, key) {
67
56
  var onEvent = _this.getEvent(name);
68
-
69
57
  if (onEvent) {
70
58
  onEvent(key);
71
59
  }
72
60
  });
73
-
74
61
  _defineProperty(_assertThisInitialized(_this), "onEdit", function (key, action) {
75
62
  if (action === 'remove') {
76
63
  _this.callEvent('onTabClose', key);
77
64
  }
78
65
  });
79
-
80
66
  _defineProperty(_assertThisInitialized(_this), "onChange", function (key) {
81
67
  _this.callEvent('onTabChange', key);
82
68
  });
83
-
84
69
  _defineProperty(_assertThisInitialized(_this), "toTab", function (_ref) {
85
70
  var key = _ref.key,
86
- title = _ref.title,
87
- close = _ref.close;
71
+ title = _ref.title,
72
+ close = _ref.close;
88
73
  return /*#__PURE__*/React.createElement(TabPane, {
89
74
  key: key,
90
75
  tab: title,
91
76
  closable: close
92
77
  });
93
78
  });
94
-
95
79
  _defineProperty(_assertThisInitialized(_this), "getTabsProps", function () {
96
80
  return {
97
81
  className: variables('SuperTab'),
@@ -102,29 +86,22 @@ var SuperTab = /*#__PURE__*/function (_React$Component) {
102
86
  onChange: _this.onChange
103
87
  };
104
88
  });
105
-
106
89
  return _this;
107
90
  }
108
-
109
91
  _createClass(SuperTab, [{
110
92
  key: "render",
111
93
  value: function render() {
112
94
  var _context2;
113
-
114
95
  return /*#__PURE__*/React.createElement(_Tabs, this.getTabsProps(), _mapInstanceProperty(_context2 = this.props.tabs).call(_context2, this.toTab));
115
96
  }
116
97
  }]);
117
-
118
98
  return SuperTab;
119
99
  }(React.Component);
120
-
121
100
  _defineProperty(SuperTab, "propTypes", {
122
101
  activeKey: PropTypes.string.isRequired,
123
102
  tabs: PropTypes.arrayOf(PropTypes.shape(TabType)).isRequired,
124
103
  onTabChange: PropTypes.func,
125
104
  onTabClose: PropTypes.func
126
105
  });
127
-
128
106
  _defineProperty(SuperTab, "PROPS", ['activeKey', 'tabs', 'onTabChange', 'onTabClose']);
129
-
130
107
  export default SuperTab;
@@ -14,56 +14,45 @@ import _Tabs from "antd/es/tabs";
14
14
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
15
15
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
16
16
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
17
-
18
17
  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); }; }
19
-
20
18
  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
19
  import React from 'react';
23
20
  import PropTypes from 'prop-types';
24
21
  import ReactDOM from 'react-dom';
25
22
  import variables from '../variables';
26
23
  var TabPane = _Tabs.TabPane;
27
24
  var MenuItem = _Menu.Item;
25
+
28
26
  /**
29
27
  * key: 唯一标识一个tab
30
28
  * title: 显示在tab上的标题
31
29
  */
32
-
33
30
  var TabType = {
34
31
  key: PropTypes.string.isRequired,
35
32
  title: PropTypes.string.isRequired
36
33
  };
34
+
37
35
  /**
38
36
  * activeKey: 处于活动状态tab的key值
39
37
  * menu: 是否需要右侧下拉列表,默认false
40
38
  * onTabChange: 切换选项卡时触发,原型为function(key)
41
39
  */
42
-
43
40
  var SuperTab2 = /*#__PURE__*/function (_React$Component) {
44
41
  _inherits(SuperTab2, _React$Component);
45
-
46
42
  var _super = _createSuper(SuperTab2);
47
-
48
43
  function SuperTab2() {
49
44
  var _context;
50
-
51
45
  var _this;
52
-
53
46
  _classCallCheck(this, SuperTab2);
54
-
55
47
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
56
48
  args[_key] = arguments[_key];
57
49
  }
58
-
59
50
  _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
60
-
61
51
  _defineProperty(_assertThisInitialized(_this), "onTabChange", function (key) {
62
52
  var _this$props = _this.props,
63
- onTabChange = _this$props.onTabChange,
64
- _this$props$callback = _this$props.callback,
65
- callback = _this$props$callback === void 0 ? {} : _this$props$callback;
66
-
53
+ onTabChange = _this$props.onTabChange,
54
+ _this$props$callback = _this$props.callback,
55
+ callback = _this$props$callback === void 0 ? {} : _this$props$callback;
67
56
  if (onTabChange) {
68
57
  onTabChange(key);
69
58
  } else if (callback.onTabChange) {
@@ -71,18 +60,16 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
71
60
  callback.onTabChange(key);
72
61
  }
73
62
  });
74
-
75
63
  _defineProperty(_assertThisInitialized(_this), "toTab", function (tab) {
76
64
  return /*#__PURE__*/React.createElement(TabPane, {
77
65
  key: tab.key,
78
66
  tab: tab.title
79
67
  });
80
68
  });
81
-
82
69
  _defineProperty(_assertThisInitialized(_this), "toMenu", function () {
83
70
  var _this$props2 = _this.props,
84
- tabs = _this$props2.tabs,
85
- activeKey = _this$props2.activeKey;
71
+ tabs = _this$props2.tabs,
72
+ activeKey = _this$props2.activeKey;
86
73
  return /*#__PURE__*/React.createElement(_Menu, {
87
74
  style: {
88
75
  maxHeight: '450px',
@@ -90,7 +77,6 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
90
77
  }
91
78
  }, _mapInstanceProperty(tabs).call(tabs, function (tab) {
92
79
  var _context2, _context3;
93
-
94
80
  var style = activeKey === tab.key ? {
95
81
  color: "#2196f3"
96
82
  } : {};
@@ -110,17 +96,14 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
110
96
  }, tab.title));
111
97
  }));
112
98
  });
113
-
114
99
  _defineProperty(_assertThisInitialized(_this), "getPopupContainer", function () {
115
100
  var container = _this.props.container;
116
-
117
101
  if (typeof container === 'undefined') {
118
102
  return document.body;
119
103
  } else {
120
104
  return ReactDOM.findDOMNode(container);
121
105
  }
122
106
  });
123
-
124
107
  _defineProperty(_assertThisInitialized(_this), "toDropdown", function () {
125
108
  return /*#__PURE__*/React.createElement(_Dropdown, {
126
109
  overlay: _this.toMenu(),
@@ -133,18 +116,16 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
133
116
  }
134
117
  }));
135
118
  });
136
-
137
119
  return _this;
138
120
  }
139
-
140
121
  _createClass(SuperTab2, [{
141
122
  key: "render",
142
123
  value: function render() {
143
124
  var _this$props3 = this.props,
144
- tabs = _this$props3.tabs,
145
- activeKey = _this$props3.activeKey,
146
- _this$props3$menu = _this$props3.menu,
147
- menu = _this$props3$menu === void 0 ? false : _this$props3$menu;
125
+ tabs = _this$props3.tabs,
126
+ activeKey = _this$props3.activeKey,
127
+ _this$props3$menu = _this$props3.menu,
128
+ menu = _this$props3$menu === void 0 ? false : _this$props3$menu;
148
129
  return /*#__PURE__*/React.createElement(_Tabs, {
149
130
  className: variables('SuperTab2'),
150
131
  activeKey: activeKey,
@@ -153,15 +134,12 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
153
134
  }, _mapInstanceProperty(tabs).call(tabs, this.toTab));
154
135
  }
155
136
  }]);
156
-
157
137
  return SuperTab2;
158
138
  }(React.Component);
159
-
160
139
  _defineProperty(SuperTab2, "propTypes", {
161
140
  activeKey: PropTypes.string.isRequired,
162
141
  tabs: PropTypes.arrayOf(PropTypes.shape(TabType)).isRequired,
163
142
  menu: PropTypes.bool,
164
143
  onTabChange: PropTypes.func
165
144
  });
166
-
167
145
  export default SuperTab2;
@@ -10,55 +10,39 @@ import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
10
10
  var _excluded = ["onMoveRow", "index", "className"];
11
11
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
12
12
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
13
-
14
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); }; }
15
-
16
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; } }
17
-
18
15
  import React from 'react';
19
16
  import variables from '../variables';
20
17
  var dragIndex = -1;
21
-
22
18
  var DragSortRow = /*#__PURE__*/function (_React$Component) {
23
19
  _inherits(DragSortRow, _React$Component);
24
-
25
20
  var _super = _createSuper(DragSortRow);
26
-
27
21
  function DragSortRow() {
28
22
  var _context, _context2;
29
-
30
23
  var _this;
31
-
32
24
  _classCallCheck(this, DragSortRow);
33
-
34
25
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
35
26
  args[_key] = arguments[_key];
36
27
  }
37
-
38
28
  _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
39
-
40
29
  _defineProperty(_assertThisInitialized(_this), "state", {
41
30
  dragIndex: -1,
42
31
  firefox: _includesInstanceProperty(_context2 = navigator.userAgent).call(_context2, 'Firefox')
43
32
  });
44
-
45
33
  _defineProperty(_assertThisInitialized(_this), "onDragStart", function (e) {
46
34
  dragIndex = _this.props.index;
47
-
48
35
  if (_this.state.firefox) {
49
36
  // 火狐浏览器必须调用setData
50
37
  e.dataTransfer.setData('text/plain', 'DragSortRow');
51
38
  }
52
39
  });
53
-
54
40
  _defineProperty(_assertThisInitialized(_this), "onDragEnd", function () {
55
41
  dragIndex = -1;
56
42
  });
57
-
58
43
  _defineProperty(_assertThisInitialized(_this), "onDragOver", function (e) {
59
44
  if (dragIndex > -1 && dragIndex !== _this.props.index) {
60
45
  e.preventDefault();
61
-
62
46
  if (_this.state.dragIndex !== dragIndex) {
63
47
  _this.setState({
64
48
  dragIndex: dragIndex
@@ -66,42 +50,34 @@ var DragSortRow = /*#__PURE__*/function (_React$Component) {
66
50
  }
67
51
  }
68
52
  });
69
-
70
53
  _defineProperty(_assertThisInitialized(_this), "onDragLeave", function () {
71
54
  _this.setState({
72
55
  dragIndex: -1
73
56
  });
74
57
  });
75
-
76
58
  _defineProperty(_assertThisInitialized(_this), "onDrop", function (e) {
77
59
  var dragIndex = _this.state.dragIndex;
78
-
79
60
  _this.setState({
80
61
  dragIndex: -1
81
62
  });
63
+ _this.props.onMoveRow(dragIndex, _this.props.index);
82
64
 
83
- _this.props.onMoveRow(dragIndex, _this.props.index); // 火狐浏览器默认会打开一个新窗口,此处阻止其打开
84
-
85
-
65
+ // 火狐浏览器默认会打开一个新窗口,此处阻止其打开
86
66
  if (_this.state.firefox) {
87
67
  e.preventDefault();
88
68
  }
89
69
  });
90
-
91
70
  return _this;
92
71
  }
93
-
94
72
  _createClass(DragSortRow, [{
95
73
  key: "render",
96
74
  value: function render() {
97
75
  var _context3;
98
-
99
76
  var _this$props = this.props,
100
- onMoveRow = _this$props.onMoveRow,
101
- index = _this$props.index,
102
- className = _this$props.className,
103
- restProps = _objectWithoutProperties(_this$props, _excluded);
104
-
77
+ onMoveRow = _this$props.onMoveRow,
78
+ index = _this$props.index,
79
+ className = _this$props.className,
80
+ restProps = _objectWithoutProperties(_this$props, _excluded);
105
81
  var dragIndex = this.state.dragIndex;
106
82
  restProps.className = _concatInstanceProperty(_context3 = "".concat(className, " ")).call(_context3, variables('DragSortRow'));
107
83
  restProps.draggable = true;
@@ -110,16 +86,12 @@ var DragSortRow = /*#__PURE__*/function (_React$Component) {
110
86
  restProps.onDragOver = this.onDragOver;
111
87
  restProps.onDragLeave = this.onDragLeave;
112
88
  restProps.onDrop = this.onDrop;
113
-
114
89
  if (dragIndex > -1) {
115
90
  restProps['data-drag-hover'] = dragIndex > index ? 'up' : 'down';
116
91
  }
117
-
118
92
  return /*#__PURE__*/React.createElement("tr", restProps);
119
93
  }
120
94
  }]);
121
-
122
95
  return DragSortRow;
123
96
  }(React.Component);
124
-
125
97
  export default DragSortRow;
@@ -9,53 +9,39 @@ import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleC
9
9
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
10
10
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
11
11
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
12
-
13
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); }; }
14
-
15
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; } }
16
-
17
14
  import React from 'react';
18
15
  import PropTypes from 'prop-types';
19
16
  import Control from "../Control/Control";
20
17
  import variables from '../variables';
21
-
22
18
  var FilterDropDown = /*#__PURE__*/function (_React$Component) {
23
19
  _inherits(FilterDropDown, _React$Component);
24
-
25
20
  var _super = _createSuper(FilterDropDown);
26
-
27
21
  function FilterDropDown(_props) {
28
22
  var _this;
29
-
30
23
  _classCallCheck(this, FilterDropDown);
31
-
32
24
  _this = _super.call(this, _props);
33
-
34
25
  _defineProperty(_assertThisInitialized(_this), "onChange", function (e) {
35
26
  _this.setState({
36
27
  value: e.target.value
37
28
  });
38
29
  });
39
-
40
30
  _defineProperty(_assertThisInitialized(_this), "onDateChange", function (key, value) {
41
31
  _this.setState(_defineProperty({}, key, value));
42
32
  });
43
-
44
33
  _defineProperty(_assertThisInitialized(_this), "onSearch", function () {
45
34
  var _this$props = _this.props,
46
- onSearch = _this$props.onSearch,
47
- isDateFilterByStartAndEnd = _this$props.isDateFilterByStartAndEnd;
48
-
35
+ onSearch = _this$props.onSearch,
36
+ isDateFilterByStartAndEnd = _this$props.isDateFilterByStartAndEnd;
49
37
  if (onSearch) {
50
38
  var value = !_this.state.start && !_this.state.end ? "" : _this.state;
51
39
  var val = isDateFilterByStartAndEnd ? value : _this.state.value;
52
40
  onSearch(val);
53
41
  }
54
42
  });
55
-
56
43
  _defineProperty(_assertThisInitialized(_this), "DateInputCreator", function () {
57
44
  var _context, _context2, _context3;
58
-
59
45
  var props = _this.props.props;
60
46
  var propsStart = {
61
47
  type: "date",
@@ -91,7 +77,6 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
91
77
  onClick: _bindInstanceProperty(_context3 = _this.onSearch).call(_context3, null, _this.props.type)
92
78
  }, "\u641C\u7D22")));
93
79
  });
94
-
95
80
  _defineProperty(_assertThisInitialized(_this), "InputCreator", function () {
96
81
  var props = {
97
82
  size: 'small',
@@ -110,18 +95,15 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
110
95
  type: "primary"
111
96
  }, "\u641C\u7D22"));
112
97
  });
113
-
114
98
  _this.state = {
115
99
  value: _props.value || ''
116
100
  };
117
-
118
101
  if (_props.isDateFilterByStartAndEnd) {
119
102
  var _ref = _props.value || {},
120
- _ref$start = _ref.start,
121
- start = _ref$start === void 0 ? '' : _ref$start,
122
- _ref$end = _ref.end,
123
- end = _ref$end === void 0 ? '' : _ref$end;
124
-
103
+ _ref$start = _ref.start,
104
+ start = _ref$start === void 0 ? '' : _ref$start,
105
+ _ref$end = _ref.end,
106
+ end = _ref$end === void 0 ? '' : _ref$end;
125
107
  _this.state = {
126
108
  start: start,
127
109
  end: end
@@ -131,20 +113,17 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
131
113
  value: _props.value || ''
132
114
  };
133
115
  }
134
-
135
116
  return _this;
136
117
  }
137
-
138
118
  _createClass(FilterDropDown, [{
139
119
  key: "componentWillReceiveProps",
140
120
  value: function componentWillReceiveProps(newProps) {
141
121
  if (newProps.isDateFilterByStartAndEnd) {
142
122
  var _ref2 = newProps.value || {},
143
- _ref2$start = _ref2.start,
144
- start = _ref2$start === void 0 ? '' : _ref2$start,
145
- _ref2$end = _ref2.end,
146
- end = _ref2$end === void 0 ? '' : _ref2$end;
147
-
123
+ _ref2$start = _ref2.start,
124
+ start = _ref2$start === void 0 ? '' : _ref2$start,
125
+ _ref2$end = _ref2.end,
126
+ end = _ref2$end === void 0 ? '' : _ref2$end;
148
127
  this.setState({
149
128
  start: start,
150
129
  end: end
@@ -175,14 +154,11 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
175
154
  return this.props.isDateFilterByStartAndEnd ? this.DateInputCreator() : this.InputCreator();
176
155
  }
177
156
  }]);
178
-
179
157
  return FilterDropDown;
180
158
  }(React.Component);
181
-
182
159
  _defineProperty(FilterDropDown, "propTypes", {
183
160
  value: PropTypes.any,
184
161
  onSearch: PropTypes.func,
185
162
  onClose: PropTypes.func
186
163
  });
187
-
188
164
  export default FilterDropDown;