cloud-b2b 1.1.70 → 1.1.71
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.
- package/es/Area/Area.js +8 -11
- package/es/CodeInput/CodeInput.js +16 -19
- package/es/Enhance/Dialogs.js +11 -14
- package/es/Enhance/Loading.js +15 -18
- package/es/Header/Header.js +17 -20
- package/es/Header/Vertical.js +11 -14
- package/es/ImageView/ImageView.js +10 -13
- package/es/InpurCascader/InputCascader.js +11 -14
- package/es/InputEditor/InputEditor.js +16 -18
- package/es/InputSearch/InputSearch.js +20 -23
- package/es/InputSelect/InputSelect.js +14 -17
- package/es/InputTreeSelect/InputTreeSelect.js +10 -13
- package/es/InputWriting/InputWriting.js +12 -15
- package/es/Layout/Layout.js +14 -17
- package/es/Link/Link.js +7 -10
- package/es/NumberInput/NumberInput.js +13 -16
- package/es/Search/Search.js +52 -55
- package/es/Search2/Search.js +83 -86
- package/es/Search2/Search.less +64 -64
- package/es/Search2/package.json +6 -6
- package/es/Sidebar/Sidebar.js +11 -14
- package/es/Sidebar2/Sidebar.js +13 -16
- package/es/SuperForm/SuperForm.js +74 -79
- package/es/SuperForm2/SuperForm.js +101 -103
- package/es/SuperPagination/SuperPagination.js +8 -11
- package/es/SuperTab/SuperTab.js +12 -15
- package/es/SuperTab2/SuperTab2.js +13 -16
- package/es/SuperTable/DragSortRow.js +12 -15
- package/es/SuperTable/FilterDropDown.js +11 -14
- package/es/SuperTable/SuperTable.js +70 -73
- package/es/SuperTable2/SuperTable2.js +89 -92
- package/es/SuperTable2/SuperTableCell.js +27 -30
- package/es/SuperTable3/FilterDropDown.js +11 -14
- package/es/SuperTable3/SuperTable.js +58 -61
- package/es/SuperToolbar/SuperToolbar.js +11 -14
- package/es/SuperUpload/SuperUpload.js +74 -74
- package/es/Viewer/ImageViews.js +16 -19
- package/es/Viewer/Viewer.js +11 -14
- package/es/helper.js +18 -17
- package/lib/Area/Area.js +8 -11
- package/lib/CodeInput/CodeInput.js +16 -19
- package/lib/Enhance/Dialogs.js +11 -14
- package/lib/Enhance/Loading.js +15 -18
- package/lib/Header/Header.js +17 -20
- package/lib/Header/Vertical.js +11 -14
- package/lib/ImageView/ImageView.js +10 -13
- package/lib/InpurCascader/InputCascader.js +11 -14
- package/lib/InputEditor/InputEditor.js +16 -18
- package/lib/InputSearch/InputSearch.js +20 -23
- package/lib/InputSelect/InputSelect.js +14 -17
- package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
- package/lib/InputWriting/InputWriting.js +12 -15
- package/lib/Layout/Layout.js +14 -17
- package/lib/LayoutLink/LayoutLink.js +1 -2
- package/lib/Link/Link.js +7 -10
- package/lib/NumberInput/NumberInput.js +13 -16
- package/lib/Search/Search.js +53 -57
- package/lib/Search2/Search.js +84 -88
- package/lib/Search2/Search.less +64 -64
- package/lib/Search2/package.json +6 -6
- package/lib/Sidebar/Sidebar.js +11 -14
- package/lib/Sidebar2/Sidebar.js +13 -16
- package/lib/SuperForm/SuperForm.js +75 -81
- package/lib/SuperForm2/SuperForm.js +102 -105
- package/lib/SuperPagination/SuperPagination.js +8 -11
- package/lib/SuperTab/SuperTab.js +12 -15
- package/lib/SuperTab2/SuperTab2.js +13 -16
- package/lib/SuperTable/DragSortRow.js +12 -15
- package/lib/SuperTable/FilterDropDown.js +11 -14
- package/lib/SuperTable/SuperTable.js +70 -73
- package/lib/SuperTable2/SuperTable2.js +90 -94
- package/lib/SuperTable2/SuperTableCell.js +27 -30
- package/lib/SuperTable3/FilterDropDown.js +11 -14
- package/lib/SuperTable3/SuperTable.js +58 -61
- package/lib/SuperToolbar/SuperToolbar.js +11 -14
- package/lib/SuperUpload/SuperUpload.js +75 -76
- package/lib/Viewer/ImageViews.js +16 -19
- package/lib/Viewer/Viewer.js +11 -14
- package/lib/helper.js +18 -17
- package/package.json +1 -1
|
@@ -15,10 +15,9 @@ import _Checkbox from "antd/es/checkbox";
|
|
|
15
15
|
import _typeof from "@babel/runtime-corejs3/helpers/typeof";
|
|
16
16
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
17
17
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
18
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
19
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
20
18
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
21
19
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
20
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
22
21
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
23
22
|
import _Form from "antd/es/form";
|
|
24
23
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
@@ -29,9 +28,9 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/ins
|
|
|
29
28
|
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
30
29
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
31
30
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
33
|
-
function
|
|
34
|
-
function _isNativeReflectConstruct() {
|
|
31
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context24, _context25; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context24 = ownKeys(Object(t), !0)).call(_context24, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context25 = ownKeys(Object(t))).call(_context25, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
33
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
35
34
|
import React from 'react';
|
|
36
35
|
import PropTypes from 'prop-types';
|
|
37
36
|
import ReactDOM from 'react-dom';
|
|
@@ -66,13 +65,11 @@ var ControlType = {
|
|
|
66
65
|
props: PropTypes.object
|
|
67
66
|
};
|
|
68
67
|
var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
69
|
-
_inherits(Controlled, _React$Component);
|
|
70
|
-
var _super = _createSuper(Controlled);
|
|
71
68
|
function Controlled(props) {
|
|
72
69
|
var _this;
|
|
73
70
|
_classCallCheck(this, Controlled);
|
|
74
|
-
_this =
|
|
75
|
-
_defineProperty(
|
|
71
|
+
_this = _callSuper(this, Controlled, [props]);
|
|
72
|
+
_defineProperty(_this, "onChange", function (value) {
|
|
76
73
|
var onChange = _this.props.onChange;
|
|
77
74
|
_this.setState({
|
|
78
75
|
value: value
|
|
@@ -84,7 +81,8 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
84
81
|
};
|
|
85
82
|
return _this;
|
|
86
83
|
}
|
|
87
|
-
|
|
84
|
+
_inherits(Controlled, _React$Component);
|
|
85
|
+
return _createClass(Controlled, [{
|
|
88
86
|
key: "componentWillReceiveProps",
|
|
89
87
|
value: function componentWillReceiveProps(nextProps) {
|
|
90
88
|
if (this.props.value !== nextProps.value) {
|
|
@@ -104,7 +102,6 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
104
102
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
105
103
|
}
|
|
106
104
|
}]);
|
|
107
|
-
return Controlled;
|
|
108
105
|
}(React.Component);
|
|
109
106
|
/**
|
|
110
107
|
* colNum:[可选],表单的列数,默认为4
|
|
@@ -120,8 +117,6 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
120
117
|
* onFileChange:上传组件触发,原型为func(key,{fileList, fileDeleteList})
|
|
121
118
|
*/
|
|
122
119
|
var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
123
|
-
_inherits(SuperForm2, _React$Component2);
|
|
124
|
-
var _super2 = _createSuper(SuperForm2);
|
|
125
120
|
function SuperForm2() {
|
|
126
121
|
var _context;
|
|
127
122
|
var _this2;
|
|
@@ -129,35 +124,35 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
129
124
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
130
125
|
args[_key] = arguments[_key];
|
|
131
126
|
}
|
|
132
|
-
_this2 =
|
|
133
|
-
_defineProperty(
|
|
127
|
+
_this2 = _callSuper(this, SuperForm2, _concatInstanceProperty(_context = []).call(_context, args));
|
|
128
|
+
_defineProperty(_this2, "onAdd", function (key, title) {
|
|
134
129
|
var onAdd = _this2.props.onAdd;
|
|
135
130
|
onAdd && onAdd(key, title);
|
|
136
131
|
});
|
|
137
|
-
_defineProperty(
|
|
132
|
+
_defineProperty(_this2, "onFileChange", function (_ref, file) {
|
|
138
133
|
var key = _ref.key;
|
|
139
134
|
var onFileChange = _this2.props.onFileChange;
|
|
140
135
|
onFileChange && onFileChange(key, file);
|
|
141
136
|
});
|
|
142
|
-
_defineProperty(
|
|
137
|
+
_defineProperty(_this2, "onChange", function (key, value) {
|
|
143
138
|
var onChange = _this2.props.onChange;
|
|
144
139
|
if (onChange) {
|
|
145
140
|
_this2.onExitValid(key);
|
|
146
141
|
onChange(key, value);
|
|
147
142
|
}
|
|
148
143
|
});
|
|
149
|
-
_defineProperty(
|
|
144
|
+
_defineProperty(_this2, "onGetCode", function (key, value) {
|
|
150
145
|
var onGetCode = _this2.props.onGetCode;
|
|
151
146
|
onGetCode && onGetCode();
|
|
152
147
|
});
|
|
153
|
-
_defineProperty(
|
|
148
|
+
_defineProperty(_this2, "onBlur", function (key, value) {
|
|
154
149
|
var onChange = _this2.props.onChange;
|
|
155
150
|
if (onChange) {
|
|
156
151
|
_this2.onExitValid(key);
|
|
157
152
|
onChange(key, value);
|
|
158
153
|
}
|
|
159
154
|
});
|
|
160
|
-
_defineProperty(
|
|
155
|
+
_defineProperty(_this2, "onExitValid", function (key, value) {
|
|
161
156
|
if (key === _this2.validKey) {
|
|
162
157
|
_this2.validKey = '';
|
|
163
158
|
_this2.props.onExitValid();
|
|
@@ -165,7 +160,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
165
160
|
_this2.props.onChangeOperate && _this2.props.onChangeOperate(key, value);
|
|
166
161
|
});
|
|
167
162
|
// 动态生成getValidState方法
|
|
168
|
-
_defineProperty(
|
|
163
|
+
_defineProperty(_this2, "initValidState", function () {
|
|
169
164
|
var _this2$props = _this2.props,
|
|
170
165
|
value = _this2$props.value,
|
|
171
166
|
valid = _this2$props.valid;
|
|
@@ -186,7 +181,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
186
181
|
};
|
|
187
182
|
_this2.getValidState = valid ? _valid : invalid;
|
|
188
183
|
});
|
|
189
|
-
_defineProperty(
|
|
184
|
+
_defineProperty(_this2, "validDate", function (_ref3) {
|
|
190
185
|
var key = _ref3.key,
|
|
191
186
|
type = _ref3.type;
|
|
192
187
|
return function (date) {
|
|
@@ -205,25 +200,25 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
205
200
|
}
|
|
206
201
|
};
|
|
207
202
|
});
|
|
208
|
-
_defineProperty(
|
|
203
|
+
_defineProperty(_this2, "getPopupContainer", function () {
|
|
209
204
|
var container = _this2.props.container;
|
|
210
205
|
if (typeof container === 'undefined') {
|
|
211
|
-
return ReactDOM.findDOMNode(
|
|
206
|
+
return ReactDOM.findDOMNode(_this2);
|
|
212
207
|
} else if (typeof container === 'boolean') {
|
|
213
208
|
return document.body;
|
|
214
209
|
} else {
|
|
215
210
|
return ReactDOM.findDOMNode(container);
|
|
216
211
|
}
|
|
217
212
|
});
|
|
218
|
-
_defineProperty(
|
|
213
|
+
_defineProperty(_this2, "getMaxWidth", function () {
|
|
219
214
|
var _this2$props$colNum = _this2.props.colNum,
|
|
220
215
|
colNum = _this2$props$colNum === void 0 ? defaultColNum : _this2$props$colNum;
|
|
221
216
|
return colNum * 1200;
|
|
222
217
|
});
|
|
223
|
-
_defineProperty(
|
|
218
|
+
_defineProperty(_this2, "getContainer", function () {
|
|
224
219
|
return _this2.props.getContainer;
|
|
225
220
|
});
|
|
226
|
-
_defineProperty(
|
|
221
|
+
_defineProperty(_this2, "getControls", function () {
|
|
227
222
|
var _this2$props2 = _this2.props,
|
|
228
223
|
hideControls = _this2$props2.hideControls,
|
|
229
224
|
controls = _this2$props2.controls;
|
|
@@ -237,7 +232,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
237
232
|
});
|
|
238
233
|
}
|
|
239
234
|
});
|
|
240
|
-
_defineProperty(
|
|
235
|
+
_defineProperty(_this2, "getType", function (_ref4) {
|
|
241
236
|
var _context2;
|
|
242
237
|
var key = _ref4.key,
|
|
243
238
|
type = _ref4.type;
|
|
@@ -256,7 +251,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
256
251
|
return type;
|
|
257
252
|
}
|
|
258
253
|
});
|
|
259
|
-
_defineProperty(
|
|
254
|
+
_defineProperty(_this2, "specialProps", function (type, _ref5) {
|
|
260
255
|
var key = _ref5.key,
|
|
261
256
|
_ref5$props = _ref5.props,
|
|
262
257
|
props = _ref5$props === void 0 ? {} : _ref5$props,
|
|
@@ -267,70 +262,70 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
267
262
|
return {
|
|
268
263
|
type: 'textArea',
|
|
269
264
|
readonly: true,
|
|
270
|
-
onBlur: _bindInstanceProperty(_context3 = _this2.onExitValid).call(_context3,
|
|
265
|
+
onBlur: _bindInstanceProperty(_context3 = _this2.onExitValid).call(_context3, _this2, key)
|
|
271
266
|
};
|
|
272
267
|
} else if (originType === 'uploadImg') {
|
|
273
268
|
var _context4;
|
|
274
269
|
var commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
|
|
275
270
|
return _objectSpread(_objectSpread(_objectSpread({}, props), commonProps), {}, {
|
|
276
271
|
readonly: true,
|
|
277
|
-
onBlur: _bindInstanceProperty(_context4 = _this2.onExitValid).call(_context4,
|
|
272
|
+
onBlur: _bindInstanceProperty(_context4 = _this2.onExitValid).call(_context4, _this2, key)
|
|
278
273
|
});
|
|
279
274
|
} else {
|
|
280
275
|
var _context5;
|
|
281
276
|
return {
|
|
282
|
-
onBlur: _bindInstanceProperty(_context5 = _this2.onExitValid).call(_context5,
|
|
277
|
+
onBlur: _bindInstanceProperty(_context5 = _this2.onExitValid).call(_context5, _this2, key)
|
|
283
278
|
};
|
|
284
279
|
}
|
|
285
280
|
} else if (type === 'text' || type === 'textArea') {
|
|
286
281
|
var _context6, _context7;
|
|
287
282
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
288
|
-
onChange: _bindInstanceProperty(_context6 = _this2.onExitValid).call(_context6,
|
|
289
|
-
onBlur: _bindInstanceProperty(_context7 = _this2.onChange).call(_context7,
|
|
283
|
+
onChange: _bindInstanceProperty(_context6 = _this2.onExitValid).call(_context6, _this2, key),
|
|
284
|
+
onBlur: _bindInstanceProperty(_context7 = _this2.onChange).call(_context7, _this2, key)
|
|
290
285
|
});
|
|
291
286
|
} else if (type === 'date') {
|
|
292
287
|
var _context8, _context9;
|
|
293
288
|
var propsObj = _objectSpread(_objectSpread({}, props), {}, {
|
|
294
|
-
onChange: _bindInstanceProperty(_context8 = _this2.onBlur).call(_context8,
|
|
295
|
-
onBlur: _bindInstanceProperty(_context9 = _this2.onExitValid).call(_context9,
|
|
289
|
+
onChange: _bindInstanceProperty(_context8 = _this2.onBlur).call(_context8, _this2, key),
|
|
290
|
+
onBlur: _bindInstanceProperty(_context9 = _this2.onExitValid).call(_context9, _this2, key)
|
|
296
291
|
});
|
|
297
292
|
if (_this2.props.onOpenChange && typeof _this2.props.onOpenChange === 'function') {
|
|
298
|
-
var
|
|
299
|
-
propsObj.onOpenChange = _bindInstanceProperty(
|
|
293
|
+
var _context0;
|
|
294
|
+
propsObj.onOpenChange = _bindInstanceProperty(_context0 = _this2.props.onOpenChange).call(_context0, _this2, key);
|
|
300
295
|
}
|
|
301
296
|
return propsObj;
|
|
302
297
|
} else if (type === 'captcha') {
|
|
303
|
-
var
|
|
298
|
+
var _context1, _context10, _context11;
|
|
304
299
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
305
|
-
onChange: _bindInstanceProperty(
|
|
306
|
-
onBlur: _bindInstanceProperty(
|
|
307
|
-
onGetCode: _bindInstanceProperty(
|
|
300
|
+
onChange: _bindInstanceProperty(_context1 = _this2.onBlur).call(_context1, _this2, key),
|
|
301
|
+
onBlur: _bindInstanceProperty(_context10 = _this2.onExitValid).call(_context10, _this2, key),
|
|
302
|
+
onGetCode: _bindInstanceProperty(_context11 = _this2.onGetCode).call(_context11, _this2, key)
|
|
308
303
|
});
|
|
309
304
|
} else if (type === 'area') {
|
|
310
|
-
var
|
|
305
|
+
var _context12, _context13;
|
|
311
306
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
312
|
-
onChange: _bindInstanceProperty(
|
|
313
|
-
onBlur: _bindInstanceProperty(
|
|
307
|
+
onChange: _bindInstanceProperty(_context12 = _this2.onBlur).call(_context12, _this2, key),
|
|
308
|
+
onBlur: _bindInstanceProperty(_context13 = _this2.onExitValid).call(_context13, _this2, key),
|
|
314
309
|
onAreaSearch: _this2.props.onAreaSearch
|
|
315
310
|
});
|
|
316
311
|
} else if (type === 'uploadImg') {
|
|
317
|
-
var
|
|
312
|
+
var _context14, _context15;
|
|
318
313
|
var _commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
|
|
319
314
|
return _objectSpread(_objectSpread(_objectSpread({}, props), _commonProps), {}, {
|
|
320
|
-
onChange: _bindInstanceProperty(
|
|
321
|
-
onBlur: _bindInstanceProperty(
|
|
315
|
+
onChange: _bindInstanceProperty(_context14 = _this2.onBlur).call(_context14, _this2, key),
|
|
316
|
+
onBlur: _bindInstanceProperty(_context15 = _this2.onExitValid).call(_context15, _this2, key)
|
|
322
317
|
});
|
|
323
318
|
} else if (type === 'double') {
|
|
324
319
|
return props;
|
|
325
320
|
} else {
|
|
326
|
-
var
|
|
321
|
+
var _context16, _context17;
|
|
327
322
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
328
|
-
onChange: _bindInstanceProperty(
|
|
329
|
-
onBlur: _bindInstanceProperty(
|
|
323
|
+
onChange: _bindInstanceProperty(_context16 = _this2.onBlur).call(_context16, _this2, key),
|
|
324
|
+
onBlur: _bindInstanceProperty(_context17 = _this2.onExitValid).call(_context17, _this2, key)
|
|
330
325
|
});
|
|
331
326
|
}
|
|
332
327
|
});
|
|
333
|
-
_defineProperty(
|
|
328
|
+
_defineProperty(_this2, "getControlProps", function (control, status) {
|
|
334
329
|
var _this2$props3 = _this2.props,
|
|
335
330
|
_this2$props3$value = _this2$props3.value,
|
|
336
331
|
value = _this2$props3$value === void 0 ? {} : _this2$props3$value,
|
|
@@ -345,25 +340,25 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
345
340
|
value: makeString(value[control.key])
|
|
346
341
|
});
|
|
347
342
|
});
|
|
348
|
-
_defineProperty(
|
|
343
|
+
_defineProperty(_this2, "getOptions", function (key, options) {
|
|
349
344
|
var higher = _this2.props.options || {};
|
|
350
345
|
return higher[key] || options;
|
|
351
346
|
});
|
|
352
|
-
_defineProperty(
|
|
353
|
-
_defineProperty(
|
|
347
|
+
_defineProperty(_this2, "toEmpty", function (props) {});
|
|
348
|
+
_defineProperty(_this2, "toText", function (props) {
|
|
354
349
|
return /*#__PURE__*/React.createElement(Controlled, props);
|
|
355
350
|
});
|
|
356
|
-
_defineProperty(
|
|
351
|
+
_defineProperty(_this2, "toPassword", function (props) {
|
|
357
352
|
return /*#__PURE__*/React.createElement(Controlled, props);
|
|
358
353
|
});
|
|
359
|
-
_defineProperty(
|
|
354
|
+
_defineProperty(_this2, "toEditor", function (props, control) {
|
|
360
355
|
props.inputKey = control.key;
|
|
361
356
|
return /*#__PURE__*/React.createElement(Controlled, props);
|
|
362
357
|
});
|
|
363
|
-
_defineProperty(
|
|
358
|
+
_defineProperty(_this2, "toSelectWriting", function (props, control) {
|
|
364
359
|
return /*#__PURE__*/React.createElement(Controlled, props);
|
|
365
360
|
});
|
|
366
|
-
_defineProperty(
|
|
361
|
+
_defineProperty(_this2, "toTextArea", function (props, control) {
|
|
367
362
|
if (control.allFullFather) {
|
|
368
363
|
props.rows = control.rows;
|
|
369
364
|
props.maxLength = control.maxLength;
|
|
@@ -378,30 +373,31 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
378
373
|
}
|
|
379
374
|
return /*#__PURE__*/React.createElement(Controlled, props);
|
|
380
375
|
});
|
|
381
|
-
_defineProperty(
|
|
376
|
+
_defineProperty(_this2, "toNumber", function (props) {
|
|
382
377
|
props.defaultValue = props.value;
|
|
383
378
|
delete props.value;
|
|
384
379
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
385
380
|
});
|
|
386
|
-
_defineProperty(
|
|
387
|
-
var
|
|
381
|
+
_defineProperty(_this2, "toDoubleInput", function (props, control, cc) {
|
|
382
|
+
var _context18, _context19;
|
|
388
383
|
props.defaultValue = props.value;
|
|
389
384
|
props.doubleKey = props.key;
|
|
390
385
|
props.doubleValue = helper.getObject(cc, props.key);
|
|
391
|
-
props.onChangeKey1 = _bindInstanceProperty(
|
|
392
|
-
props.onChangeKey2 = _bindInstanceProperty(
|
|
386
|
+
props.onChangeKey1 = _bindInstanceProperty(_context18 = _this2.onChange).call(_context18, _this2, props.key[0]);
|
|
387
|
+
props.onChangeKey2 = _bindInstanceProperty(_context19 = _this2.onChange).call(_context19, _this2, props.key[1]);
|
|
393
388
|
delete props.value;
|
|
394
389
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
395
390
|
});
|
|
396
|
-
_defineProperty(
|
|
391
|
+
_defineProperty(_this2, "toSelect", function (props, _ref6) {
|
|
397
392
|
var options = _ref6.options,
|
|
398
393
|
key = _ref6.key;
|
|
399
394
|
props.getPopupContainer = _this2.getPopupContainer;
|
|
400
395
|
props.options = _this2.getOptions(key, options);
|
|
401
396
|
props.dropdownMatchSelectWidth = false;
|
|
397
|
+
props.placeholder = filter.placeholder || '';
|
|
402
398
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
403
399
|
});
|
|
404
|
-
_defineProperty(
|
|
400
|
+
_defineProperty(_this2, "toTreeSelect", function (props, filter) {
|
|
405
401
|
var container = _this2.getContainer();
|
|
406
402
|
container && (props.getPopupContainer = container);
|
|
407
403
|
props.options = _this2.getOptions(filter);
|
|
@@ -409,7 +405,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
409
405
|
props.placeholder = filter.placeholder || '';
|
|
410
406
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
411
407
|
});
|
|
412
|
-
_defineProperty(
|
|
408
|
+
_defineProperty(_this2, "createSearchEvent", function (control) {
|
|
413
409
|
if (_this2.props.onSearch) {
|
|
414
410
|
return function (value) {
|
|
415
411
|
return _this2.props.onSearch(control.key, value, control);
|
|
@@ -418,7 +414,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
418
414
|
return null;
|
|
419
415
|
}
|
|
420
416
|
});
|
|
421
|
-
_defineProperty(
|
|
417
|
+
_defineProperty(_this2, "createGetCodeEvent", function (control) {
|
|
422
418
|
if (_this2.props.onGetCode) {
|
|
423
419
|
return function (value) {
|
|
424
420
|
return _this2.props.onGetCode(control.key, value, control);
|
|
@@ -427,14 +423,15 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
427
423
|
return null;
|
|
428
424
|
}
|
|
429
425
|
});
|
|
430
|
-
_defineProperty(
|
|
426
|
+
_defineProperty(_this2, "toSearch", function (props, control) {
|
|
431
427
|
props.getPopupContainer = _this2.getPopupContainer;
|
|
432
428
|
props.options = _this2.getOptions(control.key, control.options);
|
|
433
429
|
props.onSearch = _this2.createSearchEvent(control);
|
|
434
430
|
props.dropdownMatchSelectWidth = false;
|
|
431
|
+
props.placeholder = props.placeholder || '';
|
|
435
432
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
436
433
|
});
|
|
437
|
-
_defineProperty(
|
|
434
|
+
_defineProperty(_this2, "toDate", function (props, _ref7) {
|
|
438
435
|
var rule = _ref7.rule;
|
|
439
436
|
props.getCalendarContainer = _this2.getPopupContainer;
|
|
440
437
|
props.style = {
|
|
@@ -443,7 +440,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
443
440
|
rule && (props.disabledDate = _this2.validDate(rule));
|
|
444
441
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
445
442
|
});
|
|
446
|
-
_defineProperty(
|
|
443
|
+
_defineProperty(_this2, "toRangePicker", function (props, _ref8) {
|
|
447
444
|
var rule = _ref8.rule;
|
|
448
445
|
props.getCalendarContainer = _this2.getPopupContainer;
|
|
449
446
|
props.style = {
|
|
@@ -452,32 +449,33 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
452
449
|
// rule && (props.disabledDate = this.validDate(rule));
|
|
453
450
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
454
451
|
});
|
|
455
|
-
_defineProperty(
|
|
452
|
+
_defineProperty(_this2, "toRadioGroup", function (props, _ref9) {
|
|
456
453
|
var key = _ref9.key,
|
|
457
454
|
options = _ref9.options;
|
|
458
455
|
props.options = _this2.getOptions(key, options);
|
|
459
456
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
460
457
|
});
|
|
461
|
-
_defineProperty(
|
|
458
|
+
_defineProperty(_this2, "captcha", function (props, control) {
|
|
462
459
|
props.onGetCode = _this2.props.onGetCode;
|
|
463
460
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
464
461
|
});
|
|
465
|
-
_defineProperty(
|
|
466
|
-
var options =
|
|
467
|
-
key =
|
|
462
|
+
_defineProperty(_this2, "toReadonly", function (props, _ref0) {
|
|
463
|
+
var options = _ref0.options,
|
|
464
|
+
key = _ref0.key;
|
|
468
465
|
props.value = getTitle(props.value, _this2.getOptions(key, options));
|
|
469
466
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
470
467
|
});
|
|
471
|
-
_defineProperty(
|
|
468
|
+
_defineProperty(_this2, "selectSearch", function (props, control) {
|
|
472
469
|
props.getPopupContainer = _this2.getPopupContainer;
|
|
473
470
|
props.options = _this2.getOptions(control.key, control.options);
|
|
474
471
|
props.onSearch = _this2.createSearchEvent(control);
|
|
475
472
|
props.dropdownMatchSelectWidth = false;
|
|
473
|
+
props.placeholder = props.placeholder || '';
|
|
476
474
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
477
475
|
});
|
|
478
|
-
_defineProperty(
|
|
479
|
-
var key =
|
|
480
|
-
options =
|
|
476
|
+
_defineProperty(_this2, "area", function (props, _ref1) {
|
|
477
|
+
var key = _ref1.key,
|
|
478
|
+
options = _ref1.options;
|
|
481
479
|
var readonly = _this2.props.readonly;
|
|
482
480
|
props.parentKey = key;
|
|
483
481
|
props.options = _this2.getOptions(key, options);
|
|
@@ -487,17 +485,17 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
487
485
|
}) ? true : false;
|
|
488
486
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
489
487
|
});
|
|
490
|
-
_defineProperty(
|
|
491
|
-
var
|
|
488
|
+
_defineProperty(_this2, "uploadImg", function (props, control) {
|
|
489
|
+
var _context20;
|
|
492
490
|
var readonly = _this2.props.readonly;
|
|
493
491
|
props.required = control.required || false;
|
|
494
|
-
props.onFileChange = _bindInstanceProperty(
|
|
492
|
+
props.onFileChange = _bindInstanceProperty(_context20 = _this2.onFileChange).call(_context20, _this2, control);
|
|
495
493
|
props.readonly = readonly === true || _Array$isArray(readonly) && _someInstanceProperty(readonly).call(readonly, function (readonlyKey) {
|
|
496
494
|
return readonlyKey === control.key;
|
|
497
495
|
}) ? true : false;
|
|
498
496
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
499
497
|
});
|
|
500
|
-
_defineProperty(
|
|
498
|
+
_defineProperty(_this2, "toCascader", function (props, control) {
|
|
501
499
|
var container = _this2.getContainer();
|
|
502
500
|
container && (props.getPopupContainer = container);
|
|
503
501
|
props.options = control.options || [];
|
|
@@ -506,16 +504,16 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
506
504
|
props.loadData = _this2.createSearchEvent(control);
|
|
507
505
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
508
506
|
});
|
|
509
|
-
_defineProperty(
|
|
510
|
-
var
|
|
507
|
+
_defineProperty(_this2, "toCheckbox", function (props, control) {
|
|
508
|
+
var _context21;
|
|
511
509
|
var options = control.options || [];
|
|
512
510
|
return /*#__PURE__*/React.createElement(_Checkbox.Group, {
|
|
513
511
|
options: options,
|
|
514
|
-
onChange: _bindInstanceProperty(
|
|
512
|
+
onChange: _bindInstanceProperty(_context21 = _this2.onBlur).call(_context21, _this2, control.key),
|
|
515
513
|
value: _this2.props.value[control.key]
|
|
516
514
|
});
|
|
517
515
|
});
|
|
518
|
-
_defineProperty(
|
|
516
|
+
_defineProperty(_this2, "toControl", function (props, control) {
|
|
519
517
|
switch (props.type) {
|
|
520
518
|
case 'readonly':
|
|
521
519
|
return _this2.toReadonly(props, control);
|
|
@@ -565,15 +563,15 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
565
563
|
return 'type error';
|
|
566
564
|
}
|
|
567
565
|
});
|
|
568
|
-
_defineProperty(
|
|
569
|
-
var title =
|
|
570
|
-
showAdd =
|
|
571
|
-
key =
|
|
572
|
-
showInfo =
|
|
573
|
-
showInfoTitle =
|
|
566
|
+
_defineProperty(_this2, "toLabel", function (_ref10, type) {
|
|
567
|
+
var title = _ref10.title,
|
|
568
|
+
showAdd = _ref10.showAdd,
|
|
569
|
+
key = _ref10.key,
|
|
570
|
+
showInfo = _ref10.showInfo,
|
|
571
|
+
showInfoTitle = _ref10.showInfoTitle;
|
|
574
572
|
if (showAdd && type !== 'readonly') {
|
|
575
|
-
var
|
|
576
|
-
var onClick = _bindInstanceProperty(
|
|
573
|
+
var _context22;
|
|
574
|
+
var onClick = _bindInstanceProperty(_context22 = _this2.onAdd).call(_context22, _this2, key, title);
|
|
577
575
|
return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
|
|
578
576
|
role: "add",
|
|
579
577
|
type: "plus-circle-o",
|
|
@@ -589,7 +587,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
589
587
|
return title;
|
|
590
588
|
}
|
|
591
589
|
});
|
|
592
|
-
_defineProperty(
|
|
590
|
+
_defineProperty(_this2, "toCol", function (span, control) {
|
|
593
591
|
var factor = control.span || 1;
|
|
594
592
|
var status = _this2.getValidState(control);
|
|
595
593
|
var controlProps = _this2.getControlProps(control, status);
|
|
@@ -606,7 +604,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
606
604
|
key: control.key
|
|
607
605
|
}, checkable && /*#__PURE__*/React.createElement(_Checkbox, {
|
|
608
606
|
className: variables('SuperForm2').checkbox,
|
|
609
|
-
onChange: _bindInstanceProperty(onCheckItem).call(onCheckItem,
|
|
607
|
+
onChange: _bindInstanceProperty(onCheckItem).call(onCheckItem, _this2, control),
|
|
610
608
|
checked: control.checked
|
|
611
609
|
}), /*#__PURE__*/React.createElement(FormItem, _extends({}, itemProps, {
|
|
612
610
|
className: checkable ? variables('SuperForm2').formItemWithCheckbox : '',
|
|
@@ -634,8 +632,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
634
632
|
}
|
|
635
633
|
});
|
|
636
634
|
});
|
|
637
|
-
_defineProperty(
|
|
638
|
-
var
|
|
635
|
+
_defineProperty(_this2, "toCols", function () {
|
|
636
|
+
var _context23;
|
|
639
637
|
var _this2$props5 = _this2.props,
|
|
640
638
|
_this2$props5$colNum = _this2$props5.colNum,
|
|
641
639
|
colNum = _this2$props5$colNum === void 0 ? defaultColNum : _this2$props5$colNum,
|
|
@@ -644,7 +642,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
644
642
|
colNum = 1;
|
|
645
643
|
}
|
|
646
644
|
var span = 24 / colNum;
|
|
647
|
-
return _mapInstanceProperty(
|
|
645
|
+
return _mapInstanceProperty(_context23 = _this2.getControls()).call(_context23, function (control) {
|
|
648
646
|
if (allFullFather) {
|
|
649
647
|
control.allFullFather = allFullFather;
|
|
650
648
|
}
|
|
@@ -653,7 +651,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
653
651
|
});
|
|
654
652
|
return _this2;
|
|
655
653
|
}
|
|
656
|
-
|
|
654
|
+
_inherits(SuperForm2, _React$Component2);
|
|
655
|
+
return _createClass(SuperForm2, [{
|
|
657
656
|
key: "render",
|
|
658
657
|
value: function render() {
|
|
659
658
|
this.initValidState();
|
|
@@ -671,7 +670,6 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
671
670
|
}, this.toCols())));
|
|
672
671
|
}
|
|
673
672
|
}]);
|
|
674
|
-
return SuperForm2;
|
|
675
673
|
}(React.Component);
|
|
676
674
|
_defineProperty(SuperForm2, "propTypes", {
|
|
677
675
|
controls: PropTypes.arrayOf(PropTypes.shape(ControlType)).isRequired,
|
|
@@ -2,15 +2,14 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
|
|
|
2
2
|
import _Pagination from "antd/es/pagination";
|
|
3
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
7
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
8
6
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
9
8
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
10
9
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
11
10
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
12
|
-
function
|
|
13
|
-
function _isNativeReflectConstruct() {
|
|
11
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
13
|
import React from 'react';
|
|
15
14
|
import PropTypes from 'prop-types';
|
|
16
15
|
/**
|
|
@@ -25,8 +24,6 @@ import PropTypes from 'prop-types';
|
|
|
25
24
|
* onPageSizeChange: 页大小改变时触发,原型func(pageSize, pageNumber)
|
|
26
25
|
*/
|
|
27
26
|
var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
28
|
-
_inherits(SuperPagination, _React$Component);
|
|
29
|
-
var _super = _createSuper(SuperPagination);
|
|
30
27
|
function SuperPagination() {
|
|
31
28
|
var _context;
|
|
32
29
|
var _this;
|
|
@@ -34,14 +31,14 @@ var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
34
31
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
35
32
|
args[_key] = arguments[_key];
|
|
36
33
|
}
|
|
37
|
-
_this =
|
|
38
|
-
_defineProperty(
|
|
34
|
+
_this = _callSuper(this, SuperPagination, _concatInstanceProperty(_context = []).call(_context, args));
|
|
35
|
+
_defineProperty(_this, "onChange", function (page) {
|
|
39
36
|
var _this$props$callback = _this.props.callback,
|
|
40
37
|
callback = _this$props$callback === void 0 ? {} : _this$props$callback;
|
|
41
38
|
var onPageNumberChange = _this.props.onPageNumberChange || callback.onPageNumberChange;
|
|
42
39
|
onPageNumberChange && onPageNumberChange(page);
|
|
43
40
|
});
|
|
44
|
-
_defineProperty(
|
|
41
|
+
_defineProperty(_this, "onShowSizeChange", function (current, size) {
|
|
45
42
|
var _this$props$callback2 = _this.props.callback,
|
|
46
43
|
callback = _this$props$callback2 === void 0 ? {} : _this$props$callback2;
|
|
47
44
|
var onPageSizeChange = _this.props.onPageSizeChange || callback.onPageSizeChange;
|
|
@@ -49,7 +46,8 @@ var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
49
46
|
});
|
|
50
47
|
return _this;
|
|
51
48
|
}
|
|
52
|
-
|
|
49
|
+
_inherits(SuperPagination, _React$Component);
|
|
50
|
+
return _createClass(SuperPagination, [{
|
|
53
51
|
key: "render",
|
|
54
52
|
value: function render() {
|
|
55
53
|
var _this$props = this.props,
|
|
@@ -92,7 +90,6 @@ var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
92
90
|
}, /*#__PURE__*/React.createElement(_Pagination, props));
|
|
93
91
|
}
|
|
94
92
|
}]);
|
|
95
|
-
return SuperPagination;
|
|
96
93
|
}(React.Component);
|
|
97
94
|
_defineProperty(SuperPagination, "propTypes", {
|
|
98
95
|
maxRecords: PropTypes.number,
|