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
@@ -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
- title = _ref.title,
101
- isFolder = _ref.isFolder,
102
- children = _ref.children,
103
- href = _ref.href,
104
- icon = _ref.icon,
105
- unreadTotal = _ref.unreadTotal;
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
- style = _this$props.style,
133
- activeKey = _this$props.activeKey,
134
- _this$props$openKeys = _this$props.openKeys,
135
- openKeys = _this$props$openKeys === void 0 ? [] : _this$props$openKeys;
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;
@@ -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;