cloud-b2b 1.0.0 → 1.0.3

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 (208) hide show
  1. package/es/Area/Area.js +166 -0
  2. package/es/Area/package.json +6 -0
  3. package/es/Card/Card.js +20 -0
  4. package/es/Card/package.json +6 -0
  5. package/es/Control/Control.js +428 -0
  6. package/es/Control/event.js +57 -0
  7. package/es/Control/package.json +6 -0
  8. package/es/Enhance/Dialogs.js +67 -0
  9. package/es/Enhance/Loading.js +151 -0
  10. package/es/Enhance/index.js +8 -0
  11. package/es/Enhance/package.json +6 -0
  12. package/es/Header/Header.js +194 -0
  13. package/es/Header/Header.less +95 -0
  14. package/es/Header/Vertical.js +129 -0
  15. package/es/Header/Vertical.less +60 -0
  16. package/es/Header/package.json +6 -0
  17. package/es/HomeHeader/Header.js +75 -0
  18. package/es/HomeHeader/Header.less +73 -0
  19. package/es/HomeHeader/package.json +6 -0
  20. package/es/ImageView/ImageView.js +117 -0
  21. package/es/ImageView/ImageView.less +14 -0
  22. package/es/ImageView/package.json +6 -0
  23. package/es/InpurCascader/InputCascader.js +135 -0
  24. package/es/InpurCascader/package.json +6 -0
  25. package/es/InputEditor/InputEditor.js +118 -0
  26. package/es/InputEditor/inputEditor.less +8 -0
  27. package/es/InputEditor/package.json +6 -0
  28. package/es/InputSearch/InputSearch.js +306 -0
  29. package/es/InputSearch/package.json +6 -0
  30. package/es/InputSelect/InputSelect.js +185 -0
  31. package/es/InputSelect/package.json +6 -0
  32. package/es/InputWriting/InputWriting.js +107 -0
  33. package/es/InputWriting/package.json +6 -0
  34. package/es/Layout/Layout.js +232 -0
  35. package/es/Layout/Layout.less +28 -0
  36. package/es/Layout/package.json +6 -0
  37. package/es/LayoutLink/LayoutLink.js +82 -0
  38. package/es/LayoutLink/LayoutLink.less +53 -0
  39. package/es/LayoutLink/package.json +6 -0
  40. package/es/Link/Link.js +108 -0
  41. package/es/Link/package.json +6 -0
  42. package/es/Loading/Loading.js +15 -0
  43. package/es/Loading/Loading.less +13 -0
  44. package/es/Loading/package.json +6 -0
  45. package/es/Loading2/Loading2.js +11 -0
  46. package/es/Loading2/Loading2.less +19 -0
  47. package/es/Loading2/package.json +6 -0
  48. package/es/ModalWithDrag/ModalWithDrag.js +34 -0
  49. package/es/ModalWithDrag/ModalWithDrag.less +6 -0
  50. package/es/ModalWithDrag/drag.js +133 -0
  51. package/es/ModalWithDrag/package.json +6 -0
  52. package/es/NumberInput/NumberInput.js +237 -0
  53. package/es/NumberInput/package.json +6 -0
  54. package/es/Search/Search.js +581 -0
  55. package/es/Search/Search.less +63 -0
  56. package/es/Search/package.json +6 -0
  57. package/es/Sidebar/Sidebar.js +165 -0
  58. package/es/Sidebar/Sidebar.less +78 -0
  59. package/es/Sidebar/package.json +6 -0
  60. package/es/Sidebar2/Sidebar.js +192 -0
  61. package/es/Sidebar2/Sidebar.less +153 -0
  62. package/es/Sidebar2/package.json +6 -0
  63. package/es/SuperForm/SuperForm.js +688 -0
  64. package/es/SuperForm/SuperForm.less +52 -0
  65. package/es/SuperForm/package.json +6 -0
  66. package/es/SuperIcon/SuperIcon.js +30 -0
  67. package/es/SuperIcon/package.json +6 -0
  68. package/es/SuperPagination/SuperPagination.js +126 -0
  69. package/es/SuperPagination/package.json +6 -0
  70. package/es/SuperTable/DragSortRow.js +125 -0
  71. package/es/SuperTable/DragSortRow.less +17 -0
  72. package/es/SuperTable/FilterDropDown.js +188 -0
  73. package/es/SuperTable/FilterDropDown.less +30 -0
  74. package/es/SuperTable/SuperTable.js +933 -0
  75. package/es/SuperTable/SuperTable.less +135 -0
  76. package/es/SuperTable/fixed.js +42 -0
  77. package/es/SuperTable/package.json +6 -0
  78. package/es/SuperTable2/SuperTable2.js +700 -0
  79. package/es/SuperTable2/SuperTable2.less +100 -0
  80. package/es/SuperTable2/SuperTableCell.js +215 -0
  81. package/es/SuperTable2/package.json +6 -0
  82. package/es/SuperToolbar/SuperToolbar.js +223 -0
  83. package/es/SuperToolbar/SuperToolbar.less +17 -0
  84. package/es/SuperToolbar/package.json +6 -0
  85. package/es/SuperUpload/SuperUpload.js +282 -0
  86. package/es/SuperUpload/SuperUpload.less +27 -0
  87. package/es/SuperUpload/package.json +6 -0
  88. package/es/Title/Title.less +35 -35
  89. package/es/Title/package.json +6 -6
  90. package/es/Viewer/ImageViews.js +311 -0
  91. package/es/Viewer/Viewer.js +149 -0
  92. package/es/Viewer/Viewer.less +67 -0
  93. package/es/Viewer/imgView.less +59 -0
  94. package/es/Viewer/package.json +7 -0
  95. package/es/WingBlank/WingBlank.js +20 -0
  96. package/es/WingBlank/WingBlank.less +12 -0
  97. package/es/WingBlank/package.json +6 -0
  98. package/es/adjust.less +89 -0
  99. package/es/helper.js +118 -0
  100. package/es/history.js +5 -0
  101. package/es/index.js +27 -1
  102. package/es/style.less +20 -1
  103. package/es/variables.less +73 -73
  104. package/lib/Area/Area.js +194 -0
  105. package/lib/Area/package.json +6 -0
  106. package/lib/Card/Card.js +38 -0
  107. package/lib/Card/package.json +6 -0
  108. package/lib/Control/Control.js +477 -0
  109. package/lib/Control/event.js +68 -0
  110. package/lib/Control/package.json +6 -0
  111. package/lib/Enhance/Dialogs.js +87 -0
  112. package/lib/Enhance/Loading.js +175 -0
  113. package/lib/Enhance/index.js +35 -0
  114. package/lib/Enhance/package.json +6 -0
  115. package/lib/Header/Header.js +215 -0
  116. package/lib/Header/Header.less +95 -0
  117. package/lib/Header/Vertical.js +150 -0
  118. package/lib/Header/Vertical.less +60 -0
  119. package/lib/Header/package.json +6 -0
  120. package/lib/HomeHeader/Header.js +95 -0
  121. package/lib/HomeHeader/Header.less +73 -0
  122. package/lib/HomeHeader/package.json +6 -0
  123. package/lib/ImageView/ImageView.js +134 -0
  124. package/lib/ImageView/ImageView.less +14 -0
  125. package/lib/ImageView/package.json +6 -0
  126. package/lib/InpurCascader/InputCascader.js +156 -0
  127. package/lib/InpurCascader/package.json +6 -0
  128. package/lib/InputEditor/InputEditor.js +136 -0
  129. package/lib/InputEditor/inputEditor.less +8 -0
  130. package/lib/InputEditor/package.json +6 -0
  131. package/lib/InputSearch/InputSearch.js +322 -0
  132. package/lib/InputSearch/package.json +6 -0
  133. package/lib/InputSelect/InputSelect.js +208 -0
  134. package/lib/InputSelect/package.json +6 -0
  135. package/lib/InputWriting/InputWriting.js +123 -0
  136. package/lib/InputWriting/package.json +6 -0
  137. package/lib/Layout/Layout.js +258 -0
  138. package/lib/Layout/Layout.less +28 -0
  139. package/lib/Layout/package.json +6 -0
  140. package/lib/LayoutLink/LayoutLink.js +114 -0
  141. package/lib/LayoutLink/LayoutLink.less +53 -0
  142. package/lib/LayoutLink/package.json +6 -0
  143. package/lib/Link/Link.js +130 -0
  144. package/lib/Link/package.json +6 -0
  145. package/lib/Loading/Loading.js +30 -0
  146. package/lib/Loading/Loading.less +13 -0
  147. package/lib/Loading/package.json +6 -0
  148. package/lib/Loading2/Loading2.js +26 -0
  149. package/lib/Loading2/Loading2.less +19 -0
  150. package/lib/Loading2/package.json +6 -0
  151. package/lib/ModalWithDrag/ModalWithDrag.js +53 -0
  152. package/lib/ModalWithDrag/ModalWithDrag.less +6 -0
  153. package/lib/ModalWithDrag/drag.js +147 -0
  154. package/lib/ModalWithDrag/package.json +6 -0
  155. package/lib/NumberInput/NumberInput.js +259 -0
  156. package/lib/NumberInput/package.json +6 -0
  157. package/lib/Search/Search.js +603 -0
  158. package/lib/Search/Search.less +63 -0
  159. package/lib/Search/package.json +6 -0
  160. package/lib/Sidebar/Sidebar.js +186 -0
  161. package/lib/Sidebar/Sidebar.less +78 -0
  162. package/lib/Sidebar/package.json +6 -0
  163. package/lib/Sidebar2/Sidebar.js +213 -0
  164. package/lib/Sidebar2/Sidebar.less +153 -0
  165. package/lib/Sidebar2/package.json +6 -0
  166. package/lib/SuperForm/SuperForm.js +702 -0
  167. package/lib/SuperForm/SuperForm.less +52 -0
  168. package/lib/SuperForm/package.json +6 -0
  169. package/lib/SuperIcon/SuperIcon.js +47 -0
  170. package/lib/SuperIcon/package.json +6 -0
  171. package/lib/SuperPagination/SuperPagination.js +145 -0
  172. package/lib/SuperPagination/package.json +6 -0
  173. package/lib/SuperTable/DragSortRow.js +142 -0
  174. package/lib/SuperTable/DragSortRow.less +17 -0
  175. package/lib/SuperTable/FilterDropDown.js +205 -0
  176. package/lib/SuperTable/FilterDropDown.less +30 -0
  177. package/lib/SuperTable/SuperTable.js +937 -0
  178. package/lib/SuperTable/SuperTable.less +135 -0
  179. package/lib/SuperTable/fixed.js +55 -0
  180. package/lib/SuperTable/package.json +6 -0
  181. package/lib/SuperTable2/SuperTable2.js +725 -0
  182. package/lib/SuperTable2/SuperTable2.less +100 -0
  183. package/lib/SuperTable2/SuperTableCell.js +231 -0
  184. package/lib/SuperTable2/package.json +6 -0
  185. package/lib/SuperToolbar/SuperToolbar.js +248 -0
  186. package/lib/SuperToolbar/SuperToolbar.less +17 -0
  187. package/lib/SuperToolbar/package.json +6 -0
  188. package/lib/SuperUpload/SuperUpload.js +324 -0
  189. package/lib/SuperUpload/SuperUpload.less +27 -0
  190. package/lib/SuperUpload/package.json +6 -0
  191. package/lib/Title/Title.less +35 -35
  192. package/lib/Title/package.json +6 -6
  193. package/lib/Viewer/ImageViews.js +323 -0
  194. package/lib/Viewer/Viewer.js +167 -0
  195. package/lib/Viewer/Viewer.less +67 -0
  196. package/lib/Viewer/imgView.less +59 -0
  197. package/lib/Viewer/package.json +7 -0
  198. package/lib/WingBlank/WingBlank.js +37 -0
  199. package/lib/WingBlank/WingBlank.less +12 -0
  200. package/lib/WingBlank/package.json +6 -0
  201. package/lib/adjust.less +89 -0
  202. package/lib/helper.js +147 -0
  203. package/lib/history.js +18 -0
  204. package/lib/index.js +235 -1
  205. package/lib/index.less +25 -1
  206. package/lib/style.less +20 -1
  207. package/lib/variables.less +73 -73
  208. package/package.json +3 -2
