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
@@ -14,80 +14,68 @@ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
14
14
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
15
15
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
16
16
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
17
-
18
17
  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; }
19
-
20
18
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
21
-
22
19
  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); }; }
23
-
24
20
  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; } }
25
-
26
21
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
27
22
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
28
23
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
29
24
  import React from 'react';
30
25
  import PropTypes from 'prop-types';
31
26
  import { getObjectExclude } from '../helper';
32
-
33
27
  var parseNumber = function parseNumber(value, _ref) {
34
28
  var _context;
35
-
36
29
  var real = _ref.real,
37
- sign = _ref.sign,
38
- zero = _ref.zero,
39
- precision = _ref.precision,
40
- fixed = _ref.fixed,
41
- big = _ref.big;
30
+ sign = _ref.sign,
31
+ zero = _ref.zero,
32
+ precision = _ref.precision,
33
+ fixed = _ref.fixed,
34
+ big = _ref.big;
42
35
  var invalid = {
43
36
  invalid: true,
44
37
  value: ''
45
38
  };
46
-
47
39
  if (value === '') {
48
40
  return {
49
41
  value: value
50
42
  };
51
- } // 非数字
52
-
43
+ }
53
44
 
45
+ // 非数字
54
46
  value = big ? value : Number(value);
55
-
56
47
  if (isNaN(value)) {
57
48
  return invalid;
58
- } // 不能为实数,却包含小数点
59
-
49
+ }
60
50
 
51
+ // 不能为实数,却包含小数点
61
52
  if (!real && _includesInstanceProperty(_context = String(value)).call(_context, '.')) {
62
53
  return invalid;
63
- } // 不能为负数,却小于0
64
-
54
+ }
65
55
 
56
+ // 不能为负数,却小于0
66
57
  if (!sign && value < 0) {
67
58
  return invalid;
68
- } // 不能为0,却为0
69
-
59
+ }
70
60
 
61
+ // 不能为0,却为0
71
62
  if (!zero && value === 0) {
72
63
  return invalid;
73
64
  }
74
-
75
65
  if (real) {
76
66
  precision = Number(precision);
77
-
78
67
  if (precision) {
79
68
  value = value.toFixed(precision);
80
-
81
69
  if (!fixed) {
82
70
  value = Number(value);
83
71
  }
84
72
  }
85
73
  }
86
-
87
74
  return {
88
75
  value: value
89
76
  };
90
77
  };
78
+
91
79
  /**
92
80
  * real: true表示带小数点,默认为false
93
81
  * sign: true表示带正负号,默认为false
@@ -96,8 +84,6 @@ var parseNumber = function parseNumber(value, _ref) {
96
84
  * fixed: real为true时生效; true表示固定显示指定精度的小数,精度由precision确定,默认值为false
97
85
  * big: big为ture时生效; true标识为大数值,与上面所有属性互斥
98
86
  */
