uiw 4.11.0 → 4.11.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 +2 -1
- package/dist/uiw.css +105 -60
- package/dist/uiw.js +433 -266
- package/dist/uiw.min.css +1 -1
- package/dist/uiw.min.js +1 -1
- package/package.json +56 -56
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
|
+
/***/ }),
|
|
1017
|
+
|
|
1018
|
+
/***/ 156:
|
|
1019
|
+
/***/ (function(module) {
|
|
1012
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__);
|
|
@@ -4503,7 +4587,7 @@ function TimePicker(props) {
|
|
|
4503
4587
|
hideDisabled: hideDisabled,
|
|
4504
4588
|
precision: precision
|
|
4505
4589
|
};
|
|
4506
|
-
var inputValue = date ? formatter(format, date) : '';
|
|
4590
|
+
var inputValue = date ? formatter(format, new Date(date)) : '';
|
|
4507
4591
|
var datePickerTime = date || new Date();
|
|
4508
4592
|
|
|
4509
4593
|
var _props = _extends({}, inputProps, {
|
|
@@ -6225,6 +6309,8 @@ function Dropdown(props) {
|
|
|
6225
6309
|
;// CONCATENATED MODULE: ../react-empty/esm/index.js
|
|
6226
6310
|
|
|
6227
6311
|
|
|
6312
|
+
var react_empty_esm_excluded = ["prefixCls", "className", "icon", "iconProps", "size", "description", "children"];
|
|
6313
|
+
|
|
6228
6314
|
|
|
6229
6315
|
|
|
6230
6316
|
|
|
@@ -6233,57 +6319,51 @@ var Empty = function Empty(props) {
|
|
|
6233
6319
|
var _props$prefixCls = props.prefixCls,
|
|
6234
6320
|
prefixCls = _props$prefixCls === void 0 ? 'w-empty' : _props$prefixCls,
|
|
6235
6321
|
className = props.className,
|
|
6236
|
-
|
|
6237
|
-
|
|
6322
|
+
icon = props.icon,
|
|
6323
|
+
iconProps = props.iconProps,
|
|
6238
6324
|
_props$size = props.size,
|
|
6239
|
-
size = _props$size === void 0 ?
|
|
6240
|
-
_props$
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
description = props.description;
|
|
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
|
+
|
|
6246
6331
|
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
color: iconColor
|
|
6275
|
-
}
|
|
6276
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6277
|
-
className: prefixCls + "-text",
|
|
6278
|
-
style: {
|
|
6279
|
-
color: textColor
|
|
6280
|
-
},
|
|
6281
|
-
children: text
|
|
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
|
+
}))
|
|
6282
6359
|
}), description && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6283
6360
|
className: prefixCls + "-description",
|
|
6284
6361
|
children: description
|
|
6362
|
+
}), children && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
6363
|
+
className: prefixCls + "-footer",
|
|
6364
|
+
children: children
|
|
6285
6365
|
})]
|
|
6286
|
-
});
|
|
6366
|
+
}));
|
|
6287
6367
|
};
|
|
6288
6368
|
|
|
6289
6369
|
/* harmony default export */ var react_empty_esm = (Empty);
|
|
@@ -6742,7 +6822,7 @@ function Row_Row(props) {
|
|
|
6742
6822
|
|
|
6743
6823
|
|
|
6744
6824
|
|
|
6745
|
-
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"];
|
|
6746
6826
|
|
|
6747
6827
|
|
|
6748
6828
|
|
|
@@ -6766,6 +6846,7 @@ var FormItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6766
6846
|
var _this$props = this.props,
|
|
6767
6847
|
prefixCls = _this$props.prefixCls,
|
|
6768
6848
|
className = _this$props.className,
|
|
6849
|
+
required = _this$props.required,
|
|
6769
6850
|
style = _this$props.style,
|
|
6770
6851
|
label = _this$props.label,
|
|
6771
6852
|
labelFor = _this$props.labelFor,
|
|
@@ -6785,14 +6866,19 @@ var FormItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6785
6866
|
style: style
|
|
6786
6867
|
}, otherProps, {
|
|
6787
6868
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(Row_Row, {
|
|
6788
|
-
children: [/*#__PURE__*/(0,jsx_runtime.
|
|
6869
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(Col, {
|
|
6789
6870
|
fixed: true,
|
|
6790
6871
|
className: labelCls,
|
|
6791
|
-
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", {
|
|
6792
6878
|
style: labelStyle,
|
|
6793
6879
|
htmlFor: labelFor,
|
|
6794
6880
|
children: label
|
|
6795
|
-
})
|
|
6881
|
+
})]
|
|
6796
6882
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Col, {
|
|
6797
6883
|
className: "w-form-row",
|
|
6798
6884
|
children: this.props.children
|
|
@@ -6810,11 +6896,18 @@ var FormItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
6810
6896
|
className: cls,
|
|
6811
6897
|
style: style
|
|
6812
6898
|
}, otherProps, {
|
|
6813
|
-
children: [label && /*#__PURE__*/(0,jsx_runtime.
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
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
|
+
})]
|
|
6818
6911
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Col, {
|
|
6819
6912
|
className: "w-form-row",
|
|
6820
6913
|
children: this.props.children
|
|
@@ -6922,7 +7015,11 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
|
|
|
6922
7015
|
resetForm: handleReset,
|
|
6923
7016
|
getFieldValues: function getFieldValues() {
|
|
6924
7017
|
return data.current;
|
|
6925
|
-
}
|
|
7018
|
+
},
|
|
7019
|
+
getError: function getError() {
|
|
7020
|
+
return data.errors;
|
|
7021
|
+
},
|
|
7022
|
+
setFields: setFields
|
|
6926
7023
|
};
|
|
6927
7024
|
}, [data]);
|
|
6928
7025
|
var formUnits = {};
|
|
@@ -6952,6 +7049,11 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
|
|
|
6952
7049
|
})));
|
|
6953
7050
|
}
|
|
6954
7051
|
|
|
7052
|
+
function setFields(fields) {
|
|
7053
|
+
data.current = fields;
|
|
7054
|
+
setData(data);
|
|
7055
|
+
}
|
|
7056
|
+
|
|
6955
7057
|
function handleChange(name, validator, element, cb) {
|
|
6956
7058
|
return function (env, list) {
|
|
6957
7059
|
var value = env && env.target && 'value' in env.target ? env.target.value : env; // 控件 Checkbox.Group 多选值的处理
|
|
@@ -7014,13 +7116,11 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
|
|
|
7014
7116
|
setData(_extends({}, data, nextState, {
|
|
7015
7117
|
errors: {}
|
|
7016
7118
|
}));
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
});
|
|
7023
|
-
};
|
|
7119
|
+
afterSubmit && afterSubmit({
|
|
7120
|
+
state: data,
|
|
7121
|
+
response: response,
|
|
7122
|
+
reset: handleReset
|
|
7123
|
+
});
|
|
7024
7124
|
};
|
|
7025
7125
|
|
|
7026
7126
|
try {
|
|
@@ -9206,11 +9306,95 @@ function Rate(props) {
|
|
|
9206
9306
|
})
|
|
9207
9307
|
}));
|
|
9208
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 = ({});
|
|
9209
9389
|
;// CONCATENATED MODULE: ../react-search-select/esm/index.js
|
|
9210
9390
|
|
|
9211
9391
|
|
|
9212
9392
|
|
|
9213
|
-
|
|
9393
|
+
|
|
9394
|
+
var react_search_select_esm_excluded = ["allowClear", "disabled", "size", "maxTagCount", "option", "loading", "labelInValue", "prefixCls", "className", "mode", "style", "isOpen", "value", "defaultValue", "showSearch", "placeholder", "onSearch", "onChange", "onSelect"];
|
|
9395
|
+
|
|
9396
|
+
|
|
9397
|
+
|
|
9214
9398
|
|
|
9215
9399
|
|
|
9216
9400
|
|
|
@@ -9227,10 +9411,18 @@ function SearchSelect(props) {
|
|
|
9227
9411
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
9228
9412
|
_props$size = props.size,
|
|
9229
9413
|
size = _props$size === void 0 ? 'default' : _props$size,
|
|
9414
|
+
maxTagCount = props.maxTagCount,
|
|
9230
9415
|
_props$option = props.option,
|
|
9231
9416
|
option = _props$option === void 0 ? [] : _props$option,
|
|
9232
9417
|
_props$loading = props.loading,
|
|
9233
9418
|
loading = _props$loading === void 0 ? false : _props$loading,
|
|
9419
|
+
_props$labelInValue = props.labelInValue,
|
|
9420
|
+
labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
|
|
9421
|
+
_props$prefixCls = props.prefixCls,
|
|
9422
|
+
prefixCls = _props$prefixCls === void 0 ? 'w-search-select' : _props$prefixCls,
|
|
9423
|
+
className = props.className,
|
|
9424
|
+
_props$mode = props.mode,
|
|
9425
|
+
mode = _props$mode === void 0 ? 'single' : _props$mode,
|
|
9234
9426
|
style = props.style,
|
|
9235
9427
|
value = props.value,
|
|
9236
9428
|
defaultValue = props.defaultValue,
|
|
@@ -9241,12 +9433,17 @@ function SearchSelect(props) {
|
|
|
9241
9433
|
onSelect = props.onSelect,
|
|
9242
9434
|
others = _objectWithoutPropertiesLoose(props, react_search_select_esm_excluded);
|
|
9243
9435
|
|
|
9436
|
+
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
9437
|
+
var isMultiple = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
9438
|
+
return mode === 'multiple';
|
|
9439
|
+
}, [mode]);
|
|
9440
|
+
|
|
9244
9441
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
9245
9442
|
_useState2 = _slicedToArray(_useState, 2),
|
|
9246
9443
|
innerIsOpen = _useState2[0],
|
|
9247
9444
|
setInnerIsOpen = _useState2[1];
|
|
9248
9445
|
|
|
9249
|
-
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(
|
|
9446
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
|
|
9250
9447
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
9251
9448
|
selectedValue = _useState4[0],
|
|
9252
9449
|
setSelectedValue = _useState4[1];
|
|
@@ -9261,29 +9458,98 @@ function SearchSelect(props) {
|
|
|
9261
9458
|
selectIconType = _useState8[0],
|
|
9262
9459
|
setSelectIconType = _useState8[1];
|
|
9263
9460
|
|
|
9461
|
+
var omitTagCount = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
9462
|
+
return maxTagCount && selectedValue.length > maxTagCount ? selectedValue.length - maxTagCount : 0;
|
|
9463
|
+
}, [selectedValue.length]);
|
|
9264
9464
|
var divRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
9465
|
+
var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
9466
|
+
valueRef.current = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
9467
|
+
return selectedValue;
|
|
9468
|
+
}, [selectedValue]);
|
|
9265
9469
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
9266
|
-
if (defaultValue) {
|
|
9267
|
-
|
|
9268
|
-
return defaultValue === menuItem.value;
|
|
9269
|
-
});
|
|
9270
|
-
setSelectedValue(defaultValue);
|
|
9271
|
-
setSelectedLabel(defaultMenuItem ? defaultMenuItem.label : '');
|
|
9470
|
+
if (value === undefined && defaultValue !== undefined) {
|
|
9471
|
+
selectedValueChange(defaultValue);
|
|
9272
9472
|
}
|
|
9273
9473
|
}, []);
|
|
9274
9474
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
9275
|
-
if (value !==
|
|
9276
|
-
|
|
9475
|
+
if (value !== undefined) {
|
|
9476
|
+
selectedValueChange(value);
|
|
9277
9477
|
}
|
|
9278
|
-
}, [value]);
|
|
9478
|
+
}, [JSON.stringify(value)]);
|
|
9479
|
+
|
|
9480
|
+
var getSelectOption = function getSelectOption(option, value) {
|
|
9481
|
+
var findResult = option.find(function (item) {
|
|
9482
|
+
return item.value === value;
|
|
9483
|
+
});
|
|
9484
|
+
return findResult;
|
|
9485
|
+
};
|
|
9486
|
+
|
|
9487
|
+
function selectedValueChange(changeValue) {
|
|
9488
|
+
var opts = [];
|
|
9489
|
+
|
|
9490
|
+
if (labelInValue) {
|
|
9491
|
+
if (Array.isArray(changeValue)) {
|
|
9492
|
+
opts = changeValue;
|
|
9493
|
+
} else {
|
|
9494
|
+
opts.push(changeValue);
|
|
9495
|
+
}
|
|
9496
|
+
} else {
|
|
9497
|
+
if (Array.isArray(changeValue)) {
|
|
9498
|
+
opts = changeValue.map(function (v) {
|
|
9499
|
+
return getSelectOption(option, v);
|
|
9500
|
+
});
|
|
9501
|
+
} else {
|
|
9502
|
+
var findResult = getSelectOption(option, changeValue);
|
|
9503
|
+
|
|
9504
|
+
if (findResult) {
|
|
9505
|
+
setSelectedLabel(findResult.label);
|
|
9506
|
+
opts.push(findResult);
|
|
9507
|
+
}
|
|
9508
|
+
}
|
|
9509
|
+
}
|
|
9510
|
+
|
|
9511
|
+
setSelectedValue(opts);
|
|
9512
|
+
}
|
|
9513
|
+
|
|
9514
|
+
function removeSelectItem(index) {
|
|
9515
|
+
var selectedValue = valueRef.current;
|
|
9516
|
+
selectedValue.splice(index, 1);
|
|
9517
|
+
|
|
9518
|
+
var values = _toConsumableArray(selectedValue);
|
|
9519
|
+
|
|
9520
|
+
return values;
|
|
9521
|
+
}
|
|
9279
9522
|
|
|
9280
9523
|
function handleItemClick(item) {
|
|
9281
9524
|
setInnerIsOpen(false);
|
|
9282
|
-
|
|
9525
|
+
var values = [item];
|
|
9283
9526
|
setSelectedLabel(item.label);
|
|
9284
|
-
|
|
9527
|
+
var resultValue = item.value;
|
|
9528
|
+
onSelect && onSelect(resultValue);
|
|
9529
|
+
handleSelectChange(resultValue, values); // 支持form组件
|
|
9530
|
+
|
|
9531
|
+
value === undefined && setSelectedValue(values); // 如果存在props.value,内部不维护value状态
|
|
9532
|
+
}
|
|
9533
|
+
|
|
9534
|
+
function handleItemsClick(item) {
|
|
9535
|
+
var values = [];
|
|
9536
|
+
var index = selectedValue.findIndex(function (finds) {
|
|
9537
|
+
return finds.value === item.value;
|
|
9538
|
+
});
|
|
9539
|
+
|
|
9540
|
+
if (index !== -1) {
|
|
9541
|
+
values = removeSelectItem(index);
|
|
9542
|
+
} else {
|
|
9543
|
+
values = [].concat(_toConsumableArray(selectedValue), [item]);
|
|
9544
|
+
}
|
|
9285
9545
|
|
|
9286
|
-
|
|
9546
|
+
var resultValue = values.map(function (item) {
|
|
9547
|
+
return item.value;
|
|
9548
|
+
});
|
|
9549
|
+
onSelect && onSelect(resultValue);
|
|
9550
|
+
handleSelectChange(resultValue, values); // 支持form组件
|
|
9551
|
+
|
|
9552
|
+
value === undefined && setSelectedValue(values);
|
|
9287
9553
|
} // 渲染icon
|
|
9288
9554
|
|
|
9289
9555
|
|
|
@@ -9305,24 +9571,32 @@ function SearchSelect(props) {
|
|
|
9305
9571
|
setInnerIsOpen(!!value);
|
|
9306
9572
|
setSelectedLabel(value);
|
|
9307
9573
|
setSelectIconType(showSearch && value ? 'loading' : '');
|
|
9308
|
-
showSearch && onSearch && onSearch(value);
|
|
9309
|
-
handleSelectChange(value);
|
|
9574
|
+
showSearch && onSearch && onSearch(value); // handleSelectChange(value);
|
|
9310
9575
|
} // 清除选中的值
|
|
9311
9576
|
|
|
9312
9577
|
|
|
9313
9578
|
function resetSelectedValue() {
|
|
9314
9579
|
setInnerIsOpen(false);
|
|
9315
|
-
setSelectedValue(
|
|
9580
|
+
setSelectedValue([]);
|
|
9316
9581
|
setSelectedLabel('');
|
|
9317
9582
|
setSelectIconType('');
|
|
9318
|
-
handleSelectChange('');
|
|
9583
|
+
handleSelectChange('', []);
|
|
9319
9584
|
}
|
|
9320
9585
|
|
|
9321
|
-
function handleSelectChange(value) {
|
|
9322
|
-
|
|
9586
|
+
function handleSelectChange(value, options) {
|
|
9587
|
+
if (!onChange) return;
|
|
9588
|
+
onChange(labelInValue ? options : value);
|
|
9589
|
+
}
|
|
9590
|
+
|
|
9591
|
+
function inputKeyDown(e) {
|
|
9592
|
+
if (isMultiple && selectedValue.length > 0 && !selectedLabel && e.keyCode === 8) {
|
|
9593
|
+
var values = removeSelectItem(selectedValue.length - 1);
|
|
9594
|
+
setSelectedValue(values);
|
|
9595
|
+
}
|
|
9323
9596
|
}
|
|
9324
9597
|
|
|
9325
9598
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown, _extends({
|
|
9599
|
+
className: cls,
|
|
9326
9600
|
trigger: "focus",
|
|
9327
9601
|
style: {
|
|
9328
9602
|
marginTop: 5
|
|
@@ -9330,7 +9604,8 @@ function SearchSelect(props) {
|
|
|
9330
9604
|
disabled: option && option.length > 0 ? false : true
|
|
9331
9605
|
}, others, {
|
|
9332
9606
|
onVisibleChange: function onVisibleChange(open) {
|
|
9333
|
-
|
|
9607
|
+
if (!open && isMultiple) setSelectedLabel('');
|
|
9608
|
+
setInnerIsOpen(open);
|
|
9334
9609
|
},
|
|
9335
9610
|
isOpen: innerIsOpen,
|
|
9336
9611
|
menu: /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm, {
|
|
@@ -9338,6 +9613,7 @@ function SearchSelect(props) {
|
|
|
9338
9613
|
style: {
|
|
9339
9614
|
minHeight: 25,
|
|
9340
9615
|
maxHeight: 280,
|
|
9616
|
+
minWidth: 200,
|
|
9341
9617
|
overflowY: 'scroll',
|
|
9342
9618
|
width: divRef.current ? divRef.current.offsetWidth : 'auto'
|
|
9343
9619
|
},
|
|
@@ -9347,13 +9623,13 @@ function SearchSelect(props) {
|
|
|
9347
9623
|
fontSize: 12
|
|
9348
9624
|
},
|
|
9349
9625
|
children: loading ? '正在加载数据...' : '没有数据'
|
|
9350
|
-
}) : option.map(function (
|
|
9351
|
-
var active = selectedValue
|
|
9626
|
+
}) : option.map(function (opt, idx) {
|
|
9627
|
+
var active = !!getSelectOption(selectedValue, opt.value);
|
|
9352
9628
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm.Item, {
|
|
9353
9629
|
active: active,
|
|
9354
|
-
text:
|
|
9630
|
+
text: opt.label,
|
|
9355
9631
|
onClick: function onClick() {
|
|
9356
|
-
return handleItemClick(
|
|
9632
|
+
return isMultiple ? handleItemsClick(opt) : handleItemClick(opt);
|
|
9357
9633
|
}
|
|
9358
9634
|
}, idx);
|
|
9359
9635
|
})
|
|
@@ -9366,8 +9642,61 @@ function SearchSelect(props) {
|
|
|
9366
9642
|
onMouseLeave: function onMouseLeave() {
|
|
9367
9643
|
return renderSelectIcon('leave');
|
|
9368
9644
|
},
|
|
9369
|
-
style:
|
|
9370
|
-
|
|
9645
|
+
style: _extends({
|
|
9646
|
+
width: '100%',
|
|
9647
|
+
maxWidth: 'none'
|
|
9648
|
+
}, style),
|
|
9649
|
+
children: isMultiple ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
9650
|
+
className: prefixCls + "-inner",
|
|
9651
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
9652
|
+
style: {
|
|
9653
|
+
display: 'flex',
|
|
9654
|
+
flexFlow: 'wrap'
|
|
9655
|
+
},
|
|
9656
|
+
children: [isMultiple && selectedValue.slice(0, maxTagCount).map(function (item, index) {
|
|
9657
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, {
|
|
9658
|
+
style: {
|
|
9659
|
+
height: 20,
|
|
9660
|
+
margin: 1,
|
|
9661
|
+
display: 'flex',
|
|
9662
|
+
alignItems: 'center'
|
|
9663
|
+
},
|
|
9664
|
+
className: prefixCls + "-tag",
|
|
9665
|
+
closable: true,
|
|
9666
|
+
onClose: function onClose() {
|
|
9667
|
+
return setSelectedValue(removeSelectItem(index));
|
|
9668
|
+
},
|
|
9669
|
+
color: "#ccc",
|
|
9670
|
+
children: item.label
|
|
9671
|
+
}, index);
|
|
9672
|
+
}), !!omitTagCount && /*#__PURE__*/(0,jsx_runtime.jsxs)(react_tag_esm, {
|
|
9673
|
+
style: {
|
|
9674
|
+
height: 20,
|
|
9675
|
+
margin: 1,
|
|
9676
|
+
display: 'flex',
|
|
9677
|
+
alignItems: 'center'
|
|
9678
|
+
},
|
|
9679
|
+
disabled: true,
|
|
9680
|
+
children: ["+", omitTagCount, " \u2026", ' ']
|
|
9681
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
|
|
9682
|
+
style: {
|
|
9683
|
+
flex: 1
|
|
9684
|
+
},
|
|
9685
|
+
className: prefixCls + "-input-contents",
|
|
9686
|
+
readOnly: !showSearch,
|
|
9687
|
+
size: size,
|
|
9688
|
+
disabled: disabled,
|
|
9689
|
+
onKeyDown: inputKeyDown,
|
|
9690
|
+
onChange: handleInputChange,
|
|
9691
|
+
value: selectedLabel,
|
|
9692
|
+
placeholder: selectedValue.length ? '' : placeholder
|
|
9693
|
+
})]
|
|
9694
|
+
}), (selectIconType === 'close' || selectIconType === 'loading' && loading) && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
9695
|
+
type: selectIconType,
|
|
9696
|
+
spin: loading && selectIconType === 'loading',
|
|
9697
|
+
onClick: resetSelectedValue
|
|
9698
|
+
})]
|
|
9699
|
+
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
|
|
9371
9700
|
readOnly: !showSearch,
|
|
9372
9701
|
size: size,
|
|
9373
9702
|
disabled: disabled,
|
|
@@ -10622,83 +10951,6 @@ function Tabs(props) {
|
|
|
10622
10951
|
})]
|
|
10623
10952
|
}));
|
|
10624
10953
|
}
|
|
10625
|
-
;// CONCATENATED MODULE: ../react-tag/esm/style/index.css
|
|
10626
|
-
// extracted by mini-css-extract-plugin
|
|
10627
|
-
/* harmony default export */ var react_tag_esm_style = ({});
|
|
10628
|
-
;// CONCATENATED MODULE: ../react-tag/esm/index.js
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
var react_tag_esm_excluded = ["prefixCls", "className", "style", "title", "children", "visible", "color", "disabled", "bordered", "closable", "light", "onClose"];
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
/* harmony default export */ var react_tag_esm = (function (props) {
|
|
10637
|
-
if (props === void 0) {
|
|
10638
|
-
props = {};
|
|
10639
|
-
}
|
|
10640
|
-
|
|
10641
|
-
var _props = props,
|
|
10642
|
-
_props$prefixCls = _props.prefixCls,
|
|
10643
|
-
prefixCls = _props$prefixCls === void 0 ? 'w-tag' : _props$prefixCls,
|
|
10644
|
-
className = _props.className,
|
|
10645
|
-
style = _props.style,
|
|
10646
|
-
_props$title = _props.title,
|
|
10647
|
-
title = _props$title === void 0 ? '' : _props$title,
|
|
10648
|
-
children = _props.children,
|
|
10649
|
-
_props$visible = _props.visible,
|
|
10650
|
-
visible = _props$visible === void 0 ? true : _props$visible,
|
|
10651
|
-
_props$color = _props.color,
|
|
10652
|
-
color = _props$color === void 0 ? '#6E6E6E' : _props$color,
|
|
10653
|
-
_props$disabled = _props.disabled,
|
|
10654
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
10655
|
-
_props$bordered = _props.bordered,
|
|
10656
|
-
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
10657
|
-
closable = _props.closable,
|
|
10658
|
-
_props$light = _props.light,
|
|
10659
|
-
light = _props$light === void 0 ? false : _props$light,
|
|
10660
|
-
onClose = _props.onClose,
|
|
10661
|
-
other = _objectWithoutPropertiesLoose(props, react_tag_esm_excluded);
|
|
10662
|
-
|
|
10663
|
-
var cls = [prefixCls, className, light ? prefixCls + "-light" : null, disabled ? 'disabled' : null].filter(Boolean).join(' ').trim();
|
|
10664
|
-
|
|
10665
|
-
var styl = _extends({}, style);
|
|
10666
|
-
|
|
10667
|
-
if (!light) {
|
|
10668
|
-
styl.color = '#fff';
|
|
10669
|
-
styl.backgroundColor = color;
|
|
10670
|
-
} else {
|
|
10671
|
-
styl.color = color;
|
|
10672
|
-
styl.borderColor = color;
|
|
10673
|
-
|
|
10674
|
-
if (bordered && light) {
|
|
10675
|
-
styl.boxShadow = "inset 0 0 0 1px " + color;
|
|
10676
|
-
}
|
|
10677
|
-
}
|
|
10678
|
-
|
|
10679
|
-
if (!visible) {
|
|
10680
|
-
return null;
|
|
10681
|
-
}
|
|
10682
|
-
|
|
10683
|
-
var closeBtn = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
10684
|
-
return closable ? /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
|
|
10685
|
-
onClick: onClose,
|
|
10686
|
-
className: prefixCls + "-close",
|
|
10687
|
-
width: "15",
|
|
10688
|
-
height: "15",
|
|
10689
|
-
viewBox: "0 0 16 16",
|
|
10690
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
10691
|
-
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"
|
|
10692
|
-
})
|
|
10693
|
-
}) : null;
|
|
10694
|
-
}, [closable]);
|
|
10695
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", _extends({
|
|
10696
|
-
className: cls,
|
|
10697
|
-
style: styl
|
|
10698
|
-
}, other, {
|
|
10699
|
-
children: [title || children, closeBtn]
|
|
10700
|
-
}));
|
|
10701
|
-
});
|
|
10702
10954
|
;// CONCATENATED MODULE: ../react-textarea/esm/style/index.css
|
|
10703
10955
|
// extracted by mini-css-extract-plugin
|
|
10704
10956
|
/* harmony default export */ var react_textarea_esm_style = ({});
|
|
@@ -10943,7 +11195,7 @@ var isContained = function isContained(a, b) {
|
|
|
10943
11195
|
return true;
|
|
10944
11196
|
};
|
|
10945
11197
|
|
|
10946
|
-
var getChildKeys = function getChildKeys(childs, result) {
|
|
11198
|
+
var getChildKeys = function getChildKeys(childs, result, depth) {
|
|
10947
11199
|
if (childs === void 0) {
|
|
10948
11200
|
childs = [];
|
|
10949
11201
|
}
|
|
@@ -10954,9 +11206,10 @@ var getChildKeys = function getChildKeys(childs, result) {
|
|
|
10954
11206
|
|
|
10955
11207
|
childs.forEach(function (item) {
|
|
10956
11208
|
result.push(item.key);
|
|
11209
|
+
if (typeof depth === 'number' && !(depth - 1)) return;
|
|
10957
11210
|
|
|
10958
11211
|
if (item.children && item.children.length > 0) {
|
|
10959
|
-
result = result.concat(getChildKeys(item.children));
|
|
11212
|
+
result = result.concat(getChildKeys(item.children, undefined, depth ? depth - 1 : undefined));
|
|
10960
11213
|
}
|
|
10961
11214
|
});
|
|
10962
11215
|
return result;
|
|
@@ -11044,6 +11297,8 @@ function Tree(props) {
|
|
|
11044
11297
|
_props$onSelected = props.onSelected,
|
|
11045
11298
|
onSelected = _props$onSelected === void 0 ? noop : _props$onSelected,
|
|
11046
11299
|
className = props.className,
|
|
11300
|
+
_props$autoExpandPare = props.autoExpandParent,
|
|
11301
|
+
autoExpandParent = _props$autoExpandPare === void 0 ? true : _props$autoExpandPare,
|
|
11047
11302
|
renderTitle = props.renderTitle,
|
|
11048
11303
|
elementProps = _objectWithoutPropertiesLoose(props, react_tree_esm_excluded);
|
|
11049
11304
|
|
|
@@ -11060,11 +11315,15 @@ function Tree(props) {
|
|
|
11060
11315
|
|
|
11061
11316
|
|
|
11062
11317
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
11063
|
-
var arrOpenKeys =
|
|
11318
|
+
var arrOpenKeys = [];
|
|
11064
11319
|
|
|
11065
11320
|
if (defaultExpandAll) {
|
|
11066
|
-
|
|
11321
|
+
arrOpenKeys = getChildKeys(data);
|
|
11322
|
+
} else if (autoExpandParent) {
|
|
11323
|
+
arrOpenKeys = getChildKeys(data, undefined, 1);
|
|
11067
11324
|
}
|
|
11325
|
+
|
|
11326
|
+
setCurOpenKeys(arrOpenKeys);
|
|
11068
11327
|
}, []);
|
|
11069
11328
|
var cls = [className, prefixCls, showLine ? prefixCls + "-line" : null].filter(Boolean).join(' ').trim();
|
|
11070
11329
|
|
|
@@ -11319,99 +11578,7 @@ function TreeChecked(_ref) {
|
|
|
11319
11578
|
|
|
11320
11579
|
|
|
11321
11580
|
|
|
11322
|
-
|
|
11323
|
-
/***/ }),
|
|
11324
|
-
|
|
11325
|
-
/***/ 787:
|
|
11326
|
-
/***/ (function(module) {
|
|
11327
|
-
|
|
11328
|
-
"use strict";
|
|
11329
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
11330
|
-
|
|
11331
|
-
/***/ }),
|
|
11332
|
-
|
|
11333
|
-
/***/ 156:
|
|
11334
|
-
/***/ (function(module) {
|
|
11335
|
-
|
|
11336
|
-
"use strict";
|
|
11337
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
|
|
11338
|
-
|
|
11339
|
-
/***/ })
|
|
11340
|
-
|
|
11341
|
-
/******/ });
|
|
11342
|
-
/************************************************************************/
|
|
11343
|
-
/******/ // The module cache
|
|
11344
|
-
/******/ var __webpack_module_cache__ = {};
|
|
11345
|
-
/******/
|
|
11346
|
-
/******/ // The require function
|
|
11347
|
-
/******/ function __webpack_require__(moduleId) {
|
|
11348
|
-
/******/ // Check if module is in cache
|
|
11349
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
11350
|
-
/******/ if (cachedModule !== undefined) {
|
|
11351
|
-
/******/ return cachedModule.exports;
|
|
11352
|
-
/******/ }
|
|
11353
|
-
/******/ // Create a new module (and put it into the cache)
|
|
11354
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
11355
|
-
/******/ // no module.id needed
|
|
11356
|
-
/******/ // no module.loaded needed
|
|
11357
|
-
/******/ exports: {}
|
|
11358
|
-
/******/ };
|
|
11359
|
-
/******/
|
|
11360
|
-
/******/ // Execute the module function
|
|
11361
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
11362
|
-
/******/
|
|
11363
|
-
/******/ // Return the exports of the module
|
|
11364
|
-
/******/ return module.exports;
|
|
11365
|
-
/******/ }
|
|
11366
|
-
/******/
|
|
11367
|
-
/************************************************************************/
|
|
11368
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
11369
|
-
/******/ !function() {
|
|
11370
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
11371
|
-
/******/ __webpack_require__.n = function(module) {
|
|
11372
|
-
/******/ var getter = module && module.__esModule ?
|
|
11373
|
-
/******/ function() { return module['default']; } :
|
|
11374
|
-
/******/ function() { return module; };
|
|
11375
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
11376
|
-
/******/ return getter;
|
|
11377
|
-
/******/ };
|
|
11378
|
-
/******/ }();
|
|
11379
|
-
/******/
|
|
11380
|
-
/******/ /* webpack/runtime/define property getters */
|
|
11381
|
-
/******/ !function() {
|
|
11382
|
-
/******/ // define getter functions for harmony exports
|
|
11383
|
-
/******/ __webpack_require__.d = function(exports, definition) {
|
|
11384
|
-
/******/ for(var key in definition) {
|
|
11385
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
11386
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
11387
|
-
/******/ }
|
|
11388
|
-
/******/ }
|
|
11389
|
-
/******/ };
|
|
11390
|
-
/******/ }();
|
|
11391
|
-
/******/
|
|
11392
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
11393
|
-
/******/ !function() {
|
|
11394
|
-
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
11395
|
-
/******/ }();
|
|
11396
|
-
/******/
|
|
11397
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
11398
|
-
/******/ !function() {
|
|
11399
|
-
/******/ // define __esModule on exports
|
|
11400
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
11401
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
11402
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
11403
|
-
/******/ }
|
|
11404
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
11405
|
-
/******/ };
|
|
11406
|
-
/******/ }();
|
|
11407
|
-
/******/
|
|
11408
|
-
/************************************************************************/
|
|
11409
|
-
/******/
|
|
11410
|
-
/******/ // startup
|
|
11411
|
-
/******/ // Load entry module and return exports
|
|
11412
|
-
/******/ // This entry module doesn't tell about it's top-level declarations so it can't be inlined
|
|
11413
|
-
/******/ var __webpack_exports__ = __webpack_require__(518);
|
|
11414
|
-
/******/
|
|
11581
|
+
}();
|
|
11415
11582
|
/******/ return __webpack_exports__;
|
|
11416
11583
|
/******/ })()
|
|
11417
11584
|
;
|