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.
- package/es/Area/Area.js +16 -45
- package/es/Card/Card.js +3 -4
- package/es/CodeInput/CodeInput.js +30 -59
- package/es/Control/Control.js +47 -94
- package/es/Control/event.js +0 -14
- package/es/Enhance/Dialogs.js +0 -15
- package/es/Enhance/Loading.js +16 -36
- package/es/Enhance/index.js +0 -2
- package/es/Header/Header.js +3 -35
- package/es/Header/Vertical.js +1 -24
- package/es/ImageView/ImageView.js +5 -22
- package/es/Indent/Indent.js +3 -7
- package/es/InpurCascader/InputCascader.js +10 -36
- package/es/InputEditor/InputEditor.js +55 -55
- package/es/InputSearch/InputSearch.js +26 -71
- package/es/InputSelect/InputSelect.js +17 -48
- package/es/InputWriting/InputWriting.js +6 -28
- package/es/Layout/Layout.js +28 -59
- package/es/LayoutLink/LayoutLink.js +11 -20
- package/es/Link/Link.js +4 -27
- package/es/Loading/Loading.js +1 -3
- package/es/Loading2/Loading2.js +0 -2
- package/es/ModalWithDrag/ModalWithDrag.js +3 -8
- package/es/ModalWithDrag/drag.js +12 -29
- package/es/NumberInput/NumberInput.js +24 -63
- package/es/Search/Search.js +53 -149
- package/es/Sidebar/Sidebar.js +13 -34
- package/es/Sidebar2/Sidebar.js +3 -30
- package/es/SuperForm/SuperForm.js +27 -150
- package/es/SuperForm2/SuperForm.js +31 -165
- package/es/SuperIcon/SuperIcon.js +3 -6
- package/es/SuperPagination/SuperPagination.js +15 -32
- package/es/SuperTab/SuperTab.js +4 -27
- package/es/SuperTab2/SuperTab2.js +11 -33
- package/es/SuperTable/DragSortRow.js +6 -34
- package/es/SuperTable/FilterDropDown.js +10 -34
- package/es/SuperTable/SuperTable.js +91 -216
- package/es/SuperTable/fixed.js +1 -9
- package/es/SuperTable2/SuperTable2.js +104 -206
- package/es/SuperTable2/SuperTableCell.js +16 -55
- package/es/SuperTable3/FilterDropDown.js +10 -34
- package/es/SuperTable3/SuperTable.js +57 -175
- package/es/SuperTable3/fixed.js +1 -9
- package/es/SuperToolbar/SuperToolbar.js +21 -49
- package/es/SuperUpload/SuperUpload.js +73 -110
- package/es/Title/Title.js +12 -15
- package/es/Viewer/ImageViews.js +7 -60
- package/es/Viewer/Viewer.js +7 -34
- package/es/WingBlank/WingBlank.js +2 -6
- package/es/helper.js +36 -23
- package/es/history.js +3 -2
- package/lib/Area/Area.js +16 -64
- package/lib/Card/Card.js +3 -13
- package/lib/CodeInput/CodeInput.js +30 -77
- package/lib/Control/Control.js +47 -135
- package/lib/Control/event.js +0 -16
- package/lib/Enhance/Dialogs.js +0 -26
- package/lib/Enhance/Loading.js +16 -52
- package/lib/Enhance/index.js +0 -9
- package/lib/Header/Header.js +3 -48
- package/lib/Header/Vertical.js +1 -36
- package/lib/ImageView/ImageView.js +5 -30
- package/lib/Indent/Indent.js +3 -13
- package/lib/InpurCascader/InputCascader.js +11 -50
- package/lib/InputEditor/InputEditor.js +55 -64
- package/lib/InputSearch/InputSearch.js +26 -78
- package/lib/InputSelect/InputSelect.js +17 -62
- package/lib/InputWriting/InputWriting.js +6 -35
- package/lib/Layout/Layout.js +28 -76
- package/lib/LayoutLink/LayoutLink.js +11 -38
- package/lib/Link/Link.js +4 -40
- package/lib/Loading/Loading.js +1 -9
- package/lib/Loading2/Loading2.js +0 -8
- package/lib/ModalWithDrag/ModalWithDrag.js +3 -18
- package/lib/ModalWithDrag/drag.js +12 -34
- package/lib/NumberInput/NumberInput.js +24 -76
- package/lib/Search/Search.js +53 -157
- package/lib/Sidebar/Sidebar.js +13 -46
- package/lib/Sidebar2/Sidebar.js +3 -42
- package/lib/SuperForm/SuperForm.js +27 -149
- package/lib/SuperForm2/SuperForm.js +31 -160
- package/lib/SuperIcon/SuperIcon.js +3 -14
- package/lib/SuperPagination/SuperPagination.js +15 -42
- package/lib/SuperTab/SuperTab.js +4 -34
- package/lib/SuperTab2/SuperTab2.js +11 -48
- package/lib/SuperTable/DragSortRow.js +6 -42
- package/lib/SuperTable/FilterDropDown.js +10 -42
- package/lib/SuperTable/SuperTable.js +90 -210
- package/lib/SuperTable/fixed.js +1 -13
- package/lib/SuperTable2/SuperTable2.js +104 -222
- package/lib/SuperTable2/SuperTableCell.js +13 -62
- package/lib/SuperTable3/FilterDropDown.js +10 -42
- package/lib/SuperTable3/SuperTable.js +56 -169
- package/lib/SuperTable3/fixed.js +1 -13
- package/lib/SuperToolbar/SuperToolbar.js +20 -64
- package/lib/SuperUpload/SuperUpload.js +73 -140
- package/lib/Title/Title.js +12 -24
- package/lib/Viewer/ImageViews.js +7 -63
- package/lib/Viewer/Viewer.js +7 -43
- package/lib/WingBlank/WingBlank.js +2 -14
- package/lib/helper.js +36 -37
- package/lib/history.js +0 -5
- package/lib/index.js +0 -76
- package/lib/variables.js +0 -4
- package/package.json +1 -1
package/es/Sidebar/Sidebar.js
CHANGED
|
@@ -9,11 +9,8 @@ import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
|
9
9
|
import _Menu from "antd/es/menu";
|
|
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 Link from '../Link';
|
|
@@ -21,17 +18,18 @@ import SuperIcon from '../SuperIcon';
|
|
|
21
18
|
import variables from '../variables';
|
|
22
19
|
var SubMenu = _Menu.SubMenu;
|
|
23
20
|
var MenuItem = _Menu.Item;
|
|
21
|
+
|
|
24
22
|
/** 侧边栏二级条目的类型
|
|
25
23
|
* key: 唯一标识一个条目
|
|
26
24
|
* title:条目的标题
|
|
27
25
|
* href: 为跳转页面的url
|
|
28
26
|
*/
|
|
29
|
-
|
|
30
27
|
var ChildType = {
|
|
31
28
|
key: PropTypes.string.isRequired,
|
|
32
29
|
title: PropTypes.string.isRequired,
|
|
33
30
|
href: PropTypes.string.isRequired
|
|
34
31
|
};
|
|
32
|
+
|
|
35
33
|
/** 侧边栏一级条目的类型
|
|
36
34
|
* key: 唯一标识一个条目
|
|
37
35
|
* title:条目的标题
|
|
@@ -40,7 +38,6 @@ var ChildType = {
|
|
|
40
38
|
* href: isFolder为false时,为跳转页面的url,否则被忽略
|
|
41
39
|
* children:isFolder为true时,存放下级菜单的信息,否则被忽略
|
|
42
40
|
*/
|
|
43
|
-
|
|
44
41
|
var ItemType = {
|
|
45
42
|
key: PropTypes.string.isRequired,
|
|
46
43
|
title: PropTypes.string.isRequired,
|
|
@@ -49,38 +46,29 @@ var ItemType = {
|
|
|
49
46
|
href: PropTypes.string,
|
|
50
47
|
children: PropTypes.arrayOf(PropTypes.shape(ChildType))
|
|
51
48
|
};
|
|
49
|
+
|
|
52
50
|
/**
|
|
53
51
|
* activeKey:指定被选中的一级条目的key,不能是二级条目的key
|
|
54
52
|
* items:存放所有侧边栏条目的信息
|
|
55
53
|
* style: 样式
|
|
56
54
|
*/
|
|
57
|
-
|
|
58
55
|
var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
59
56
|
_inherits(Sidebar, _React$Component);
|
|
60
|
-
|
|
61
57
|
var _super = _createSuper(Sidebar);
|
|
62
|
-
|
|
63
58
|
function Sidebar() {
|
|
64
59
|
var _context;
|
|
65
|
-
|
|
66
60
|
var _this;
|
|
67
|
-
|
|
68
61
|
_classCallCheck(this, Sidebar);
|
|
69
|
-
|
|
70
62
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
71
63
|
args[_key] = arguments[_key];
|
|
72
64
|
}
|
|
73
|
-
|
|
74
65
|
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
75
|
-
|
|
76
66
|
_defineProperty(_assertThisInitialized(_this), "onOpenChange", function (openKeys) {
|
|
77
67
|
var onOpenChange = _this.props.onOpenChange;
|
|
78
|
-
|
|
79
68
|
if (onOpenChange) {
|
|
80
69
|
onOpenChange(openKeys);
|
|
81
70
|
}
|
|
82
71
|
});
|
|
83
|
-
|
|
84
72
|
_defineProperty(_assertThisInitialized(_this), "toIcon", function (type) {
|
|
85
73
|
if (type) {
|
|
86
74
|
return /*#__PURE__*/React.createElement(SuperIcon, {
|
|
@@ -94,16 +82,14 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
94
82
|
return null;
|
|
95
83
|
}
|
|
96
84
|
});
|
|
97
|
-
|
|
98
85
|
_defineProperty(_assertThisInitialized(_this), "toItem", function (_ref) {
|
|
99
86
|
var key = _ref.key,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
87
|
+
title = _ref.title,
|
|
88
|
+
isFolder = _ref.isFolder,
|
|
89
|
+
children = _ref.children,
|
|
90
|
+
href = _ref.href,
|
|
91
|
+
icon = _ref.icon,
|
|
92
|
+
unreadTotal = _ref.unreadTotal;
|
|
107
93
|
if (isFolder) {
|
|
108
94
|
var t = /*#__PURE__*/React.createElement("div", null, _this.toIcon(icon), title);
|
|
109
95
|
return /*#__PURE__*/React.createElement(SubMenu, {
|
|
@@ -122,17 +108,15 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
122
108
|
}, unreadTotal)));
|
|
123
109
|
}
|
|
124
110
|
});
|
|
125
|
-
|
|
126
111
|
_defineProperty(_assertThisInitialized(_this), "toItems", function (items) {
|
|
127
112
|
return _mapInstanceProperty(items).call(items, _this.toItem);
|
|
128
113
|
});
|
|
129
|
-
|
|
130
114
|
_defineProperty(_assertThisInitialized(_this), "getProps", function () {
|
|
131
115
|
var _this$props = _this.props,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
116
|
+
style = _this$props.style,
|
|
117
|
+
activeKey = _this$props.activeKey,
|
|
118
|
+
_this$props$openKeys = _this$props.openKeys,
|
|
119
|
+
openKeys = _this$props$openKeys === void 0 ? [] : _this$props$openKeys;
|
|
136
120
|
return {
|
|
137
121
|
style: style,
|
|
138
122
|
openKeys: openKeys,
|
|
@@ -142,24 +126,19 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
142
126
|
className: variables('Sidebar')
|
|
143
127
|
};
|
|
144
128
|
});
|
|
145
|
-
|
|
146
129
|
return _this;
|
|
147
130
|
}
|
|
148
|
-
|
|
149
131
|
_createClass(Sidebar, [{
|
|
150
132
|
key: "render",
|
|
151
133
|
value: function render() {
|
|
152
134
|
return /*#__PURE__*/React.createElement(_Menu, this.getProps(), this.toItems(this.props.items));
|
|
153
135
|
}
|
|
154
136
|
}]);
|
|
155
|
-
|
|
156
137
|
return Sidebar;
|
|
157
138
|
}(React.Component);
|
|
158
|
-
|
|
159
139
|
_defineProperty(Sidebar, "propTypes", {
|
|
160
140
|
activeKey: PropTypes.string.isRequired,
|
|
161
141
|
items: PropTypes.arrayOf(PropTypes.shape(ItemType)).isRequired,
|
|
162
142
|
style: PropTypes.object
|
|
163
143
|
});
|
|
164
|
-
|
|
165
144
|
export default Sidebar;
|
package/es/Sidebar2/Sidebar.js
CHANGED
|
@@ -13,27 +13,25 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
|
|
|
13
13
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
14
14
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
15
15
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
16
|
-
|
|
17
16
|
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); }; }
|
|
18
|
-
|
|
19
17
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
-
|
|
21
18
|
import React from 'react';
|
|
22
19
|
import PropTypes from 'prop-types';
|
|
23
20
|
import Link from '../Link';
|
|
24
21
|
import variables from '../variables';
|
|
25
22
|
var ITEM_HEIGHT = 40;
|
|
23
|
+
|
|
26
24
|
/** 侧边栏二级条目的类型
|
|
27
25
|
* key: 唯一标识一个条目
|
|
28
26
|
* title:条目的标题
|
|
29
27
|
* href: 为跳转页面的url
|
|
30
28
|
*/
|
|
31
|
-
|
|
32
29
|
var ChildType = {
|
|
33
30
|
key: PropTypes.string.isRequired,
|
|
34
31
|
title: PropTypes.string.isRequired,
|
|
35
32
|
href: PropTypes.string.isRequired
|
|
36
33
|
};
|
|
34
|
+
|
|
37
35
|
/** 侧边栏一级条目的类型
|
|
38
36
|
* key: 唯一标识一个条目
|
|
39
37
|
* title:条目的标题
|
|
@@ -41,7 +39,6 @@ var ChildType = {
|
|
|
41
39
|
* href: isFolder为false时,为跳转页面的url,否则被忽略
|
|
42
40
|
* children:isFolder为true时,存放下级菜单的信息,否则被忽略
|
|
43
41
|
*/
|
|
44
|
-
|
|
45
42
|
var ItemType = {
|
|
46
43
|
key: PropTypes.string.isRequired,
|
|
47
44
|
title: PropTypes.string.isRequired,
|
|
@@ -49,6 +46,7 @@ var ItemType = {
|
|
|
49
46
|
href: PropTypes.string,
|
|
50
47
|
children: PropTypes.arrayOf(PropTypes.shape(ChildType))
|
|
51
48
|
};
|
|
49
|
+
|
|
52
50
|
/**
|
|
53
51
|
* title: 侧边栏的标题
|
|
54
52
|
* mode: 显示模式,默认为expand(展开)
|
|
@@ -59,41 +57,28 @@ var ItemType = {
|
|
|
59
57
|
* onOpenChange: 展开条目信息改变时触发,原型为func(openKeys)
|
|
60
58
|
* onModeChange: 模式改变时触发,原型为func(mode)
|
|
61
59
|
*/
|
|
62
|
-
|
|
63
60
|
var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
64
61
|
_inherits(Sidebar, _React$Component);
|
|
65
|
-
|
|
66
62
|
var _super = _createSuper(Sidebar);
|
|
67
|
-
|
|
68
63
|
function Sidebar() {
|
|
69
64
|
var _context;
|
|
70
|
-
|
|
71
65
|
var _this;
|
|
72
|
-
|
|
73
66
|
_classCallCheck(this, Sidebar);
|
|
74
|
-
|
|
75
67
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
76
68
|
args[_key] = arguments[_key];
|
|
77
69
|
}
|
|
78
|
-
|
|
79
70
|
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
80
|
-
|
|
81
71
|
_defineProperty(_assertThisInitialized(_this), "onModeChange", function () {
|
|
82
72
|
var mode = _this.props.mode || 'expand';
|
|
83
|
-
|
|
84
73
|
_this.props.onModeChange(mode === 'expand' ? 'collapse' : 'expand');
|
|
85
74
|
});
|
|
86
|
-
|
|
87
75
|
_defineProperty(_assertThisInitialized(_this), "isSelect", function (item) {
|
|
88
76
|
return _this.props.activeKey === item.key;
|
|
89
77
|
});
|
|
90
|
-
|
|
91
78
|
_defineProperty(_assertThisInitialized(_this), "isOpen", function (item) {
|
|
92
79
|
var _context2;
|
|
93
|
-
|
|
94
80
|
return _includesInstanceProperty(_context2 = _this.props.openKeys).call(_context2, item.key);
|
|
95
81
|
});
|
|
96
|
-
|
|
97
82
|
_defineProperty(_assertThisInitialized(_this), "getHeight", function (item) {
|
|
98
83
|
if (item.isFolder && _this.isOpen(item)) {
|
|
99
84
|
return (item.children.length + 1) * ITEM_HEIGHT;
|
|
@@ -101,7 +86,6 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
101
86
|
return ITEM_HEIGHT;
|
|
102
87
|
}
|
|
103
88
|
});
|
|
104
|
-
|
|
105
89
|
_defineProperty(_assertThisInitialized(_this), "linkProps", function (item) {
|
|
106
90
|
if (item.isFolder) {
|
|
107
91
|
return {
|
|
@@ -109,13 +93,11 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
109
93
|
onClick: function onClick() {
|
|
110
94
|
if (_this.isOpen(item)) {
|
|
111
95
|
var _context3;
|
|
112
|
-
|
|
113
96
|
_this.props.onOpenChange(_filterInstanceProperty(_context3 = _this.props.openKeys).call(_context3, function (key) {
|
|
114
97
|
return item.key !== key;
|
|
115
98
|
}));
|
|
116
99
|
} else {
|
|
117
100
|
var _context4;
|
|
118
|
-
|
|
119
101
|
_this.props.onOpenChange(_concatInstanceProperty(_context4 = []).call(_context4, _toConsumableArray(_this.props.openKeys), [item.key]));
|
|
120
102
|
}
|
|
121
103
|
}
|
|
@@ -128,7 +110,6 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
128
110
|
};
|
|
129
111
|
}
|
|
130
112
|
});
|
|
131
|
-
|
|
132
113
|
_defineProperty(_assertThisInitialized(_this), "renderChild", function (item, index) {
|
|
133
114
|
return /*#__PURE__*/React.createElement("li", {
|
|
134
115
|
key: index
|
|
@@ -138,10 +119,8 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
138
119
|
className: variables('Sidebar2').unreadTotal
|
|
139
120
|
}, item.unreadTotal)));
|
|
140
121
|
});
|
|
141
|
-
|
|
142
122
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, index) {
|
|
143
123
|
var _context5;
|
|
144
|
-
|
|
145
124
|
return /*#__PURE__*/React.createElement("li", {
|
|
146
125
|
key: index,
|
|
147
126
|
style: {
|
|
@@ -154,15 +133,12 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
154
133
|
"data-open": _this.isOpen(item)
|
|
155
134
|
}) : null), /*#__PURE__*/React.createElement("span", null, item.title)), item.isFolder && _this.isOpen(item) ? /*#__PURE__*/React.createElement("ul", null, _mapInstanceProperty(_context5 = item.children).call(_context5, _this.renderChild)) : null);
|
|
156
135
|
});
|
|
157
|
-
|
|
158
136
|
return _this;
|
|
159
137
|
}
|
|
160
|
-
|
|
161
138
|
_createClass(Sidebar, [{
|
|
162
139
|
key: "render",
|
|
163
140
|
value: function render() {
|
|
164
141
|
var _context6;
|
|
165
|
-
|
|
166
142
|
return /*#__PURE__*/React.createElement("div", {
|
|
167
143
|
className: variables('Sidebar2'),
|
|
168
144
|
"data-mode": this.props.mode || 'expand'
|
|
@@ -174,10 +150,8 @@ var Sidebar = /*#__PURE__*/function (_React$Component) {
|
|
|
174
150
|
})))));
|
|
175
151
|
}
|
|
176
152
|
}]);
|
|
177
|
-
|
|
178
153
|
return Sidebar;
|
|
179
154
|
}(React.Component);
|
|
180
|
-
|
|
181
155
|
_defineProperty(Sidebar, "propTypes", {
|
|
182
156
|
title: PropTypes.string,
|
|
183
157
|
mode: PropTypes.oneOf(['collapse', 'expand']),
|
|
@@ -188,5 +162,4 @@ _defineProperty(Sidebar, "propTypes", {
|
|
|
188
162
|
onOpenChange: PropTypes.func,
|
|
189
163
|
onModeChange: PropTypes.func
|
|
190
164
|
});
|
|
191
|
-
|
|
192
165
|
export default Sidebar;
|