uiw 4.19.0 → 4.21.1
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/dist/uiw.css +6 -0
- package/dist/uiw.js +197 -37
- package/dist/uiw.min.css +1 -1
- package/dist/uiw.min.js +1 -1
- package/dist/uiw.min.js.LICENSE.txt +1 -1
- package/package.json +60 -60
package/dist/uiw.css
CHANGED
|
@@ -5041,6 +5041,12 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
5041
5041
|
.w-tree-title > * {
|
|
5042
5042
|
vertical-align: middle;
|
|
5043
5043
|
}
|
|
5044
|
+
.w-tree-disabled-mouse {
|
|
5045
|
+
cursor: not-allowed;
|
|
5046
|
+
}
|
|
5047
|
+
.w-tree-disabled-ele {
|
|
5048
|
+
color: #00000040;
|
|
5049
|
+
}
|
|
5044
5050
|
.w-tree-title.selected {
|
|
5045
5051
|
background-color: #d5e8fc;
|
|
5046
5052
|
}
|
package/dist/uiw.js
CHANGED
|
@@ -325,6 +325,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
325
325
|
"Cascader": () => (/* reexport */ react_cascader_esm),
|
|
326
326
|
"Checkbox": () => (/* reexport */ react_checkbox_esm),
|
|
327
327
|
"CheckboxGroup": () => (/* reexport */ CheckboxGroup),
|
|
328
|
+
"Circle": () => (/* reexport */ Circle),
|
|
328
329
|
"Col": () => (/* reexport */ Col),
|
|
329
330
|
"Collapse": () => (/* reexport */ react_collapse_esm),
|
|
330
331
|
"CopyToClipboard": () => (/* reexport */ CopyToClipboard),
|
|
@@ -353,6 +354,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
353
354
|
"LayoutFooter": () => (/* reexport */ LayoutFooter),
|
|
354
355
|
"LayoutHeader": () => (/* reexport */ LayoutHeader),
|
|
355
356
|
"LayoutSider": () => (/* reexport */ LayoutSider),
|
|
357
|
+
"Line": () => (/* reexport */ Line),
|
|
356
358
|
"List": () => (/* reexport */ react_list_esm),
|
|
357
359
|
"ListItem": () => (/* reexport */ ListItem),
|
|
358
360
|
"Loader": () => (/* reexport */ react_loader_esm),
|
|
@@ -370,10 +372,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
370
372
|
"Popover": () => (/* reexport */ Popover),
|
|
371
373
|
"Portal": () => (/* reexport */ Portal),
|
|
372
374
|
"Progress": () => (/* reexport */ react_progress_esm),
|
|
373
|
-
"Radio": () => (/* reexport */
|
|
375
|
+
"Radio": () => (/* reexport */ esm_Radio),
|
|
374
376
|
"RadioAbstract": () => (/* reexport */ RadioAbstract),
|
|
375
377
|
"RadioButton": () => (/* reexport */ esm_RadioButton),
|
|
376
|
-
"RadioGroup": () => (/* reexport */
|
|
378
|
+
"RadioGroup": () => (/* reexport */ esm_RadioGroup),
|
|
377
379
|
"Rate": () => (/* reexport */ Rate),
|
|
378
380
|
"Row": () => (/* reexport */ Row_Row),
|
|
379
381
|
"SearchSelect": () => (/* reexport */ SearchSelect),
|
|
@@ -1517,7 +1519,7 @@ function Portal(props) {
|
|
|
1517
1519
|
;// CONCATENATED MODULE: ../react-overlay/esm/index.js
|
|
1518
1520
|
|
|
1519
1521
|
|
|
1520
|
-
var esm_excluded = ["className", "style", "isOpen", "prefixCls", "usePortal", "maskClosable", "backdropProps", "portalProps", "hasBackdrop", "unmountOnExit", "timeout", "transitionName", "onOpening", "onOpened", "onClosing", "onClosed", "onClose", "children", "dialogProps"];
|
|
1522
|
+
var esm_excluded = ["className", "style", "isOpen", "prefixCls", "usePortal", "maskClosable", "backdropProps", "portalProps", "hasBackdrop", "unmountOnExit", "timeout", "transitionName", "onOpening", "onOpened", "onClosing", "onClosed", "onClose", "onEnter", "onExiting", "onEntering", "onEntered", "onExit", "children", "dialogProps"];
|
|
1521
1523
|
|
|
1522
1524
|
/**
|
|
1523
1525
|
* Overlay 组件
|
|
@@ -1558,6 +1560,11 @@ function Overlay(props) {
|
|
|
1558
1560
|
onClosing = noop,
|
|
1559
1561
|
onClosed = noop,
|
|
1560
1562
|
onClose = noop,
|
|
1563
|
+
onEnter: _onEnter = noop,
|
|
1564
|
+
onExiting: _onExiting = noop,
|
|
1565
|
+
onEntering: _onEntering = noop,
|
|
1566
|
+
onEntered: _onEntered = noop,
|
|
1567
|
+
onExit = noop,
|
|
1561
1568
|
children,
|
|
1562
1569
|
dialogProps = {}
|
|
1563
1570
|
} = props,
|
|
@@ -1632,10 +1639,29 @@ function Overlay(props) {
|
|
|
1632
1639
|
unmountOnExit: unmountOnExit,
|
|
1633
1640
|
timeout: timeout,
|
|
1634
1641
|
in: isOpen,
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1642
|
+
onEnter: isAppearing => {
|
|
1643
|
+
_onEnter(overlay.current, isAppearing);
|
|
1644
|
+
},
|
|
1645
|
+
onEntering: isAppearing => {
|
|
1646
|
+
onOpening(overlay.current, isAppearing);
|
|
1647
|
+
|
|
1648
|
+
_onEntering(overlay.current);
|
|
1649
|
+
},
|
|
1650
|
+
onEntered: isAppearing => {
|
|
1651
|
+
onOpened(overlay.current, isAppearing);
|
|
1652
|
+
|
|
1653
|
+
_onEntered(overlay.current);
|
|
1654
|
+
},
|
|
1655
|
+
onExiting: () => {
|
|
1656
|
+
onClosing(overlay.current);
|
|
1657
|
+
|
|
1658
|
+
_onExiting(overlay.current);
|
|
1659
|
+
},
|
|
1660
|
+
onExited: () => {
|
|
1661
|
+
handleClosed(overlay.current);
|
|
1662
|
+
onExit(overlay.current);
|
|
1663
|
+
},
|
|
1664
|
+
nodeRef: overlay
|
|
1639
1665
|
}, otherProps, {
|
|
1640
1666
|
children: status => {
|
|
1641
1667
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
@@ -1796,10 +1822,10 @@ function CallShow(props) {
|
|
|
1796
1822
|
title: title,
|
|
1797
1823
|
isOpen: true,
|
|
1798
1824
|
onClosed: () => {
|
|
1799
|
-
|
|
1825
|
+
dv.remove();
|
|
1800
1826
|
},
|
|
1801
1827
|
children: children
|
|
1802
|
-
})),
|
|
1828
|
+
})), dv);
|
|
1803
1829
|
}
|
|
1804
1830
|
|
|
1805
1831
|
;// CONCATENATED MODULE: ../react-modal/esm/index.js
|
|
@@ -2335,6 +2361,7 @@ var Breadcrumb = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
|
|
|
2335
2361
|
Breadcrumb.Item = Item;
|
|
2336
2362
|
/* harmony default export */ const esm_Breadcrumb = (Breadcrumb);
|
|
2337
2363
|
|
|
2364
|
+
|
|
2338
2365
|
;// CONCATENATED MODULE: ../react-breadcrumb/esm/index.js
|
|
2339
2366
|
|
|
2340
2367
|
|
|
@@ -2371,7 +2398,7 @@ var react_button_group_esm_excluded = ["prefixCls", "vertical", "children", "cla
|
|
|
2371
2398
|
|
|
2372
2399
|
;// CONCATENATED MODULE: ../../node_modules/@uiw/formatter/esm/index.js
|
|
2373
2400
|
/**!
|
|
2374
|
-
* @uiw/formatter v1.3.
|
|
2401
|
+
* @uiw/formatter v1.3.3
|
|
2375
2402
|
* Get a formatted date.
|
|
2376
2403
|
*
|
|
2377
2404
|
* Copyright (c) 2022 Kenny Wang <wowohoo@qq.com>
|
|
@@ -2414,7 +2441,6 @@ formatter.utc = function (str, date) {
|
|
|
2414
2441
|
};
|
|
2415
2442
|
|
|
2416
2443
|
|
|
2417
|
-
//# sourceMappingURL=index.js.map
|
|
2418
2444
|
|
|
2419
2445
|
;// CONCATENATED MODULE: ../react-overlay-trigger/esm/utils.js
|
|
2420
2446
|
var utils_canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
@@ -2946,11 +2972,13 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
|
|
|
2946
2972
|
}
|
|
2947
2973
|
|
|
2948
2974
|
function handleShow() {
|
|
2975
|
+
var _props$children;
|
|
2976
|
+
|
|
2949
2977
|
clearTimeouts();
|
|
2950
2978
|
hoverStateRef.current = 'show';
|
|
2951
2979
|
var delay = normalizeDelay(props.delay);
|
|
2952
2980
|
|
|
2953
|
-
if (!delay.show) {
|
|
2981
|
+
if (!delay.show && !((_props$children = props.children) != null && _props$children.props.disabled)) {
|
|
2954
2982
|
_show();
|
|
2955
2983
|
|
|
2956
2984
|
return;
|
|
@@ -2959,6 +2987,7 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
|
|
|
2959
2987
|
var handle = window.setTimeout(() => {
|
|
2960
2988
|
if (hoverStateRef.current === 'show') _show();
|
|
2961
2989
|
}, delay.show);
|
|
2990
|
+
clearTimeout(handle);
|
|
2962
2991
|
timeoutRef.current.push(handle);
|
|
2963
2992
|
}
|
|
2964
2993
|
|
|
@@ -3078,6 +3107,88 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
|
|
|
3078
3107
|
;// CONCATENATED MODULE: ../react-popover/esm/style/index.css
|
|
3079
3108
|
// extracted by mini-css-extract-plugin
|
|
3080
3109
|
/* harmony default export */ const react_popover_esm_style = ({});
|
|
3110
|
+
;// CONCATENATED MODULE: ../react-popover/esm/Confirm.js
|
|
3111
|
+
|
|
3112
|
+
|
|
3113
|
+
|
|
3114
|
+
|
|
3115
|
+
|
|
3116
|
+
|
|
3117
|
+
|
|
3118
|
+
function Confirm(props) {
|
|
3119
|
+
var {
|
|
3120
|
+
trigger = 'click',
|
|
3121
|
+
placement = 'top',
|
|
3122
|
+
confirmText = 'Yes',
|
|
3123
|
+
title,
|
|
3124
|
+
cancelText = 'No',
|
|
3125
|
+
visibleArrow,
|
|
3126
|
+
children,
|
|
3127
|
+
onConfirm
|
|
3128
|
+
} = props;
|
|
3129
|
+
var [isOpen, setIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
|
|
3130
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(Popover, {
|
|
3131
|
+
isOpen: isOpen,
|
|
3132
|
+
visibleArrow: visibleArrow,
|
|
3133
|
+
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
3134
|
+
style: {
|
|
3135
|
+
padding: '12px 16px',
|
|
3136
|
+
position: 'relative'
|
|
3137
|
+
},
|
|
3138
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
3139
|
+
type: "information",
|
|
3140
|
+
style: {
|
|
3141
|
+
position: 'absolute',
|
|
3142
|
+
top: 13.5,
|
|
3143
|
+
fontSize: 14,
|
|
3144
|
+
transform: 'rotate(180deg)',
|
|
3145
|
+
color: '#faad14'
|
|
3146
|
+
}
|
|
3147
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
3148
|
+
style: {
|
|
3149
|
+
paddingLeft: 20
|
|
3150
|
+
},
|
|
3151
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
3152
|
+
style: {
|
|
3153
|
+
fontSize: 14
|
|
3154
|
+
},
|
|
3155
|
+
children: title
|
|
3156
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
3157
|
+
style: {
|
|
3158
|
+
position: 'relative',
|
|
3159
|
+
bottom: 0,
|
|
3160
|
+
marginTop: 12,
|
|
3161
|
+
display: 'flex',
|
|
3162
|
+
justifyContent: 'end'
|
|
3163
|
+
},
|
|
3164
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(esm, {
|
|
3165
|
+
size: "small",
|
|
3166
|
+
onClick: () => setIsOpen(false),
|
|
3167
|
+
children: cancelText
|
|
3168
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(esm, {
|
|
3169
|
+
size: "small",
|
|
3170
|
+
type: "primary",
|
|
3171
|
+
style: {
|
|
3172
|
+
marginLeft: 10
|
|
3173
|
+
},
|
|
3174
|
+
onClick: () => {
|
|
3175
|
+
onConfirm == null ? void 0 : onConfirm();
|
|
3176
|
+
setIsOpen(false);
|
|
3177
|
+
},
|
|
3178
|
+
children: confirmText
|
|
3179
|
+
})]
|
|
3180
|
+
})]
|
|
3181
|
+
})]
|
|
3182
|
+
}),
|
|
3183
|
+
trigger: trigger,
|
|
3184
|
+
placement: placement,
|
|
3185
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
3186
|
+
onClick: () => setIsOpen(true),
|
|
3187
|
+
children: children
|
|
3188
|
+
})
|
|
3189
|
+
});
|
|
3190
|
+
}
|
|
3191
|
+
|
|
3081
3192
|
;// CONCATENATED MODULE: ../react-popover/esm/index.js
|
|
3082
3193
|
|
|
3083
3194
|
|
|
@@ -3087,6 +3198,7 @@ var react_popover_esm_excluded = ["prefixCls", "className", "content", "visibleA
|
|
|
3087
3198
|
|
|
3088
3199
|
|
|
3089
3200
|
|
|
3201
|
+
|
|
3090
3202
|
class Popover extends (external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component {
|
|
3091
3203
|
constructor() {
|
|
3092
3204
|
super(...arguments);
|
|
@@ -3140,6 +3252,7 @@ class Popover extends (external_root_React_commonjs2_react_commonjs_react_amd_re
|
|
|
3140
3252
|
}
|
|
3141
3253
|
|
|
3142
3254
|
}
|
|
3255
|
+
Popover.Confirm = Confirm;
|
|
3143
3256
|
Popover.defaultProps = {
|
|
3144
3257
|
prefixCls: 'w-popover',
|
|
3145
3258
|
placement: 'top',
|
|
@@ -4981,11 +5094,12 @@ var RadioAbstract = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
|
|
|
4981
5094
|
|
|
4982
5095
|
|
|
4983
5096
|
|
|
4984
|
-
|
|
5097
|
+
var Radio = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
|
|
4985
5098
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(RadioAbstract, _extends({
|
|
4986
5099
|
ref: ref
|
|
4987
5100
|
}, props));
|
|
4988
|
-
})
|
|
5101
|
+
});
|
|
5102
|
+
/* harmony default export */ const esm_Radio = (Radio);
|
|
4989
5103
|
|
|
4990
5104
|
;// CONCATENATED MODULE: ../react-radio/esm/style/group.css
|
|
4991
5105
|
// extracted by mini-css-extract-plugin
|
|
@@ -4998,7 +5112,7 @@ var RadioGroup_excluded = ["prefixCls", "className", "name", "value", "onChange"
|
|
|
4998
5112
|
|
|
4999
5113
|
|
|
5000
5114
|
|
|
5001
|
-
|
|
5115
|
+
var RadioGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
|
|
5002
5116
|
var {
|
|
5003
5117
|
prefixCls = 'w-radio-group',
|
|
5004
5118
|
className,
|
|
@@ -5024,7 +5138,8 @@ var RadioGroup_excluded = ["prefixCls", "className", "name", "value", "onChange"
|
|
|
5024
5138
|
})
|
|
5025
5139
|
})
|
|
5026
5140
|
}));
|
|
5027
|
-
})
|
|
5141
|
+
});
|
|
5142
|
+
/* harmony default export */ const esm_RadioGroup = (RadioGroup);
|
|
5028
5143
|
|
|
5029
5144
|
;// CONCATENATED MODULE: ../react-radio/esm/RadioButton.js
|
|
5030
5145
|
|
|
@@ -8141,6 +8256,7 @@ Circle.defaultProps = {
|
|
|
8141
8256
|
|
|
8142
8257
|
};
|
|
8143
8258
|
|
|
8259
|
+
|
|
8144
8260
|
;// CONCATENATED MODULE: ../react-progress/esm/style/line.css
|
|
8145
8261
|
// extracted by mini-css-extract-plugin
|
|
8146
8262
|
/* harmony default export */ const line = ({});
|
|
@@ -8226,6 +8342,7 @@ Line.defaultProps = {
|
|
|
8226
8342
|
|
|
8227
8343
|
};
|
|
8228
8344
|
|
|
8345
|
+
|
|
8229
8346
|
;// CONCATENATED MODULE: ../react-progress/esm/index.js
|
|
8230
8347
|
|
|
8231
8348
|
|
|
@@ -8497,6 +8614,9 @@ function SearchSelect(props) {
|
|
|
8497
8614
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
8498
8615
|
if (valueVerify(value)) {
|
|
8499
8616
|
selectedValueChange(value);
|
|
8617
|
+
} else {
|
|
8618
|
+
setSelectedValue([]);
|
|
8619
|
+
setSelectedLabel('');
|
|
8500
8620
|
}
|
|
8501
8621
|
}, [JSON.stringify(value)]);
|
|
8502
8622
|
|
|
@@ -9488,6 +9608,8 @@ var react_switch_esm_excluded = ["prefixCls"];
|
|
|
9488
9608
|
// extracted by mini-css-extract-plugin
|
|
9489
9609
|
/* harmony default export */ const react_table_esm_style = ({});
|
|
9490
9610
|
;// CONCATENATED MODULE: ../react-table/esm/util.js
|
|
9611
|
+
|
|
9612
|
+
|
|
9491
9613
|
/**
|
|
9492
9614
|
* Get colspan number
|
|
9493
9615
|
* @param {Array} date
|
|
@@ -9643,6 +9765,10 @@ function getAllColumnsKeys(data, keys) {
|
|
|
9643
9765
|
keys = keys.concat(getAllColumnsKeys(data[i].children || []));
|
|
9644
9766
|
} else if (data[i].key) {
|
|
9645
9767
|
keys.push(data[i]);
|
|
9768
|
+
} else {
|
|
9769
|
+
keys.push(_extends({}, data[i], {
|
|
9770
|
+
key: i.toString()
|
|
9771
|
+
}));
|
|
9646
9772
|
}
|
|
9647
9773
|
}
|
|
9648
9774
|
|
|
@@ -9667,12 +9793,15 @@ var ThComponent_excluded = ["title", "key", "render", "children", "ellipsis", "f
|
|
|
9667
9793
|
|
|
9668
9794
|
|
|
9669
9795
|
|
|
9670
|
-
|
|
9671
9796
|
class ThComponent extends external_root_React_commonjs2_react_commonjs_react_amd_react_.Component {
|
|
9797
|
+
constructor() {
|
|
9798
|
+
super(...arguments);
|
|
9799
|
+
this.wrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();
|
|
9800
|
+
}
|
|
9801
|
+
|
|
9672
9802
|
componentDidMount() {
|
|
9673
|
-
var rect = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this);
|
|
9674
9803
|
this.props.updateLocation({
|
|
9675
|
-
width:
|
|
9804
|
+
width: this.wrapper.current.getBoundingClientRect().width
|
|
9676
9805
|
}, "" + this.props.rowNum + this.props.colNum, this.props.item.key, this.props.item.colSpan);
|
|
9677
9806
|
}
|
|
9678
9807
|
|
|
@@ -9702,7 +9831,9 @@ class ThComponent extends external_root_React_commonjs2_react_commonjs_react_amd
|
|
|
9702
9831
|
}
|
|
9703
9832
|
}
|
|
9704
9833
|
|
|
9705
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("th", _extends({
|
|
9834
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("th", _extends({
|
|
9835
|
+
ref: this.wrapper
|
|
9836
|
+
}, thProps, {
|
|
9706
9837
|
style: _extends({}, thProps.style, locationFixed(fixed, locationWidth, "" + rowNum + colNum)),
|
|
9707
9838
|
className: prefixCls + "-tr-children-" + ((item == null ? void 0 : item.align) || 'left') + " " + (item.className || '') + " " + cls,
|
|
9708
9839
|
onClick: evn => onCellHead == null ? void 0 : onCellHead(item, colNum, rowNum, evn),
|
|
@@ -10236,7 +10367,7 @@ function Table(props) {
|
|
|
10236
10367
|
}), data && data.length === 0 && empty && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
10237
10368
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
|
|
10238
10369
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
|
|
10239
|
-
colSpan:
|
|
10370
|
+
colSpan: self.keys.length,
|
|
10240
10371
|
style: {
|
|
10241
10372
|
position: 'relative',
|
|
10242
10373
|
left: 0
|
|
@@ -10561,9 +10692,11 @@ var TreeNode_excluded = ["prefixCls", "renderTitle", "icon", "iconAnimation", "i
|
|
|
10561
10692
|
|
|
10562
10693
|
var Label = _ref => {
|
|
10563
10694
|
var {
|
|
10564
|
-
label
|
|
10695
|
+
label,
|
|
10696
|
+
className
|
|
10565
10697
|
} = _ref;
|
|
10566
10698
|
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
10699
|
+
className: className,
|
|
10567
10700
|
children: label
|
|
10568
10701
|
}), [label]);
|
|
10569
10702
|
};
|
|
@@ -10586,27 +10719,29 @@ function TreeNode(props) {
|
|
|
10586
10719
|
other = _objectWithoutPropertiesLoose(props, TreeNode_excluded);
|
|
10587
10720
|
|
|
10588
10721
|
var isOpen = false;
|
|
10722
|
+
var node = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
|
|
10589
10723
|
|
|
10590
10724
|
if (parent && (parent.key || parent.key === 0)) {
|
|
10591
10725
|
isOpen = !!(openKeys && openKeys.indexOf(parent.key) > -1);
|
|
10592
10726
|
}
|
|
10593
10727
|
|
|
10594
|
-
var onExit = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(
|
|
10595
|
-
node.style.height = node.scrollHeight + "px";
|
|
10728
|
+
var onExit = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
|
|
10729
|
+
node.current.style.height = node.current.scrollHeight + "px";
|
|
10596
10730
|
}, []);
|
|
10597
|
-
var onExiting = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(
|
|
10598
|
-
node.style.height = '1px';
|
|
10731
|
+
var onExiting = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
|
|
10732
|
+
node.current.style.height = '1px';
|
|
10599
10733
|
}, []);
|
|
10600
|
-
var onEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((
|
|
10601
|
-
node.style.height = '1px';
|
|
10734
|
+
var onEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
|
|
10735
|
+
node.current.style.height = '1px';
|
|
10602
10736
|
}, []);
|
|
10603
|
-
var onEntering = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((
|
|
10604
|
-
node.style.height = node.scrollHeight + "px";
|
|
10737
|
+
var onEntering = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
|
|
10738
|
+
node.current.style.height = node.current.scrollHeight + "px";
|
|
10605
10739
|
}, []);
|
|
10606
|
-
var onEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((
|
|
10607
|
-
node.style.height = 'initial';
|
|
10740
|
+
var onEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
|
|
10741
|
+
node.current.style.height = 'initial';
|
|
10608
10742
|
}, []);
|
|
10609
10743
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_CSSTransition, {
|
|
10744
|
+
nodeRef: node,
|
|
10610
10745
|
classNames: prefixCls,
|
|
10611
10746
|
in: isOpen,
|
|
10612
10747
|
timeout: 200,
|
|
@@ -10616,6 +10751,7 @@ function TreeNode(props) {
|
|
|
10616
10751
|
onEntered: onEntered,
|
|
10617
10752
|
onEntering: onEntering,
|
|
10618
10753
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("ul", {
|
|
10754
|
+
ref: node,
|
|
10619
10755
|
className: [level !== 1 && isOpen ? [prefixCls + "-open"] : null, level !== 1 && !isOpen ? [prefixCls + "-close"] : null].filter(Boolean).join(' ').trim(),
|
|
10620
10756
|
children: data.map((item, idx) => {
|
|
10621
10757
|
item.parent = parent;
|
|
@@ -10631,6 +10767,24 @@ function TreeNode(props) {
|
|
|
10631
10767
|
var childKeys = noChild ? [] : getChildKeys(item.children);
|
|
10632
10768
|
var checkedKeys = selectedKeys ? selectedKeys.filter(key => childKeys.indexOf(key) > -1) : [];
|
|
10633
10769
|
var isHalfChecked = checkedKeys.length > 0 && childKeys.length !== checkedKeys.length;
|
|
10770
|
+
var disabledObj = {
|
|
10771
|
+
onClick: onItemSelected,
|
|
10772
|
+
disabled: null,
|
|
10773
|
+
disabledMouse: null,
|
|
10774
|
+
disabledClass: undefined,
|
|
10775
|
+
disabledStyle: undefined
|
|
10776
|
+
};
|
|
10777
|
+
|
|
10778
|
+
if (item.disabled) {
|
|
10779
|
+
disabledObj.onClick = undefined;
|
|
10780
|
+
disabledObj.disabled = 'disabled';
|
|
10781
|
+
disabledObj.disabledMouse = prefixCls + "-disabled-mouse";
|
|
10782
|
+
disabledObj.disabledClass = prefixCls + "-disabled-ele";
|
|
10783
|
+
disabledObj.disabledStyle = {
|
|
10784
|
+
color: '#00000040'
|
|
10785
|
+
};
|
|
10786
|
+
}
|
|
10787
|
+
|
|
10634
10788
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
10635
10789
|
style: {
|
|
10636
10790
|
display: item.hideNode ? 'none' : 'block'
|
|
@@ -10648,16 +10802,20 @@ function TreeNode(props) {
|
|
|
10648
10802
|
className: [typeof icon === 'function' ? prefixCls + "-switcher-noop" : null, noChild ? 'no-child' : null, !iconAnimation ? 'no-animation' : null, itemIsOpen ? 'open' : null].filter(Boolean).join(' ').trim()
|
|
10649
10803
|
})
|
|
10650
10804
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
10651
|
-
onClick: evn =>
|
|
10652
|
-
className: [prefixCls + "-title", selected && isSelected ? 'selected' : null,
|
|
10805
|
+
onClick: evn => disabledObj.onClick == null ? void 0 : disabledObj.onClick(item, evn),
|
|
10806
|
+
className: [prefixCls + "-title", selected && isSelected ? 'selected' : null, disabledObj.disabled, disabledObj.disabledMouse].filter(Boolean).join(' ').trim(),
|
|
10653
10807
|
children: renderTitle ? renderTitle(item, {
|
|
10654
10808
|
selected,
|
|
10655
10809
|
noChild,
|
|
10656
10810
|
openKeys,
|
|
10657
10811
|
isHalfChecked,
|
|
10658
|
-
selectedKeys
|
|
10812
|
+
selectedKeys,
|
|
10813
|
+
disabled: item.disabled,
|
|
10814
|
+
disabledClass: disabledObj.disabledClass,
|
|
10815
|
+
disabledStyle: disabledObj.disabledStyle
|
|
10659
10816
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(Label, {
|
|
10660
|
-
label: item.label
|
|
10817
|
+
label: item.label,
|
|
10818
|
+
className: disabledObj.disabledClass
|
|
10661
10819
|
})
|
|
10662
10820
|
})]
|
|
10663
10821
|
}), item.children && /*#__PURE__*/(0,jsx_runtime.jsx)(TreeNode, _extends({}, other, {
|
|
@@ -10945,8 +11103,10 @@ function TreeChecked(_ref) {
|
|
|
10945
11103
|
|
|
10946
11104
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
|
|
10947
11105
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(react_checkbox_esm, _extends({
|
|
10948
|
-
className: prefixCls + "-checked"
|
|
11106
|
+
className: prefixCls + "-checked",
|
|
11107
|
+
disabled: node.disabled
|
|
10949
11108
|
}, checkedProps)), item.label && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
11109
|
+
className: node.disabledClass,
|
|
10950
11110
|
children: item.label
|
|
10951
11111
|
})]
|
|
10952
11112
|
});
|