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