@@ -0,0 +1,259 @@
1
+ "use strict";
2
+
3
+ var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
4
+
5
+ var _Object$keys2 = require("@babel/runtime-corejs3/core-js-stable/object/keys");
6
+
7
+ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
8
+
9
+ var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
10
+
11
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
12
+
13
+ var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
14
+
15
+ var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
16
+
17
+ var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
18
+
19
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
20
+
21
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
22
+
23
+ _Object$defineProperty(exports, "__esModule", {
24
+ value: true
25
+ });
26
+
27
+ exports["default"] = void 0;
28
+
29
+ var _input = _interopRequireDefault(require("antd/lib/input"));
30
+
31
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
32
+
33
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
34
+
35
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
36
+
37
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
38
+
39
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
40
+
41
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
42
+
43
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
44
+
45
+ var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
46
+
47
+ var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
48
+
49
+ var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
50
+
51
+ var _react = _interopRequireDefault(require("react"));
52
+
53
+ var _propTypes = _interopRequireDefault(require("prop-types"));
54
+
55
+ var _helper = require("../helper");
56
+
57
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(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; }
58
+
59
+ 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) { (0, _defineProperty2["default"])(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; }
60
+
61
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
62
+
63
+ 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; } }
64
+
65
+ var parseNumber = function parseNumber(value, _ref) {
66
+ var _context;
67
+
68
+ var real = _ref.real,
69
+ sign = _ref.sign,
70
+ zero = _ref.zero,
71
+ precision = _ref.precision,
72
+ fixed = _ref.fixed,
73
+ big = _ref.big;
74
+ var invalid = {
75
+ invalid: true,
76
+ value: ''
77
+ };
78
+
79
+ if (value === '') {
80
+ return {
81
+ value: value
82
+ };
83
+ } // 非数字
84
+
85
+
86
+ value = big ? value : Number(value);
87
+
88
+ if (isNaN(value)) {
89
+ return invalid;
90
+ } // 不能为实数,却包含小数点
91
+
92
+
93
+ if (!real && (0, _includes["default"])(_context = String(value)).call(_context, '.')) {
94
+ return invalid;
95
+ } // 不能为负数,却小于0
96
+
97
+
98
+ if (!sign && value < 0) {
99
+ return invalid;
100
+ } // 不能为0,却为0
101
+
102
+
103
+ if (!zero && value === 0) {
104
+ return invalid;
105
+ }
106
+
107
+ if (real) {
108
+ precision = Number(precision);
109
+
110
+ if (precision) {
111
+ value = value.toFixed(precision);
112
+
113
+ if (!fixed) {
114
+ value = Number(value);
115
+ }
116
+ }
117
+ }
118
+
119
+ return {
120
+ value: value
121
+ };
122
+ };
123
+ /**
124
+ * real: true表示带小数点,默认为false
125
+ * sign: true表示带正负号,默认为false
126
+ * precision: real为true时,小数的精度;否则无效
127
+ * zero:true表示可以输入0,默认为false
128
+ * fixed: real为true时生效; true表示固定显示指定精度的小数,精度由precision确定,默认值为false
129
+ * big: big为ture时生效; true标识为大数值,与上面所有属性互斥
130
+ */
131
+
132
+
133
+ var PROPS = {
134
+ defaultValue: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
135
+ real: _propTypes["default"].bool,
136
+ sign: _propTypes["default"].bool,
137
+ precision: _propTypes["default"].any,
138
+ zero: _propTypes["default"].bool,
139
+ fixed: _propTypes["default"].bool,
140
+ big: _propTypes["default"].bool,
141
+ inputRef: _propTypes["default"].func,
142
+ onChange: _propTypes["default"].func,
143
+ onBlur: _propTypes["default"].func
144
+ };
145
+ var PROPS_KEYS = (0, _keys["default"])(PROPS);
146
+
147
+ var NumberInput = /*#__PURE__*/function (_React$Component) {
148
+ (0, _inherits2["default"])(NumberInput, _React$Component);
149
+
150
+ var _super = _createSuper(NumberInput);
151
+
152
+ function NumberInput() {
153
+ var _context2;
154
+
155
+ var _this;
156
+
157
+ (0, _classCallCheck2["default"])(this, NumberInput);
158
+
159
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
160
+ args[_key] = arguments[_key];
161
+ }
162
+
163
+ _this = _super.call.apply(_super, (0, _concat["default"])(_context2 = [this]).call(_context2, args));
164
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
165
+ typo: false,
166
+ value: ''
167
+ });
168
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (event) {
169
+ var value = event.target.value;
170
+
171
+ if (!_this.hasSpecialChar(value)) {
172
+ _this.setState({
173
+ value: value,
174
+ typo: true
175
+ });
176
+ }
177
+ });
178
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onBlur", function (event) {
179
+ var _this$props = _this.props,
180
+ onBlur = _this$props.onBlur,
181
+ onChange = _this$props.onChange,
182
+ fixed = _this$props.fixed;
183
+
184
+ if (_this.state.typo) {
185
+ var _this$format = _this.format(_this.state.value, fixed),
186
+ invalid = _this$format.invalid,
187
+ value = _this$format.value;
188
+
189
+ _this.setState({
190
+ typo: false,
191
+ value: ''
192
+ });
193
+
194
+ if (!invalid) {
195
+ onChange && onChange(value);
196
+ }
197
+ }
198
+
199
+ onBlur && onBlur(event);
200
+ });
201
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "hasSpecialChar", function (value) {
202
+ if ((0, _includes["default"])(value).call(value, '+')) {
203
+ return true;
204
+ } else if (!_this.props.sign && (0, _includes["default"])(value).call(value, '-')) {
205
+ return true;
206
+ } else {
207
+ return !_this.props.real && (0, _includes["default"])(value).call(value, '.');
208
+ }
209
+ });
210
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "format", function (value, fixed) {
211
+ var _this$props2 = _this.props,
212
+ real = _this$props2.real,
213
+ sign = _this$props2.sign,
214
+ zero = _this$props2.zero,
215
+ precision = _this$props2.precision,
216
+ big = _this$props2.big;
217
+ return parseNumber(value, {
218
+ real: real,
219
+ sign: sign,
220
+ zero: zero,
221
+ precision: precision,
222
+ fixed: fixed,
223
+ big: big
224
+ });
225
+ });
226
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getShowValue", function () {
227
+ if (_this.state.typo) {
228
+ // 处于输入状态从state中取值
229
+ return _this.state.value;
230
+ } else {
231
+ // 处于非输入状态从props中取值
232
+ return _this.format(_this.props.defaultValue, _this.props.fixed).value;
233
+ }
234
+ });
235
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getProps", function () {
236
+ var props = (0, _helper.getObjectExclude)(_this.props, PROPS_KEYS);
237
+ return _objectSpread(_objectSpread({}, props), {}, {
238
+ type: 'text',
239
+ ref: _this.props.inputRef || null,
240
+ value: _this.getShowValue(),
241
+ onChange: _this.onChange,
242
+ onBlur: _this.onBlur
243
+ });
244
+ });
245
+ return _this;
246
+ }
247
+
248
+ (0, _createClass2["default"])(NumberInput, [{
249
+ key: "render",
250
+ value: function render() {
251
+ return /*#__PURE__*/_react["default"].createElement(_input["default"], this.getProps());
252
+ }
253
+ }]);
254
+ return NumberInput;
255
+ }(_react["default"].Component);
256
+
257
+ (0, _defineProperty2["default"])(NumberInput, "propTypes", PROPS);
258
+ var _default = NumberInput;
259
+ exports["default"] = _default;
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "NumberInput",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "main": "./NumberInput.js"
6
+ }