uiw 4.9.11 → 4.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/uiw.css +4779 -0
- package/dist/uiw.js +407 -134
- 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
|
@@ -202,6 +202,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
202
202
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
203
203
|
|
|
204
204
|
"use strict";
|
|
205
|
+
var __webpack_unused_export__;
|
|
205
206
|
/** @license React v17.0.2
|
|
206
207
|
* react-jsx-runtime.production.min.js
|
|
207
208
|
*
|
|
@@ -217,12 +218,12 @@ __webpack_require__(115);
|
|
|
217
218
|
var f = __webpack_require__(787),
|
|
218
219
|
g = 60103;
|
|
219
220
|
|
|
220
|
-
|
|
221
|
+
__webpack_unused_export__ = 60107;
|
|
221
222
|
|
|
222
223
|
if ("function" === typeof Symbol && Symbol.for) {
|
|
223
224
|
var h = Symbol.for;
|
|
224
225
|
g = h("react.element");
|
|
225
|
-
|
|
226
|
+
__webpack_unused_export__ = h("react.fragment");
|
|
226
227
|
}
|
|
227
228
|
|
|
228
229
|
var m = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
|
@@ -1006,7 +1007,7 @@ try {
|
|
|
1006
1007
|
|
|
1007
1008
|
/***/ }),
|
|
1008
1009
|
|
|
1009
|
-
/***/
|
|
1010
|
+
/***/ 523:
|
|
1010
1011
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1011
1012
|
|
|
1012
1013
|
"use strict";
|
|
@@ -1050,8 +1051,11 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1050
1051
|
"Layout": function() { return /* reexport */ react_layout_esm; },
|
|
1051
1052
|
"LayoutContext": function() { return /* reexport */ LayoutContext; },
|
|
1052
1053
|
"List": function() { return /* reexport */ react_list_esm; },
|
|
1054
|
+
"ListItem": function() { return /* reexport */ ListItem; },
|
|
1053
1055
|
"Loader": function() { return /* reexport */ react_loader_esm; },
|
|
1054
1056
|
"Menu": function() { return /* reexport */ react_menu_esm; },
|
|
1057
|
+
"MenuDivider": function() { return /* reexport */ MenuDivider; },
|
|
1058
|
+
"MenuItem": function() { return /* reexport */ MenuItem; },
|
|
1055
1059
|
"Message": function() { return /* reexport */ Message; },
|
|
1056
1060
|
"Modal": function() { return /* reexport */ react_modal_esm; },
|
|
1057
1061
|
"MonthPicker": function() { return /* reexport */ MonthPicker; },
|
|
@@ -1073,6 +1077,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1073
1077
|
"Slider": function() { return /* reexport */ Slider; },
|
|
1074
1078
|
"Split": function() { return /* reexport */ Split; },
|
|
1075
1079
|
"Steps": function() { return /* reexport */ react_steps_esm; },
|
|
1080
|
+
"SubMenu": function() { return /* reexport */ SubMenu; },
|
|
1076
1081
|
"Switch": function() { return /* reexport */ react_switch_esm; },
|
|
1077
1082
|
"Table": function() { return /* reexport */ react_table_esm; },
|
|
1078
1083
|
"Tabs": function() { return /* reexport */ Tabs; },
|
|
@@ -1084,7 +1089,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1084
1089
|
"Tree": function() { return /* reexport */ Tree; },
|
|
1085
1090
|
"TreeChecked": function() { return /* reexport */ TreeChecked; },
|
|
1086
1091
|
"canUseDOM": function() { return /* reexport */ canUseDOM; },
|
|
1087
|
-
"formatter": function() { return /* reexport */
|
|
1092
|
+
"formatter": function() { return /* reexport */ formatter; },
|
|
1088
1093
|
"getChildKeys": function() { return /* reexport */ getChildKeys; },
|
|
1089
1094
|
"randomid": function() { return /* reexport */ randomid; }
|
|
1090
1095
|
});
|
|
@@ -1248,6 +1253,8 @@ function _extends() {
|
|
|
1248
1253
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
|
|
1249
1254
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
|
|
1250
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() {}
|
|
1251
1258
|
;// CONCATENATED MODULE: ../utils/esm/getScroll.js
|
|
1252
1259
|
/**
|
|
1253
1260
|
* Gets the scroll value of the given element in the given side (top and left)
|
|
@@ -1273,32 +1280,16 @@ function getScroll(target, top) {
|
|
|
1273
1280
|
|
|
1274
1281
|
return ret;
|
|
1275
1282
|
}
|
|
1276
|
-
;// CONCATENATED MODULE: ../
|
|
1277
|
-
function noop() {}
|
|
1278
|
-
// EXTERNAL MODULE: ../../node_modules/react/jsx-runtime.js
|
|
1279
|
-
var jsx_runtime = __webpack_require__(770);
|
|
1280
|
-
;// CONCATENATED MODULE: ../react-affix/esm/index.js
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
var _excluded = ["prefixCls", "className", "children", "offsetTop", "offsetBottom", "target", "onChange"];
|
|
1289
|
-
|
|
1290
|
-
|
|
1283
|
+
;// CONCATENATED MODULE: ../react-affix/esm/utils.js
|
|
1291
1284
|
|
|
1292
|
-
|
|
1293
|
-
function getTargetRect(target) {
|
|
1285
|
+
var getTargetRect = function getTargetRect(target) {
|
|
1294
1286
|
return target !== window ? target.getBoundingClientRect() : {
|
|
1295
1287
|
top: 0,
|
|
1296
1288
|
left: 0,
|
|
1297
1289
|
bottom: 0
|
|
1298
1290
|
};
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
function getOffset(element, target) {
|
|
1291
|
+
};
|
|
1292
|
+
var getOffset = function getOffset(element, target) {
|
|
1302
1293
|
var elemRect = element.getBoundingClientRect();
|
|
1303
1294
|
var targetRect = getTargetRect(target);
|
|
1304
1295
|
var scrollTop = getScroll(target, true);
|
|
@@ -1312,11 +1303,25 @@ function getOffset(element, target) {
|
|
|
1312
1303
|
width: elemRect.width,
|
|
1313
1304
|
height: elemRect.height
|
|
1314
1305
|
};
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
function getDefaultTarget() {
|
|
1306
|
+
};
|
|
1307
|
+
var getDefaultTarget = function getDefaultTarget() {
|
|
1318
1308
|
return typeof window !== 'undefined' ? window : null;
|
|
1319
|
-
}
|
|
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
|
+
|
|
1320
1325
|
|
|
1321
1326
|
var Affix = /*#__PURE__*/function (_React$Component) {
|
|
1322
1327
|
_inherits(Affix, _React$Component);
|
|
@@ -2638,9 +2643,7 @@ function Icon(props) {
|
|
|
2638
2643
|
className: [prefixCls, className, prefixCls && verticalAlign ? prefixCls + "-" + verticalAlign : null, spin && prefixCls ? prefixCls + "-spin" : null].filter(Boolean).join(' ').trim()
|
|
2639
2644
|
});
|
|
2640
2645
|
|
|
2641
|
-
return /*#__PURE__*/(
|
|
2642
|
-
children: svg
|
|
2643
|
-
}));
|
|
2646
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TagName, _extends({}, propps), svg);
|
|
2644
2647
|
}
|
|
2645
2648
|
;// CONCATENATED MODULE: ../react-button/esm/style/index.css
|
|
2646
2649
|
// extracted by mini-css-extract-plugin
|
|
@@ -3360,7 +3363,7 @@ var react_button_group_esm_excluded = ["prefixCls", "vertical", "children", "cla
|
|
|
3360
3363
|
}));
|
|
3361
3364
|
;// CONCATENATED MODULE: ../../node_modules/@uiw/formatter/esm/index.js
|
|
3362
3365
|
/**!
|
|
3363
|
-
* @uiw/formatter v1.3.
|
|
3366
|
+
* @uiw/formatter v1.3.2
|
|
3364
3367
|
* Get a formatted date.
|
|
3365
3368
|
*
|
|
3366
3369
|
* Copyright (c) 2022 Kenny Wang <wowohoo@qq.com>
|
|
@@ -3684,7 +3687,11 @@ function getStyle(options) {
|
|
|
3684
3687
|
usePortal = _ref.usePortal,
|
|
3685
3688
|
autoAdjustOverflow = _ref.autoAdjustOverflow;
|
|
3686
3689
|
|
|
3687
|
-
var sty = {
|
|
3690
|
+
var sty = {
|
|
3691
|
+
left: 0,
|
|
3692
|
+
top: 0,
|
|
3693
|
+
placement: placement
|
|
3694
|
+
};
|
|
3688
3695
|
|
|
3689
3696
|
if (!triggerDom || !popupDom || !document) {
|
|
3690
3697
|
return sty;
|
|
@@ -6211,22 +6218,18 @@ function Dropdown(props) {
|
|
|
6211
6218
|
children: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props))
|
|
6212
6219
|
}));
|
|
6213
6220
|
}
|
|
6214
|
-
;// CONCATENATED MODULE: ../react-file-input/esm/
|
|
6215
|
-
// extracted by mini-css-extract-plugin
|
|
6216
|
-
/* harmony default export */ var react_file_input_esm_style = ({});
|
|
6217
|
-
;// CONCATENATED MODULE: ../react-file-input/esm/index.js
|
|
6218
|
-
|
|
6221
|
+
;// CONCATENATED MODULE: ../react-file-input/esm/Input.js
|
|
6219
6222
|
|
|
6220
|
-
var react_file_input_esm_excluded = ["className", "prefixCls"];
|
|
6221
6223
|
|
|
6224
|
+
var Input_excluded = ["className", "prefixCls"];
|
|
6222
6225
|
|
|
6223
6226
|
|
|
6224
6227
|
|
|
6225
|
-
/* 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) {
|
|
6226
6229
|
var className = props.className,
|
|
6227
6230
|
_props$prefixCls = props.prefixCls,
|
|
6228
6231
|
prefixCls = _props$prefixCls === void 0 ? 'w-fileinput' : _props$prefixCls,
|
|
6229
|
-
other = _objectWithoutPropertiesLoose(props,
|
|
6232
|
+
other = _objectWithoutPropertiesLoose(props, Input_excluded);
|
|
6230
6233
|
|
|
6231
6234
|
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
6232
6235
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, _extends({
|
|
@@ -6237,6 +6240,331 @@ var react_file_input_esm_excluded = ["className", "prefixCls"];
|
|
|
6237
6240
|
type: "file"
|
|
6238
6241
|
}));
|
|
6239
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);
|
|
6240
6568
|
;// CONCATENATED MODULE: ../react-grid/esm/style/col.css
|
|
6241
6569
|
// extracted by mini-css-extract-plugin
|
|
6242
6570
|
/* harmony default export */ var col = ({});
|
|
@@ -6693,8 +7021,7 @@ var esm_Item_excluded = ["prefixCls", "className", "children", "extra", "tagName
|
|
|
6693
7021
|
|
|
6694
7022
|
|
|
6695
7023
|
|
|
6696
|
-
|
|
6697
|
-
var Item_Item = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
|
7024
|
+
var ListItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
|
6698
7025
|
var _props$prefixCls = props.prefixCls,
|
|
6699
7026
|
prefixCls = _props$prefixCls === void 0 ? 'w-list-item' : _props$prefixCls,
|
|
6700
7027
|
className = props.className,
|
|
@@ -6711,20 +7038,17 @@ var Item_Item = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
|
|
|
6711
7038
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TagName, _extends({}, resetProps, {
|
|
6712
7039
|
className: cls,
|
|
6713
7040
|
ref: ref
|
|
6714
|
-
}), /*#__PURE__*/(0,jsx_runtime.
|
|
6715
|
-
children:
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
})]
|
|
6723
|
-
})
|
|
7041
|
+
}), !extra || resetProps.href ? children : /*#__PURE__*/(0,jsx_runtime.jsxs)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
|
|
7042
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
7043
|
+
className: prefixCls + "-main",
|
|
7044
|
+
children: children
|
|
7045
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
7046
|
+
className: prefixCls + "-extra",
|
|
7047
|
+
children: extra
|
|
7048
|
+
})]
|
|
6724
7049
|
}));
|
|
6725
7050
|
});
|
|
6726
|
-
|
|
6727
|
-
/* harmony default export */ var esm_Item = (Item_Item);
|
|
7051
|
+
ListItem.displayName = 'List.Item';
|
|
6728
7052
|
;// CONCATENATED MODULE: ../react-list/esm/style/index.css
|
|
6729
7053
|
// extracted by mini-css-extract-plugin
|
|
6730
7054
|
/* harmony default export */ var react_list_esm_style = ({});
|
|
@@ -6793,9 +7117,9 @@ function InternalList(props, ref) {
|
|
|
6793
7117
|
}));
|
|
6794
7118
|
}
|
|
6795
7119
|
|
|
6796
|
-
var
|
|
6797
|
-
|
|
6798
|
-
/* 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);
|
|
6799
7123
|
;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Layout.js
|
|
6800
7124
|
|
|
6801
7125
|
|
|
@@ -7159,7 +7483,8 @@ var disabledProps = {
|
|
|
7159
7483
|
onMouseLeave: undefined,
|
|
7160
7484
|
tabIndex: -1
|
|
7161
7485
|
};
|
|
7162
|
-
|
|
7486
|
+
|
|
7487
|
+
function Internal(props, ref) {
|
|
7163
7488
|
var _props$prefixCls = props.prefixCls,
|
|
7164
7489
|
prefixCls = _props$prefixCls === void 0 ? 'w-menu-item' : _props$prefixCls,
|
|
7165
7490
|
className = props.className,
|
|
@@ -7198,47 +7523,42 @@ var MenuItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_a
|
|
|
7198
7523
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
7199
7524
|
children: [" ", tagComp, " "]
|
|
7200
7525
|
});
|
|
7201
|
-
}
|
|
7526
|
+
}
|
|
7527
|
+
|
|
7528
|
+
var MenuItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Internal);
|
|
7202
7529
|
MenuItem.displayName = 'uiw.MenuItem';
|
|
7203
|
-
/* harmony default export */ var esm_MenuItem = (MenuItem);
|
|
7204
7530
|
;// CONCATENATED MODULE: ../react-menu/esm/Divider.js
|
|
7205
7531
|
|
|
7206
7532
|
|
|
7207
7533
|
var Divider_excluded = ["prefixCls", "className", "title"];
|
|
7208
7534
|
|
|
7209
7535
|
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
if (props === void 0) {
|
|
7213
|
-
props = {};
|
|
7214
|
-
}
|
|
7215
|
-
|
|
7216
|
-
var _props = props,
|
|
7217
|
-
_props$prefixCls = _props.prefixCls,
|
|
7536
|
+
var MenuDivider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
|
|
7537
|
+
var _props$prefixCls = props.prefixCls,
|
|
7218
7538
|
prefixCls = _props$prefixCls === void 0 ? 'w-menu-divider' : _props$prefixCls,
|
|
7219
|
-
className =
|
|
7220
|
-
title =
|
|
7539
|
+
className = props.className,
|
|
7540
|
+
title = props.title,
|
|
7221
7541
|
htmlProps = _objectWithoutPropertiesLoose(props, Divider_excluded);
|
|
7222
7542
|
|
|
7223
7543
|
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
7224
7544
|
|
|
7225
7545
|
if (!title) {
|
|
7226
7546
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("li", _extends({}, htmlProps, {
|
|
7547
|
+
ref: ref,
|
|
7227
7548
|
className: cls
|
|
7228
7549
|
}));
|
|
7229
7550
|
}
|
|
7230
7551
|
|
|
7231
7552
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("li", _extends({}, htmlProps, {
|
|
7553
|
+
ref: ref,
|
|
7232
7554
|
className: cls,
|
|
7233
7555
|
"data-menu": "divider",
|
|
7234
7556
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
7235
7557
|
children: title
|
|
7236
7558
|
})
|
|
7237
7559
|
}));
|
|
7238
|
-
}
|
|
7239
|
-
|
|
7240
|
-
Divider.displayName = 'uiw.MenuDivider';
|
|
7241
|
-
/* harmony default export */ var esm_Divider = (Divider);
|
|
7560
|
+
});
|
|
7561
|
+
MenuDivider.displayName = 'uiw.MenuDivider';
|
|
7242
7562
|
;// CONCATENATED MODULE: ../react-menu/esm/style/submenu.css
|
|
7243
7563
|
// extracted by mini-css-extract-plugin
|
|
7244
7564
|
/* harmony default export */ var submenu = ({});
|
|
@@ -7390,7 +7710,7 @@ var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
|
|
|
7390
7710
|
paddingLeft: inlineIndent
|
|
7391
7711
|
} : {}
|
|
7392
7712
|
})),
|
|
7393
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
7713
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem, _extends({}, other, {
|
|
7394
7714
|
ref: null,
|
|
7395
7715
|
disabled: disabled,
|
|
7396
7716
|
isSubMenuItem: true,
|
|
@@ -7405,7 +7725,6 @@ var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
|
|
|
7405
7725
|
});
|
|
7406
7726
|
});
|
|
7407
7727
|
SubMenu.displayName = 'uiw.SubMenu';
|
|
7408
|
-
/* harmony default export */ var esm_SubMenu = (SubMenu);
|
|
7409
7728
|
;// CONCATENATED MODULE: ../react-menu/esm/style/menu.css
|
|
7410
7729
|
// extracted by mini-css-extract-plugin
|
|
7411
7730
|
/* harmony default export */ var menu = ({});
|
|
@@ -7443,7 +7762,7 @@ var Menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
7443
7762
|
if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) return child;
|
|
7444
7763
|
var props = {}; // Sub Menu
|
|
7445
7764
|
|
|
7446
|
-
if (child.props.children && child.type ===
|
|
7765
|
+
if (child.props.children && child.type === SubMenu) {
|
|
7447
7766
|
props.inlineIndent = inlineIndent;
|
|
7448
7767
|
}
|
|
7449
7768
|
|
|
@@ -7453,10 +7772,10 @@ var Menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
7453
7772
|
})
|
|
7454
7773
|
}));
|
|
7455
7774
|
});
|
|
7456
|
-
Menu.Item = esm_MenuItem;
|
|
7457
|
-
Menu.SubMenu = esm_SubMenu;
|
|
7458
|
-
Menu.Divider = esm_Divider;
|
|
7459
7775
|
Menu.displayName = 'uiw.Menu';
|
|
7776
|
+
Menu.Item = MenuItem;
|
|
7777
|
+
Menu.SubMenu = SubMenu;
|
|
7778
|
+
Menu.Divider = MenuDivider;
|
|
7460
7779
|
/* harmony default export */ var esm_Menu = (Menu);
|
|
7461
7780
|
;// CONCATENATED MODULE: ../react-menu/esm/index.js
|
|
7462
7781
|
|
|
@@ -7984,12 +8303,13 @@ function NotificationCreate(props, type) {
|
|
|
7984
8303
|
|
|
7985
8304
|
|
|
7986
8305
|
|
|
7987
|
-
var react_pagination_esm_excluded = ["className", "prefixCls", "alignment", "size", "total", "pageSize", "current", "onChange", "divider"];
|
|
8306
|
+
var react_pagination_esm_excluded = ["className", "style", "prefixCls", "alignment", "size", "total", "pageSize", "current", "onChange", "divider"];
|
|
7988
8307
|
|
|
7989
8308
|
|
|
7990
8309
|
|
|
7991
8310
|
function Pagination(props) {
|
|
7992
8311
|
var className = props.className,
|
|
8312
|
+
style = props.style,
|
|
7993
8313
|
_props$prefixCls = props.prefixCls,
|
|
7994
8314
|
prefixCls = _props$prefixCls === void 0 ? 'w-pagination' : _props$prefixCls,
|
|
7995
8315
|
_props$alignment = props.alignment,
|
|
@@ -8134,7 +8454,10 @@ function Pagination(props) {
|
|
|
8134
8454
|
}
|
|
8135
8455
|
|
|
8136
8456
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", _extends({
|
|
8137
|
-
className: cls
|
|
8457
|
+
className: cls,
|
|
8458
|
+
style: _extends({}, style, {
|
|
8459
|
+
textAlign: alignment
|
|
8460
|
+
})
|
|
8138
8461
|
}, other, {
|
|
8139
8462
|
children: initPageSoure.map(function (item, idx) {
|
|
8140
8463
|
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
@@ -10736,56 +11059,6 @@ function TreeChecked(_ref) {
|
|
|
10736
11059
|
}
|
|
10737
11060
|
}, props));
|
|
10738
11061
|
}
|
|
10739
|
-
;// CONCATENATED MODULE: ./node_modules/@uiw/formatter/esm/index.js
|
|
10740
|
-
/**!
|
|
10741
|
-
* @uiw/formatter v1.3.1
|
|
10742
|
-
* Get a formatted date.
|
|
10743
|
-
*
|
|
10744
|
-
* Copyright (c) 2022 Kenny Wang <wowohoo@qq.com>
|
|
10745
|
-
* https://github.com/uiwjs/date-formatter.git
|
|
10746
|
-
* Licensed under the MIT license
|
|
10747
|
-
*/
|
|
10748
|
-
var esm_dateRegex = /(?=(YYYY|YY|MM|DD|HH|mm|ss|ms))\1([:/]*)/g;
|
|
10749
|
-
var esm_timespan = {
|
|
10750
|
-
YYYY: ['getFullYear', 4],
|
|
10751
|
-
YY: ['getFullYear', 2],
|
|
10752
|
-
MM: ['getMonth', 2, 1],
|
|
10753
|
-
DD: ['getDate', 2],
|
|
10754
|
-
HH: ['getHours', 2],
|
|
10755
|
-
mm: ['getMinutes', 2],
|
|
10756
|
-
ss: ['getSeconds', 2],
|
|
10757
|
-
ms: ['getMilliseconds', 3]
|
|
10758
|
-
};
|
|
10759
|
-
|
|
10760
|
-
function esm_formatter(str, date, utc) {
|
|
10761
|
-
if (typeof str !== 'string') {
|
|
10762
|
-
date = str;
|
|
10763
|
-
str = 'YYYY-MM-DD';
|
|
10764
|
-
}
|
|
10765
|
-
|
|
10766
|
-
return str.replace(esm_dateRegex, function (match, key, rest) {
|
|
10767
|
-
var args = esm_timespan[key];
|
|
10768
|
-
var chars = args[1];
|
|
10769
|
-
var name = args[0];
|
|
10770
|
-
|
|
10771
|
-
if (utc === true) {
|
|
10772
|
-
name = "getUTC".concat(name.slice(3));
|
|
10773
|
-
}
|
|
10774
|
-
|
|
10775
|
-
if (!date) {
|
|
10776
|
-
date = new Date();
|
|
10777
|
-
}
|
|
10778
|
-
|
|
10779
|
-
var val = "00".concat(String(date[name]() + (args[2] || 0)));
|
|
10780
|
-
return val.slice(-chars) + (rest || '');
|
|
10781
|
-
});
|
|
10782
|
-
}
|
|
10783
|
-
|
|
10784
|
-
esm_formatter.utc = function (str, date) {
|
|
10785
|
-
return esm_formatter(str, date, true);
|
|
10786
|
-
};
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
11062
|
;// CONCATENATED MODULE: ./esm/index.js
|
|
10790
11063
|
|
|
10791
11064
|
|
|
@@ -10989,7 +11262,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
|
10989
11262
|
/******/ // startup
|
|
10990
11263
|
/******/ // Load entry module and return exports
|
|
10991
11264
|
/******/ // This entry module doesn't tell about it's top-level declarations so it can't be inlined
|
|
10992
|
-
/******/ var __webpack_exports__ = __webpack_require__(
|
|
11265
|
+
/******/ var __webpack_exports__ = __webpack_require__(523);
|
|
10993
11266
|
/******/
|
|
10994
11267
|
/******/ return __webpack_exports__;
|
|
10995
11268
|
/******/ })()
|