99
-
100
-
101
87
  var PROPS = {
102
88
  defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
103
89
  real: PropTypes.bool,
@@ -110,35 +96,24 @@ var PROPS = {
110
96
  onChange: PropTypes.func,
111
97
  onBlur: PropTypes.func
112
98
  };
113
-
114
99
  var PROPS_KEYS = _Object$keys(PROPS);
115
-
116
100
  var NumberInput = /*#__PURE__*/function (_React$Component) {
117
101
  _inherits(NumberInput, _React$Component);
118
-
119
102
  var _super = _createSuper(NumberInput);
120
-
121
103
  function NumberInput() {
122
104
  var _context2;
123
-
124
105
  var _this;
125
-
126
106
  _classCallCheck(this, NumberInput);
127
-
128
107
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
129
108
  args[_key] = arguments[_key];
130
109
  }
131
-
132
110
  _this = _super.call.apply(_super, _concatInstanceProperty(_context2 = [this]).call(_context2, args));
133
-
134
111
  _defineProperty(_assertThisInitialized(_this), "state", {
135
112
  typo: false,
136
113
  value: ''
137
114
  });
138
-
139
115
  _defineProperty(_assertThisInitialized(_this), "onChange", function (event) {
140
116
  var value = event.target.value;
141
-
142
117
  if (!_this.hasSpecialChar(value)) {
143
118
  _this.setState({
144
119
  value: value,
@@ -146,31 +121,25 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
146
121
  });
147
122
  }
148
123
  });
149
-
150
124
  _defineProperty(_assertThisInitialized(_this), "onBlur", function (event) {
151
125
  var _this$props = _this.props,
152
- onBlur = _this$props.onBlur,
153
- onChange = _this$props.onChange,
154
- fixed = _this$props.fixed;
155
-
126
+ onBlur = _this$props.onBlur,
127
+ onChange = _this$props.onChange,
128
+ fixed = _this$props.fixed;
156
129
  if (_this.state.typo) {
157
130
  var _this$format = _this.format(_this.state.value, fixed),
158
- invalid = _this$format.invalid,
159
- value = _this$format.value;
160
-
131
+ invalid = _this$format.invalid,
132
+ value = _this$format.value;
161
133
  _this.setState({
162
134
  typo: false,
163
135
  value: ''
164
136
  });
165
-
166
137
  if (!invalid) {
167
138
  onChange && onChange(value);
168
139
  }
169
-
170
140
  onBlur && onBlur(event); //有输入才触发外部失去焦点事件,避免非必要请求
171
141
  }
172
142
  });
173
-
174
143
  _defineProperty(_assertThisInitialized(_this), "hasSpecialChar", function (value) {
175
144
  if (_includesInstanceProperty(value).call(value, '+')) {
176
145
  return true;
@@ -180,14 +149,13 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
180
149
  return !_this.props.real && _includesInstanceProperty(value).call(value, '.');
181
150
  }
182
151
  });
183
-
184
152
  _defineProperty(_assertThisInitialized(_this), "format", function (value, fixed) {
185
153
  var _this$props2 = _this.props,
186
- real = _this$props2.real,
187
- sign = _this$props2.sign,
188
- zero = _this$props2.zero,
189
- precision = _this$props2.precision,
190
- big = _this$props2.big;
154
+ real = _this$props2.real,
155
+ sign = _this$props2.sign,
156
+ zero = _this$props2.zero,
157
+ precision = _this$props2.precision,
158
+ big = _this$props2.big;
191
159
  return parseNumber(value, {
192
160
  real: real,
193
161
  sign: sign,
@@ -197,7 +165,6 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
197
165
  big: big
198
166
  });
199
167
  });
200
-
201
168
  _defineProperty(_assertThisInitialized(_this), "getShowValue", function () {
202
169
  if (_this.state.typo) {
203
170
  // 处于输入状态从state中取值
@@ -207,7 +174,6 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
207
174
  return _this.format(_this.props.defaultValue, _this.props.fixed).value;
208
175
  }
209
176
  });
210
-
211
177
  _defineProperty(_assertThisInitialized(_this), "getProps", function () {
212
178
  var props = getObjectExclude(_this.props, PROPS_KEYS);
213
179
  return _objectSpread(_objectSpread({}, props), {}, {
@@ -218,20 +184,15 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
218
184
  onBlur: _this.onBlur
219
185
  });
220
186
  });
221
-
222
187
  return _this;
223
188
  }
224
-
225
189
  _createClass(NumberInput, [{
226
190
  key: "render",
227
191
  value: function render() {
228
192
  return /*#__PURE__*/React.createElement(_Input, this.getProps());
229
193
  }
230
194
  }]);
231
-
232
195
  return NumberInput;
233
196
  }(React.Component);
234
-
235
197
  _defineProperty(NumberInput, "propTypes", PROPS);
236
-
237
198
  export default NumberInput;