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