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
package/es/Area/Area.js CHANGED
@@ -15,15 +15,10 @@ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
15
15
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
16
16
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
17
17
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
18
-
19
18
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20
-
21
19
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
22
-
23
20
  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); }; }
24
-
25
21
  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; } }
26
-
27
22
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
28
23
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
29
24
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
@@ -39,77 +34,60 @@ var PROPS = {
39
34
  onParentChange: PropTypes.func,
40
35
  child: PropTypes.Array
41
36
  };
42
-
43
37
  var PROPS_KEYS = _Object$keys(PROPS);
44
-
45
38
  var Area = /*#__PURE__*/function (_React$Component) {
46
39
  _inherits(Area, _React$Component);
47
-
48
40
  var _super = _createSuper(Area);
49
-
50
41
  function Area(props) {
51
42
  var _this;
52
-
53
43
  _classCallCheck(this, Area);
54
-
55
44
  _this = _super.call(this, props);
56
-
57
45
  _defineProperty(_assertThisInitialized(_this), "onChange", function (key, keyValue) {
58
46
  var _this$props = _this.props,
59
- onParentChange = _this$props.onParentChange,
60
- child = _this$props.child,
61
- _this$props$value = _this$props.value,
62
- value = _this$props$value === void 0 ? {} : _this$props$value;
47
+ onParentChange = _this$props.onParentChange,
48
+ child = _this$props.child,
49
+ _this$props$value = _this$props.value,
50
+ value = _this$props$value === void 0 ? {} : _this$props$value;
63
51
  var newValue = {};
64
52
  newValue[key] = keyValue;
65
53
  var CheckValue, checkIndex;
66
-
67
54
  _mapInstanceProperty(child).call(child, function (item, index) {
68
55
  if (item.key === key) {
69
56
  checkIndex = index;
70
57
  }
71
-
72
58
  CheckValue = index > checkIndex ? '' : value[item.key];
73
59
  newValue[item.key] = item.key === key ? keyValue : CheckValue;
74
60
  });
75
-
76
61
  _this.setState({
77
62
  value: _objectSpread(_objectSpread({}, _this.state.value), newValue)
78
63
  }, function () {
79
64
  return onParentChange && onParentChange(_this.state.value);
80
65
  });
81
66
  });
82
-
83
67
  _defineProperty(_assertThisInitialized(_this), "onSearch", function (key, control, parentKey, KeyValue) {
84
68
  var _this$props2 = _this.props,
85
- onAreaSearch = _this$props2.onAreaSearch,
86
- child = _this$props2.child,
87
- _this$props2$value = _this$props2.value,
88
- value = _this$props2$value === void 0 ? {} : _this$props2$value;
69
+ onAreaSearch = _this$props2.onAreaSearch,
70
+ child = _this$props2.child,
71
+ _this$props2$value = _this$props2.value,
72
+ value = _this$props2$value === void 0 ? {} : _this$props2$value;
89
73
  var flag = true;
90
-
91
74
  _mapInstanceProperty(child).call(child, function (item, index) {
92
75
  if (item.key === key && index !== 0) {
93
76
  var upKey = child[index - 1].key;
94
-
95
77
  if (index !== 0 && (helper.isEmpty2(value[upKey]) || _Object$keys(value[upKey]).length === 0)) {
96
78
  flag = false;
97
79
  }
98
-
99
80
  ;
100
81
  }
101
82
  });
102
-
103
83
  return flag ? onAreaSearch && onAreaSearch(key, KeyValue, parentKey) : helper.showError('请输入上级选择器');
104
84
  });
105
-
106
85
  _this.state = {
107
86
  value: props.value || {},
108
87
  options: props.options || {}
109
88
  };
110
89
  return _this;
111
90
  }
112
-
113
91
  _createClass(Area, [{
114
92
  key: "componentWillReceiveProps",
115
93
  value: function componentWillReceiveProps(props) {
@@ -123,21 +101,18 @@ var Area = /*#__PURE__*/function (_React$Component) {
123
101
  key: "render",
124
102
  value: function render() {
125
103
  var _this2 = this;
126
-
127
104
  var _this$props3 = this.props,
128
- child = _this$props3.child,
129
- parentKey = _this$props3.parentKey,
130
- _this$props3$options = _this$props3.options,
131
- options = _this$props3$options === void 0 ? {} : _this$props3$options,
132
- _this$props3$readonly = _this$props3.readonly,
133
- readonly = _this$props3$readonly === void 0 ? false : _this$props3$readonly,
134
- _this$props3$value = _this$props3.value,
135
- value = _this$props3$value === void 0 ? {} : _this$props3$value;
105
+ child = _this$props3.child,
106
+ parentKey = _this$props3.parentKey,
107
+ _this$props3$options = _this$props3.options,
108
+ options = _this$props3$options === void 0 ? {} : _this$props3$options,
109
+ _this$props3$readonly = _this$props3.readonly,
110
+ readonly = _this$props3$readonly === void 0 ? false : _this$props3$readonly,
111
+ _this$props3$value = _this$props3.value,
112
+ value = _this$props3$value === void 0 ? {} : _this$props3$value;
136
113
  return /*#__PURE__*/React.createElement(_Row, null, _mapInstanceProperty(child).call(child, function (item, index) {
137
114
  var _context, _context2, _context3;
138
-
139
115
  var childOptions = [];
140
-
141
116
  if (_includesInstanceProperty(_context = _Object$keys(options)).call(_context, item.key)) {
142
117
  if (index === 0) {
143
118
  childOptions = options[item.key];
@@ -146,7 +121,6 @@ var Area = /*#__PURE__*/function (_React$Component) {
146
121
  childOptions = helper.isEmpty2(value[upKey]) || _Object$keys(value[upKey]).length === 0 ? [] : options[item.key];
147
122
  }
148
123
  }
149
-
150
124
  var props = _objectSpread(_objectSpread({}, item), {}, {
151
125
  onSearch: _bindInstanceProperty(_context2 = _this2.onSearch).call(_context2, _this2, item.key, item, parentKey),
152
126
  onChange: _bindInstanceProperty(_context3 = _this2.onChange).call(_context3, _this2, item.key),
@@ -155,7 +129,6 @@ var Area = /*#__PURE__*/function (_React$Component) {
155
129
  type: readonly ? 'readonly' : item.type,
156
130
  searchWhenClick: true
157
131
  });
158
-
159
132
  return /*#__PURE__*/React.createElement(_Col, {
160
133
  span: 24 / child.length,
161
134
  key: item.key
@@ -163,8 +136,6 @@ var Area = /*#__PURE__*/function (_React$Component) {
163
136
  }));
164
137
  }
165
138
  }]);
166
-
167
139
  return Area;
168
140
  }(React.Component);
169
-
170
141
  export default Area;
package/es/Card/Card.js CHANGED
@@ -5,10 +5,9 @@ import React from 'react';
5
5
  import classNames from 'classnames';
6
6
  var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
7
7
  var children = _ref.children,
8
- className = _ref.className,
9
- noPadding = _ref.noPadding,
10
- other = _objectWithoutProperties(_ref, _excluded);
11
-
8
+ className = _ref.className,
9
+ noPadding = _ref.noPadding,
10
+ other = _objectWithoutProperties(_ref, _excluded);
12
11
  var padding = !noPadding ? true : null;
13
12
  return /*#__PURE__*/React.createElement("div", _extends({
14
13
  className: classNames('pld-card', className),
@@ -16,17 +16,11 @@ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
16
16
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
17
17
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
18
18
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
19
-
20
19
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21
-
22
20
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
23
-
24
21
  import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
25
-
26
22
  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); }; }
27
-
28
23
  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; } }
29
-
30
24
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
31
25
  import _setInterval from "@babel/runtime-corejs3/core-js-stable/set-interval";
32
26
  import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
@@ -46,97 +40,76 @@ var PROPS = {
46
40
  onSelect: PropTypes.func,
47
41
  onSearch: PropTypes.func
48
42
  };
49
-
50
43
  var PROPS_KEYS = _Object$keys(PROPS);
51
-
52
44
  var CodeInput = /*#__PURE__*/function (_React$Component) {
53
45
  _inherits(CodeInput, _React$Component);
54
-
55
46
  var _super = _createSuper(CodeInput);
56
-
57
47
  function CodeInput(_props) {
58
48
  var _this;
59
-
60
49
  _classCallCheck(this, CodeInput);
61
-
62
50
  _this = _super.call(this, _props);
63
-
64
51
  _defineProperty(_assertThisInitialized(_this), "onGetCode", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
65
52
  var onGetCode, that, s;
66
53
  return _regeneratorRuntime.wrap(function _callee$(_context) {
67
- while (1) {
68
- switch (_context.prev = _context.next) {
69
- case 0:
70
- // const url = await helper.fetchJson();
71
- onGetCode = _this.props.onGetCode;
72
- _context.next = 3;
73
- return onGetCode && onGetCode();
74
-
75
- case 3:
76
- if (!_context.sent) {
77
- _context.next = 7;
78
- break;
79
- }
80
-
81
- _this.setState({
82
- time: _this.props.time || 60
54
+ while (1) switch (_context.prev = _context.next) {
55
+ case 0:
56
+ // const url = await helper.fetchJson();
57
+ onGetCode = _this.props.onGetCode;
58
+ _context.next = 3;
59
+ return onGetCode && onGetCode();
60
+ case 3:
61
+ if (!_context.sent) {
62
+ _context.next = 7;
63
+ break;
64
+ }
65
+ _this.setState({
66
+ time: _this.props.time || 60
67
+ });
68
+ that = _assertThisInitialized(_this);
69
+ s = _setInterval(function () {
70
+ that.setState({
71
+ time: that.state.time -= 1
83
72
  });
84
-
85
- that = _assertThisInitialized(_this);
86
- s = _setInterval(function () {
87
- that.setState({
88
- time: that.state.time -= 1
89
- });
90
-
91
- if (that.state.time === 0) {
92
- clearInterval(s);
93
- }
94
- }, 1000);
95
-
96
- case 7:
97
- ;
98
-
99
- case 8:
100
- case "end":
101
- return _context.stop();
102
- }
73
+ if (that.state.time === 0) {
74
+ clearInterval(s);
75
+ }
76
+ }, 1000);
77
+ case 7:
78
+ ;
79
+ case 8:
80
+ case "end":
81
+ return _context.stop();
103
82
  }
104
83
  }, _callee);
105
84
  })));
106
-
107
85
  _defineProperty(_assertThisInitialized(_this), "btnProps", function (props) {
108
86
  var btnProps = _Object$assign(helper.getObjectExclude(props, ['onGetCode']));
109
-
110
87
  return _objectSpread(_objectSpread({}, btnProps), {}, {
111
88
  size: 'large',
112
89
  disabled: _this.state.time !== 0,
113
90
  onClick: _this.onGetCode
114
91
  });
115
92
  });
116
-
117
93
  _defineProperty(_assertThisInitialized(_this), "inputProps", function (props) {
118
94
  var inpPros = _Object$assign(helper.getObjectExclude(props, ['onGetCode', 'value']));
119
-
120
95
  return _objectSpread(_objectSpread({}, inpPros), {}, {
121
96
  size: 'large',
122
97
  defaultValue: props.value || ''
123
98
  });
124
99
  });
125
-
126
100
  _this.state = {
127
101
  value: _props.value,
128
102
  time: 0
129
103
  };
130
104
  return _this;
131
105
  }
132
-
133
106
  _createClass(CodeInput, [{
134
107
  key: "render",
135
108
  value: function render() {
136
109
  var _this$props = this.props,
137
- inputKey = _this$props.inputKey,
138
- readonly = _this$props.readonly,
139
- value = _this$props.value;
110
+ inputKey = _this$props.inputKey,
111
+ readonly = _this$props.readonly,
112
+ value = _this$props.value;
140
113
  var time = this.state.time;
141
114
  return /*#__PURE__*/React.createElement("div", {
142
115
  style: {
@@ -145,8 +118,6 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
145
118
  }, /*#__PURE__*/React.createElement(_Input, this.inputProps(this.props)), /*#__PURE__*/React.createElement(_Button, this.btnProps(this.props), time === 0 ? "\u83B7\u53D6\u9A8C\u8BC1\u7801" : "".concat(time, "s\u83B7\u53D6\u9A8C\u8BC1\u7801")));
146
119
  }
147
120
  }]);
148
-
149
121
  return CodeInput;
150
122
  }(React.Component);
151
-
152
123
  export default CodeInput;