cloud-b2b 1.1.80 → 1.1.82
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 +16 -11
- package/es/CodeInput/CodeInput.js +19 -16
- package/es/Control/Control.js +4 -1
- package/es/Enhance/Dialogs.js +14 -11
- package/es/Enhance/Loading.js +18 -15
- package/es/Header/Header.js +20 -17
- package/es/Header/Vertical.js +14 -11
- package/es/ImageView/ImageView.js +13 -10
- package/es/InpurCascader/InputCascader.js +14 -11
- package/es/InputEditor/InputEditor.js +18 -16
- package/es/InputSearch/InputSearch.js +23 -20
- package/es/InputSelect/InputSelect.js +17 -14
- package/es/InputTreeSelect/InputTreeSelect.js +13 -10
- package/es/InputWriting/InputWriting.js +15 -12
- package/es/Layout/Layout.js +17 -14
- package/es/Link/Link.js +10 -7
- package/es/NumberInput/NumberInput.js +16 -13
- package/es/Search/Search.js +55 -52
- package/es/Search2/Search.js +86 -83
- package/es/Search2/Search.less +64 -64
- package/es/Search2/package.json +6 -6
- package/es/Sidebar/Sidebar.js +14 -11
- package/es/Sidebar2/Sidebar.js +16 -13
- package/es/SuperForm/SuperForm.js +79 -74
- package/es/SuperForm2/SuperForm.js +114 -108
- package/es/SuperPagination/SuperPagination.js +11 -8
- package/es/SuperTab/SuperTab.js +15 -12
- package/es/SuperTab2/SuperTab2.js +16 -13
- package/es/SuperTable/DragSortRow.js +15 -12
- package/es/SuperTable/FilterDropDown.js +14 -11
- package/es/SuperTable/SuperTable.js +73 -70
- package/es/SuperTable2/SuperTable2.js +92 -89
- package/es/SuperTable2/SuperTableCell.js +30 -27
- package/es/SuperTable3/FilterDropDown.js +14 -11
- package/es/SuperTable3/SuperTable.js +61 -58
- package/es/SuperToolbar/SuperToolbar.js +15 -12
- package/es/SuperUpload/SuperUpload.js +38 -38
- package/es/Viewer/ImageViews.js +19 -16
- package/es/Viewer/Viewer.js +14 -11
- package/es/helper.js +17 -18
- package/lib/Area/Area.js +16 -11
- package/lib/CodeInput/CodeInput.js +19 -16
- package/lib/Control/Control.js +4 -1
- package/lib/Enhance/Dialogs.js +14 -11
- package/lib/Enhance/Loading.js +18 -15
- package/lib/Header/Header.js +20 -17
- package/lib/Header/Vertical.js +14 -11
- package/lib/ImageView/ImageView.js +13 -10
- package/lib/InpurCascader/InputCascader.js +14 -11
- package/lib/InputEditor/InputEditor.js +18 -16
- package/lib/InputSearch/InputSearch.js +23 -20
- package/lib/InputSelect/InputSelect.js +17 -14
- package/lib/InputTreeSelect/InputTreeSelect.js +13 -10
- package/lib/InputWriting/InputWriting.js +15 -12
- package/lib/Layout/Layout.js +17 -14
- package/lib/LayoutLink/LayoutLink.js +2 -1
- package/lib/Link/Link.js +10 -7
- package/lib/NumberInput/NumberInput.js +16 -13
- package/lib/Search/Search.js +57 -53
- package/lib/Search2/Search.js +88 -84
- package/lib/Search2/Search.less +64 -64
- package/lib/Search2/package.json +6 -6
- package/lib/Sidebar/Sidebar.js +14 -11
- package/lib/Sidebar2/Sidebar.js +16 -13
- package/lib/SuperForm/SuperForm.js +81 -75
- package/lib/SuperForm2/SuperForm.js +116 -109
- package/lib/SuperPagination/SuperPagination.js +11 -8
- package/lib/SuperTab/SuperTab.js +15 -12
- package/lib/SuperTab2/SuperTab2.js +16 -13
- package/lib/SuperTable/DragSortRow.js +15 -12
- package/lib/SuperTable/FilterDropDown.js +14 -11
- package/lib/SuperTable/SuperTable.js +73 -70
- package/lib/SuperTable2/SuperTable2.js +94 -90
- package/lib/SuperTable2/SuperTableCell.js +30 -27
- package/lib/SuperTable3/FilterDropDown.js +14 -11
- package/lib/SuperTable3/SuperTable.js +61 -58
- package/lib/SuperToolbar/SuperToolbar.js +15 -12
- package/lib/SuperUpload/SuperUpload.js +40 -39
- package/lib/Viewer/ImageViews.js +19 -16
- package/lib/Viewer/Viewer.js +14 -11
- package/lib/helper.js +17 -18
- package/package.json +1 -1
|
@@ -32,9 +32,10 @@ var _checkbox = _interopRequireDefault(require("antd/lib/checkbox"));
|
|
|
32
32
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/typeof"));
|
|
33
33
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
34
34
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
35
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
|
|
36
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
35
37
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
36
38
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
37
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
38
39
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
39
40
|
var _form = _interopRequireDefault(require("antd/lib/form"));
|
|
40
41
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -43,11 +44,12 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
43
44
|
var _helper = _interopRequireDefault(require("../helper"));
|
|
44
45
|
var _Control = _interopRequireWildcard(require("../Control"));
|
|
45
46
|
var _variables = _interopRequireDefault(require("../variables"));
|
|
46
|
-
function
|
|
47
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
48
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
47
49
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty2(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
48
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
49
|
-
function
|
|
50
|
-
function _isNativeReflectConstruct() {
|
|
50
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context29, _context30; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context29 = ownKeys(Object(t), !0)).call(_context29, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context30 = ownKeys(Object(t))).call(_context30, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
51
|
+
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); }; }
|
|
52
|
+
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; } }
|
|
51
53
|
var FormItem = _form["default"].Item;
|
|
52
54
|
var defaultSize = 'default';
|
|
53
55
|
var defaultColNum = 4;
|
|
@@ -76,11 +78,13 @@ var ControlType = {
|
|
|
76
78
|
props: _propTypes["default"].object
|
|
77
79
|
};
|
|
78
80
|
var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
81
|
+
(0, _inherits2["default"])(Controlled, _React$Component);
|
|
82
|
+
var _super = _createSuper(Controlled);
|
|
79
83
|
function Controlled(props) {
|
|
80
84
|
var _this;
|
|
81
85
|
(0, _classCallCheck2["default"])(this, Controlled);
|
|
82
|
-
_this =
|
|
83
|
-
(0, _defineProperty2["default"])(_this, "onChange", function (value) {
|
|
86
|
+
_this = _super.call(this, props);
|
|
87
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (value) {
|
|
84
88
|
var onChange = _this.props.onChange;
|
|
85
89
|
_this.setState({
|
|
86
90
|
value: value
|
|
@@ -92,8 +96,7 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
92
96
|
};
|
|
93
97
|
return _this;
|
|
94
98
|
}
|
|
95
|
-
(0,
|
|
96
|
-
return (0, _createClass2["default"])(Controlled, [{
|
|
99
|
+
(0, _createClass2["default"])(Controlled, [{
|
|
97
100
|
key: "componentWillReceiveProps",
|
|
98
101
|
value: function componentWillReceiveProps(nextProps) {
|
|
99
102
|
if (this.props.value !== nextProps.value) {
|
|
@@ -112,6 +115,7 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
112
115
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
113
116
|
}
|
|
114
117
|
}]);
|
|
118
|
+
return Controlled;
|
|
115
119
|
}(_react["default"].Component);
|
|
116
120
|
/**
|
|
117
121
|
* colNum:[可选],表单的列数,默认为4
|
|
@@ -127,6 +131,8 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
127
131
|
* onFileChange:上传组件触发,原型为func(key,{fileList, fileDeleteList})
|
|
128
132
|
*/
|
|
129
133
|
var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
134
|
+
(0, _inherits2["default"])(SuperForm2, _React$Component2);
|
|
135
|
+
var _super2 = _createSuper(SuperForm2);
|
|
130
136
|
function SuperForm2() {
|
|
131
137
|
var _context;
|
|
132
138
|
var _this2;
|
|
@@ -134,35 +140,35 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
134
140
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
135
141
|
args[_key] = arguments[_key];
|
|
136
142
|
}
|
|
137
|
-
_this2 =
|
|
138
|
-
(0, _defineProperty2["default"])(_this2, "onAdd", function (key, title) {
|
|
143
|
+
_this2 = _super2.call.apply(_super2, (0, _concat["default"])(_context = [this]).call(_context, args));
|
|
144
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onAdd", function (key, title) {
|
|
139
145
|
var onAdd = _this2.props.onAdd;
|
|
140
146
|
onAdd && onAdd(key, title);
|
|
141
147
|
});
|
|
142
|
-
(0, _defineProperty2["default"])(_this2, "onFileChange", function (_ref, file) {
|
|
148
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onFileChange", function (_ref, file) {
|
|
143
149
|
var key = _ref.key;
|
|
144
150
|
var onFileChange = _this2.props.onFileChange;
|
|
145
151
|
onFileChange && onFileChange(key, file);
|
|
146
152
|
});
|
|
147
|
-
(0, _defineProperty2["default"])(_this2, "onChange", function (key, value) {
|
|
153
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onChange", function (key, value) {
|
|
148
154
|
var onChange = _this2.props.onChange;
|
|
149
155
|
if (onChange) {
|
|
150
156
|
_this2.onExitValid(key);
|
|
151
157
|
onChange(key, value);
|
|
152
158
|
}
|
|
153
159
|
});
|
|
154
|
-
(0, _defineProperty2["default"])(_this2, "onGetCode", function (key, value) {
|
|
160
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onGetCode", function (key, value) {
|
|
155
161
|
var onGetCode = _this2.props.onGetCode;
|
|
156
162
|
onGetCode && onGetCode();
|
|
157
163
|
});
|
|
158
|
-
(0, _defineProperty2["default"])(_this2, "onBlur", function (key, value) {
|
|
164
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onBlur", function (key, value) {
|
|
159
165
|
var onChange = _this2.props.onChange;
|
|
160
166
|
if (onChange) {
|
|
161
167
|
_this2.onExitValid(key);
|
|
162
168
|
onChange(key, value);
|
|
163
169
|
}
|
|
164
170
|
});
|
|
165
|
-
(0, _defineProperty2["default"])(_this2, "onExitValid", function (key, value) {
|
|
171
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "onExitValid", function (key, value) {
|
|
166
172
|
if (key === _this2.validKey) {
|
|
167
173
|
_this2.validKey = '';
|
|
168
174
|
_this2.props.onExitValid();
|
|
@@ -170,7 +176,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
170
176
|
_this2.props.onChangeOperate && _this2.props.onChangeOperate(key, value);
|
|
171
177
|
});
|
|
172
178
|
// 动态生成getValidState方法
|
|
173
|
-
(0, _defineProperty2["default"])(_this2, "initValidState", function () {
|
|
179
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "initValidState", function () {
|
|
174
180
|
var _this2$props = _this2.props,
|
|
175
181
|
value = _this2$props.value,
|
|
176
182
|
valid = _this2$props.valid;
|
|
@@ -191,7 +197,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
191
197
|
};
|
|
192
198
|
_this2.getValidState = valid ? _valid : invalid;
|
|
193
199
|
});
|
|
194
|
-
(0, _defineProperty2["default"])(_this2, "validDate", function (_ref3) {
|
|
200
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "validDate", function (_ref3) {
|
|
195
201
|
var key = _ref3.key,
|
|
196
202
|
type = _ref3.type;
|
|
197
203
|
return function (date) {
|
|
@@ -210,25 +216,25 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
210
216
|
}
|
|
211
217
|
};
|
|
212
218
|
});
|
|
213
|
-
(0, _defineProperty2["default"])(_this2, "getPopupContainer", function () {
|
|
219
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getPopupContainer", function () {
|
|
214
220
|
var container = _this2.props.container;
|
|
215
221
|
if (typeof container === 'undefined') {
|
|
216
|
-
return _reactDom["default"].findDOMNode(_this2);
|
|
222
|
+
return _reactDom["default"].findDOMNode((0, _assertThisInitialized2["default"])(_this2));
|
|
217
223
|
} else if (typeof container === 'boolean') {
|
|
218
224
|
return document.body;
|
|
219
225
|
} else {
|
|
220
226
|
return _reactDom["default"].findDOMNode(container);
|
|
221
227
|
}
|
|
222
228
|
});
|
|
223
|
-
(0, _defineProperty2["default"])(_this2, "getMaxWidth", function () {
|
|
229
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getMaxWidth", function () {
|
|
224
230
|
var _this2$props$colNum = _this2.props.colNum,
|
|
225
231
|
colNum = _this2$props$colNum === void 0 ? defaultColNum : _this2$props$colNum;
|
|
226
232
|
return colNum * 1200;
|
|
227
233
|
});
|
|
228
|
-
(0, _defineProperty2["default"])(_this2, "getContainer", function () {
|
|
234
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getContainer", function () {
|
|
229
235
|
return _this2.props.getContainer;
|
|
230
236
|
});
|
|
231
|
-
(0, _defineProperty2["default"])(_this2, "getControls", function () {
|
|
237
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getControls", function () {
|
|
232
238
|
var _this2$props2 = _this2.props,
|
|
233
239
|
hideControls = _this2$props2.hideControls,
|
|
234
240
|
controls = _this2$props2.controls;
|
|
@@ -242,7 +248,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
242
248
|
});
|
|
243
249
|
}
|
|
244
250
|
});
|
|
245
|
-
(0, _defineProperty2["default"])(_this2, "getType", function (_ref4) {
|
|
251
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getType", function (_ref4) {
|
|
246
252
|
var _context2;
|
|
247
253
|
var key = _ref4.key,
|
|
248
254
|
type = _ref4.type;
|
|
@@ -261,7 +267,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
261
267
|
return type;
|
|
262
268
|
}
|
|
263
269
|
});
|
|
264
|
-
(0, _defineProperty2["default"])(_this2, "specialProps", function (type, _ref5) {
|
|
270
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "specialProps", function (type, _ref5) {
|
|
265
271
|
var key = _ref5.key,
|
|
266
272
|
_ref5$props = _ref5.props,
|
|
267
273
|
props = _ref5$props === void 0 ? {} : _ref5$props,
|
|
@@ -272,70 +278,71 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
272
278
|
return {
|
|
273
279
|
type: 'textArea',
|
|
274
280
|
readonly: true,
|
|
275
|
-
onBlur: (0, _bind["default"])(_context3 = _this2.onExitValid).call(_context3, _this2, key)
|
|
281
|
+
onBlur: (0, _bind["default"])(_context3 = _this2.onExitValid).call(_context3, (0, _assertThisInitialized2["default"])(_this2), key)
|
|
276
282
|
};
|
|
277
283
|
} else if (originType === 'uploadImg') {
|
|
278
284
|
var _context4;
|
|
279
285
|
var commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
|
|
280
286
|
return _objectSpread(_objectSpread(_objectSpread({}, props), commonProps), {}, {
|
|
281
287
|
readonly: true,
|
|
282
|
-
onBlur: (0, _bind["default"])(_context4 = _this2.onExitValid).call(_context4, _this2, key)
|
|
288
|
+
onBlur: (0, _bind["default"])(_context4 = _this2.onExitValid).call(_context4, (0, _assertThisInitialized2["default"])(_this2), key)
|
|
283
289
|
});
|
|
284
290
|
} else {
|
|
285
291
|
var _context5;
|
|
286
292
|
return {
|
|
287
|
-
onBlur: (0, _bind["default"])(_context5 = _this2.onExitValid).call(_context5, _this2, key)
|
|
293
|
+
onBlur: (0, _bind["default"])(_context5 = _this2.onExitValid).call(_context5, (0, _assertThisInitialized2["default"])(_this2), key)
|
|
288
294
|
};
|
|
289
295
|
}
|
|
290
296
|
} else if (type === 'text' || type === 'textArea') {
|
|
291
297
|
var _context6, _context7;
|
|
292
298
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
293
|
-
onChange: (0, _bind["default"])(_context6 = _this2.onExitValid).call(_context6, _this2, key),
|
|
294
|
-
onBlur: (0, _bind["default"])(_context7 = _this2.onChange).call(_context7, _this2, key)
|
|
299
|
+
onChange: (0, _bind["default"])(_context6 = _this2.onExitValid).call(_context6, (0, _assertThisInitialized2["default"])(_this2), key),
|
|
300
|
+
onBlur: (0, _bind["default"])(_context7 = _this2.onChange).call(_context7, (0, _assertThisInitialized2["default"])(_this2), key)
|
|
295
301
|
});
|
|
296
302
|
} else if (type === 'date') {
|
|
297
303
|
var _context8, _context9;
|
|
298
304
|
var propsObj = _objectSpread(_objectSpread({}, props), {}, {
|
|
299
|
-
onChange: (0, _bind["default"])(_context8 = _this2.onBlur).call(_context8, _this2, key),
|
|
300
|
-
onBlur: (0, _bind["default"])(_context9 = _this2.onExitValid).call(_context9, _this2, key)
|
|
305
|
+
onChange: (0, _bind["default"])(_context8 = _this2.onBlur).call(_context8, (0, _assertThisInitialized2["default"])(_this2), key),
|
|
306
|
+
onBlur: (0, _bind["default"])(_context9 = _this2.onExitValid).call(_context9, (0, _assertThisInitialized2["default"])(_this2), key)
|
|
301
307
|
});
|
|
302
308
|
if (_this2.props.onOpenChange && typeof _this2.props.onOpenChange === 'function') {
|
|
303
|
-
var
|
|
304
|
-
propsObj.onOpenChange = (0, _bind["default"])(
|
|
309
|
+
var _context10;
|
|
310
|
+
propsObj.onOpenChange = (0, _bind["default"])(_context10 = _this2.props.onOpenChange).call(_context10, (0, _assertThisInitialized2["default"])(_this2), key);
|
|
305
311
|
}
|
|
306
312
|
return propsObj;
|
|
307
313
|
} else if (type === 'captcha') {
|
|
308
|
-
var
|
|
314
|
+
var _context11, _context12, _context13;
|
|
309
315
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
310
|
-
onChange: (0, _bind["default"])(
|
|
311
|
-
onBlur: (0, _bind["default"])(
|
|
312
|
-
onGetCode: (0, _bind["default"])(
|
|
316
|
+
onChange: (0, _bind["default"])(_context11 = _this2.onBlur).call(_context11, (0, _assertThisInitialized2["default"])(_this2), key),
|
|
317
|
+
onBlur: (0, _bind["default"])(_context12 = _this2.onExitValid).call(_context12, (0, _assertThisInitialized2["default"])(_this2), key),
|
|
318
|
+
onGetCode: (0, _bind["default"])(_context13 = _this2.onGetCode).call(_context13, (0, _assertThisInitialized2["default"])(_this2), key)
|
|
313
319
|
});
|
|
314
320
|
} else if (type === 'area') {
|
|
315
|
-
var
|
|
321
|
+
var _context14, _context15;
|
|
316
322
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
317
|
-
onChange: (0, _bind["default"])(
|
|
318
|
-
onBlur: (0, _bind["default"])(
|
|
319
|
-
onAreaSearch: _this2.props.onAreaSearch
|
|
323
|
+
onChange: (0, _bind["default"])(_context14 = _this2.onBlur).call(_context14, (0, _assertThisInitialized2["default"])(_this2), key),
|
|
324
|
+
onBlur: (0, _bind["default"])(_context15 = _this2.onExitValid).call(_context15, (0, _assertThisInitialized2["default"])(_this2), key),
|
|
325
|
+
onAreaSearch: _this2.props.onAreaSearch,
|
|
326
|
+
onClick: _this2.props.onAdd
|
|
320
327
|
});
|
|
321
328
|
} else if (type === 'uploadImg') {
|
|
322
|
-
var
|
|
329
|
+
var _context16, _context17;
|
|
323
330
|
var _commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
|
|
324
331
|
return _objectSpread(_objectSpread(_objectSpread({}, props), _commonProps), {}, {
|
|
325
|
-
onChange: (0, _bind["default"])(
|
|
326
|
-
onBlur: (0, _bind["default"])(
|
|
332
|
+
onChange: (0, _bind["default"])(_context16 = _this2.onBlur).call(_context16, (0, _assertThisInitialized2["default"])(_this2), key),
|
|
333
|
+
onBlur: (0, _bind["default"])(_context17 = _this2.onExitValid).call(_context17, (0, _assertThisInitialized2["default"])(_this2), key)
|
|
327
334
|
});
|
|
328
335
|
} else if (type === 'double') {
|
|
329
336
|
return props;
|
|
330
337
|
} else {
|
|
331
|
-
var
|
|
338
|
+
var _context18, _context19;
|
|
332
339
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
333
|
-
onChange: (0, _bind["default"])(
|
|
334
|
-
onBlur: (0, _bind["default"])(
|
|
340
|
+
onChange: (0, _bind["default"])(_context18 = _this2.onBlur).call(_context18, (0, _assertThisInitialized2["default"])(_this2), key),
|
|
341
|
+
onBlur: (0, _bind["default"])(_context19 = _this2.onExitValid).call(_context19, (0, _assertThisInitialized2["default"])(_this2), key)
|
|
335
342
|
});
|
|
336
343
|
}
|
|
337
344
|
});
|
|
338
|
-
(0, _defineProperty2["default"])(_this2, "getControlProps", function (control, status) {
|
|
345
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getControlProps", function (control, status) {
|
|
339
346
|
var _this2$props3 = _this2.props,
|
|
340
347
|
_this2$props3$value = _this2$props3.value,
|
|
341
348
|
value = _this2$props3$value === void 0 ? {} : _this2$props3$value,
|
|
@@ -356,25 +363,25 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
356
363
|
requiredColor: requiredColor
|
|
357
364
|
});
|
|
358
365
|
});
|
|
359
|
-
(0, _defineProperty2["default"])(_this2, "getOptions", function (key, options) {
|
|
366
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "getOptions", function (key, options) {
|
|
360
367
|
var higher = _this2.props.options || {};
|
|
361
368
|
return higher[key] || options;
|
|
362
369
|
});
|
|
363
|
-
(0, _defineProperty2["default"])(_this2, "toEmpty", function (props) {});
|
|
364
|
-
(0, _defineProperty2["default"])(_this2, "toText", function (props) {
|
|
370
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toEmpty", function (props) {});
|
|
371
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toText", function (props) {
|
|
365
372
|
return /*#__PURE__*/_react["default"].createElement(Controlled, props);
|
|
366
373
|
});
|
|
367
|
-
(0, _defineProperty2["default"])(_this2, "toPassword", function (props) {
|
|
374
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toPassword", function (props) {
|
|
368
375
|
return /*#__PURE__*/_react["default"].createElement(Controlled, props);
|
|
369
376
|
});
|
|
370
|
-
(0, _defineProperty2["default"])(_this2, "toEditor", function (props, control) {
|
|
377
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toEditor", function (props, control) {
|
|
371
378
|
props.inputKey = control.key;
|
|
372
379
|
return /*#__PURE__*/_react["default"].createElement(Controlled, props);
|
|
373
380
|
});
|
|
374
|
-
(0, _defineProperty2["default"])(_this2, "toSelectWriting", function (props, control) {
|
|
381
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toSelectWriting", function (props, control) {
|
|
375
382
|
return /*#__PURE__*/_react["default"].createElement(Controlled, props);
|
|
376
383
|
});
|
|
377
|
-
(0, _defineProperty2["default"])(_this2, "toTextArea", function (props, control) {
|
|
384
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toTextArea", function (props, control) {
|
|
378
385
|
if (control.allFullFather) {
|
|
379
386
|
props.rows = control.rows;
|
|
380
387
|
props.maxLength = control.maxLength;
|
|
@@ -389,22 +396,22 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
389
396
|
}
|
|
390
397
|
return /*#__PURE__*/_react["default"].createElement(Controlled, props);
|
|
391
398
|
});
|
|
392
|
-
(0, _defineProperty2["default"])(_this2, "toNumber", function (props) {
|
|
399
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toNumber", function (props) {
|
|
393
400
|
props.defaultValue = props.value;
|
|
394
401
|
delete props.value;
|
|
395
402
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
396
403
|
});
|
|
397
|
-
(0, _defineProperty2["default"])(_this2, "toDoubleInput", function (props, control, cc) {
|
|
398
|
-
var
|
|
404
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toDoubleInput", function (props, control, cc) {
|
|
405
|
+
var _context20, _context21;
|
|
399
406
|
props.defaultValue = props.value;
|
|
400
407
|
props.doubleKey = props.key;
|
|
401
408
|
props.doubleValue = _helper["default"].getObject(cc, props.key);
|
|
402
|
-
props.onChangeKey1 = (0, _bind["default"])(
|
|
403
|
-
props.onChangeKey2 = (0, _bind["default"])(
|
|
409
|
+
props.onChangeKey1 = (0, _bind["default"])(_context20 = _this2.onChange).call(_context20, (0, _assertThisInitialized2["default"])(_this2), props.key[0]);
|
|
410
|
+
props.onChangeKey2 = (0, _bind["default"])(_context21 = _this2.onChange).call(_context21, (0, _assertThisInitialized2["default"])(_this2), props.key[1]);
|
|
404
411
|
delete props.value;
|
|
405
412
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
406
413
|
});
|
|
407
|
-
(0, _defineProperty2["default"])(_this2, "toSelect", function (props, _ref6) {
|
|
414
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toSelect", function (props, _ref6) {
|
|
408
415
|
var options = _ref6.options,
|
|
409
416
|
key = _ref6.key;
|
|
410
417
|
props.getPopupContainer = _this2.getPopupContainer;
|
|
@@ -412,14 +419,14 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
412
419
|
props.dropdownMatchSelectWidth = false;
|
|
413
420
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
414
421
|
});
|
|
415
|
-
(0, _defineProperty2["default"])(_this2, "toTreeSelect", function (props, filter) {
|
|
422
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toTreeSelect", function (props, filter) {
|
|
416
423
|
var container = _this2.getContainer();
|
|
417
424
|
container && (props.getPopupContainer = container);
|
|
418
425
|
props.options = _this2.getOptions(filter);
|
|
419
426
|
props.onSearch = _this2.createSearchEvent(filter);
|
|
420
427
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
421
428
|
});
|
|
422
|
-
(0, _defineProperty2["default"])(_this2, "createSearchEvent", function (control) {
|
|
429
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "createSearchEvent", function (control) {
|
|
423
430
|
if (_this2.props.onSearch) {
|
|
424
431
|
return function (value) {
|
|
425
432
|
return _this2.props.onSearch(control.key, value, control);
|
|
@@ -428,7 +435,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
428
435
|
return null;
|
|
429
436
|
}
|
|
430
437
|
});
|
|
431
|
-
(0, _defineProperty2["default"])(_this2, "createGetCodeEvent", function (control) {
|
|
438
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "createGetCodeEvent", function (control) {
|
|
432
439
|
if (_this2.props.onGetCode) {
|
|
433
440
|
return function (value) {
|
|
434
441
|
return _this2.props.onGetCode(control.key, value, control);
|
|
@@ -437,14 +444,14 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
437
444
|
return null;
|
|
438
445
|
}
|
|
439
446
|
});
|
|
440
|
-
(0, _defineProperty2["default"])(_this2, "toSearch", function (props, control) {
|
|
447
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toSearch", function (props, control) {
|
|
441
448
|
props.getPopupContainer = _this2.getPopupContainer;
|
|
442
449
|
props.options = _this2.getOptions(control.key, control.options);
|
|
443
450
|
props.onSearch = _this2.createSearchEvent(control);
|
|
444
451
|
props.dropdownMatchSelectWidth = false;
|
|
445
452
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
446
453
|
});
|
|
447
|
-
(0, _defineProperty2["default"])(_this2, "toDate", function (props, _ref7) {
|
|
454
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toDate", function (props, _ref7) {
|
|
448
455
|
var rule = _ref7.rule;
|
|
449
456
|
props.getCalendarContainer = _this2.getPopupContainer;
|
|
450
457
|
props.style = {
|
|
@@ -453,7 +460,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
453
460
|
rule && (props.disabledDate = _this2.validDate(rule));
|
|
454
461
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
455
462
|
});
|
|
456
|
-
(0, _defineProperty2["default"])(_this2, "toRangePicker", function (props, _ref8) {
|
|
463
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toRangePicker", function (props, _ref8) {
|
|
457
464
|
var rule = _ref8.rule;
|
|
458
465
|
props.getCalendarContainer = _this2.getPopupContainer;
|
|
459
466
|
props.style = {
|
|
@@ -462,32 +469,32 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
462
469
|
// rule && (props.disabledDate = this.validDate(rule));
|
|
463
470
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
464
471
|
});
|
|
465
|
-
(0, _defineProperty2["default"])(_this2, "toRadioGroup", function (props, _ref9) {
|
|
472
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toRadioGroup", function (props, _ref9) {
|
|
466
473
|
var key = _ref9.key,
|
|
467
474
|
options = _ref9.options;
|
|
468
475
|
props.options = _this2.getOptions(key, options);
|
|
469
476
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
470
477
|
});
|
|
471
|
-
(0, _defineProperty2["default"])(_this2, "captcha", function (props, control) {
|
|
478
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "captcha", function (props, control) {
|
|
472
479
|
props.onGetCode = _this2.props.onGetCode;
|
|
473
480
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
474
481
|
});
|
|
475
|
-
(0, _defineProperty2["default"])(_this2, "toReadonly", function (props,
|
|
476
|
-
var options =
|
|
477
|
-
key =
|
|
482
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toReadonly", function (props, _ref10) {
|
|
483
|
+
var options = _ref10.options,
|
|
484
|
+
key = _ref10.key;
|
|
478
485
|
props.value = (0, _Control.getTitle)(props.value, _this2.getOptions(key, options));
|
|
479
486
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
480
487
|
});
|
|
481
|
-
(0, _defineProperty2["default"])(_this2, "selectSearch", function (props, control) {
|
|
488
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "selectSearch", function (props, control) {
|
|
482
489
|
props.getPopupContainer = _this2.getPopupContainer;
|
|
483
490
|
props.options = _this2.getOptions(control.key, control.options);
|
|
484
491
|
props.onSearch = _this2.createSearchEvent(control);
|
|
485
492
|
props.dropdownMatchSelectWidth = false;
|
|
486
493
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
487
494
|
});
|
|
488
|
-
(0, _defineProperty2["default"])(_this2, "area", function (props,
|
|
489
|
-
var key =
|
|
490
|
-
options =
|
|
495
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "area", function (props, _ref11) {
|
|
496
|
+
var key = _ref11.key,
|
|
497
|
+
options = _ref11.options;
|
|
491
498
|
var readonly = _this2.props.readonly;
|
|
492
499
|
props.parentKey = key;
|
|
493
500
|
props.options = _this2.getOptions(key, options);
|
|
@@ -497,17 +504,17 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
497
504
|
}) ? true : false;
|
|
498
505
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
499
506
|
});
|
|
500
|
-
(0, _defineProperty2["default"])(_this2, "uploadImg", function (props, control) {
|
|
501
|
-
var
|
|
507
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "uploadImg", function (props, control) {
|
|
508
|
+
var _context22;
|
|
502
509
|
var readonly = _this2.props.readonly;
|
|
503
510
|
props.required = control.required || false;
|
|
504
|
-
props.onFileChange = (0, _bind["default"])(
|
|
511
|
+
props.onFileChange = (0, _bind["default"])(_context22 = _this2.onFileChange).call(_context22, (0, _assertThisInitialized2["default"])(_this2), control);
|
|
505
512
|
props.readonly = readonly === true || (0, _isArray["default"])(readonly) && (0, _some["default"])(readonly).call(readonly, function (readonlyKey) {
|
|
506
513
|
return readonlyKey === control.key;
|
|
507
514
|
}) ? true : false;
|
|
508
515
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
509
516
|
});
|
|
510
|
-
(0, _defineProperty2["default"])(_this2, "toCascader", function (props, control) {
|
|
517
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toCascader", function (props, control) {
|
|
511
518
|
var container = _this2.getContainer();
|
|
512
519
|
container && (props.getPopupContainer = container);
|
|
513
520
|
props.options = control.options || [];
|
|
@@ -516,17 +523,17 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
516
523
|
props.loadData = _this2.createSearchEvent(control);
|
|
517
524
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
518
525
|
});
|
|
519
|
-
(0, _defineProperty2["default"])(_this2, "toCheckbox", function (props, control) {
|
|
520
|
-
var
|
|
526
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toCheckbox", function (props, control) {
|
|
527
|
+
var _context23;
|
|
521
528
|
var options = control.options || [];
|
|
522
529
|
return /*#__PURE__*/_react["default"].createElement(_checkbox["default"].Group, {
|
|
523
530
|
options: options,
|
|
524
531
|
disabled: _this2.props.readonly === true,
|
|
525
|
-
onChange: (0, _bind["default"])(
|
|
532
|
+
onChange: (0, _bind["default"])(_context23 = _this2.onBlur).call(_context23, (0, _assertThisInitialized2["default"])(_this2), control.key),
|
|
526
533
|
value: _this2.props.value[control.key]
|
|
527
534
|
});
|
|
528
535
|
});
|
|
529
|
-
(0, _defineProperty2["default"])(_this2, "toControl", function (props, control) {
|
|
536
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toControl", function (props, control) {
|
|
530
537
|
switch (props.type) {
|
|
531
538
|
case 'readonly':
|
|
532
539
|
return _this2.toReadonly(props, control);
|
|
@@ -576,34 +583,34 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
576
583
|
return 'type error';
|
|
577
584
|
}
|
|
578
585
|
});
|
|
579
|
-
(0, _defineProperty2["default"])(_this2, "toLabel", function (
|
|
580
|
-
var title =
|
|
581
|
-
showAdd =
|
|
582
|
-
showQuery =
|
|
583
|
-
key =
|
|
584
|
-
showInfo =
|
|
585
|
-
showInfoTitle =
|
|
586
|
-
showIcon =
|
|
587
|
-
iconType =
|
|
586
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toLabel", function (_ref12, type) {
|
|
587
|
+
var title = _ref12.title,
|
|
588
|
+
showAdd = _ref12.showAdd,
|
|
589
|
+
showQuery = _ref12.showQuery,
|
|
590
|
+
key = _ref12.key,
|
|
591
|
+
showInfo = _ref12.showInfo,
|
|
592
|
+
showInfoTitle = _ref12.showInfoTitle,
|
|
593
|
+
showIcon = _ref12.showIcon,
|
|
594
|
+
iconType = _ref12.iconType;
|
|
588
595
|
if (showAdd && type !== 'readonly') {
|
|
589
|
-
var
|
|
590
|
-
var onClick = (0, _bind["default"])(
|
|
596
|
+
var _context24;
|
|
597
|
+
var onClick = (0, _bind["default"])(_context24 = _this2.onAdd).call(_context24, (0, _assertThisInitialized2["default"])(_this2), key, title);
|
|
591
598
|
return /*#__PURE__*/_react["default"].createElement("span", null, title, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
592
599
|
role: "add",
|
|
593
600
|
type: "plus-circle-o",
|
|
594
601
|
onClick: onClick
|
|
595
602
|
}));
|
|
596
603
|
} else if (showQuery && type !== 'readonly') {
|
|
597
|
-
var
|
|
598
|
-
var _onClick = (0, _bind["default"])(
|
|
604
|
+
var _context25;
|
|
605
|
+
var _onClick = (0, _bind["default"])(_context25 = _this2.onAdd).call(_context25, (0, _assertThisInitialized2["default"])(_this2), key, title);
|
|
599
606
|
return /*#__PURE__*/_react["default"].createElement("span", null, title, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
600
607
|
role: "add",
|
|
601
608
|
type: "search",
|
|
602
609
|
onClick: _onClick
|
|
603
610
|
}));
|
|
604
611
|
} else if (showIcon && iconType && type !== 'readonly' && showInfoTitle) {
|
|
605
|
-
var
|
|
606
|
-
var _onClick2 = (0, _bind["default"])(
|
|
612
|
+
var _context26;
|
|
613
|
+
var _onClick2 = (0, _bind["default"])(_context26 = _this2.onAdd).call(_context26, (0, _assertThisInitialized2["default"])(_this2), key, title);
|
|
607
614
|
return /*#__PURE__*/_react["default"].createElement("span", null, title, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
608
615
|
title: showInfoTitle
|
|
609
616
|
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
@@ -612,8 +619,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
612
619
|
onClick: _onClick2
|
|
613
620
|
})));
|
|
614
621
|
} else if (showIcon && iconType && type !== 'readonly') {
|
|
615
|
-
var
|
|
616
|
-
var _onClick3 = (0, _bind["default"])(
|
|
622
|
+
var _context27;
|
|
623
|
+
var _onClick3 = (0, _bind["default"])(_context27 = _this2.onAdd).call(_context27, (0, _assertThisInitialized2["default"])(_this2), key, title);
|
|
617
624
|
return /*#__PURE__*/_react["default"].createElement("span", null, title, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
618
625
|
role: "add",
|
|
619
626
|
type: iconType,
|
|
@@ -629,7 +636,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
629
636
|
return title;
|
|
630
637
|
}
|
|
631
638
|
});
|
|
632
|
-
(0, _defineProperty2["default"])(_this2, "toCol", function (span, control) {
|
|
639
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toCol", function (span, control) {
|
|
633
640
|
var factor = control.span || 1;
|
|
634
641
|
var status = _this2.getValidState(control);
|
|
635
642
|
var controlProps = _this2.getControlProps(control, status);
|
|
@@ -650,7 +657,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
650
657
|
key: control.key
|
|
651
658
|
}, checkable && /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
|
|
652
659
|
className: (0, _variables["default"])('SuperForm2').checkbox,
|
|
653
|
-
onChange: (0, _bind["default"])(onCheckItem).call(onCheckItem, _this2, control),
|
|
660
|
+
onChange: (0, _bind["default"])(onCheckItem).call(onCheckItem, (0, _assertThisInitialized2["default"])(_this2), control),
|
|
654
661
|
checked: control.checked
|
|
655
662
|
}), /*#__PURE__*/_react["default"].createElement(FormItem, (0, _extends2["default"])({}, itemProps, {
|
|
656
663
|
className: checkable ? (0, _variables["default"])('SuperForm2').formItemWithCheckbox : '',
|
|
@@ -678,8 +685,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
678
685
|
}
|
|
679
686
|
});
|
|
680
687
|
});
|
|
681
|
-
(0, _defineProperty2["default"])(_this2, "toCols", function () {
|
|
682
|
-
var
|
|
688
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "toCols", function () {
|
|
689
|
+
var _context28;
|
|
683
690
|
var _this2$props5 = _this2.props,
|
|
684
691
|
_this2$props5$colNum = _this2$props5.colNum,
|
|
685
692
|
colNum = _this2$props5$colNum === void 0 ? defaultColNum : _this2$props5$colNum,
|
|
@@ -688,7 +695,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
688
695
|
colNum = 1;
|
|
689
696
|
}
|
|
690
697
|
var span = 24 / colNum;
|
|
691
|
-
return (0, _map["default"])(
|
|
698
|
+
return (0, _map["default"])(_context28 = _this2.getControls()).call(_context28, function (control) {
|
|
692
699
|
if (allFullFather) {
|
|
693
700
|
control.allFullFather = allFullFather;
|
|
694
701
|
}
|
|
@@ -697,8 +704,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
697
704
|
});
|
|
698
705
|
return _this2;
|
|
699
706
|
}
|
|
700
|
-
(0,
|
|
701
|
-
return (0, _createClass2["default"])(SuperForm2, [{
|
|
707
|
+
(0, _createClass2["default"])(SuperForm2, [{
|
|
702
708
|
key: "render",
|
|
703
709
|
value: function render() {
|
|
704
710
|
this.initValidState();
|
|
@@ -716,6 +722,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
716
722
|
}, this.toCols())));
|
|
717
723
|
}
|
|
718
724
|
}]);
|
|
725
|
+
return SuperForm2;
|
|
719
726
|
}(_react["default"].Component);
|
|
720
727
|
(0, _defineProperty2["default"])(SuperForm2, "propTypes", {
|
|
721
728
|
controls: _propTypes["default"].arrayOf(_propTypes["default"].shape(ControlType)).isRequired,
|