uiw 4.10.0 → 4.10.4
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 +4779 -0
- package/dist/uiw.js +364 -95
- package/dist/uiw.min.css +1 -0
- package/dist/uiw.min.js +1 -1
- package/dist/uiw.min.js.LICENSE.txt +0 -9
- package/package.json +58 -58
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";
|
|
@@ -1089,7 +1089,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1089
1089
|
"Tree": function() { return /* reexport */ Tree; },
|
|
1090
1090
|
"TreeChecked": function() { return /* reexport */ TreeChecked; },
|
|
1091
1091
|
"canUseDOM": function() { return /* reexport */ canUseDOM; },
|
|
1092
|
-
"formatter": function() { return /* reexport */
|
|
1092
|
+
"formatter": function() { return /* reexport */ formatter; },
|
|
1093
1093
|
"getChildKeys": function() { return /* reexport */ getChildKeys; },
|
|
1094
1094
|
"randomid": function() { return /* reexport */ randomid; }
|
|
1095
1095
|
});
|
|
@@ -1253,6 +1253,8 @@ function _extends() {
|
|
|
1253
1253
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
|
|
1254
1254
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
|
|
1255
1255
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
|
1256
|
+
;// CONCATENATED MODULE: ../utils/esm/noop.js
|
|
1257
|
+
function noop() {}
|
|
1256
1258
|
;// CONCATENATED MODULE: ../utils/esm/getScroll.js
|
|
1257
1259
|
/**
|
|
1258
1260
|
* Gets the scroll value of the given element in the given side (top and left)
|
|
@@ -1278,32 +1280,16 @@ function getScroll(target, top) {
|
|
|
1278
1280
|
|
|
1279
1281
|
return ret;
|
|
1280
1282
|
}
|
|
1281
|
-
;// CONCATENATED MODULE: ../
|
|
1282
|
-
function noop() {}
|
|
1283
|
-
// EXTERNAL MODULE: ../../node_modules/react/jsx-runtime.js
|
|
1284
|
-
var jsx_runtime = __webpack_require__(770);
|
|
1285
|
-
;// CONCATENATED MODULE: ../react-affix/esm/index.js
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
var _excluded = ["prefixCls", "className", "children", "offsetTop", "offsetBottom", "target", "onChange"];
|
|
1283
|
+
;// CONCATENATED MODULE: ../react-affix/esm/utils.js
|
|
1294
1284
|
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
function getTargetRect(target) {
|
|
1285
|
+
var getTargetRect = function getTargetRect(target) {
|
|
1299
1286
|
return target !== window ? target.getBoundingClientRect() : {
|
|
1300
1287
|
top: 0,
|
|
1301
1288
|
left: 0,
|
|
1302
1289
|
bottom: 0
|
|
1303
1290
|
};
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
function getOffset(element, target) {
|
|
1291
|
+
};
|
|
1292
|
+
var getOffset = function getOffset(element, target) {
|
|
1307
1293
|
var elemRect = element.getBoundingClientRect();
|
|
1308
1294
|
var targetRect = getTargetRect(target);
|
|
1309
1295
|
var scrollTop = getScroll(target, true);
|
|
@@ -1317,11 +1303,25 @@ function getOffset(element, target) {
|
|
|
1317
1303
|
width: elemRect.width,
|
|
1318
1304
|
height: elemRect.height
|
|
1319
1305
|
};
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
function getDefaultTarget() {
|
|
1306
|
+
};
|
|
1307
|
+
var getDefaultTarget = function getDefaultTarget() {
|
|
1323
1308
|
return typeof window !== 'undefined' ? window : null;
|
|
1324
|
-
}
|
|
1309
|
+
};
|
|
1310
|
+
// EXTERNAL MODULE: ../../node_modules/react/jsx-runtime.js
|
|
1311
|
+
var jsx_runtime = __webpack_require__(770);
|
|
1312
|
+
;// CONCATENATED MODULE: ../react-affix/esm/index.js
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
var _excluded = ["prefixCls", "className", "children", "offsetTop", "offsetBottom", "target", "onChange"];
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
1325
|
|
|
1326
1326
|
var Affix = /*#__PURE__*/function (_React$Component) {
|
|
1327
1327
|
_inherits(Affix, _React$Component);
|
|
@@ -2643,9 +2643,7 @@ function Icon(props) {
|
|
|
2643
2643
|
className: [prefixCls, className, prefixCls && verticalAlign ? prefixCls + "-" + verticalAlign : null, spin && prefixCls ? prefixCls + "-spin" : null].filter(Boolean).join(' ').trim()
|
|
2644
2644
|
});
|
|
2645
2645
|
|
|
2646
|
-
return /*#__PURE__*/(
|
|
2647
|
-
children: svg
|
|
2648
|
-
}));
|
|
2646
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TagName, _extends({}, propps), svg);
|
|
2649
2647
|
}
|
|
2650
2648
|
;// CONCATENATED MODULE: ../react-button/esm/style/index.css
|
|
2651
2649
|
// extracted by mini-css-extract-plugin
|
|
@@ -3365,7 +3363,7 @@ var react_button_group_esm_excluded = ["prefixCls", "vertical", "children", "cla
|
|
|
3365
3363
|
}));
|
|
3366
3364
|
;// CONCATENATED MODULE: ../../node_modules/@uiw/formatter/esm/index.js
|
|
3367
3365
|
/**!
|
|
3368
|
-
* @uiw/formatter v1.3.
|
|
3366
|
+
* @uiw/formatter v1.3.2
|
|
3369
3367
|
* Get a formatted date.
|
|
3370
3368
|
*
|
|
3371
3369
|
* Copyright (c) 2022 Kenny Wang <wowohoo@qq.com>
|
|
@@ -6220,22 +6218,18 @@ function Dropdown(props) {
|
|
|
6220
6218
|
children: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props))
|
|
6221
6219
|
}));
|
|
6222
6220
|
}
|
|
6223
|
-
;// CONCATENATED MODULE: ../react-file-input/esm/
|
|
6224
|
-
// extracted by mini-css-extract-plugin
|
|
6225
|
-
/* harmony default export */ var react_file_input_esm_style = ({});
|
|
6226
|
-
;// CONCATENATED MODULE: ../react-file-input/esm/index.js
|
|
6227
|
-
|
|
6221
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/Input.js
|
|
6228
6222
|
|
|
6229
|
-
var react_file_input_esm_excluded = ["className", "prefixCls"];
|
|
6230
6223
|
|
|
6224
|
+
var Input_excluded = ["className", "prefixCls"];
|
|
6231
6225
|
|
|
6232
6226
|
|
|
6233
6227
|
|
|
6234
|
-
/* 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) {
|
|
6235
6229
|
var className = props.className,
|
|
6236
6230
|
_props$prefixCls = props.prefixCls,
|
|
6237
6231
|
prefixCls = _props$prefixCls === void 0 ? 'w-fileinput' : _props$prefixCls,
|
|
6238
|
-
other = _objectWithoutPropertiesLoose(props,
|
|
6232
|
+
other = _objectWithoutPropertiesLoose(props, Input_excluded);
|
|
6239
6233
|
|
|
6240
6234
|
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
6241
6235
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, _extends({
|
|
@@ -6246,6 +6240,331 @@ var react_file_input_esm_excluded = ["className", "prefixCls"];
|
|
|
6246
6240
|
type: "file"
|
|
6247
6241
|
}));
|
|
6248
6242
|
}));
|
|
6243
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/style/index.css
|
|
6244
|
+
// extracted by mini-css-extract-plugin
|
|
6245
|
+
/* harmony default export */ var react_file_input_esm_style = ({});
|
|
6246
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/List.js
|
|
6247
|
+
|
|
6248
|
+
|
|
6249
|
+
|
|
6250
|
+
|
|
6251
|
+
|
|
6252
|
+
|
|
6253
|
+
var Picture = function Picture(props) {
|
|
6254
|
+
var className = props.className,
|
|
6255
|
+
_props$prefixCls = props.prefixCls,
|
|
6256
|
+
prefixCls = _props$prefixCls === void 0 ? 'w-fileinput-list' : _props$prefixCls,
|
|
6257
|
+
_props$dataList = props.dataList,
|
|
6258
|
+
dataList = _props$dataList === void 0 ? [] : _props$dataList,
|
|
6259
|
+
uploadType = props.uploadType,
|
|
6260
|
+
children = props.children,
|
|
6261
|
+
onPreview = props.onPreview,
|
|
6262
|
+
onAdd = props.onAdd,
|
|
6263
|
+
onRemove = props.onRemove;
|
|
6264
|
+
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
6265
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6266
|
+
className: cls,
|
|
6267
|
+
children: [children && /*#__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, {
|
|
6268
|
+
onClick: onAdd
|
|
6269
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6270
|
+
children: dataList.map(function (item, index) {
|
|
6271
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6272
|
+
className: cls + "_" + uploadType,
|
|
6273
|
+
children: [uploadType === 'picture' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6274
|
+
className: cls + "_info " + cls + "_" + uploadType + "_info",
|
|
6275
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
6276
|
+
src: item['dataURL'],
|
|
6277
|
+
alt: ""
|
|
6278
|
+
}), onPreview && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6279
|
+
className: cls + "_actions",
|
|
6280
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
6281
|
+
className: cls + "_actions_search",
|
|
6282
|
+
onClick: function onClick() {
|
|
6283
|
+
return onPreview(item);
|
|
6284
|
+
},
|
|
6285
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
6286
|
+
type: "search",
|
|
6287
|
+
style: {
|
|
6288
|
+
color: '#fff',
|
|
6289
|
+
fontSize: 16
|
|
6290
|
+
}
|
|
6291
|
+
})
|
|
6292
|
+
})
|
|
6293
|
+
})]
|
|
6294
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6295
|
+
className: cls + "_" + uploadType + "_text",
|
|
6296
|
+
children: item.name
|
|
6297
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6298
|
+
className: cls + "_" + uploadType + "_icon",
|
|
6299
|
+
onClick: function onClick() {
|
|
6300
|
+
return onRemove(index);
|
|
6301
|
+
},
|
|
6302
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
6303
|
+
type: "delete",
|
|
6304
|
+
style: {
|
|
6305
|
+
color: '#999'
|
|
6306
|
+
}
|
|
6307
|
+
})
|
|
6308
|
+
})]
|
|
6309
|
+
}, index);
|
|
6310
|
+
})
|
|
6311
|
+
})]
|
|
6312
|
+
});
|
|
6313
|
+
};
|
|
6314
|
+
|
|
6315
|
+
/* harmony default export */ var List = (Picture);
|
|
6316
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/Card.js
|
|
6317
|
+
|
|
6318
|
+
|
|
6319
|
+
|
|
6320
|
+
|
|
6321
|
+
|
|
6322
|
+
|
|
6323
|
+
var Card = function Card(props) {
|
|
6324
|
+
var className = props.className,
|
|
6325
|
+
_props$prefixCls = props.prefixCls,
|
|
6326
|
+
prefixCls = _props$prefixCls === void 0 ? 'w-fileinput-card' : _props$prefixCls,
|
|
6327
|
+
_props$dataList = props.dataList,
|
|
6328
|
+
dataList = _props$dataList === void 0 ? [] : _props$dataList,
|
|
6329
|
+
_props$maxNumber = props.maxNumber,
|
|
6330
|
+
maxNumber = _props$maxNumber === void 0 ? 3 : _props$maxNumber,
|
|
6331
|
+
readonly = props.readonly,
|
|
6332
|
+
children = props.children,
|
|
6333
|
+
onAdd = props.onAdd,
|
|
6334
|
+
onPreview = props.onPreview,
|
|
6335
|
+
onRemove = props.onRemove;
|
|
6336
|
+
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
6337
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6338
|
+
className: cls,
|
|
6339
|
+
children: [dataList.map(function (item, index) {
|
|
6340
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6341
|
+
className: cls + "_box",
|
|
6342
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6343
|
+
className: cls + "_box_info",
|
|
6344
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
6345
|
+
src: item['dataURL'],
|
|
6346
|
+
alt: ""
|
|
6347
|
+
})
|
|
6348
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
6349
|
+
className: cls + "_actions",
|
|
6350
|
+
children: [onPreview && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
6351
|
+
className: cls + "_actions_remove",
|
|
6352
|
+
onClick: function onClick() {
|
|
6353
|
+
return onPreview(item);
|
|
6354
|
+
},
|
|
6355
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
6356
|
+
type: "search",
|
|
6357
|
+
style: {
|
|
6358
|
+
color: '#fff',
|
|
6359
|
+
fontSize: 16
|
|
6360
|
+
}
|
|
6361
|
+
})
|
|
6362
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
6363
|
+
className: cls + "_actions_remove",
|
|
6364
|
+
onClick: function onClick() {
|
|
6365
|
+
return onRemove(index);
|
|
6366
|
+
},
|
|
6367
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
6368
|
+
type: "delete",
|
|
6369
|
+
style: {
|
|
6370
|
+
color: '#fff',
|
|
6371
|
+
fontSize: 16
|
|
6372
|
+
}
|
|
6373
|
+
})
|
|
6374
|
+
})]
|
|
6375
|
+
})]
|
|
6376
|
+
}, index);
|
|
6377
|
+
}), maxNumber > dataList.length && !readonly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6378
|
+
className: cls + "_box " + cls + "_btn",
|
|
6379
|
+
onClick: onAdd,
|
|
6380
|
+
children: children
|
|
6381
|
+
})]
|
|
6382
|
+
});
|
|
6383
|
+
};
|
|
6384
|
+
|
|
6385
|
+
/* harmony default export */ var esm_Card = (Card);
|
|
6386
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/utils.js
|
|
6387
|
+
|
|
6388
|
+
var openFileDialog = function openFileDialog(inputRef) {
|
|
6389
|
+
if (inputRef.current) inputRef.current.click();
|
|
6390
|
+
};
|
|
6391
|
+
var getAcceptTypeString = function getAcceptTypeString(accept) {
|
|
6392
|
+
return accept && accept.length > 0 ? accept.map(function (item) {
|
|
6393
|
+
return "." + item;
|
|
6394
|
+
}).join(', ') : 'image/*';
|
|
6395
|
+
};
|
|
6396
|
+
var getBase64 = function getBase64(file) {
|
|
6397
|
+
var reader = new FileReader();
|
|
6398
|
+
return new Promise(function (resolve) {
|
|
6399
|
+
reader.addEventListener('load', function () {
|
|
6400
|
+
return resolve(String(reader.result));
|
|
6401
|
+
});
|
|
6402
|
+
reader.readAsDataURL(file);
|
|
6403
|
+
});
|
|
6404
|
+
};
|
|
6405
|
+
var getListFiles = function getListFiles(files, dataURLKey) {
|
|
6406
|
+
var promiseFiles = [];
|
|
6407
|
+
|
|
6408
|
+
for (var i = 0; i < files.length; i += 1) {
|
|
6409
|
+
promiseFiles.push(getBase64(files[i]));
|
|
6410
|
+
}
|
|
6411
|
+
|
|
6412
|
+
return Promise.all(promiseFiles).then(function (fileListBase64) {
|
|
6413
|
+
var fileList = fileListBase64.map(function (base64, index) {
|
|
6414
|
+
var _ref;
|
|
6415
|
+
|
|
6416
|
+
return _ref = {}, _defineProperty(_ref, dataURLKey, base64), _defineProperty(_ref, "file", files[index]), _defineProperty(_ref, "name", files[index].name), _ref;
|
|
6417
|
+
});
|
|
6418
|
+
return fileList;
|
|
6419
|
+
});
|
|
6420
|
+
};
|
|
6421
|
+
var isUploadType = function isUploadType(type) {
|
|
6422
|
+
return ['picture', 'text', 'card'].includes(type);
|
|
6423
|
+
};
|
|
6424
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/FileList.js
|
|
6425
|
+
|
|
6426
|
+
|
|
6427
|
+
|
|
6428
|
+
|
|
6429
|
+
|
|
6430
|
+
|
|
6431
|
+
|
|
6432
|
+
|
|
6433
|
+
|
|
6434
|
+
|
|
6435
|
+
|
|
6436
|
+
var FileList = function FileList(props) {
|
|
6437
|
+
var uploadType = props.uploadType,
|
|
6438
|
+
_props$value = props.value,
|
|
6439
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
6440
|
+
_props$multiple = props.multiple,
|
|
6441
|
+
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
|
6442
|
+
_props$maxNumber = props.maxNumber,
|
|
6443
|
+
maxNumber = _props$maxNumber === void 0 ? 3 : _props$maxNumber,
|
|
6444
|
+
onChange = props.onChange;
|
|
6445
|
+
var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
6446
|
+
var inValue = value || [];
|
|
6447
|
+
|
|
6448
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
|
|
6449
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
6450
|
+
fileList = _useState2[0],
|
|
6451
|
+
setFileList = _useState2[1];
|
|
6452
|
+
|
|
6453
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
6454
|
+
setFileList(inValue);
|
|
6455
|
+
}, []);
|
|
6456
|
+
var handleClickInput = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
|
6457
|
+
return openFileDialog(inputRef);
|
|
6458
|
+
}, [inputRef]);
|
|
6459
|
+
var onFileUpload = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
|
6460
|
+
handleClickInput();
|
|
6461
|
+
}, [handleClickInput]);
|
|
6462
|
+
|
|
6463
|
+
var onInputChange = /*#__PURE__*/function () {
|
|
6464
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee(e) {
|
|
6465
|
+
var files, updatedFileList, updatedList;
|
|
6466
|
+
return regenerator_default().wrap(function _callee$(_context) {
|
|
6467
|
+
while (1) {
|
|
6468
|
+
switch (_context.prev = _context.next) {
|
|
6469
|
+
case 0:
|
|
6470
|
+
files = e.target.files;
|
|
6471
|
+
|
|
6472
|
+
if (files) {
|
|
6473
|
+
_context.next = 3;
|
|
6474
|
+
break;
|
|
6475
|
+
}
|
|
6476
|
+
|
|
6477
|
+
return _context.abrupt("return");
|
|
6478
|
+
|
|
6479
|
+
case 3:
|
|
6480
|
+
_context.next = 5;
|
|
6481
|
+
return getListFiles(files, 'dataURL');
|
|
6482
|
+
|
|
6483
|
+
case 5:
|
|
6484
|
+
updatedFileList = _context.sent;
|
|
6485
|
+
updatedList = [].concat(_toConsumableArray(fileList), _toConsumableArray(updatedFileList));
|
|
6486
|
+
|
|
6487
|
+
if (maxNumber < updatedList.length) {
|
|
6488
|
+
updatedList = updatedList.slice(0, maxNumber);
|
|
6489
|
+
}
|
|
6490
|
+
|
|
6491
|
+
setFileList(updatedList);
|
|
6492
|
+
onChange == null ? void 0 : onChange(updatedList);
|
|
6493
|
+
|
|
6494
|
+
case 10:
|
|
6495
|
+
case "end":
|
|
6496
|
+
return _context.stop();
|
|
6497
|
+
}
|
|
6498
|
+
}
|
|
6499
|
+
}, _callee);
|
|
6500
|
+
}));
|
|
6501
|
+
|
|
6502
|
+
return function onInputChange(_x) {
|
|
6503
|
+
return _ref.apply(this, arguments);
|
|
6504
|
+
};
|
|
6505
|
+
}();
|
|
6506
|
+
|
|
6507
|
+
var onRemove = function onRemove(index) {
|
|
6508
|
+
var updatedList = _toConsumableArray(fileList);
|
|
6509
|
+
|
|
6510
|
+
updatedList.splice(index, 1);
|
|
6511
|
+
setFileList(updatedList);
|
|
6512
|
+
onChange == null ? void 0 : onChange(fileList);
|
|
6513
|
+
};
|
|
6514
|
+
|
|
6515
|
+
var Comp;
|
|
6516
|
+
|
|
6517
|
+
if (uploadType === 'card') {
|
|
6518
|
+
Comp = esm_Card;
|
|
6519
|
+
}
|
|
6520
|
+
|
|
6521
|
+
if (uploadType === 'picture' || uploadType === 'text') {
|
|
6522
|
+
Comp = List;
|
|
6523
|
+
}
|
|
6524
|
+
|
|
6525
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
6526
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("input", {
|
|
6527
|
+
type: "file",
|
|
6528
|
+
ref: inputRef,
|
|
6529
|
+
multiple: multiple,
|
|
6530
|
+
style: {
|
|
6531
|
+
display: 'none'
|
|
6532
|
+
},
|
|
6533
|
+
onChange: onInputChange
|
|
6534
|
+
}), Comp && /*#__PURE__*/(0,jsx_runtime.jsx)(Comp, _extends({}, props, {
|
|
6535
|
+
maxNumber: maxNumber || 3,
|
|
6536
|
+
dataList: fileList,
|
|
6537
|
+
onAdd: onFileUpload,
|
|
6538
|
+
onRemove: onRemove
|
|
6539
|
+
}))]
|
|
6540
|
+
});
|
|
6541
|
+
};
|
|
6542
|
+
/* harmony default export */ var esm_FileList = (FileList);
|
|
6543
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/index.js
|
|
6544
|
+
|
|
6545
|
+
|
|
6546
|
+
|
|
6547
|
+
|
|
6548
|
+
|
|
6549
|
+
|
|
6550
|
+
|
|
6551
|
+
|
|
6552
|
+
function Upload(props) {
|
|
6553
|
+
var _props$uploadType = props.uploadType,
|
|
6554
|
+
uploadType = _props$uploadType === void 0 ? 'input' : _props$uploadType;
|
|
6555
|
+
|
|
6556
|
+
if (uploadType === 'input') {
|
|
6557
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(Input, _extends({}, props));
|
|
6558
|
+
}
|
|
6559
|
+
|
|
6560
|
+
if (isUploadType(uploadType)) {
|
|
6561
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_FileList, _extends({}, props));
|
|
6562
|
+
}
|
|
6563
|
+
|
|
6564
|
+
return null;
|
|
6565
|
+
}
|
|
6566
|
+
|
|
6567
|
+
/* harmony default export */ var react_file_input_esm = (Upload);
|
|
6249
6568
|
;// CONCATENATED MODULE: ../react-grid/esm/style/col.css
|
|
6250
6569
|
// extracted by mini-css-extract-plugin
|
|
6251
6570
|
/* harmony default export */ var col = ({});
|
|
@@ -6596,12 +6915,12 @@ function Form(_ref, ref) {
|
|
|
6596
6915
|
};
|
|
6597
6916
|
|
|
6598
6917
|
try {
|
|
6599
|
-
var afterSubmitPromise = onSubmit({
|
|
6918
|
+
var afterSubmitPromise = onSubmit ? onSubmit({
|
|
6600
6919
|
initial: initial,
|
|
6601
6920
|
current: current
|
|
6602
|
-
});
|
|
6921
|
+
}, e) : undefined;
|
|
6603
6922
|
|
|
6604
|
-
if (isPromise(afterSubmitPromise)) {
|
|
6923
|
+
if (afterSubmitPromise && isPromise(afterSubmitPromise)) {
|
|
6605
6924
|
return afterSubmitPromise.then(onSuccess).catch(onError);
|
|
6606
6925
|
} else {
|
|
6607
6926
|
return onSuccess(afterSubmitPromise);
|
|
@@ -6798,9 +7117,9 @@ function InternalList(props, ref) {
|
|
|
6798
7117
|
}));
|
|
6799
7118
|
}
|
|
6800
7119
|
|
|
6801
|
-
var
|
|
6802
|
-
|
|
6803
|
-
/* harmony default export */ var react_list_esm = (
|
|
7120
|
+
var esm_List = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalList);
|
|
7121
|
+
esm_List.Item = ListItem;
|
|
7122
|
+
/* harmony default export */ var react_list_esm = (esm_List);
|
|
6804
7123
|
;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Layout.js
|
|
6805
7124
|
|
|
6806
7125
|
|
|
@@ -10740,56 +11059,6 @@ function TreeChecked(_ref) {
|
|
|
10740
11059
|
}
|
|
10741
11060
|
}, props));
|
|
10742
11061
|
}
|
|
10743
|
-
;// CONCATENATED MODULE: ./node_modules/@uiw/formatter/esm/index.js
|
|
10744
|
-
/**!
|
|
10745
|
-
* @uiw/formatter v1.3.1
|
|
10746
|
-
* Get a formatted date.
|
|
10747
|
-
*
|
|
10748
|
-
* Copyright (c) 2022 Kenny Wang <wowohoo@qq.com>
|
|
10749
|
-
* https://github.com/uiwjs/date-formatter.git
|
|
10750
|
-
* Licensed under the MIT license
|
|
10751
|
-
*/
|
|
10752
|
-
var esm_dateRegex = /(?=(YYYY|YY|MM|DD|HH|mm|ss|ms))\1([:/]*)/g;
|
|
10753
|
-
var esm_timespan = {
|
|
10754
|
-
YYYY: ['getFullYear', 4],
|
|
10755
|
-
YY: ['getFullYear', 2],
|
|
10756
|
-
MM: ['getMonth', 2, 1],
|
|
10757
|
-
DD: ['getDate', 2],
|
|
10758
|
-
HH: ['getHours', 2],
|
|
10759
|
-
mm: ['getMinutes', 2],
|
|
10760
|
-
ss: ['getSeconds', 2],
|
|
10761
|
-
ms: ['getMilliseconds', 3]
|
|
10762
|
-
};
|
|
10763
|
-
|
|
10764
|
-
function esm_formatter(str, date, utc) {
|
|
10765
|
-
if (typeof str !== 'string') {
|
|
10766
|
-
date = str;
|
|
10767
|
-
str = 'YYYY-MM-DD';
|
|
10768
|
-
}
|
|
10769
|
-
|
|
10770
|
-
return str.replace(esm_dateRegex, function (match, key, rest) {
|
|
10771
|
-
var args = esm_timespan[key];
|
|
10772
|
-
var chars = args[1];
|
|
10773
|
-
var name = args[0];
|
|
10774
|
-
|
|
10775
|
-
if (utc === true) {
|
|
10776
|
-
name = "getUTC".concat(name.slice(3));
|
|
10777
|
-
}
|
|
10778
|
-
|
|
10779
|
-
if (!date) {
|
|
10780
|
-
date = new Date();
|
|
10781
|
-
}
|
|
10782
|
-
|
|
10783
|
-
var val = "00".concat(String(date[name]() + (args[2] || 0)));
|
|
10784
|
-
return val.slice(-chars) + (rest || '');
|
|
10785
|
-
});
|
|
10786
|
-
}
|
|
10787
|
-
|
|
10788
|
-
esm_formatter.utc = function (str, date) {
|
|
10789
|
-
return esm_formatter(str, date, true);
|
|
10790
|
-
};
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
11062
|
;// CONCATENATED MODULE: ./esm/index.js
|
|
10794
11063
|
|
|
10795
11064
|
|
|
@@ -10993,7 +11262,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
|
10993
11262
|
/******/ // startup
|
|
10994
11263
|
/******/ // Load entry module and return exports
|
|
10995
11264
|
/******/ // This entry module doesn't tell about it's top-level declarations so it can't be inlined
|
|
10996
|
-
/******/ var __webpack_exports__ = __webpack_require__(
|
|
11265
|
+
/******/ var __webpack_exports__ = __webpack_require__(523);
|
|
10997
11266
|
/******/
|
|
10998
11267
|
/******/ return __webpack_exports__;
|
|
10999
11268
|
/******/ })()
|