cloud-b2b 1.1.79 → 1.1.80
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 +10 -13
- package/es/CodeInput/CodeInput.js +16 -19
- package/es/Enhance/Dialogs.js +11 -14
- package/es/Enhance/Loading.js +15 -18
- package/es/Header/Header.js +17 -20
- package/es/Header/Vertical.js +11 -14
- package/es/ImageView/ImageView.js +10 -13
- package/es/InpurCascader/InputCascader.js +11 -14
- package/es/InputEditor/InputEditor.js +16 -18
- package/es/InputSearch/InputSearch.js +20 -23
- package/es/InputSelect/InputSelect.js +14 -17
- package/es/InputTreeSelect/InputTreeSelect.js +10 -13
- package/es/InputWriting/InputWriting.js +12 -15
- package/es/Layout/Layout.js +14 -17
- package/es/Link/Link.js +7 -10
- package/es/NumberInput/NumberInput.js +13 -16
- package/es/Search/Search.js +52 -55
- package/es/Search2/Search.js +83 -86
- package/es/Search2/Search.less +64 -64
- package/es/Search2/package.json +6 -6
- package/es/Sidebar/Sidebar.js +11 -14
- package/es/Sidebar2/Sidebar.js +13 -16
- package/es/SuperForm/SuperForm.js +74 -79
- package/es/SuperForm2/SuperForm.js +107 -112
- package/es/SuperPagination/SuperPagination.js +8 -11
- package/es/SuperTab/SuperTab.js +12 -15
- package/es/SuperTab2/SuperTab2.js +13 -16
- package/es/SuperTable/DragSortRow.js +12 -15
- package/es/SuperTable/FilterDropDown.js +11 -14
- package/es/SuperTable/SuperTable.js +70 -73
- package/es/SuperTable2/SuperTable2.js +89 -92
- package/es/SuperTable2/SuperTable2.less +3 -1
- package/es/SuperTable2/SuperTableCell.js +27 -30
- package/es/SuperTable3/FilterDropDown.js +11 -14
- package/es/SuperTable3/SuperTable.js +58 -61
- package/es/SuperToolbar/SuperToolbar.js +12 -15
- package/es/SuperUpload/SuperUpload.js +38 -38
- package/es/Viewer/ImageViews.js +16 -19
- package/es/Viewer/Viewer.js +11 -14
- package/es/helper.js +18 -17
- package/lib/Area/Area.js +10 -13
- package/lib/CodeInput/CodeInput.js +16 -19
- package/lib/Enhance/Dialogs.js +11 -14
- package/lib/Enhance/Loading.js +15 -18
- package/lib/Header/Header.js +17 -20
- package/lib/Header/Vertical.js +11 -14
- package/lib/ImageView/ImageView.js +10 -13
- package/lib/InpurCascader/InputCascader.js +11 -14
- package/lib/InputEditor/InputEditor.js +16 -18
- package/lib/InputSearch/InputSearch.js +20 -23
- package/lib/InputSelect/InputSelect.js +14 -17
- package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
- package/lib/InputWriting/InputWriting.js +12 -15
- package/lib/Layout/Layout.js +14 -17
- package/lib/LayoutLink/LayoutLink.js +1 -2
- package/lib/Link/Link.js +7 -10
- package/lib/NumberInput/NumberInput.js +13 -16
- package/lib/Search/Search.js +53 -57
- package/lib/Search2/Search.js +84 -88
- package/lib/Search2/Search.less +64 -64
- package/lib/Search2/package.json +6 -6
- package/lib/Sidebar/Sidebar.js +11 -14
- package/lib/Sidebar2/Sidebar.js +13 -16
- package/lib/SuperForm/SuperForm.js +75 -81
- package/lib/SuperForm2/SuperForm.js +108 -114
- package/lib/SuperPagination/SuperPagination.js +8 -11
- package/lib/SuperTab/SuperTab.js +12 -15
- package/lib/SuperTab2/SuperTab2.js +13 -16
- package/lib/SuperTable/DragSortRow.js +12 -15
- package/lib/SuperTable/FilterDropDown.js +11 -14
- package/lib/SuperTable/SuperTable.js +70 -73
- package/lib/SuperTable2/SuperTable2.js +90 -94
- package/lib/SuperTable2/SuperTable2.less +3 -1
- package/lib/SuperTable2/SuperTableCell.js +27 -30
- package/lib/SuperTable3/FilterDropDown.js +11 -14
- package/lib/SuperTable3/SuperTable.js +58 -61
- package/lib/SuperToolbar/SuperToolbar.js +12 -15
- package/lib/SuperUpload/SuperUpload.js +39 -40
- package/lib/Viewer/ImageViews.js +16 -19
- package/lib/Viewer/Viewer.js +11 -14
- package/lib/helper.js +18 -17
- package/package.json +1 -1
|
@@ -2,15 +2,14 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
|
|
|
2
2
|
import _Pagination from "antd/es/pagination";
|
|
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 _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
11
10
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
12
|
-
function
|
|
13
|
-
function _isNativeReflectConstruct() {
|
|
11
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
13
|
import React from 'react';
|
|
15
14
|
import PropTypes from 'prop-types';
|
|
16
15
|
/**
|
|
@@ -25,8 +24,6 @@ import PropTypes from 'prop-types';
|
|
|
25
24
|
* onPageSizeChange: 页大小改变时触发,原型func(pageSize, pageNumber)
|
|
26
25
|
*/
|
|
27
26
|
var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
28
|
-
_inherits(SuperPagination, _React$Component);
|
|
29
|
-
var _super = _createSuper(SuperPagination);
|
|
30
27
|
function SuperPagination() {
|
|
31
28
|
var _context;
|
|
32
29
|
var _this;
|
|
@@ -34,14 +31,14 @@ var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
34
31
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
35
32
|
args[_key] = arguments[_key];
|
|
36
33
|
}
|
|
37
|
-
_this =
|
|
38
|
-
_defineProperty(
|
|
34
|
+
_this = _callSuper(this, SuperPagination, _concatInstanceProperty(_context = []).call(_context, args));
|
|
35
|
+
_defineProperty(_this, "onChange", function (page) {
|
|
39
36
|
var _this$props$callback = _this.props.callback,
|
|
40
37
|
callback = _this$props$callback === void 0 ? {} : _this$props$callback;
|
|
41
38
|
var onPageNumberChange = _this.props.onPageNumberChange || callback.onPageNumberChange;
|
|
42
39
|
onPageNumberChange && onPageNumberChange(page);
|
|
43
40
|
});
|
|
44
|
-
_defineProperty(
|
|
41
|
+
_defineProperty(_this, "onShowSizeChange", function (current, size) {
|
|
45
42
|
var _this$props$callback2 = _this.props.callback,
|
|
46
43
|
callback = _this$props$callback2 === void 0 ? {} : _this$props$callback2;
|
|
47
44
|
var onPageSizeChange = _this.props.onPageSizeChange || callback.onPageSizeChange;
|
|
@@ -49,7 +46,8 @@ var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
49
46
|
});
|
|
50
47
|
return _this;
|
|
51
48
|
}
|
|
52
|
-
|
|
49
|
+
_inherits(SuperPagination, _React$Component);
|
|
50
|
+
return _createClass(SuperPagination, [{
|
|
53
51
|
key: "render",
|
|
54
52
|
value: function render() {
|
|
55
53
|
var _this$props = this.props,
|
|
@@ -92,7 +90,6 @@ var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
92
90
|
}, /*#__PURE__*/React.createElement(_Pagination, props));
|
|
93
91
|
}
|
|
94
92
|
}]);
|
|
95
|
-
return SuperPagination;
|
|
96
93
|
}(React.Component);
|
|
97
94
|
_defineProperty(SuperPagination, "propTypes", {
|
|
98
95
|
maxRecords: PropTypes.number,
|
package/es/SuperTab/SuperTab.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
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 _Tabs from "antd/es/tabs";
|
|
10
9
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
11
10
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
12
|
-
function
|
|
13
|
-
function _isNativeReflectConstruct() {
|
|
11
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
13
|
import React from 'react';
|
|
15
14
|
import PropTypes from 'prop-types';
|
|
16
15
|
import variables from '../variables';
|
|
@@ -33,8 +32,6 @@ var TabType = {
|
|
|
33
32
|
* onTabClose: 关闭选项卡时触发,原型为funtion(key)
|
|
34
33
|
*/
|
|
35
34
|
var SuperTab = /*#__PURE__*/function (_React$Component) {
|
|
36
|
-
_inherits(SuperTab, _React$Component);
|
|
37
|
-
var _super = _createSuper(SuperTab);
|
|
38
35
|
function SuperTab() {
|
|
39
36
|
var _context;
|
|
40
37
|
var _this;
|
|
@@ -42,8 +39,8 @@ var SuperTab = /*#__PURE__*/function (_React$Component) {
|
|
|
42
39
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
40
|
args[_key] = arguments[_key];
|
|
44
41
|
}
|
|
45
|
-
_this =
|
|
46
|
-
_defineProperty(
|
|
42
|
+
_this = _callSuper(this, SuperTab, _concatInstanceProperty(_context = []).call(_context, args));
|
|
43
|
+
_defineProperty(_this, "getEvent", function (name) {
|
|
47
44
|
if (_this.props[name]) {
|
|
48
45
|
return _this.props[name];
|
|
49
46
|
} else if (_this.props.callback) {
|
|
@@ -52,21 +49,21 @@ var SuperTab = /*#__PURE__*/function (_React$Component) {
|
|
|
52
49
|
return null;
|
|
53
50
|
}
|
|
54
51
|
});
|
|
55
|
-
_defineProperty(
|
|
52
|
+
_defineProperty(_this, "callEvent", function (name, key) {
|
|
56
53
|
var onEvent = _this.getEvent(name);
|
|
57
54
|
if (onEvent) {
|
|
58
55
|
onEvent(key);
|
|
59
56
|
}
|
|
60
57
|
});
|
|
61
|
-
_defineProperty(
|
|
58
|
+
_defineProperty(_this, "onEdit", function (key, action) {
|
|
62
59
|
if (action === 'remove') {
|
|
63
60
|
_this.callEvent('onTabClose', key);
|
|
64
61
|
}
|
|
65
62
|
});
|
|
66
|
-
_defineProperty(
|
|
63
|
+
_defineProperty(_this, "onChange", function (key) {
|
|
67
64
|
_this.callEvent('onTabChange', key);
|
|
68
65
|
});
|
|
69
|
-
_defineProperty(
|
|
66
|
+
_defineProperty(_this, "toTab", function (_ref) {
|
|
70
67
|
var key = _ref.key,
|
|
71
68
|
title = _ref.title,
|
|
72
69
|
close = _ref.close;
|
|
@@ -76,7 +73,7 @@ var SuperTab = /*#__PURE__*/function (_React$Component) {
|
|
|
76
73
|
closable: close
|
|
77
74
|
});
|
|
78
75
|
});
|
|
79
|
-
_defineProperty(
|
|
76
|
+
_defineProperty(_this, "getTabsProps", function () {
|
|
80
77
|
return {
|
|
81
78
|
className: variables('SuperTab'),
|
|
82
79
|
activeKey: _this.props.activeKey,
|
|
@@ -88,14 +85,14 @@ var SuperTab = /*#__PURE__*/function (_React$Component) {
|
|
|
88
85
|
});
|
|
89
86
|
return _this;
|
|
90
87
|
}
|
|
91
|
-
|
|
88
|
+
_inherits(SuperTab, _React$Component);
|
|
89
|
+
return _createClass(SuperTab, [{
|
|
92
90
|
key: "render",
|
|
93
91
|
value: function render() {
|
|
94
92
|
var _context2;
|
|
95
93
|
return /*#__PURE__*/React.createElement(_Tabs, this.getTabsProps(), _mapInstanceProperty(_context2 = this.props.tabs).call(_context2, this.toTab));
|
|
96
94
|
}
|
|
97
95
|
}]);
|
|
98
|
-
return SuperTab;
|
|
99
96
|
}(React.Component);
|
|
100
97
|
_defineProperty(SuperTab, "propTypes", {
|
|
101
98
|
activeKey: PropTypes.string.isRequired,
|
|
@@ -4,18 +4,17 @@ import _Icon from "antd/es/icon";
|
|
|
4
4
|
import _Tooltip from "antd/es/tooltip";
|
|
5
5
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
6
6
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
7
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
8
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
9
7
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
10
8
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
9
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
11
10
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
12
11
|
import _Menu from "antd/es/menu";
|
|
13
12
|
import _Tabs from "antd/es/tabs";
|
|
14
13
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
15
14
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
16
15
|
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
17
|
-
function
|
|
18
|
-
function _isNativeReflectConstruct() {
|
|
16
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
17
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
18
|
import React from 'react';
|
|
20
19
|
import PropTypes from 'prop-types';
|
|
21
20
|
import ReactDOM from 'react-dom';
|
|
@@ -38,8 +37,6 @@ var TabType = {
|
|
|
38
37
|
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
39
38
|
*/
|
|
40
39
|
var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
41
|
-
_inherits(SuperTab2, _React$Component);
|
|
42
|
-
var _super = _createSuper(SuperTab2);
|
|
43
40
|
function SuperTab2() {
|
|
44
41
|
var _context;
|
|
45
42
|
var _this;
|
|
@@ -47,8 +44,8 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
|
47
44
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
45
|
args[_key] = arguments[_key];
|
|
49
46
|
}
|
|
50
|
-
_this =
|
|
51
|
-
_defineProperty(
|
|
47
|
+
_this = _callSuper(this, SuperTab2, _concatInstanceProperty(_context = []).call(_context, args));
|
|
48
|
+
_defineProperty(_this, "onTabChange", function (key) {
|
|
52
49
|
var _this$props = _this.props,
|
|
53
50
|
onTabChange = _this$props.onTabChange,
|
|
54
51
|
_this$props$callback = _this$props.callback,
|
|
@@ -60,13 +57,13 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
|
60
57
|
callback.onTabChange(key);
|
|
61
58
|
}
|
|
62
59
|
});
|
|
63
|
-
_defineProperty(
|
|
60
|
+
_defineProperty(_this, "toTab", function (tab) {
|
|
64
61
|
return /*#__PURE__*/React.createElement(TabPane, {
|
|
65
62
|
key: tab.key,
|
|
66
63
|
tab: tab.title
|
|
67
64
|
});
|
|
68
65
|
});
|
|
69
|
-
_defineProperty(
|
|
66
|
+
_defineProperty(_this, "toMenu", function () {
|
|
70
67
|
var _this$props2 = _this.props,
|
|
71
68
|
tabs = _this$props2.tabs,
|
|
72
69
|
activeKey = _this$props2.activeKey;
|
|
@@ -86,17 +83,17 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
|
86
83
|
placement: "leftTop",
|
|
87
84
|
title: tab.tip
|
|
88
85
|
}, /*#__PURE__*/React.createElement("a", {
|
|
89
|
-
onClick: _bindInstanceProperty(_context2 = _this.onTabChange).call(_context2,
|
|
86
|
+
onClick: _bindInstanceProperty(_context2 = _this.onTabChange).call(_context2, _this, tab.key),
|
|
90
87
|
style: style
|
|
91
88
|
}, tab.title))) : /*#__PURE__*/React.createElement(MenuItem, {
|
|
92
89
|
key: tab.key
|
|
93
90
|
}, /*#__PURE__*/React.createElement("a", {
|
|
94
|
-
onClick: _bindInstanceProperty(_context3 = _this.onTabChange).call(_context3,
|
|
91
|
+
onClick: _bindInstanceProperty(_context3 = _this.onTabChange).call(_context3, _this, tab.key),
|
|
95
92
|
style: style
|
|
96
93
|
}, tab.title));
|
|
97
94
|
}));
|
|
98
95
|
});
|
|
99
|
-
_defineProperty(
|
|
96
|
+
_defineProperty(_this, "getPopupContainer", function () {
|
|
100
97
|
var container = _this.props.container;
|
|
101
98
|
if (typeof container === 'undefined') {
|
|
102
99
|
return document.body;
|
|
@@ -104,7 +101,7 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
|
104
101
|
return ReactDOM.findDOMNode(container);
|
|
105
102
|
}
|
|
106
103
|
});
|
|
107
|
-
_defineProperty(
|
|
104
|
+
_defineProperty(_this, "toDropdown", function () {
|
|
108
105
|
return /*#__PURE__*/React.createElement(_Dropdown, {
|
|
109
106
|
overlay: _this.toMenu(),
|
|
110
107
|
getPopupContainer: _this.getPopupContainer
|
|
@@ -118,7 +115,8 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
|
118
115
|
});
|
|
119
116
|
return _this;
|
|
120
117
|
}
|
|
121
|
-
|
|
118
|
+
_inherits(SuperTab2, _React$Component);
|
|
119
|
+
return _createClass(SuperTab2, [{
|
|
122
120
|
key: "render",
|
|
123
121
|
value: function render() {
|
|
124
122
|
var _this$props3 = this.props,
|
|
@@ -134,7 +132,6 @@ var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
|
134
132
|
}, _mapInstanceProperty(tabs).call(tabs, this.toTab));
|
|
135
133
|
}
|
|
136
134
|
}]);
|
|
137
|
-
return SuperTab2;
|
|
138
135
|
}(React.Component);
|
|
139
136
|
_defineProperty(SuperTab2, "propTypes", {
|
|
140
137
|
activeKey: PropTypes.string.isRequired,
|
|
@@ -2,22 +2,19 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
|
|
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
|
var _excluded = ["onMoveRow", "index", "className"];
|
|
11
10
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
12
11
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
13
|
-
function
|
|
14
|
-
function _isNativeReflectConstruct() {
|
|
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 variables from '../variables';
|
|
17
16
|
var dragIndex = -1;
|
|
18
17
|
var DragSortRow = /*#__PURE__*/function (_React$Component) {
|
|
19
|
-
_inherits(DragSortRow, _React$Component);
|
|
20
|
-
var _super = _createSuper(DragSortRow);
|
|
21
18
|
function DragSortRow() {
|
|
22
19
|
var _context, _context2;
|
|
23
20
|
var _this;
|
|
@@ -25,22 +22,22 @@ var DragSortRow = /*#__PURE__*/function (_React$Component) {
|
|
|
25
22
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
23
|
args[_key] = arguments[_key];
|
|
27
24
|
}
|
|
28
|
-
_this =
|
|
29
|
-
_defineProperty(
|
|
25
|
+
_this = _callSuper(this, DragSortRow, _concatInstanceProperty(_context = []).call(_context, args));
|
|
26
|
+
_defineProperty(_this, "state", {
|
|
30
27
|
dragIndex: -1,
|
|
31
28
|
firefox: _includesInstanceProperty(_context2 = navigator.userAgent).call(_context2, 'Firefox')
|
|
32
29
|
});
|
|
33
|
-
_defineProperty(
|
|
30
|
+
_defineProperty(_this, "onDragStart", function (e) {
|
|
34
31
|
dragIndex = _this.props.index;
|
|
35
32
|
if (_this.state.firefox) {
|
|
36
33
|
// 火狐浏览器必须调用setData
|
|
37
34
|
e.dataTransfer.setData('text/plain', 'DragSortRow');
|
|
38
35
|
}
|
|
39
36
|
});
|
|
40
|
-
_defineProperty(
|
|
37
|
+
_defineProperty(_this, "onDragEnd", function () {
|
|
41
38
|
dragIndex = -1;
|
|
42
39
|
});
|
|
43
|
-
_defineProperty(
|
|
40
|
+
_defineProperty(_this, "onDragOver", function (e) {
|
|
44
41
|
if (dragIndex > -1 && dragIndex !== _this.props.index) {
|
|
45
42
|
e.preventDefault();
|
|
46
43
|
if (_this.state.dragIndex !== dragIndex) {
|
|
@@ -50,12 +47,12 @@ var DragSortRow = /*#__PURE__*/function (_React$Component) {
|
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
});
|
|
53
|
-
_defineProperty(
|
|
50
|
+
_defineProperty(_this, "onDragLeave", function () {
|
|
54
51
|
_this.setState({
|
|
55
52
|
dragIndex: -1
|
|
56
53
|
});
|
|
57
54
|
});
|
|
58
|
-
_defineProperty(
|
|
55
|
+
_defineProperty(_this, "onDrop", function (e) {
|
|
59
56
|
var dragIndex = _this.state.dragIndex;
|
|
60
57
|
_this.setState({
|
|
61
58
|
dragIndex: -1
|
|
@@ -69,7 +66,8 @@ var DragSortRow = /*#__PURE__*/function (_React$Component) {
|
|
|
69
66
|
});
|
|
70
67
|
return _this;
|
|
71
68
|
}
|
|
72
|
-
|
|
69
|
+
_inherits(DragSortRow, _React$Component);
|
|
70
|
+
return _createClass(DragSortRow, [{
|
|
73
71
|
key: "render",
|
|
74
72
|
value: function render() {
|
|
75
73
|
var _context3;
|
|
@@ -92,6 +90,5 @@ var DragSortRow = /*#__PURE__*/function (_React$Component) {
|
|
|
92
90
|
return /*#__PURE__*/React.createElement("tr", restProps);
|
|
93
91
|
}
|
|
94
92
|
}]);
|
|
95
|
-
return DragSortRow;
|
|
96
93
|
}(React.Component);
|
|
97
94
|
export default DragSortRow;
|
|
@@ -3,34 +3,31 @@ import _Input from "antd/es/input";
|
|
|
3
3
|
import _Button from "antd/es/button";
|
|
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 _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
12
|
-
function
|
|
13
|
-
function _isNativeReflectConstruct() {
|
|
11
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
13
|
import React from 'react';
|
|
15
14
|
import PropTypes from 'prop-types';
|
|
16
15
|
import Control from "../Control/Control";
|
|
17
16
|
import variables from '../variables';
|
|
18
17
|
var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
19
|
-
_inherits(FilterDropDown, _React$Component);
|
|
20
|
-
var _super = _createSuper(FilterDropDown);
|
|
21
18
|
function FilterDropDown(_props) {
|
|
22
19
|
var _this;
|
|
23
20
|
_classCallCheck(this, FilterDropDown);
|
|
24
|
-
_this =
|
|
25
|
-
_defineProperty(
|
|
21
|
+
_this = _callSuper(this, FilterDropDown, [_props]);
|
|
22
|
+
_defineProperty(_this, "onChange", function (e) {
|
|
26
23
|
_this.setState({
|
|
27
24
|
value: e.target.value
|
|
28
25
|
});
|
|
29
26
|
});
|
|
30
|
-
_defineProperty(
|
|
27
|
+
_defineProperty(_this, "onDateChange", function (key, value) {
|
|
31
28
|
_this.setState(_defineProperty({}, key, value));
|
|
32
29
|
});
|
|
33
|
-
_defineProperty(
|
|
30
|
+
_defineProperty(_this, "onSearch", function () {
|
|
34
31
|
var _this$props = _this.props,
|
|
35
32
|
onSearch = _this$props.onSearch,
|
|
36
33
|
isDateFilterByStartAndEnd = _this$props.isDateFilterByStartAndEnd;
|
|
@@ -40,7 +37,7 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
40
37
|
onSearch(val);
|
|
41
38
|
}
|
|
42
39
|
});
|
|
43
|
-
_defineProperty(
|
|
40
|
+
_defineProperty(_this, "DateInputCreator", function () {
|
|
44
41
|
var _context, _context2, _context3;
|
|
45
42
|
var props = _this.props.props;
|
|
46
43
|
var propsStart = {
|
|
@@ -77,7 +74,7 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
77
74
|
onClick: _bindInstanceProperty(_context3 = _this.onSearch).call(_context3, null, _this.props.type)
|
|
78
75
|
}, "\u641C\u7D22")));
|
|
79
76
|
});
|
|
80
|
-
_defineProperty(
|
|
77
|
+
_defineProperty(_this, "InputCreator", function () {
|
|
81
78
|
var props = {
|
|
82
79
|
size: 'small',
|
|
83
80
|
value: _this.state.value,
|
|
@@ -115,7 +112,8 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
115
112
|
}
|
|
116
113
|
return _this;
|
|
117
114
|
}
|
|
118
|
-
|
|
115
|
+
_inherits(FilterDropDown, _React$Component);
|
|
116
|
+
return _createClass(FilterDropDown, [{
|
|
119
117
|
key: "componentWillReceiveProps",
|
|
120
118
|
value: function componentWillReceiveProps(newProps) {
|
|
121
119
|
if (newProps.isDateFilterByStartAndEnd) {
|
|
@@ -154,7 +152,6 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
154
152
|
return this.props.isDateFilterByStartAndEnd ? this.DateInputCreator() : this.InputCreator();
|
|
155
153
|
}
|
|
156
154
|
}]);
|
|
157
|
-
return FilterDropDown;
|
|
158
155
|
}(React.Component);
|
|
159
156
|
_defineProperty(FilterDropDown, "propTypes", {
|
|
160
157
|
value: PropTypes.any,
|