uiw 4.10.2 → 4.10.6
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/README.md +8 -2
- package/dist/uiw.css +4828 -0
- package/dist/uiw.js +445 -67
- package/dist/uiw.min.css +1 -0
- package/dist/uiw.min.js +1 -1
- package/package.json +55 -55
package/dist/uiw.js
CHANGED
|
@@ -1007,7 +1007,7 @@ try {
|
|
|
1007
1007
|
|
|
1008
1008
|
/***/ }),
|
|
1009
1009
|
|
|
1010
|
-
/***/
|
|
1010
|
+
/***/ 523:
|
|
1011
1011
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1012
1012
|
|
|
1013
1013
|
"use strict";
|
|
@@ -6218,32 +6218,376 @@ function Dropdown(props) {
|
|
|
6218
6218
|
children: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props))
|
|
6219
6219
|
}));
|
|
6220
6220
|
}
|
|
6221
|
-
;// CONCATENATED MODULE: ../react-file-input/esm/
|
|
6222
|
-
// extracted by mini-css-extract-plugin
|
|
6223
|
-
/* harmony default export */ var react_file_input_esm_style = ({});
|
|
6224
|
-
;// CONCATENATED MODULE: ../react-file-input/esm/index.js
|
|
6225
|
-
|
|
6221
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/Input.js
|
|
6226
6222
|
|
|
6227
|
-
var react_file_input_esm_excluded = ["className", "prefixCls"];
|
|
6228
6223
|
|
|
6224
|
+
var Input_excluded = ["className", "dataLabel", "prefixCls"];
|
|
6229
6225
|
|
|
6230
6226
|
|
|
6231
6227
|
|
|
6232
|
-
/* harmony default export */ var
|
|
6228
|
+
/* harmony default export */ var Input = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
|
6233
6229
|
var className = props.className,
|
|
6230
|
+
_props$dataLabel = props.dataLabel,
|
|
6231
|
+
dataLabel = _props$dataLabel === void 0 ? 'Browse' : _props$dataLabel,
|
|
6234
6232
|
_props$prefixCls = props.prefixCls,
|
|
6235
6233
|
prefixCls = _props$prefixCls === void 0 ? 'w-fileinput' : _props$prefixCls,
|
|
6236
|
-
other = _objectWithoutPropertiesLoose(props,
|
|
6234
|
+
other = _objectWithoutPropertiesLoose(props, Input_excluded);
|
|
6237
6235
|
|
|
6238
6236
|
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
6239
6237
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, _extends({
|
|
6240
6238
|
ref: ref,
|
|
6241
|
-
"data-label":
|
|
6239
|
+
"data-label": dataLabel,
|
|
6242
6240
|
className: cls
|
|
6243
6241
|
}, other, {
|
|
6244
6242
|
type: "file"
|
|
6245
6243
|
}));
|
|
6246
6244
|
}));
|
|
6245
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/style/index.css
|
|
6246
|
+
// extracted by mini-css-extract-plugin
|
|
6247
|
+
/* harmony default export */ var react_file_input_esm_style = ({});
|
|
6248
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/List.js
|
|
6249
|
+
|
|
6250
|
+
|
|
6251
|
+
|
|
6252
|
+
|
|
6253
|
+
|
|
6254
|
+
|
|
6255
|
+
var Picture = function Picture(props) {
|
|
6256
|
+
var className = props.className,
|
|
6257
|
+
_props$prefixCls = props.prefixCls,
|
|
6258
|
+
prefixCls = _props$prefixCls === void 0 ? 'w-fileinput-list' : _props$prefixCls,
|
|
6259
|
+
_props$dataList = props.dataList,
|
|
6260
|
+
dataList = _props$dataList === void 0 ? [] : _props$dataList,
|
|
6261
|
+
uploadType = props.uploadType,
|
|
6262
|
+
_props$size = props.size,
|
|
6263
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
6264
|
+
_props$shape = props.shape,
|
|
6265
|
+
shape = _props$shape === void 0 ? 'round' : _props$shape,
|
|
6266
|
+
readonly = props.readonly,
|
|
6267
|
+
children = props.children,
|
|
6268
|
+
_props$showFileIcon = props.showFileIcon,
|
|
6269
|
+
showFileIcon = _props$showFileIcon === void 0 ? {
|
|
6270
|
+
showPreviewIcon: true,
|
|
6271
|
+
showRemoveIcon: true
|
|
6272
|
+
} : _props$showFileIcon,
|
|
6273
|
+
onPreview = props.onPreview,
|
|
6274
|
+
onAdd = props.onAdd,
|
|
6275
|
+
onRemove = props.onRemove;
|
|
6276
|
+
var cls = [prefixCls, prefixCls + "-size-" + size, prefixCls + "-shape-" + shape, className].filter(Boolean).join(' ').trim();
|
|
6277
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6278
|
+
className: cls,
|
|
6279
|
+
children: [children && !readonly && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
|
|
6280
|
+
onClick: onAdd
|
|
6281
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6282
|
+
children: dataList.map(function (item, index) {
|
|
6283
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6284
|
+
className: prefixCls + "-" + uploadType,
|
|
6285
|
+
children: [uploadType === 'picture' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6286
|
+
className: prefixCls + "-info " + prefixCls + "-" + uploadType + "-info",
|
|
6287
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
6288
|
+
src: item['dataURL'],
|
|
6289
|
+
alt: ""
|
|
6290
|
+
}), (showFileIcon == null ? void 0 : showFileIcon.showPreviewIcon) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6291
|
+
className: prefixCls + "-actions",
|
|
6292
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
6293
|
+
className: prefixCls + "-actions-search",
|
|
6294
|
+
onClick: function onClick() {
|
|
6295
|
+
return onPreview == null ? void 0 : onPreview(item);
|
|
6296
|
+
},
|
|
6297
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
6298
|
+
type: "search",
|
|
6299
|
+
style: {
|
|
6300
|
+
color: '#fff',
|
|
6301
|
+
fontSize: 16
|
|
6302
|
+
}
|
|
6303
|
+
})
|
|
6304
|
+
})
|
|
6305
|
+
})]
|
|
6306
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6307
|
+
className: prefixCls + "-" + uploadType + "-text",
|
|
6308
|
+
children: item.name
|
|
6309
|
+
}), (showFileIcon == null ? void 0 : showFileIcon.showRemoveIcon) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6310
|
+
className: prefixCls + "-" + uploadType + "-icon",
|
|
6311
|
+
onClick: function onClick() {
|
|
6312
|
+
return onRemove == null ? void 0 : onRemove(index);
|
|
6313
|
+
},
|
|
6314
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
6315
|
+
type: "delete",
|
|
6316
|
+
style: {
|
|
6317
|
+
color: '#999'
|
|
6318
|
+
}
|
|
6319
|
+
})
|
|
6320
|
+
})]
|
|
6321
|
+
}, index);
|
|
6322
|
+
})
|
|
6323
|
+
})]
|
|
6324
|
+
});
|
|
6325
|
+
};
|
|
6326
|
+
|
|
6327
|
+
/* harmony default export */ var List = (Picture);
|
|
6328
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/Card.js
|
|
6329
|
+
|
|
6330
|
+
|
|
6331
|
+
|
|
6332
|
+
|
|
6333
|
+
|
|
6334
|
+
|
|
6335
|
+
var Card = function Card(props) {
|
|
6336
|
+
var className = props.className,
|
|
6337
|
+
_props$prefixCls = props.prefixCls,
|
|
6338
|
+
prefixCls = _props$prefixCls === void 0 ? 'w-fileinput-card' : _props$prefixCls,
|
|
6339
|
+
_props$dataList = props.dataList,
|
|
6340
|
+
dataList = _props$dataList === void 0 ? [] : _props$dataList,
|
|
6341
|
+
_props$maxNumber = props.maxNumber,
|
|
6342
|
+
maxNumber = _props$maxNumber === void 0 ? 3 : _props$maxNumber,
|
|
6343
|
+
_props$shape = props.shape,
|
|
6344
|
+
shape = _props$shape === void 0 ? 'round' : _props$shape,
|
|
6345
|
+
_props$size = props.size,
|
|
6346
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
6347
|
+
readonly = props.readonly,
|
|
6348
|
+
children = props.children,
|
|
6349
|
+
_props$showFileIcon = props.showFileIcon,
|
|
6350
|
+
showFileIcon = _props$showFileIcon === void 0 ? {
|
|
6351
|
+
showPreviewIcon: true,
|
|
6352
|
+
showRemoveIcon: true
|
|
6353
|
+
} : _props$showFileIcon,
|
|
6354
|
+
onAdd = props.onAdd,
|
|
6355
|
+
onPreview = props.onPreview,
|
|
6356
|
+
onRemove = props.onRemove;
|
|
6357
|
+
var cls = [prefixCls, prefixCls + "-size-" + size, prefixCls + "-shape-" + shape, className].filter(Boolean).join(' ').trim();
|
|
6358
|
+
var isAction = showFileIcon.showPreviewIcon || showFileIcon.showRemoveIcon ? true : false;
|
|
6359
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6360
|
+
className: cls,
|
|
6361
|
+
children: [dataList.map(function (item, index) {
|
|
6362
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6363
|
+
className: prefixCls + "-box",
|
|
6364
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6365
|
+
className: prefixCls + "-box-info",
|
|
6366
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
6367
|
+
src: item['dataURL'],
|
|
6368
|
+
alt: ""
|
|
6369
|
+
})
|
|
6370
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6371
|
+
className: isAction ? prefixCls + "-actions" : '',
|
|
6372
|
+
children: [(showFileIcon == null ? void 0 : showFileIcon.showPreviewIcon) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
6373
|
+
className: prefixCls + "-actions-remove",
|
|
6374
|
+
onClick: function onClick() {
|
|
6375
|
+
return onPreview == null ? void 0 : onPreview(item);
|
|
6376
|
+
},
|
|
6377
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
6378
|
+
type: "search",
|
|
6379
|
+
style: {
|
|
6380
|
+
color: '#fff',
|
|
6381
|
+
fontSize: 16
|
|
6382
|
+
}
|
|
6383
|
+
})
|
|
6384
|
+
}), (showFileIcon == null ? void 0 : showFileIcon.showRemoveIcon) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
6385
|
+
className: prefixCls + "-actions-remove",
|
|
6386
|
+
onClick: function onClick() {
|
|
6387
|
+
return onRemove == null ? void 0 : onRemove(index);
|
|
6388
|
+
},
|
|
6389
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
6390
|
+
type: "delete",
|
|
6391
|
+
style: {
|
|
6392
|
+
color: '#fff',
|
|
6393
|
+
fontSize: 16
|
|
6394
|
+
}
|
|
6395
|
+
})
|
|
6396
|
+
})]
|
|
6397
|
+
})]
|
|
6398
|
+
}, index);
|
|
6399
|
+
}), maxNumber > dataList.length && !readonly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6400
|
+
className: prefixCls + "-box " + prefixCls + "-btn",
|
|
6401
|
+
onClick: onAdd,
|
|
6402
|
+
children: children
|
|
6403
|
+
})]
|
|
6404
|
+
});
|
|
6405
|
+
};
|
|
6406
|
+
|
|
6407
|
+
/* harmony default export */ var esm_Card = (Card);
|
|
6408
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/utils.js
|
|
6409
|
+
|
|
6410
|
+
var openFileDialog = function openFileDialog(inputRef) {
|
|
6411
|
+
if (inputRef.current) inputRef.current.click();
|
|
6412
|
+
};
|
|
6413
|
+
var getAcceptTypeString = function getAcceptTypeString(accept) {
|
|
6414
|
+
return accept && accept.length > 0 ? accept.map(function (item) {
|
|
6415
|
+
return "." + item;
|
|
6416
|
+
}).join(', ') : 'image/*';
|
|
6417
|
+
};
|
|
6418
|
+
var getBase64 = function getBase64(file) {
|
|
6419
|
+
var reader = new FileReader();
|
|
6420
|
+
return new Promise(function (resolve) {
|
|
6421
|
+
reader.addEventListener('load', function () {
|
|
6422
|
+
return resolve(String(reader.result));
|
|
6423
|
+
});
|
|
6424
|
+
reader.readAsDataURL(file);
|
|
6425
|
+
});
|
|
6426
|
+
};
|
|
6427
|
+
var getListFiles = function getListFiles(files, dataURLKey) {
|
|
6428
|
+
var promiseFiles = [];
|
|
6429
|
+
|
|
6430
|
+
for (var i = 0; i < files.length; i += 1) {
|
|
6431
|
+
promiseFiles.push(getBase64(files[i]));
|
|
6432
|
+
}
|
|
6433
|
+
|
|
6434
|
+
return Promise.all(promiseFiles).then(function (fileListBase64) {
|
|
6435
|
+
var fileList = fileListBase64.map(function (base64, index) {
|
|
6436
|
+
var _ref;
|
|
6437
|
+
|
|
6438
|
+
return _ref = {}, _defineProperty(_ref, dataURLKey, base64), _defineProperty(_ref, "file", files[index]), _defineProperty(_ref, "name", files[index].name), _ref;
|
|
6439
|
+
});
|
|
6440
|
+
return fileList;
|
|
6441
|
+
});
|
|
6442
|
+
};
|
|
6443
|
+
var isUploadType = function isUploadType(type) {
|
|
6444
|
+
return ['picture', 'text', 'card'].includes(type);
|
|
6445
|
+
};
|
|
6446
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/FileList.js
|
|
6447
|
+
|
|
6448
|
+
|
|
6449
|
+
|
|
6450
|
+
|
|
6451
|
+
|
|
6452
|
+
|
|
6453
|
+
|
|
6454
|
+
|
|
6455
|
+
|
|
6456
|
+
|
|
6457
|
+
|
|
6458
|
+
var FileList = function FileList(props) {
|
|
6459
|
+
var uploadType = props.uploadType,
|
|
6460
|
+
_props$value = props.value,
|
|
6461
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
6462
|
+
_props$multiple = props.multiple,
|
|
6463
|
+
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
|
6464
|
+
_props$maxNumber = props.maxNumber,
|
|
6465
|
+
maxNumber = _props$maxNumber === void 0 ? 3 : _props$maxNumber,
|
|
6466
|
+
onChange = props.onChange;
|
|
6467
|
+
var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
6468
|
+
var inValue = value || [];
|
|
6469
|
+
|
|
6470
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
|
|
6471
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
6472
|
+
fileList = _useState2[0],
|
|
6473
|
+
setFileList = _useState2[1];
|
|
6474
|
+
|
|
6475
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
6476
|
+
setFileList(inValue);
|
|
6477
|
+
}, []);
|
|
6478
|
+
var handleClickInput = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
|
6479
|
+
return openFileDialog(inputRef);
|
|
6480
|
+
}, [inputRef]);
|
|
6481
|
+
var onFileUpload = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
|
6482
|
+
if (inputRef.current) inputRef.current.value = '';
|
|
6483
|
+
handleClickInput();
|
|
6484
|
+
}, [handleClickInput]);
|
|
6485
|
+
|
|
6486
|
+
var onInputChange = /*#__PURE__*/function () {
|
|
6487
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(e) {
|
|
6488
|
+
var files, updatedFileList, updatedList;
|
|
6489
|
+
return regenerator_default().wrap(function _callee$(_context) {
|
|
6490
|
+
while (1) {
|
|
6491
|
+
switch (_context.prev = _context.next) {
|
|
6492
|
+
case 0:
|
|
6493
|
+
files = e.target.files;
|
|
6494
|
+
|
|
6495
|
+
if (files) {
|
|
6496
|
+
_context.next = 3;
|
|
6497
|
+
break;
|
|
6498
|
+
}
|
|
6499
|
+
|
|
6500
|
+
return _context.abrupt("return");
|
|
6501
|
+
|
|
6502
|
+
case 3:
|
|
6503
|
+
_context.next = 5;
|
|
6504
|
+
return getListFiles(files, 'dataURL');
|
|
6505
|
+
|
|
6506
|
+
case 5:
|
|
6507
|
+
updatedFileList = _context.sent;
|
|
6508
|
+
updatedList = [].concat(_toConsumableArray(fileList), _toConsumableArray(updatedFileList));
|
|
6509
|
+
|
|
6510
|
+
if (maxNumber < updatedList.length) {
|
|
6511
|
+
updatedList = updatedList.slice(0, maxNumber);
|
|
6512
|
+
}
|
|
6513
|
+
|
|
6514
|
+
setFileList(updatedList);
|
|
6515
|
+
onChange == null ? void 0 : onChange(updatedList);
|
|
6516
|
+
|
|
6517
|
+
case 10:
|
|
6518
|
+
case "end":
|
|
6519
|
+
return _context.stop();
|
|
6520
|
+
}
|
|
6521
|
+
}
|
|
6522
|
+
}, _callee);
|
|
6523
|
+
}));
|
|
6524
|
+
|
|
6525
|
+
return function onInputChange(_x) {
|
|
6526
|
+
return _ref.apply(this, arguments);
|
|
6527
|
+
};
|
|
6528
|
+
}();
|
|
6529
|
+
|
|
6530
|
+
var onRemove = function onRemove(index) {
|
|
6531
|
+
var updatedList = _toConsumableArray(fileList);
|
|
6532
|
+
|
|
6533
|
+
updatedList.splice(index, 1);
|
|
6534
|
+
setFileList(updatedList);
|
|
6535
|
+
onChange == null ? void 0 : onChange(updatedList);
|
|
6536
|
+
};
|
|
6537
|
+
|
|
6538
|
+
var Comp;
|
|
6539
|
+
|
|
6540
|
+
if (uploadType === 'card') {
|
|
6541
|
+
Comp = esm_Card;
|
|
6542
|
+
}
|
|
6543
|
+
|
|
6544
|
+
if (uploadType === 'picture' || uploadType === 'text') {
|
|
6545
|
+
Comp = List;
|
|
6546
|
+
}
|
|
6547
|
+
|
|
6548
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
6549
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("input", {
|
|
6550
|
+
type: "file",
|
|
6551
|
+
ref: inputRef,
|
|
6552
|
+
multiple: multiple,
|
|
6553
|
+
style: {
|
|
6554
|
+
display: 'none'
|
|
6555
|
+
},
|
|
6556
|
+
onChange: onInputChange
|
|
6557
|
+
}), Comp && /*#__PURE__*/(0,jsx_runtime.jsx)(Comp, _extends({}, props, {
|
|
6558
|
+
maxNumber: maxNumber || 3,
|
|
6559
|
+
dataList: fileList,
|
|
6560
|
+
onAdd: onFileUpload,
|
|
6561
|
+
onRemove: onRemove
|
|
6562
|
+
}))]
|
|
6563
|
+
});
|
|
6564
|
+
};
|
|
6565
|
+
/* harmony default export */ var esm_FileList = (FileList);
|
|
6566
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/index.js
|
|
6567
|
+
|
|
6568
|
+
|
|
6569
|
+
|
|
6570
|
+
|
|
6571
|
+
|
|
6572
|
+
|
|
6573
|
+
|
|
6574
|
+
|
|
6575
|
+
function Upload(props) {
|
|
6576
|
+
var _props$uploadType = props.uploadType,
|
|
6577
|
+
uploadType = _props$uploadType === void 0 ? 'input' : _props$uploadType;
|
|
6578
|
+
|
|
6579
|
+
if (uploadType === 'input') {
|
|
6580
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(Input, _extends({}, props));
|
|
6581
|
+
}
|
|
6582
|
+
|
|
6583
|
+
if (isUploadType(uploadType)) {
|
|
6584
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_FileList, _extends({}, props));
|
|
6585
|
+
}
|
|
6586
|
+
|
|
6587
|
+
return null;
|
|
6588
|
+
}
|
|
6589
|
+
|
|
6590
|
+
/* harmony default export */ var react_file_input_esm = (Upload);
|
|
6247
6591
|
;// CONCATENATED MODULE: ../react-grid/esm/style/col.css
|
|
6248
6592
|
// extracted by mini-css-extract-plugin
|
|
6249
6593
|
/* harmony default export */ var col = ({});
|
|
@@ -6495,6 +6839,15 @@ function Form(_ref, ref) {
|
|
|
6495
6839
|
data = _useState2[0],
|
|
6496
6840
|
setData = _useState2[1];
|
|
6497
6841
|
|
|
6842
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, function () {
|
|
6843
|
+
return {
|
|
6844
|
+
onSubmit: handleSubmit,
|
|
6845
|
+
resetForm: handleReset,
|
|
6846
|
+
getFieldValues: function getFieldValues() {
|
|
6847
|
+
return data.current;
|
|
6848
|
+
}
|
|
6849
|
+
};
|
|
6850
|
+
}, [data]);
|
|
6498
6851
|
var formUnits = {};
|
|
6499
6852
|
|
|
6500
6853
|
for (var name in fields) {
|
|
@@ -6594,12 +6947,12 @@ function Form(_ref, ref) {
|
|
|
6594
6947
|
};
|
|
6595
6948
|
|
|
6596
6949
|
try {
|
|
6597
|
-
var afterSubmitPromise = onSubmit({
|
|
6950
|
+
var afterSubmitPromise = onSubmit ? onSubmit({
|
|
6598
6951
|
initial: initial,
|
|
6599
6952
|
current: current
|
|
6600
|
-
});
|
|
6953
|
+
}, e) : undefined;
|
|
6601
6954
|
|
|
6602
|
-
if (isPromise(afterSubmitPromise)) {
|
|
6955
|
+
if (afterSubmitPromise && isPromise(afterSubmitPromise)) {
|
|
6603
6956
|
return afterSubmitPromise.then(onSuccess).catch(onError);
|
|
6604
6957
|
} else {
|
|
6605
6958
|
return onSuccess(afterSubmitPromise);
|
|
@@ -6796,9 +7149,9 @@ function InternalList(props, ref) {
|
|
|
6796
7149
|
}));
|
|
6797
7150
|
}
|
|
6798
7151
|
|
|
6799
|
-
var
|
|
6800
|
-
|
|
6801
|
-
/* harmony default export */ var react_list_esm = (
|
|
7152
|
+
var esm_List = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalList);
|
|
7153
|
+
esm_List.Item = ListItem;
|
|
7154
|
+
/* harmony default export */ var react_list_esm = (esm_List);
|
|
6802
7155
|
;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Layout.js
|
|
6803
7156
|
|
|
6804
7157
|
|
|
@@ -7975,6 +8328,52 @@ function NotificationCreate(props, type) {
|
|
|
7975
8328
|
};
|
|
7976
8329
|
});
|
|
7977
8330
|
/* harmony default export */ var react_notify_esm = (NotificationCreate);
|
|
8331
|
+
;// CONCATENATED MODULE: ../react-select/esm/Option.js
|
|
8332
|
+
|
|
8333
|
+
|
|
8334
|
+
|
|
8335
|
+
/* harmony default export */ var Option = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
|
8336
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("option", _extends({}, props, {
|
|
8337
|
+
ref: ref
|
|
8338
|
+
}));
|
|
8339
|
+
}));
|
|
8340
|
+
;// CONCATENATED MODULE: ../react-select/esm/Group.js
|
|
8341
|
+
|
|
8342
|
+
|
|
8343
|
+
|
|
8344
|
+
/* harmony default export */ var Group = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
|
8345
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("optgroup", _extends({}, props, {
|
|
8346
|
+
ref: ref
|
|
8347
|
+
}));
|
|
8348
|
+
}));
|
|
8349
|
+
;// CONCATENATED MODULE: ../react-select/esm/style/index.css
|
|
8350
|
+
// extracted by mini-css-extract-plugin
|
|
8351
|
+
/* harmony default export */ var react_select_esm_style = ({});
|
|
8352
|
+
;// CONCATENATED MODULE: ../react-select/esm/index.js
|
|
8353
|
+
|
|
8354
|
+
|
|
8355
|
+
var react_select_esm_excluded = ["prefixCls", "className", "size"];
|
|
8356
|
+
|
|
8357
|
+
|
|
8358
|
+
|
|
8359
|
+
|
|
8360
|
+
|
|
8361
|
+
var Select = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
|
8362
|
+
var _props$prefixCls = props.prefixCls,
|
|
8363
|
+
prefixCls = _props$prefixCls === void 0 ? 'w-select' : _props$prefixCls,
|
|
8364
|
+
className = props.className,
|
|
8365
|
+
_props$size = props.size,
|
|
8366
|
+
size = _props$size === void 0 ? 'default' : _props$size,
|
|
8367
|
+
other = _objectWithoutPropertiesLoose(props, react_select_esm_excluded);
|
|
8368
|
+
|
|
8369
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("select", _extends({}, other, {
|
|
8370
|
+
ref: ref,
|
|
8371
|
+
className: [prefixCls, className, size ? prefixCls + "-" + size : null].filter(Boolean).join(' ').trim()
|
|
8372
|
+
}));
|
|
8373
|
+
});
|
|
8374
|
+
Select.Option = Option;
|
|
8375
|
+
Select.Group = Group;
|
|
8376
|
+
/* harmony default export */ var react_select_esm = (Select);
|
|
7978
8377
|
;// CONCATENATED MODULE: ../react-pagination/esm/style/index.css
|
|
7979
8378
|
// extracted by mini-css-extract-plugin
|
|
7980
8379
|
/* harmony default export */ var react_pagination_esm_style = ({});
|
|
@@ -7982,7 +8381,9 @@ function NotificationCreate(props, type) {
|
|
|
7982
8381
|
|
|
7983
8382
|
|
|
7984
8383
|
|
|
7985
|
-
var react_pagination_esm_excluded = ["className", "style", "prefixCls", "alignment", "size", "total", "pageSize", "current", "onChange", "divider"];
|
|
8384
|
+
var react_pagination_esm_excluded = ["className", "style", "prefixCls", "alignment", "size", "total", "pageSize", "pageSizeOptions", "current", "onChange", "onShowSizeChange", "divider"];
|
|
8385
|
+
|
|
8386
|
+
|
|
7986
8387
|
|
|
7987
8388
|
|
|
7988
8389
|
|
|
@@ -7999,12 +8400,15 @@ function Pagination(props) {
|
|
|
7999
8400
|
total = _props$total === void 0 ? 0 : _props$total,
|
|
8000
8401
|
_props$pageSize = props.pageSize,
|
|
8001
8402
|
pageSize = _props$pageSize === void 0 ? 10 : _props$pageSize,
|
|
8403
|
+
_props$pageSizeOption = props.pageSizeOptions,
|
|
8404
|
+
pageSizeOptions = _props$pageSizeOption === void 0 ? [] : _props$pageSizeOption,
|
|
8002
8405
|
_props$current = props.current,
|
|
8003
8406
|
currentNumber = _props$current === void 0 ? 1 : _props$current,
|
|
8004
8407
|
_props$onChange = props.onChange,
|
|
8005
8408
|
onChange = _props$onChange === void 0 ? function () {
|
|
8006
8409
|
return null;
|
|
8007
8410
|
} : _props$onChange,
|
|
8411
|
+
onShowSizeChange = props.onShowSizeChange,
|
|
8008
8412
|
divider = props.divider,
|
|
8009
8413
|
other = _objectWithoutPropertiesLoose(props, react_pagination_esm_excluded);
|
|
8010
8414
|
|
|
@@ -8132,13 +8536,20 @@ function Pagination(props) {
|
|
|
8132
8536
|
onChange && onChange(state.current, total, pageSize);
|
|
8133
8537
|
}
|
|
8134
8538
|
|
|
8135
|
-
|
|
8539
|
+
var onSizeChange = function onSizeChange(e) {
|
|
8540
|
+
var sizeCount = Number(e.target.value);
|
|
8541
|
+
var count = Math.ceil(total / sizeCount);
|
|
8542
|
+
var newCurrent = current > count ? count : current;
|
|
8543
|
+
onShowSizeChange && onShowSizeChange(newCurrent, sizeCount);
|
|
8544
|
+
};
|
|
8545
|
+
|
|
8546
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", _extends({
|
|
8136
8547
|
className: cls,
|
|
8137
8548
|
style: _extends({}, style, {
|
|
8138
8549
|
textAlign: alignment
|
|
8139
8550
|
})
|
|
8140
8551
|
}, other, {
|
|
8141
|
-
children: initPageSoure.map(function (item, idx) {
|
|
8552
|
+
children: [initPageSoure.map(function (item, idx) {
|
|
8142
8553
|
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
8143
8554
|
var label = /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
8144
8555
|
children: item.label
|
|
@@ -8158,7 +8569,20 @@ function Pagination(props) {
|
|
|
8158
8569
|
},
|
|
8159
8570
|
children: label
|
|
8160
8571
|
}, idx);
|
|
8161
|
-
})
|
|
8572
|
+
}), pageSizeOptions.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
8573
|
+
className: prefixCls + "-options",
|
|
8574
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_select_esm, {
|
|
8575
|
+
size: size,
|
|
8576
|
+
defaultValue: pageSize,
|
|
8577
|
+
onChange: onSizeChange,
|
|
8578
|
+
children: pageSizeOptions.map(function (item, index) {
|
|
8579
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react_select_esm.Option, {
|
|
8580
|
+
value: item,
|
|
8581
|
+
children: [item, "\u6761/\u9875"]
|
|
8582
|
+
}, index);
|
|
8583
|
+
})
|
|
8584
|
+
})
|
|
8585
|
+
})]
|
|
8162
8586
|
}));
|
|
8163
8587
|
}
|
|
8164
8588
|
;// CONCATENATED MODULE: ../react-pin-code/esm/style/input.css
|
|
@@ -8882,52 +9306,6 @@ function SearchSelect(props) {
|
|
|
8882
9306
|
})
|
|
8883
9307
|
}));
|
|
8884
9308
|
}
|
|
8885
|
-
;// CONCATENATED MODULE: ../react-select/esm/Option.js
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
/* harmony default export */ var Option = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
|
8890
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("option", _extends({}, props, {
|
|
8891
|
-
ref: ref
|
|
8892
|
-
}));
|
|
8893
|
-
}));
|
|
8894
|
-
;// CONCATENATED MODULE: ../react-select/esm/Group.js
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
/* harmony default export */ var Group = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
|
8899
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("optgroup", _extends({}, props, {
|
|
8900
|
-
ref: ref
|
|
8901
|
-
}));
|
|
8902
|
-
}));
|
|
8903
|
-
;// CONCATENATED MODULE: ../react-select/esm/style/index.css
|
|
8904
|
-
// extracted by mini-css-extract-plugin
|
|
8905
|
-
/* harmony default export */ var react_select_esm_style = ({});
|
|
8906
|
-
;// CONCATENATED MODULE: ../react-select/esm/index.js
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
var react_select_esm_excluded = ["prefixCls", "className", "size"];
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
var Select = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
|
8916
|
-
var _props$prefixCls = props.prefixCls,
|
|
8917
|
-
prefixCls = _props$prefixCls === void 0 ? 'w-select' : _props$prefixCls,
|
|
8918
|
-
className = props.className,
|
|
8919
|
-
_props$size = props.size,
|
|
8920
|
-
size = _props$size === void 0 ? 'default' : _props$size,
|
|
8921
|
-
other = _objectWithoutPropertiesLoose(props, react_select_esm_excluded);
|
|
8922
|
-
|
|
8923
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("select", _extends({}, other, {
|
|
8924
|
-
ref: ref,
|
|
8925
|
-
className: [prefixCls, className, size ? prefixCls + "-" + size : null].filter(Boolean).join(' ').trim()
|
|
8926
|
-
}));
|
|
8927
|
-
});
|
|
8928
|
-
Select.Option = Option;
|
|
8929
|
-
Select.Group = Group;
|
|
8930
|
-
/* harmony default export */ var react_select_esm = (Select);
|
|
8931
9309
|
;// CONCATENATED MODULE: ../../node_modules/@uiw/react-split/esm/style/index.css
|
|
8932
9310
|
// extracted by mini-css-extract-plugin
|
|
8933
9311
|
/* harmony default export */ var react_split_esm_style = ({});
|
|
@@ -10941,7 +11319,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
|
10941
11319
|
/******/ // startup
|
|
10942
11320
|
/******/ // Load entry module and return exports
|
|
10943
11321
|
/******/ // This entry module doesn't tell about it's top-level declarations so it can't be inlined
|
|
10944
|
-
/******/ var __webpack_exports__ = __webpack_require__(
|
|
11322
|
+
/******/ var __webpack_exports__ = __webpack_require__(523);
|
|
10945
11323
|
/******/
|
|
10946
11324
|
/******/ return __webpack_exports__;
|
|
10947
11325
|
/******/ })()
|