uiw 4.10.7 → 4.11.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/README.md +2 -1
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +21 -0
- package/cjs/index.js.map +2 -2
- package/dist/uiw.css +69 -47
- package/dist/uiw.js +450 -226
- package/dist/uiw.min.css +1 -1
- package/dist/uiw.min.js +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +2 -0
- package/esm/index.js.map +3 -2
- package/package.json +56 -55
- package/src/index.ts +2 -0
package/dist/uiw.js
CHANGED
|
@@ -1007,9 +1007,93 @@ try {
|
|
|
1007
1007
|
|
|
1008
1008
|
/***/ }),
|
|
1009
1009
|
|
|
1010
|
-
/***/
|
|
1011
|
-
/***/ (function(
|
|
1010
|
+
/***/ 787:
|
|
1011
|
+
/***/ (function(module) {
|
|
1012
|
+
|
|
1013
|
+
"use strict";
|
|
1014
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
1015
|
+
|
|
1016
|
+
/***/ }),
|
|
1012
1017
|
|
|
1018
|
+
/***/ 156:
|
|
1019
|
+
/***/ (function(module) {
|
|
1020
|
+
|
|
1021
|
+
"use strict";
|
|
1022
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
1023
|
+
|
|
1024
|
+
/***/ })
|
|
1025
|
+
|
|
1026
|
+
/******/ });
|
|
1027
|
+
/************************************************************************/
|
|
1028
|
+
/******/ // The module cache
|
|
1029
|
+
/******/ var __webpack_module_cache__ = {};
|
|
1030
|
+
/******/
|
|
1031
|
+
/******/ // The require function
|
|
1032
|
+
/******/ function __webpack_require__(moduleId) {
|
|
1033
|
+
/******/ // Check if module is in cache
|
|
1034
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
1035
|
+
/******/ if (cachedModule !== undefined) {
|
|
1036
|
+
/******/ return cachedModule.exports;
|
|
1037
|
+
/******/ }
|
|
1038
|
+
/******/ // Create a new module (and put it into the cache)
|
|
1039
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
1040
|
+
/******/ // no module.id needed
|
|
1041
|
+
/******/ // no module.loaded needed
|
|
1042
|
+
/******/ exports: {}
|
|
1043
|
+
/******/ };
|
|
1044
|
+
/******/
|
|
1045
|
+
/******/ // Execute the module function
|
|
1046
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
1047
|
+
/******/
|
|
1048
|
+
/******/ // Return the exports of the module
|
|
1049
|
+
/******/ return module.exports;
|
|
1050
|
+
/******/ }
|
|
1051
|
+
/******/
|
|
1052
|
+
/************************************************************************/
|
|
1053
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
1054
|
+
/******/ !function() {
|
|
1055
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
1056
|
+
/******/ __webpack_require__.n = function(module) {
|
|
1057
|
+
/******/ var getter = module && module.__esModule ?
|
|
1058
|
+
/******/ function() { return module['default']; } :
|
|
1059
|
+
/******/ function() { return module; };
|
|
1060
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
1061
|
+
/******/ return getter;
|
|
1062
|
+
/******/ };
|
|
1063
|
+
/******/ }();
|
|
1064
|
+
/******/
|
|
1065
|
+
/******/ /* webpack/runtime/define property getters */
|
|
1066
|
+
/******/ !function() {
|
|
1067
|
+
/******/ // define getter functions for harmony exports
|
|
1068
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
|
1069
|
+
/******/ for(var key in definition) {
|
|
1070
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
1071
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
1072
|
+
/******/ }
|
|
1073
|
+
/******/ }
|
|
1074
|
+
/******/ };
|
|
1075
|
+
/******/ }();
|
|
1076
|
+
/******/
|
|
1077
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1078
|
+
/******/ !function() {
|
|
1079
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
1080
|
+
/******/ }();
|
|
1081
|
+
/******/
|
|
1082
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
1083
|
+
/******/ !function() {
|
|
1084
|
+
/******/ // define __esModule on exports
|
|
1085
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
1086
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
1087
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1088
|
+
/******/ }
|
|
1089
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
1090
|
+
/******/ };
|
|
1091
|
+
/******/ }();
|
|
1092
|
+
/******/
|
|
1093
|
+
/************************************************************************/
|
|
1094
|
+
var __webpack_exports__ = {};
|
|
1095
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
1096
|
+
!function() {
|
|
1013
1097
|
"use strict";
|
|
1014
1098
|
// ESM COMPAT FLAG
|
|
1015
1099
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -1043,6 +1127,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1043
1127
|
"Divider": function() { return /* reexport */ react_divider_esm; },
|
|
1044
1128
|
"Drawer": function() { return /* reexport */ react_drawer_esm; },
|
|
1045
1129
|
"Dropdown": function() { return /* reexport */ Dropdown; },
|
|
1130
|
+
"Empty": function() { return /* reexport */ react_empty_esm; },
|
|
1046
1131
|
"FileInput": function() { return /* reexport */ react_file_input_esm; },
|
|
1047
1132
|
"Form": function() { return /* reexport */ react_form_esm; },
|
|
1048
1133
|
"FormItem": function() { return /* reexport */ FormItem; },
|
|
@@ -4502,7 +4587,7 @@ function TimePicker(props) {
|
|
|
4502
4587
|
hideDisabled: hideDisabled,
|
|
4503
4588
|
precision: precision
|
|
4504
4589
|
};
|
|
4505
|
-
var inputValue = date ? formatter(format, date) : '';
|
|
4590
|
+
var inputValue = date ? formatter(format, new Date(date)) : '';
|
|
4506
4591
|
var datePickerTime = date || new Date();
|
|
4507
4592
|
|
|
4508
4593
|
var _props = _extends({}, inputProps, {
|
|
@@ -6218,6 +6303,70 @@ function Dropdown(props) {
|
|
|
6218
6303
|
children: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props))
|
|
6219
6304
|
}));
|
|
6220
6305
|
}
|
|
6306
|
+
;// CONCATENATED MODULE: ../react-empty/esm/style/index.css
|
|
6307
|
+
// extracted by mini-css-extract-plugin
|
|
6308
|
+
/* harmony default export */ var react_empty_esm_style = ({});
|
|
6309
|
+
;// CONCATENATED MODULE: ../react-empty/esm/index.js
|
|
6310
|
+
|
|
6311
|
+
|
|
6312
|
+
var react_empty_esm_excluded = ["prefixCls", "className", "icon", "iconProps", "size", "description", "children"];
|
|
6313
|
+
|
|
6314
|
+
|
|
6315
|
+
|
|
6316
|
+
|
|
6317
|
+
|
|
6318
|
+
var Empty = function Empty(props) {
|
|
6319
|
+
var _props$prefixCls = props.prefixCls,
|
|
6320
|
+
prefixCls = _props$prefixCls === void 0 ? 'w-empty' : _props$prefixCls,
|
|
6321
|
+
className = props.className,
|
|
6322
|
+
icon = props.icon,
|
|
6323
|
+
iconProps = props.iconProps,
|
|
6324
|
+
_props$size = props.size,
|
|
6325
|
+
size = _props$size === void 0 ? 64 : _props$size,
|
|
6326
|
+
_props$description = props.description,
|
|
6327
|
+
description = _props$description === void 0 ? '暂无数据' : _props$description,
|
|
6328
|
+
children = props.children,
|
|
6329
|
+
other = _objectWithoutPropertiesLoose(props, react_empty_esm_excluded);
|
|
6330
|
+
|
|
6331
|
+
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
6332
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", _extends({
|
|
6333
|
+
className: cls
|
|
6334
|
+
}, other, {
|
|
6335
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6336
|
+
className: prefixCls + "-icon",
|
|
6337
|
+
children: icon ? icon : /*#__PURE__*/(0,jsx_runtime.jsxs)("svg", _extends({
|
|
6338
|
+
viewBox: "0 0 1024 1024",
|
|
6339
|
+
width: size,
|
|
6340
|
+
height: size
|
|
6341
|
+
}, iconProps, {
|
|
6342
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
6343
|
+
d: "M20.48 860.16a491.52 102.4 0 1 0 983.04 0 491.52 102.4 0 1 0-983.04 0Z",
|
|
6344
|
+
fill: "#F5F5F5"
|
|
6345
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
6346
|
+
d: "M225.28 409.6l573.44-8.06912 112.78336 183.296H102.4z",
|
|
6347
|
+
fill: "#C4C5C7"
|
|
6348
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
6349
|
+
d: "M266.24 61.44h491.52a40.96 40.96 0 0 1 40.96 40.96v532.48a40.96 40.96 0 0 1-40.96 40.96H266.24a40.96 40.96 0 0 1-40.96-40.96V102.4a40.96 40.96 0 0 1 40.96-40.96z",
|
|
6350
|
+
fill: "#F5F5F7"
|
|
6351
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
6352
|
+
d: "M348.16 143.36h327.68a40.96 40.96 0 0 1 40.96 40.96v122.88a40.96 40.96 0 0 1-40.96 40.96H348.16a40.96 40.96 0 0 1-40.96-40.96V184.32a40.96 40.96 0 0 1 40.96-40.96zM327.68 409.6h368.64a20.48 20.48 0 0 1 0 40.96H327.68a20.48 20.48 0 0 1 0-40.96zM327.68 491.52h368.64a20.48 20.48 0 0 1 0 40.96H327.68a20.48 20.48 0 0 1 0-40.96z",
|
|
6353
|
+
fill: "#EBECEC"
|
|
6354
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
6355
|
+
d: "M673.44384 607.58016v13.43488c0 25.14944-20.0704 45.52704-44.8512 45.52704H382.95552l-2.2528-0.06144c-23.7568-1.16736-42.63936-21.07392-42.63936-45.4656v-13.45536c0-12.55424-10.0352-22.7328-22.44608-22.7328H102.4v250.30656C102.4 860.2624 122.49088 880.64 147.29216 880.64h719.31904c24.7808 0 44.89216-20.3776 44.89216-45.50656V584.82688H695.88992c-12.3904 0-22.44608 10.17856-22.44608 22.7328z",
|
|
6356
|
+
fill: "#E0E0E0"
|
|
6357
|
+
})]
|
|
6358
|
+
}))
|
|
6359
|
+
}), description && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6360
|
+
className: prefixCls + "-description",
|
|
6361
|
+
children: description
|
|
6362
|
+
}), children && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6363
|
+
className: prefixCls + "-footer",
|
|
6364
|
+
children: children
|
|
6365
|
+
})]
|
|
6366
|
+
}));
|
|
6367
|
+
};
|
|
6368
|
+
|
|
6369
|
+
/* harmony default export */ var react_empty_esm = (Empty);
|
|
6221
6370
|
;// CONCATENATED MODULE: ../react-file-input/esm/Input.js
|
|
6222
6371
|
|
|
6223
6372
|
|
|
@@ -6673,7 +6822,7 @@ function Row_Row(props) {
|
|
|
6673
6822
|
|
|
6674
6823
|
|
|
6675
6824
|
|
|
6676
|
-
var FormItem_excluded = ["prefixCls", "className", "style", "label", "labelFor", "labelClassName", "labelStyle", "help", "inline", "initialValue", "validator", "hasError"];
|
|
6825
|
+
var FormItem_excluded = ["prefixCls", "className", "required", "style", "label", "labelFor", "labelClassName", "labelStyle", "help", "inline", "initialValue", "validator", "hasError"];
|
|
6677
6826
|
|
|
6678
6827
|
|
|
6679
6828
|
|
|
@@ -6697,6 +6846,7 @@ var FormItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6697
6846
|
var _this$props = this.props,
|
|
6698
6847
|
prefixCls = _this$props.prefixCls,
|
|
6699
6848
|
className = _this$props.className,
|
|
6849
|
+
required = _this$props.required,
|
|
6700
6850
|
style = _this$props.style,
|
|
6701
6851
|
label = _this$props.label,
|
|
6702
6852
|
labelFor = _this$props.labelFor,
|
|
@@ -6716,14 +6866,19 @@ var FormItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6716
6866
|
style: style
|
|
6717
6867
|
}, otherProps, {
|
|
6718
6868
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(Row_Row, {
|
|
6719
|
-
children: [/*#__PURE__*/(0,jsx_runtime.
|
|
6869
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(Col, {
|
|
6720
6870
|
fixed: true,
|
|
6721
6871
|
className: labelCls,
|
|
6722
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("label", {
|
|
6872
|
+
children: [required && /*#__PURE__*/(0,jsx_runtime.jsx)("label", {
|
|
6873
|
+
style: {
|
|
6874
|
+
color: 'red'
|
|
6875
|
+
},
|
|
6876
|
+
children: "*"
|
|
6877
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("label", {
|
|
6723
6878
|
style: labelStyle,
|
|
6724
6879
|
htmlFor: labelFor,
|
|
6725
6880
|
children: label
|
|
6726
|
-
})
|
|
6881
|
+
})]
|
|
6727
6882
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Col, {
|
|
6728
6883
|
className: "w-form-row",
|
|
6729
6884
|
children: this.props.children
|
|
@@ -6741,11 +6896,18 @@ var FormItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6741
6896
|
className: cls,
|
|
6742
6897
|
style: style
|
|
6743
6898
|
}, otherProps, {
|
|
6744
|
-
children: [label && /*#__PURE__*/(0,jsx_runtime.
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6899
|
+
children: [label && /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
6900
|
+
children: [required && /*#__PURE__*/(0,jsx_runtime.jsx)("label", {
|
|
6901
|
+
style: {
|
|
6902
|
+
color: 'red'
|
|
6903
|
+
},
|
|
6904
|
+
children: "*"
|
|
6905
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)("label", {
|
|
6906
|
+
className: labelCls,
|
|
6907
|
+
style: labelStyle,
|
|
6908
|
+
htmlFor: labelFor,
|
|
6909
|
+
children: label
|
|
6910
|
+
})]
|
|
6749
6911
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Col, {
|
|
6750
6912
|
className: "w-form-row",
|
|
6751
6913
|
children: this.props.children
|
|
@@ -6853,7 +7015,11 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
|
|
|
6853
7015
|
resetForm: handleReset,
|
|
6854
7016
|
getFieldValues: function getFieldValues() {
|
|
6855
7017
|
return data.current;
|
|
6856
|
-
}
|
|
7018
|
+
},
|
|
7019
|
+
getError: function getError() {
|
|
7020
|
+
return data.errors;
|
|
7021
|
+
},
|
|
7022
|
+
setFields: setFields
|
|
6857
7023
|
};
|
|
6858
7024
|
}, [data]);
|
|
6859
7025
|
var formUnits = {};
|
|
@@ -6883,6 +7049,11 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
|
|
|
6883
7049
|
})));
|
|
6884
7050
|
}
|
|
6885
7051
|
|
|
7052
|
+
function setFields(fields) {
|
|
7053
|
+
data.current = fields;
|
|
7054
|
+
setData(data);
|
|
7055
|
+
}
|
|
7056
|
+
|
|
6886
7057
|
function handleChange(name, validator, element, cb) {
|
|
6887
7058
|
return function (env, list) {
|
|
6888
7059
|
var value = env && env.target && 'value' in env.target ? env.target.value : env; // 控件 Checkbox.Group 多选值的处理
|
|
@@ -6945,13 +7116,11 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
|
|
|
6945
7116
|
setData(_extends({}, data, nextState, {
|
|
6946
7117
|
errors: {}
|
|
6947
7118
|
}));
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
});
|
|
6954
|
-
};
|
|
7119
|
+
afterSubmit && afterSubmit({
|
|
7120
|
+
state: data,
|
|
7121
|
+
response: response,
|
|
7122
|
+
reset: handleReset
|
|
7123
|
+
});
|
|
6955
7124
|
};
|
|
6956
7125
|
|
|
6957
7126
|
try {
|
|
@@ -9137,11 +9306,95 @@ function Rate(props) {
|
|
|
9137
9306
|
})
|
|
9138
9307
|
}));
|
|
9139
9308
|
}
|
|
9309
|
+
;// CONCATENATED MODULE: ../react-tag/esm/style/index.css
|
|
9310
|
+
// extracted by mini-css-extract-plugin
|
|
9311
|
+
/* harmony default export */ var react_tag_esm_style = ({});
|
|
9312
|
+
;// CONCATENATED MODULE: ../react-tag/esm/index.js
|
|
9313
|
+
|
|
9314
|
+
|
|
9315
|
+
var react_tag_esm_excluded = ["prefixCls", "className", "style", "title", "children", "visible", "color", "disabled", "bordered", "closable", "light", "onClose"];
|
|
9316
|
+
|
|
9317
|
+
|
|
9318
|
+
|
|
9319
|
+
|
|
9320
|
+
/* harmony default export */ var react_tag_esm = (function (props) {
|
|
9321
|
+
if (props === void 0) {
|
|
9322
|
+
props = {};
|
|
9323
|
+
}
|
|
9324
|
+
|
|
9325
|
+
var _props = props,
|
|
9326
|
+
_props$prefixCls = _props.prefixCls,
|
|
9327
|
+
prefixCls = _props$prefixCls === void 0 ? 'w-tag' : _props$prefixCls,
|
|
9328
|
+
className = _props.className,
|
|
9329
|
+
style = _props.style,
|
|
9330
|
+
_props$title = _props.title,
|
|
9331
|
+
title = _props$title === void 0 ? '' : _props$title,
|
|
9332
|
+
children = _props.children,
|
|
9333
|
+
_props$visible = _props.visible,
|
|
9334
|
+
visible = _props$visible === void 0 ? true : _props$visible,
|
|
9335
|
+
_props$color = _props.color,
|
|
9336
|
+
color = _props$color === void 0 ? '#6E6E6E' : _props$color,
|
|
9337
|
+
_props$disabled = _props.disabled,
|
|
9338
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
9339
|
+
_props$bordered = _props.bordered,
|
|
9340
|
+
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
9341
|
+
closable = _props.closable,
|
|
9342
|
+
_props$light = _props.light,
|
|
9343
|
+
light = _props$light === void 0 ? false : _props$light,
|
|
9344
|
+
onClose = _props.onClose,
|
|
9345
|
+
other = _objectWithoutPropertiesLoose(props, react_tag_esm_excluded);
|
|
9346
|
+
|
|
9347
|
+
var cls = [prefixCls, className, light ? prefixCls + "-light" : null, disabled ? 'disabled' : null].filter(Boolean).join(' ').trim();
|
|
9348
|
+
|
|
9349
|
+
var styl = _extends({}, style);
|
|
9350
|
+
|
|
9351
|
+
if (!light) {
|
|
9352
|
+
styl.color = '#fff';
|
|
9353
|
+
styl.backgroundColor = color;
|
|
9354
|
+
} else {
|
|
9355
|
+
styl.color = color;
|
|
9356
|
+
styl.borderColor = color;
|
|
9357
|
+
|
|
9358
|
+
if (bordered && light) {
|
|
9359
|
+
styl.boxShadow = "inset 0 0 0 1px " + color;
|
|
9360
|
+
}
|
|
9361
|
+
}
|
|
9362
|
+
|
|
9363
|
+
if (!visible) {
|
|
9364
|
+
return null;
|
|
9365
|
+
}
|
|
9366
|
+
|
|
9367
|
+
var closeBtn = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
9368
|
+
return closable ? /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
|
|
9369
|
+
onClick: onClose,
|
|
9370
|
+
className: prefixCls + "-close",
|
|
9371
|
+
width: "15",
|
|
9372
|
+
height: "15",
|
|
9373
|
+
viewBox: "0 0 16 16",
|
|
9374
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
9375
|
+
d: "M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z"
|
|
9376
|
+
})
|
|
9377
|
+
}) : null;
|
|
9378
|
+
}, [closable]);
|
|
9379
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", _extends({
|
|
9380
|
+
className: cls,
|
|
9381
|
+
style: styl
|
|
9382
|
+
}, other, {
|
|
9383
|
+
children: [title || children, closeBtn]
|
|
9384
|
+
}));
|
|
9385
|
+
});
|
|
9386
|
+
;// CONCATENATED MODULE: ../react-search-select/esm/style/index.css
|
|
9387
|
+
// extracted by mini-css-extract-plugin
|
|
9388
|
+
/* harmony default export */ var react_search_select_esm_style = ({});
|
|
9140
9389
|
;// CONCATENATED MODULE: ../react-search-select/esm/index.js
|
|
9141
9390
|
|
|
9142
9391
|
|
|
9143
9392
|
|
|
9144
|
-
|
|
9393
|
+
|
|
9394
|
+
var react_search_select_esm_excluded = ["allowClear", "disabled", "size", "maxTagCount", "option", "loading", "prefixCls", "className", "mode", "style", "isOpen", "value", "defaultValue", "showSearch", "placeholder", "onSearch", "onChange", "onSelect"];
|
|
9395
|
+
|
|
9396
|
+
|
|
9397
|
+
|
|
9145
9398
|
|
|
9146
9399
|
|
|
9147
9400
|
|
|
@@ -9158,10 +9411,16 @@ function SearchSelect(props) {
|
|
|
9158
9411
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
9159
9412
|
_props$size = props.size,
|
|
9160
9413
|
size = _props$size === void 0 ? 'default' : _props$size,
|
|
9414
|
+
maxTagCount = props.maxTagCount,
|
|
9161
9415
|
_props$option = props.option,
|
|
9162
9416
|
option = _props$option === void 0 ? [] : _props$option,
|
|
9163
9417
|
_props$loading = props.loading,
|
|
9164
9418
|
loading = _props$loading === void 0 ? false : _props$loading,
|
|
9419
|
+
_props$prefixCls = props.prefixCls,
|
|
9420
|
+
prefixCls = _props$prefixCls === void 0 ? 'w-search-select' : _props$prefixCls,
|
|
9421
|
+
className = props.className,
|
|
9422
|
+
_props$mode = props.mode,
|
|
9423
|
+
mode = _props$mode === void 0 ? 'single' : _props$mode,
|
|
9165
9424
|
style = props.style,
|
|
9166
9425
|
value = props.value,
|
|
9167
9426
|
defaultValue = props.defaultValue,
|
|
@@ -9172,12 +9431,17 @@ function SearchSelect(props) {
|
|
|
9172
9431
|
onSelect = props.onSelect,
|
|
9173
9432
|
others = _objectWithoutPropertiesLoose(props, react_search_select_esm_excluded);
|
|
9174
9433
|
|
|
9434
|
+
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
9435
|
+
var isMultiple = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
9436
|
+
return mode === 'multiple';
|
|
9437
|
+
}, [mode]);
|
|
9438
|
+
|
|
9175
9439
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
9176
9440
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9177
9441
|
innerIsOpen = _useState2[0],
|
|
9178
9442
|
setInnerIsOpen = _useState2[1];
|
|
9179
9443
|
|
|
9180
|
-
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(
|
|
9444
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
|
|
9181
9445
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
9182
9446
|
selectedValue = _useState4[0],
|
|
9183
9447
|
setSelectedValue = _useState4[1];
|
|
@@ -9192,29 +9456,87 @@ function SearchSelect(props) {
|
|
|
9192
9456
|
selectIconType = _useState8[0],
|
|
9193
9457
|
setSelectIconType = _useState8[1];
|
|
9194
9458
|
|
|
9459
|
+
var omitTagCount = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
9460
|
+
return maxTagCount && selectedValue.length > maxTagCount ? selectedValue.length - maxTagCount : 0;
|
|
9461
|
+
}, [selectedValue.length]);
|
|
9195
9462
|
var divRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
9463
|
+
var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
9464
|
+
valueRef.current = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
9465
|
+
return selectedValue;
|
|
9466
|
+
}, [selectedValue]);
|
|
9196
9467
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
9197
|
-
if (defaultValue) {
|
|
9198
|
-
|
|
9199
|
-
return defaultValue === menuItem.value;
|
|
9200
|
-
});
|
|
9201
|
-
setSelectedValue(defaultValue);
|
|
9202
|
-
setSelectedLabel(defaultMenuItem ? defaultMenuItem.label : '');
|
|
9468
|
+
if (value === undefined && defaultValue !== undefined) {
|
|
9469
|
+
selectedValueChange(defaultValue);
|
|
9203
9470
|
}
|
|
9204
9471
|
}, []);
|
|
9205
9472
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
9206
|
-
if (value !==
|
|
9207
|
-
|
|
9473
|
+
if (value !== undefined) {
|
|
9474
|
+
selectedValueChange(value);
|
|
9208
9475
|
}
|
|
9209
|
-
}, [value]);
|
|
9476
|
+
}, [JSON.stringify(value)]);
|
|
9477
|
+
|
|
9478
|
+
function selectedValueChange(changeValue) {
|
|
9479
|
+
var opts = [];
|
|
9480
|
+
|
|
9481
|
+
if (Array.isArray(changeValue)) {
|
|
9482
|
+
opts = option.filter(function (item) {
|
|
9483
|
+
var findResult = changeValue.find(function (v) {
|
|
9484
|
+
return item.value === v;
|
|
9485
|
+
});
|
|
9486
|
+
return findResult;
|
|
9487
|
+
});
|
|
9488
|
+
} else if (!isMultiple) {
|
|
9489
|
+
var findResult = option.find(function (item) {
|
|
9490
|
+
return item.value === changeValue;
|
|
9491
|
+
});
|
|
9492
|
+
|
|
9493
|
+
if (findResult) {
|
|
9494
|
+
setSelectedLabel(findResult.label);
|
|
9495
|
+
opts.push(findResult);
|
|
9496
|
+
}
|
|
9497
|
+
}
|
|
9498
|
+
|
|
9499
|
+
setSelectedValue(opts);
|
|
9500
|
+
}
|
|
9501
|
+
|
|
9502
|
+
function removeSelectItem(index) {
|
|
9503
|
+
var selectedValue = valueRef.current;
|
|
9504
|
+
selectedValue.splice(index, 1);
|
|
9505
|
+
|
|
9506
|
+
var values = _toConsumableArray(selectedValue);
|
|
9507
|
+
|
|
9508
|
+
return values;
|
|
9509
|
+
}
|
|
9210
9510
|
|
|
9211
9511
|
function handleItemClick(item) {
|
|
9212
9512
|
setInnerIsOpen(false);
|
|
9213
|
-
|
|
9513
|
+
var values = [item];
|
|
9214
9514
|
setSelectedLabel(item.label);
|
|
9215
|
-
|
|
9515
|
+
var resultValue = item.value;
|
|
9516
|
+
value === undefined && setSelectedValue(values); // 如果存在props.value,内部不维护value状态
|
|
9517
|
+
|
|
9518
|
+
onSelect && onSelect(resultValue);
|
|
9519
|
+
handleSelectChange(resultValue); // 支持form组件
|
|
9520
|
+
}
|
|
9521
|
+
|
|
9522
|
+
function handleItemsClick(item) {
|
|
9523
|
+
var values = [];
|
|
9524
|
+
var index = selectedValue.findIndex(function (finds) {
|
|
9525
|
+
return finds.value === item.value;
|
|
9526
|
+
});
|
|
9216
9527
|
|
|
9217
|
-
|
|
9528
|
+
if (index !== -1) {
|
|
9529
|
+
values = removeSelectItem(index);
|
|
9530
|
+
} else {
|
|
9531
|
+
values = [].concat(_toConsumableArray(selectedValue), [item]);
|
|
9532
|
+
}
|
|
9533
|
+
|
|
9534
|
+
var resultValue = values.map(function (item) {
|
|
9535
|
+
return item.value;
|
|
9536
|
+
});
|
|
9537
|
+
value === undefined && setSelectedValue(values);
|
|
9538
|
+
onSelect && onSelect(resultValue);
|
|
9539
|
+
handleSelectChange(resultValue); // 支持form组件
|
|
9218
9540
|
} // 渲染icon
|
|
9219
9541
|
|
|
9220
9542
|
|
|
@@ -9236,14 +9558,13 @@ function SearchSelect(props) {
|
|
|
9236
9558
|
setInnerIsOpen(!!value);
|
|
9237
9559
|
setSelectedLabel(value);
|
|
9238
9560
|
setSelectIconType(showSearch && value ? 'loading' : '');
|
|
9239
|
-
showSearch && onSearch && onSearch(value);
|
|
9240
|
-
handleSelectChange(value);
|
|
9561
|
+
showSearch && onSearch && onSearch(value); // handleSelectChange(value);
|
|
9241
9562
|
} // 清除选中的值
|
|
9242
9563
|
|
|
9243
9564
|
|
|
9244
9565
|
function resetSelectedValue() {
|
|
9245
9566
|
setInnerIsOpen(false);
|
|
9246
|
-
setSelectedValue(
|
|
9567
|
+
setSelectedValue([]);
|
|
9247
9568
|
setSelectedLabel('');
|
|
9248
9569
|
setSelectIconType('');
|
|
9249
9570
|
handleSelectChange('');
|
|
@@ -9253,7 +9574,15 @@ function SearchSelect(props) {
|
|
|
9253
9574
|
onChange && onChange(value);
|
|
9254
9575
|
}
|
|
9255
9576
|
|
|
9577
|
+
function inputKeyDown(e) {
|
|
9578
|
+
if (selectedValue.length > 0 && !!selectedLabel && e.keyCode === 8) {
|
|
9579
|
+
var values = removeSelectItem(selectedValue.length - 1);
|
|
9580
|
+
setSelectedValue(values);
|
|
9581
|
+
}
|
|
9582
|
+
}
|
|
9583
|
+
|
|
9256
9584
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown, _extends({
|
|
9585
|
+
className: cls,
|
|
9257
9586
|
trigger: "focus",
|
|
9258
9587
|
style: {
|
|
9259
9588
|
marginTop: 5
|
|
@@ -9261,7 +9590,8 @@ function SearchSelect(props) {
|
|
|
9261
9590
|
disabled: option && option.length > 0 ? false : true
|
|
9262
9591
|
}, others, {
|
|
9263
9592
|
onVisibleChange: function onVisibleChange(open) {
|
|
9264
|
-
|
|
9593
|
+
if (!open && isMultiple) setSelectedLabel('');
|
|
9594
|
+
setInnerIsOpen(open);
|
|
9265
9595
|
},
|
|
9266
9596
|
isOpen: innerIsOpen,
|
|
9267
9597
|
menu: /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm, {
|
|
@@ -9269,6 +9599,7 @@ function SearchSelect(props) {
|
|
|
9269
9599
|
style: {
|
|
9270
9600
|
minHeight: 25,
|
|
9271
9601
|
maxHeight: 280,
|
|
9602
|
+
minWidth: (style == null ? void 0 : style.minWidth) || 200,
|
|
9272
9603
|
overflowY: 'scroll',
|
|
9273
9604
|
width: divRef.current ? divRef.current.offsetWidth : 'auto'
|
|
9274
9605
|
},
|
|
@@ -9279,12 +9610,14 @@ function SearchSelect(props) {
|
|
|
9279
9610
|
},
|
|
9280
9611
|
children: loading ? '正在加载数据...' : '没有数据'
|
|
9281
9612
|
}) : option.map(function (item, idx) {
|
|
9282
|
-
var active = selectedValue
|
|
9613
|
+
var active = !!selectedValue.find(function (finds) {
|
|
9614
|
+
return finds.value === item.value;
|
|
9615
|
+
});
|
|
9283
9616
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm.Item, {
|
|
9284
9617
|
active: active,
|
|
9285
9618
|
text: item.label,
|
|
9286
9619
|
onClick: function onClick() {
|
|
9287
|
-
return handleItemClick(item);
|
|
9620
|
+
return isMultiple ? handleItemsClick(item) : handleItemClick(item);
|
|
9288
9621
|
}
|
|
9289
9622
|
}, idx);
|
|
9290
9623
|
})
|
|
@@ -9297,19 +9630,58 @@ function SearchSelect(props) {
|
|
|
9297
9630
|
onMouseLeave: function onMouseLeave() {
|
|
9298
9631
|
return renderSelectIcon('leave');
|
|
9299
9632
|
},
|
|
9300
|
-
style:
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9633
|
+
style: _extends({
|
|
9634
|
+
width: '100%',
|
|
9635
|
+
maxWidth: 'none'
|
|
9636
|
+
}, style),
|
|
9637
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
9638
|
+
style: isMultiple ? {
|
|
9639
|
+
display: 'flex',
|
|
9640
|
+
flexFlow: 'wrap',
|
|
9641
|
+
borderRadius: 3,
|
|
9642
|
+
boxShadow: '0px 0px 2px #333'
|
|
9643
|
+
} : undefined,
|
|
9644
|
+
children: [isMultiple && selectedValue.slice(0, maxTagCount).map(function (item, index) {
|
|
9645
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, {
|
|
9646
|
+
style: {
|
|
9647
|
+
margin: 2,
|
|
9648
|
+
display: 'flex',
|
|
9649
|
+
alignItems: 'center'
|
|
9650
|
+
},
|
|
9651
|
+
closable: true,
|
|
9652
|
+
onClose: function onClose() {
|
|
9653
|
+
return setSelectedValue(removeSelectItem(index));
|
|
9654
|
+
},
|
|
9655
|
+
color: "#ccc",
|
|
9656
|
+
children: item.label
|
|
9657
|
+
}, index);
|
|
9658
|
+
}), !!omitTagCount && /*#__PURE__*/(0,jsx_runtime.jsxs)(react_tag_esm, {
|
|
9659
|
+
style: {
|
|
9660
|
+
margin: 2,
|
|
9661
|
+
display: 'flex',
|
|
9662
|
+
alignItems: 'center'
|
|
9663
|
+
},
|
|
9664
|
+
disabled: true,
|
|
9665
|
+
children: ["+", omitTagCount, " \u2026", ' ']
|
|
9666
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
|
|
9667
|
+
style: {
|
|
9668
|
+
flex: 1,
|
|
9669
|
+
boxShadow: 'none'
|
|
9670
|
+
},
|
|
9671
|
+
className: isMultiple ? prefixCls + "-input-contents" : undefined,
|
|
9672
|
+
readOnly: !showSearch,
|
|
9673
|
+
size: size,
|
|
9674
|
+
disabled: disabled,
|
|
9675
|
+
onKeyDown: inputKeyDown,
|
|
9676
|
+
onChange: handleInputChange,
|
|
9677
|
+
value: selectedLabel,
|
|
9678
|
+
placeholder: placeholder,
|
|
9679
|
+
addonAfter: (selectIconType === 'close' || selectIconType === 'loading' && loading) && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
9680
|
+
type: selectIconType,
|
|
9681
|
+
spin: loading && selectIconType === 'loading',
|
|
9682
|
+
onClick: resetSelectedValue
|
|
9683
|
+
})
|
|
9684
|
+
})]
|
|
9313
9685
|
})
|
|
9314
9686
|
})
|
|
9315
9687
|
}));
|
|
@@ -10316,7 +10688,7 @@ var getAllColumnsKeys = function getAllColumnsKeys(data, keys) {
|
|
|
10316
10688
|
;// CONCATENATED MODULE: ../react-table/esm/index.js
|
|
10317
10689
|
|
|
10318
10690
|
|
|
10319
|
-
var react_table_esm_excluded = ["prefixCls", "className", "columns", "data", "title", "footer", "bordered", "onCell", "onCellHead"];
|
|
10691
|
+
var react_table_esm_excluded = ["prefixCls", "className", "columns", "data", "title", "footer", "bordered", "onCell", "onCellHead", "empty", "children"];
|
|
10320
10692
|
|
|
10321
10693
|
|
|
10322
10694
|
|
|
@@ -10345,6 +10717,7 @@ var react_table_esm_excluded = ["prefixCls", "className", "columns", "data", "ti
|
|
|
10345
10717
|
onCell = _props$onCell === void 0 ? noop : _props$onCell,
|
|
10346
10718
|
_props$onCellHead = _props.onCellHead,
|
|
10347
10719
|
onCellHead = _props$onCellHead === void 0 ? noop : _props$onCellHead,
|
|
10720
|
+
empty = _props.empty,
|
|
10348
10721
|
other = _objectWithoutPropertiesLoose(props, react_table_esm_excluded);
|
|
10349
10722
|
|
|
10350
10723
|
var cls = [prefixCls, className, bordered ? prefixCls + "-bordered" : null].filter(Boolean).join(' ').trim();
|
|
@@ -10411,6 +10784,17 @@ var react_table_esm_excluded = ["prefixCls", "className", "columns", "data", "ti
|
|
|
10411
10784
|
})
|
|
10412
10785
|
}, rowNum);
|
|
10413
10786
|
})
|
|
10787
|
+
}), data && data.length === 0 && empty && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
10788
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
|
|
10789
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
|
|
10790
|
+
colSpan: columns.length,
|
|
10791
|
+
style: {
|
|
10792
|
+
position: 'relative',
|
|
10793
|
+
left: 0
|
|
10794
|
+
},
|
|
10795
|
+
children: empty
|
|
10796
|
+
})
|
|
10797
|
+
})
|
|
10414
10798
|
}), props.children]
|
|
10415
10799
|
}), footer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
10416
10800
|
className: prefixCls + "-footer",
|
|
@@ -10541,83 +10925,6 @@ function Tabs(props) {
|
|
|
10541
10925
|
})]
|
|
10542
10926
|
}));
|
|
10543
10927
|
}
|
|
10544
|
-
;// CONCATENATED MODULE: ../react-tag/esm/style/index.css
|
|
10545
|
-
// extracted by mini-css-extract-plugin
|
|
10546
|
-
/* harmony default export */ var react_tag_esm_style = ({});
|
|
10547
|
-
;// CONCATENATED MODULE: ../react-tag/esm/index.js
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
var react_tag_esm_excluded = ["prefixCls", "className", "style", "title", "children", "visible", "color", "disabled", "bordered", "closable", "light", "onClose"];
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
/* harmony default export */ var react_tag_esm = (function (props) {
|
|
10556
|
-
if (props === void 0) {
|
|
10557
|
-
props = {};
|
|
10558
|
-
}
|
|
10559
|
-
|
|
10560
|
-
var _props = props,
|
|
10561
|
-
_props$prefixCls = _props.prefixCls,
|
|
10562
|
-
prefixCls = _props$prefixCls === void 0 ? 'w-tag' : _props$prefixCls,
|
|
10563
|
-
className = _props.className,
|
|
10564
|
-
style = _props.style,
|
|
10565
|
-
_props$title = _props.title,
|
|
10566
|
-
title = _props$title === void 0 ? '' : _props$title,
|
|
10567
|
-
children = _props.children,
|
|
10568
|
-
_props$visible = _props.visible,
|
|
10569
|
-
visible = _props$visible === void 0 ? true : _props$visible,
|
|
10570
|
-
_props$color = _props.color,
|
|
10571
|
-
color = _props$color === void 0 ? '#6E6E6E' : _props$color,
|
|
10572
|
-
_props$disabled = _props.disabled,
|
|
10573
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
10574
|
-
_props$bordered = _props.bordered,
|
|
10575
|
-
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
10576
|
-
closable = _props.closable,
|
|
10577
|
-
_props$light = _props.light,
|
|
10578
|
-
light = _props$light === void 0 ? false : _props$light,
|
|
10579
|
-
onClose = _props.onClose,
|
|
10580
|
-
other = _objectWithoutPropertiesLoose(props, react_tag_esm_excluded);
|
|
10581
|
-
|
|
10582
|
-
var cls = [prefixCls, className, light ? prefixCls + "-light" : null, disabled ? 'disabled' : null].filter(Boolean).join(' ').trim();
|
|
10583
|
-
|
|
10584
|
-
var styl = _extends({}, style);
|
|
10585
|
-
|
|
10586
|
-
if (!light) {
|
|
10587
|
-
styl.color = '#fff';
|
|
10588
|
-
styl.backgroundColor = color;
|
|
10589
|
-
} else {
|
|
10590
|
-
styl.color = color;
|
|
10591
|
-
styl.borderColor = color;
|
|
10592
|
-
|
|
10593
|
-
if (bordered && light) {
|
|
10594
|
-
styl.boxShadow = "inset 0 0 0 1px " + color;
|
|
10595
|
-
}
|
|
10596
|
-
}
|
|
10597
|
-
|
|
10598
|
-
if (!visible) {
|
|
10599
|
-
return null;
|
|
10600
|
-
}
|
|
10601
|
-
|
|
10602
|
-
var closeBtn = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
10603
|
-
return closable ? /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
|
|
10604
|
-
onClick: onClose,
|
|
10605
|
-
className: prefixCls + "-close",
|
|
10606
|
-
width: "15",
|
|
10607
|
-
height: "15",
|
|
10608
|
-
viewBox: "0 0 16 16",
|
|
10609
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
10610
|
-
d: "M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z"
|
|
10611
|
-
})
|
|
10612
|
-
}) : null;
|
|
10613
|
-
}, [closable]);
|
|
10614
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", _extends({
|
|
10615
|
-
className: cls,
|
|
10616
|
-
style: styl
|
|
10617
|
-
}, other, {
|
|
10618
|
-
children: [title || children, closeBtn]
|
|
10619
|
-
}));
|
|
10620
|
-
});
|
|
10621
10928
|
;// CONCATENATED MODULE: ../react-textarea/esm/style/index.css
|
|
10622
10929
|
// extracted by mini-css-extract-plugin
|
|
10623
10930
|
/* harmony default export */ var react_textarea_esm_style = ({});
|
|
@@ -10862,7 +11169,7 @@ var isContained = function isContained(a, b) {
|
|
|
10862
11169
|
return true;
|
|
10863
11170
|
};
|
|
10864
11171
|
|
|
10865
|
-
var getChildKeys = function getChildKeys(childs, result) {
|
|
11172
|
+
var getChildKeys = function getChildKeys(childs, result, depth) {
|
|
10866
11173
|
if (childs === void 0) {
|
|
10867
11174
|
childs = [];
|
|
10868
11175
|
}
|
|
@@ -10873,9 +11180,10 @@ var getChildKeys = function getChildKeys(childs, result) {
|
|
|
10873
11180
|
|
|
10874
11181
|
childs.forEach(function (item) {
|
|
10875
11182
|
result.push(item.key);
|
|
11183
|
+
if (typeof depth === 'number' && !(depth - 1)) return;
|
|
10876
11184
|
|
|
10877
11185
|
if (item.children && item.children.length > 0) {
|
|
10878
|
-
result = result.concat(getChildKeys(item.children));
|
|
11186
|
+
result = result.concat(getChildKeys(item.children, undefined, depth ? depth - 1 : undefined));
|
|
10879
11187
|
}
|
|
10880
11188
|
});
|
|
10881
11189
|
return result;
|
|
@@ -10963,6 +11271,8 @@ function Tree(props) {
|
|
|
10963
11271
|
_props$onSelected = props.onSelected,
|
|
10964
11272
|
onSelected = _props$onSelected === void 0 ? noop : _props$onSelected,
|
|
10965
11273
|
className = props.className,
|
|
11274
|
+
_props$autoExpandPare = props.autoExpandParent,
|
|
11275
|
+
autoExpandParent = _props$autoExpandPare === void 0 ? true : _props$autoExpandPare,
|
|
10966
11276
|
renderTitle = props.renderTitle,
|
|
10967
11277
|
elementProps = _objectWithoutPropertiesLoose(props, react_tree_esm_excluded);
|
|
10968
11278
|
|
|
@@ -10979,11 +11289,15 @@ function Tree(props) {
|
|
|
10979
11289
|
|
|
10980
11290
|
|
|
10981
11291
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
10982
|
-
var arrOpenKeys =
|
|
11292
|
+
var arrOpenKeys = [];
|
|
10983
11293
|
|
|
10984
11294
|
if (defaultExpandAll) {
|
|
10985
|
-
|
|
11295
|
+
arrOpenKeys = getChildKeys(data);
|
|
11296
|
+
} else if (autoExpandParent) {
|
|
11297
|
+
arrOpenKeys = getChildKeys(data, undefined, 1);
|
|
10986
11298
|
}
|
|
11299
|
+
|
|
11300
|
+
setCurOpenKeys(arrOpenKeys);
|
|
10987
11301
|
}, []);
|
|
10988
11302
|
var cls = [className, prefixCls, showLine ? prefixCls + "-line" : null].filter(Boolean).join(' ').trim();
|
|
10989
11303
|
|
|
@@ -11237,98 +11551,8 @@ function TreeChecked(_ref) {
|
|
|
11237
11551
|
|
|
11238
11552
|
|
|
11239
11553
|
|
|
11240
|
-
/***/ }),
|
|
11241
|
-
|
|
11242
|
-
/***/ 787:
|
|
11243
|
-
/***/ (function(module) {
|
|
11244
|
-
|
|
11245
|
-
"use strict";
|
|
11246
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
11247
|
-
|
|
11248
|
-
/***/ }),
|
|
11249
11554
|
|
|
11250
|
-
|
|
11251
|
-
/***/ (function(module) {
|
|
11252
|
-
|
|
11253
|
-
"use strict";
|
|
11254
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
11255
|
-
|
|
11256
|
-
/***/ })
|
|
11257
|
-
|
|
11258
|
-
/******/ });
|
|
11259
|
-
/************************************************************************/
|
|
11260
|
-
/******/ // The module cache
|
|
11261
|
-
/******/ var __webpack_module_cache__ = {};
|
|
11262
|
-
/******/
|
|
11263
|
-
/******/ // The require function
|
|
11264
|
-
/******/ function __webpack_require__(moduleId) {
|
|
11265
|
-
/******/ // Check if module is in cache
|
|
11266
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
11267
|
-
/******/ if (cachedModule !== undefined) {
|
|
11268
|
-
/******/ return cachedModule.exports;
|
|
11269
|
-
/******/ }
|
|
11270
|
-
/******/ // Create a new module (and put it into the cache)
|
|
11271
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
11272
|
-
/******/ // no module.id needed
|
|
11273
|
-
/******/ // no module.loaded needed
|
|
11274
|
-
/******/ exports: {}
|
|
11275
|
-
/******/ };
|
|
11276
|
-
/******/
|
|
11277
|
-
/******/ // Execute the module function
|
|
11278
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
11279
|
-
/******/
|
|
11280
|
-
/******/ // Return the exports of the module
|
|
11281
|
-
/******/ return module.exports;
|
|
11282
|
-
/******/ }
|
|
11283
|
-
/******/
|
|
11284
|
-
/************************************************************************/
|
|
11285
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
11286
|
-
/******/ !function() {
|
|
11287
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
11288
|
-
/******/ __webpack_require__.n = function(module) {
|
|
11289
|
-
/******/ var getter = module && module.__esModule ?
|
|
11290
|
-
/******/ function() { return module['default']; } :
|
|
11291
|
-
/******/ function() { return module; };
|
|
11292
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
11293
|
-
/******/ return getter;
|
|
11294
|
-
/******/ };
|
|
11295
|
-
/******/ }();
|
|
11296
|
-
/******/
|
|
11297
|
-
/******/ /* webpack/runtime/define property getters */
|
|
11298
|
-
/******/ !function() {
|
|
11299
|
-
/******/ // define getter functions for harmony exports
|
|
11300
|
-
/******/ __webpack_require__.d = function(exports, definition) {
|
|
11301
|
-
/******/ for(var key in definition) {
|
|
11302
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
11303
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
11304
|
-
/******/ }
|
|
11305
|
-
/******/ }
|
|
11306
|
-
/******/ };
|
|
11307
|
-
/******/ }();
|
|
11308
|
-
/******/
|
|
11309
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
11310
|
-
/******/ !function() {
|
|
11311
|
-
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
11312
|
-
/******/ }();
|
|
11313
|
-
/******/
|
|
11314
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
11315
|
-
/******/ !function() {
|
|
11316
|
-
/******/ // define __esModule on exports
|
|
11317
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
11318
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
11319
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
11320
|
-
/******/ }
|
|
11321
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
11322
|
-
/******/ };
|
|
11323
|
-
/******/ }();
|
|
11324
|
-
/******/
|
|
11325
|
-
/************************************************************************/
|
|
11326
|
-
/******/
|
|
11327
|
-
/******/ // startup
|
|
11328
|
-
/******/ // Load entry module and return exports
|
|
11329
|
-
/******/ // This entry module doesn't tell about it's top-level declarations so it can't be inlined
|
|
11330
|
-
/******/ var __webpack_exports__ = __webpack_require__(523);
|
|
11331
|
-
/******/
|
|
11555
|
+
}();
|
|
11332
11556
|
/******/ return __webpack_exports__;
|
|
11333
11557
|
/******/ })()
|
|
11334
11558
|
;
|