uiw 4.17.0 → 4.19.0
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 +40 -7
- package/dist/uiw.js +288 -85
- package/dist/uiw.min.css +1 -1
- package/dist/uiw.min.js +1 -1
- package/package.json +60 -60
package/dist/uiw.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
exports["uiw"] = factory(require("react"), require("react-dom"));
|
|
8
8
|
else
|
|
9
9
|
root["uiw"] = factory(root["React"], root["ReactDOM"]);
|
|
10
|
-
})(self,
|
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
@@ -346,6 +346,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
346
346
|
"FormItem": () => (/* reexport */ FormItem),
|
|
347
347
|
"Icon": () => (/* reexport */ Icon),
|
|
348
348
|
"Input": () => (/* reexport */ react_input_esm),
|
|
349
|
+
"InputNumber": () => (/* reexport */ InputNumber),
|
|
349
350
|
"Layout": () => (/* reexport */ react_layout_esm),
|
|
350
351
|
"LayoutContent": () => (/* reexport */ LayoutContent),
|
|
351
352
|
"LayoutContext": () => (/* reexport */ LayoutContext),
|
|
@@ -371,6 +372,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
371
372
|
"Progress": () => (/* reexport */ react_progress_esm),
|
|
372
373
|
"Radio": () => (/* reexport */ Radio),
|
|
373
374
|
"RadioAbstract": () => (/* reexport */ RadioAbstract),
|
|
375
|
+
"RadioButton": () => (/* reexport */ esm_RadioButton),
|
|
374
376
|
"RadioGroup": () => (/* reexport */ RadioGroup),
|
|
375
377
|
"Rate": () => (/* reexport */ Rate),
|
|
376
378
|
"Row": () => (/* reexport */ Row_Row),
|
|
@@ -1561,7 +1563,8 @@ function Overlay(props) {
|
|
|
1561
1563
|
} = props,
|
|
1562
1564
|
otherProps = _objectWithoutPropertiesLoose(props, esm_excluded);
|
|
1563
1565
|
|
|
1564
|
-
var [isOpen, setIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.isOpen || false);
|
|
1566
|
+
var [isOpen, setIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(); // const [isOpen, setIsOpen] = useState(props.isOpen || false);
|
|
1567
|
+
|
|
1565
1568
|
var [visible, setVisible] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
|
|
1566
1569
|
var container = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
1567
1570
|
var overlay = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -1771,6 +1774,34 @@ var react_button_esm_excluded = ["prefixCls", "disabled", "active", "loading", "
|
|
|
1771
1774
|
;// CONCATENATED MODULE: ../react-modal/esm/style/index.css
|
|
1772
1775
|
// extracted by mini-css-extract-plugin
|
|
1773
1776
|
/* harmony default export */ const react_modal_esm_style = ({});
|
|
1777
|
+
;// CONCATENATED MODULE: ../react-modal/esm/CallShow.js
|
|
1778
|
+
|
|
1779
|
+
|
|
1780
|
+
var CallShow_excluded = ["title", "children"];
|
|
1781
|
+
|
|
1782
|
+
|
|
1783
|
+
|
|
1784
|
+
|
|
1785
|
+
function CallShow(props) {
|
|
1786
|
+
var {
|
|
1787
|
+
title = '提示框',
|
|
1788
|
+
children
|
|
1789
|
+
} = props,
|
|
1790
|
+
other = _objectWithoutPropertiesLoose(props, CallShow_excluded);
|
|
1791
|
+
|
|
1792
|
+
var dv = document.createElement('div');
|
|
1793
|
+
dv.id = 'uiw-modal-call-show-element';
|
|
1794
|
+
document.body.appendChild(dv);
|
|
1795
|
+
external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().render( /*#__PURE__*/(0,jsx_runtime.jsx)(react_modal_esm, _extends({}, other, {
|
|
1796
|
+
title: title,
|
|
1797
|
+
isOpen: true,
|
|
1798
|
+
onClosed: () => {
|
|
1799
|
+
document.getElementById('uiw-modal-call-show-element').remove();
|
|
1800
|
+
},
|
|
1801
|
+
children: children
|
|
1802
|
+
})), document.getElementById('uiw-modal-call-show-element'));
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1774
1805
|
;// CONCATENATED MODULE: ../react-modal/esm/index.js
|
|
1775
1806
|
|
|
1776
1807
|
|
|
@@ -1784,7 +1815,8 @@ var react_modal_esm_excluded = ["prefixCls", "className", "children", "useButton
|
|
|
1784
1815
|
|
|
1785
1816
|
|
|
1786
1817
|
|
|
1787
|
-
|
|
1818
|
+
|
|
1819
|
+
var Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
|
|
1788
1820
|
var {
|
|
1789
1821
|
prefixCls = 'w-modal',
|
|
1790
1822
|
className,
|
|
@@ -1909,7 +1941,9 @@ var react_modal_esm_excluded = ["prefixCls", "className", "children", "useButton
|
|
|
1909
1941
|
})
|
|
1910
1942
|
})
|
|
1911
1943
|
}));
|
|
1912
|
-
})
|
|
1944
|
+
});
|
|
1945
|
+
Modal.show = CallShow;
|
|
1946
|
+
/* harmony default export */ const react_modal_esm = (Modal);
|
|
1913
1947
|
|
|
1914
1948
|
;// CONCATENATED MODULE: ../react-alert/esm/style/index.css
|
|
1915
1949
|
// extracted by mini-css-extract-plugin
|
|
@@ -2853,7 +2887,7 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
|
|
|
2853
2887
|
}
|
|
2854
2888
|
|
|
2855
2889
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
2856
|
-
if (isClickOutside) {
|
|
2890
|
+
if (isClickOutside && isOpen) {
|
|
2857
2891
|
document && document.addEventListener('mousedown', handleClickOutside);
|
|
2858
2892
|
window.addEventListener('resize', handleResize);
|
|
2859
2893
|
}
|
|
@@ -2862,7 +2896,7 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
|
|
|
2862
2896
|
document && isClickOutside && document.removeEventListener('mousedown', handleClickOutside);
|
|
2863
2897
|
window.removeEventListener('resize', handleResize);
|
|
2864
2898
|
};
|
|
2865
|
-
}, []);
|
|
2899
|
+
}, [isOpen]);
|
|
2866
2900
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
2867
2901
|
if (props.isOpen !== isOpen) {
|
|
2868
2902
|
setIsOpen(!!props.isOpen);
|
|
@@ -2883,9 +2917,11 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
|
|
|
2883
2917
|
}, [isOpen]);
|
|
2884
2918
|
|
|
2885
2919
|
var handleResize = () => {
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2920
|
+
if (isOpen) {
|
|
2921
|
+
zIndex.current -= 1;
|
|
2922
|
+
setIsOpen(false);
|
|
2923
|
+
onVisibleChange && onVisibleChange(false);
|
|
2924
|
+
}
|
|
2889
2925
|
};
|
|
2890
2926
|
|
|
2891
2927
|
var handleClickOutside = e => {
|
|
@@ -3115,10 +3151,69 @@ Popover.defaultProps = {
|
|
|
3115
3151
|
;// CONCATENATED MODULE: ../react-input/esm/style/input.css
|
|
3116
3152
|
// extracted by mini-css-extract-plugin
|
|
3117
3153
|
/* harmony default export */ const input = ({});
|
|
3154
|
+
;// CONCATENATED MODULE: ../react-input/esm/InputNumber.js
|
|
3155
|
+
|
|
3156
|
+
|
|
3157
|
+
var InputNumber_excluded = ["className", "min", "max", "step", "overLimitColor", "keyboard", "formatter", "prefixCls"];
|
|
3158
|
+
|
|
3159
|
+
|
|
3160
|
+
|
|
3161
|
+
/* harmony default export */ const InputNumber = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
|
|
3162
|
+
var {
|
|
3163
|
+
className,
|
|
3164
|
+
min,
|
|
3165
|
+
max,
|
|
3166
|
+
step,
|
|
3167
|
+
overLimitColor,
|
|
3168
|
+
keyboard = false,
|
|
3169
|
+
prefixCls = 'w-input-number'
|
|
3170
|
+
} = props,
|
|
3171
|
+
otherProps = _objectWithoutPropertiesLoose(props, InputNumber_excluded);
|
|
3172
|
+
|
|
3173
|
+
var value = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
|
|
3174
|
+
var _ref;
|
|
3175
|
+
|
|
3176
|
+
return Number.parseFloat((_ref = props.value || 0) == null ? void 0 : _ref.toString());
|
|
3177
|
+
}, [props.value]);
|
|
3178
|
+
var [isOverLimit, isOverLimitSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(overLimitComp(value));
|
|
3179
|
+
|
|
3180
|
+
function overLimitComp(value) {
|
|
3181
|
+
if (typeof min === 'number' && value < min) return true;
|
|
3182
|
+
if (typeof max === 'number' && value > max) return true;
|
|
3183
|
+
return false;
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3186
|
+
var onChange = v => {
|
|
3187
|
+
var isOverLimit = overLimitComp(Number.parseFloat(v.target.value));
|
|
3188
|
+
isOverLimitSet(isOverLimit);
|
|
3189
|
+
props.onChange == null ? void 0 : props.onChange(v);
|
|
3190
|
+
};
|
|
3191
|
+
|
|
3192
|
+
var overLimitProps = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
|
|
3193
|
+
if (!overLimitColor) return {
|
|
3194
|
+
min,
|
|
3195
|
+
max
|
|
3196
|
+
};
|
|
3197
|
+
}, []);
|
|
3198
|
+
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
3199
|
+
var inputStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => isOverLimit ? {
|
|
3200
|
+
color: overLimitColor == null ? void 0 : overLimitColor.toString()
|
|
3201
|
+
} : undefined, [isOverLimit]);
|
|
3202
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, _extends({}, otherProps, {
|
|
3203
|
+
className: cls,
|
|
3204
|
+
type: "number",
|
|
3205
|
+
inputStyle: inputStyle,
|
|
3206
|
+
onChange: onChange,
|
|
3207
|
+
step: step
|
|
3208
|
+
}, overLimitProps));
|
|
3209
|
+
}));
|
|
3210
|
+
|
|
3118
3211
|
;// CONCATENATED MODULE: ../react-input/esm/index.js
|
|
3119
3212
|
|
|
3120
3213
|
|
|
3121
|
-
var react_input_esm_excluded = ["prefixCls", "className", "style", "size", "type", "preIcon", "addonAfter"];
|
|
3214
|
+
var react_input_esm_excluded = ["prefixCls", "className", "style", "size", "type", "preIcon", "addonAfter", "inputStyle"];
|
|
3215
|
+
|
|
3216
|
+
|
|
3122
3217
|
|
|
3123
3218
|
|
|
3124
3219
|
|
|
@@ -3132,7 +3227,8 @@ var react_input_esm_excluded = ["prefixCls", "className", "style", "size", "type
|
|
|
3132
3227
|
size = 'default',
|
|
3133
3228
|
type = 'text',
|
|
3134
3229
|
preIcon = null,
|
|
3135
|
-
addonAfter
|
|
3230
|
+
addonAfter,
|
|
3231
|
+
inputStyle
|
|
3136
3232
|
} = props,
|
|
3137
3233
|
otherProps = _objectWithoutPropertiesLoose(props, react_input_esm_excluded);
|
|
3138
3234
|
|
|
@@ -3161,6 +3257,7 @@ var react_input_esm_excluded = ["prefixCls", "className", "style", "size", "type
|
|
|
3161
3257
|
type: type,
|
|
3162
3258
|
autoComplete: "off"
|
|
3163
3259
|
}, otherProps, {
|
|
3260
|
+
style: inputStyle,
|
|
3164
3261
|
className: prefixCls + "-inner"
|
|
3165
3262
|
})), addonAfter && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
3166
3263
|
className: prefixCls + "-addon-after",
|
|
@@ -4552,6 +4649,8 @@ function Cascader(props) {
|
|
|
4552
4649
|
value,
|
|
4553
4650
|
onChange,
|
|
4554
4651
|
onSearch,
|
|
4652
|
+
expandTrigger = 'click',
|
|
4653
|
+
size,
|
|
4555
4654
|
disabled,
|
|
4556
4655
|
allowClear,
|
|
4557
4656
|
placeholder,
|
|
@@ -4561,7 +4660,8 @@ function Cascader(props) {
|
|
|
4561
4660
|
width: 200
|
|
4562
4661
|
},
|
|
4563
4662
|
option = [],
|
|
4564
|
-
others
|
|
4663
|
+
others,
|
|
4664
|
+
inputProps
|
|
4565
4665
|
} = props;
|
|
4566
4666
|
var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
|
|
4567
4667
|
var [innerIsOpen, setInnerIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
|
|
@@ -4641,6 +4741,7 @@ function Cascader(props) {
|
|
|
4641
4741
|
|
|
4642
4742
|
var handleItemClick = (optionsItem, level) => {
|
|
4643
4743
|
selectedValue.splice(level, selectedValue.length - level, optionsItem);
|
|
4744
|
+
if (!optionsItem.children) setInnerIsOpen(false);
|
|
4644
4745
|
handelChange(true, selectedValue);
|
|
4645
4746
|
};
|
|
4646
4747
|
|
|
@@ -4669,6 +4770,26 @@ function Cascader(props) {
|
|
|
4669
4770
|
};
|
|
4670
4771
|
|
|
4671
4772
|
var widths = (style == null ? void 0 : style.width) * 0.7 || undefined;
|
|
4773
|
+
var trigger = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
|
|
4774
|
+
return (cb, click) => {
|
|
4775
|
+
var triggers = {
|
|
4776
|
+
onClick: () => {},
|
|
4777
|
+
onMouseOver: () => {}
|
|
4778
|
+
};
|
|
4779
|
+
|
|
4780
|
+
var callback = () => {
|
|
4781
|
+
cb();
|
|
4782
|
+
};
|
|
4783
|
+
|
|
4784
|
+
if (expandTrigger === 'click' || click) {
|
|
4785
|
+
triggers.onClick = callback;
|
|
4786
|
+
} else if (expandTrigger === 'hover') {
|
|
4787
|
+
triggers.onMouseOver = callback;
|
|
4788
|
+
}
|
|
4789
|
+
|
|
4790
|
+
return triggers;
|
|
4791
|
+
};
|
|
4792
|
+
}, []);
|
|
4672
4793
|
|
|
4673
4794
|
var OptionIter = function OptionIter(option, level) {
|
|
4674
4795
|
if (level === void 0) {
|
|
@@ -4691,17 +4812,18 @@ function Cascader(props) {
|
|
|
4691
4812
|
},
|
|
4692
4813
|
children: '没有数据'
|
|
4693
4814
|
}) : option.map((opt, index) => {
|
|
4694
|
-
var _selectedValue$level;
|
|
4815
|
+
var _selectedValue$level, _opt$children;
|
|
4695
4816
|
|
|
4696
4817
|
var active = ((_selectedValue$level = selectedValue[level]) == null ? void 0 : _selectedValue$level.value) === opt.value;
|
|
4697
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm.Item, {
|
|
4818
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm.Item, _extends({
|
|
4698
4819
|
active: active,
|
|
4699
4820
|
text: opt.label,
|
|
4700
4821
|
addonAfter: opt.children ? /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
4701
4822
|
type: "right"
|
|
4702
|
-
}) : undefined
|
|
4703
|
-
|
|
4704
|
-
|
|
4823
|
+
}) : undefined
|
|
4824
|
+
}, trigger(() => {
|
|
4825
|
+
handleItemClick(opt, level);
|
|
4826
|
+
}, !((_opt$children = opt.children) != null && _opt$children.length))), index);
|
|
4705
4827
|
})
|
|
4706
4828
|
}, level);
|
|
4707
4829
|
};
|
|
@@ -4713,9 +4835,9 @@ function Cascader(props) {
|
|
|
4713
4835
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown, _extends({
|
|
4714
4836
|
className: cls,
|
|
4715
4837
|
trigger: "click",
|
|
4716
|
-
style:
|
|
4838
|
+
style: {
|
|
4717
4839
|
marginTop: 5
|
|
4718
|
-
},
|
|
4840
|
+
},
|
|
4719
4841
|
overlayStyl: {
|
|
4720
4842
|
width: 100
|
|
4721
4843
|
},
|
|
@@ -4750,22 +4872,20 @@ function Cascader(props) {
|
|
|
4750
4872
|
}) : searchOption.filter(opt => opt.label.includes(searchText.trim())).map((opt, index) => {
|
|
4751
4873
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm.Item, {
|
|
4752
4874
|
text: opt.label,
|
|
4753
|
-
onClick: () => searchItemClick(opt.options)
|
|
4754
|
-
|
|
4875
|
+
onClick: () => searchItemClick(opt.options)
|
|
4755
4876
|
}, index);
|
|
4756
4877
|
})
|
|
4757
4878
|
}),
|
|
4758
4879
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
4759
4880
|
onMouseLeave: () => renderSelectIcon('leave'),
|
|
4760
4881
|
onMouseOver: () => renderSelectIcon('enter'),
|
|
4761
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
|
|
4882
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, _extends({}, inputProps, {
|
|
4762
4883
|
value: searchOn ? searchText : inputValue,
|
|
4763
4884
|
onChange: inputChange,
|
|
4885
|
+
size: size,
|
|
4764
4886
|
disabled: disabled,
|
|
4765
4887
|
placeholder: searchOn ? inputValue : placeholder,
|
|
4766
|
-
style:
|
|
4767
|
-
width: style == null ? void 0 : style.width
|
|
4768
|
-
},
|
|
4888
|
+
style: style,
|
|
4769
4889
|
onFocus: () => onSearch && setSearchOn(true),
|
|
4770
4890
|
onBlur: () => onSearch && setSearchOn(false),
|
|
4771
4891
|
readOnly: !onSearch,
|
|
@@ -4779,7 +4899,7 @@ function Cascader(props) {
|
|
|
4779
4899
|
className: prefixCls + "-close"
|
|
4780
4900
|
})
|
|
4781
4901
|
})
|
|
4782
|
-
})
|
|
4902
|
+
}))
|
|
4783
4903
|
})
|
|
4784
4904
|
}));
|
|
4785
4905
|
}
|
|
@@ -4877,6 +4997,7 @@ var RadioGroup_excluded = ["prefixCls", "className", "name", "value", "onChange"
|
|
|
4877
4997
|
|
|
4878
4998
|
|
|
4879
4999
|
|
|
5000
|
+
|
|
4880
5001
|
/* harmony default export */ const RadioGroup = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
|
|
4881
5002
|
var {
|
|
4882
5003
|
prefixCls = 'w-radio-group',
|
|
@@ -4891,18 +5012,88 @@ var RadioGroup_excluded = ["prefixCls", "className", "name", "value", "onChange"
|
|
|
4891
5012
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({}, other, {
|
|
4892
5013
|
ref: ref,
|
|
4893
5014
|
className: [prefixCls, className].filter(Boolean).join(' ').trim(),
|
|
4894
|
-
children:
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
5015
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_button_group_esm, {
|
|
5016
|
+
children: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.toArray(children).map(child => {
|
|
5017
|
+
if (!child) return;
|
|
5018
|
+
if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) return child;
|
|
5019
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, _extends({}, child.props || {}, {
|
|
5020
|
+
checked: child.props.value === value,
|
|
5021
|
+
name,
|
|
5022
|
+
onChange
|
|
5023
|
+
}));
|
|
5024
|
+
})
|
|
4902
5025
|
})
|
|
4903
5026
|
}));
|
|
4904
5027
|
}));
|
|
4905
5028
|
|
|
5029
|
+
;// CONCATENATED MODULE: ../react-radio/esm/RadioButton.js
|
|
5030
|
+
|
|
5031
|
+
|
|
5032
|
+
var RadioButton_excluded = ["prefixCls", "type", "disabled", "value", "className", "style", "children", "size", "checked", "onChange"];
|
|
5033
|
+
|
|
5034
|
+
|
|
5035
|
+
/**
|
|
5036
|
+
* Constructs a type by picking all properties from `HTMLInputProps` and then removing `size`.
|
|
5037
|
+
* Omit: https://www.typescriptlang.org/docs/handbook/utility-types.html#omittk
|
|
5038
|
+
*/
|
|
5039
|
+
|
|
5040
|
+
|
|
5041
|
+
var RadioButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
|
|
5042
|
+
var {
|
|
5043
|
+
prefixCls = 'w-radio',
|
|
5044
|
+
type = 'button',
|
|
5045
|
+
disabled = false,
|
|
5046
|
+
value = '',
|
|
5047
|
+
className,
|
|
5048
|
+
style,
|
|
5049
|
+
children,
|
|
5050
|
+
size = 'small',
|
|
5051
|
+
checked: prChecked = false,
|
|
5052
|
+
onChange
|
|
5053
|
+
} = props,
|
|
5054
|
+
other = _objectWithoutPropertiesLoose(props, RadioButton_excluded);
|
|
5055
|
+
|
|
5056
|
+
var [checked, setChecked] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(prChecked);
|
|
5057
|
+
var [prevChecked, setPrevChecked] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)();
|
|
5058
|
+
|
|
5059
|
+
if (prChecked !== prevChecked) {
|
|
5060
|
+
setPrevChecked(prChecked);
|
|
5061
|
+
}
|
|
5062
|
+
|
|
5063
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
|
|
5064
|
+
if (prChecked !== prevChecked) {
|
|
5065
|
+
setChecked(prChecked);
|
|
5066
|
+
}
|
|
5067
|
+
}, [prevChecked]);
|
|
5068
|
+
var cls = [prefixCls, className, disabled ? 'disabled' : null, size ? prefixCls + "-" + size : null].filter(Boolean).join(' ').trim();
|
|
5069
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
|
|
5070
|
+
if (checked !== props.checked) {
|
|
5071
|
+
setChecked(!!props.checked);
|
|
5072
|
+
}
|
|
5073
|
+
}, [props.checked]);
|
|
5074
|
+
console.log('props.checked', props.checked);
|
|
5075
|
+
|
|
5076
|
+
function handleChange(e) {
|
|
5077
|
+
e.persist();
|
|
5078
|
+
setChecked(!checked);
|
|
5079
|
+
onChange && onChange(value);
|
|
5080
|
+
}
|
|
5081
|
+
|
|
5082
|
+
var label = children || value;
|
|
5083
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(esm, _extends({}, _extends({}, other, {
|
|
5084
|
+
className: cls,
|
|
5085
|
+
style,
|
|
5086
|
+
disabled,
|
|
5087
|
+
value
|
|
5088
|
+
}), {
|
|
5089
|
+
type: checked ? 'primary' : 'light',
|
|
5090
|
+
ref: ref,
|
|
5091
|
+
onClick: handleChange,
|
|
5092
|
+
children: label
|
|
5093
|
+
}));
|
|
5094
|
+
});
|
|
5095
|
+
/* harmony default export */ const esm_RadioButton = (RadioButton);
|
|
5096
|
+
|
|
4906
5097
|
;// CONCATENATED MODULE: ../react-radio/esm/index.js
|
|
4907
5098
|
|
|
4908
5099
|
|
|
@@ -4910,6 +5101,8 @@ var RadioGroup_excluded = ["prefixCls", "className", "name", "value", "onChange"
|
|
|
4910
5101
|
|
|
4911
5102
|
|
|
4912
5103
|
|
|
5104
|
+
|
|
5105
|
+
|
|
4913
5106
|
;// CONCATENATED MODULE: ../react-checkbox/esm/style/group.css
|
|
4914
5107
|
// extracted by mini-css-extract-plugin
|
|
4915
5108
|
/* harmony default export */ const style_group = ({});
|
|
@@ -8243,6 +8436,11 @@ var react_search_select_esm_excluded = ["allowClear", "disabled", "valueAmount",
|
|
|
8243
8436
|
|
|
8244
8437
|
|
|
8245
8438
|
|
|
8439
|
+
var TagSize = {
|
|
8440
|
+
large: 25,
|
|
8441
|
+
default: 20,
|
|
8442
|
+
small: 17
|
|
8443
|
+
};
|
|
8246
8444
|
function SearchSelect(props) {
|
|
8247
8445
|
var _style$width;
|
|
8248
8446
|
|
|
@@ -8261,7 +8459,7 @@ function SearchSelect(props) {
|
|
|
8261
8459
|
style,
|
|
8262
8460
|
value,
|
|
8263
8461
|
defaultValue,
|
|
8264
|
-
showSearch,
|
|
8462
|
+
showSearch = false,
|
|
8265
8463
|
tagProps = {},
|
|
8266
8464
|
placeholder,
|
|
8267
8465
|
onSearch,
|
|
@@ -8473,22 +8671,18 @@ function SearchSelect(props) {
|
|
|
8473
8671
|
maxWidth: 'none'
|
|
8474
8672
|
}, style),
|
|
8475
8673
|
children: isMultiple ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
8476
|
-
className: prefixCls + "-inner",
|
|
8674
|
+
className: [prefixCls + "-inner", prefixCls + "-search-" + showSearch, prefixCls + "-" + size].filter(Boolean).join(' ').trim(),
|
|
8477
8675
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
flexFlow: 'wrap',
|
|
8481
|
-
width: '100%'
|
|
8482
|
-
},
|
|
8676
|
+
className: prefixCls + "-tag-content",
|
|
8677
|
+
style: {},
|
|
8483
8678
|
children: [isMultiple && selectedValue.slice(0, maxTagCount).map((item, index) => {
|
|
8484
8679
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, _extends({
|
|
8485
8680
|
style: _extends({
|
|
8486
|
-
height:
|
|
8681
|
+
height: TagSize[size],
|
|
8487
8682
|
margin: 1,
|
|
8488
8683
|
display: 'flex',
|
|
8489
8684
|
alignItems: 'center'
|
|
8490
8685
|
}, tagProps.style),
|
|
8491
|
-
className: prefixCls + "-tag",
|
|
8492
8686
|
color: "#393E48"
|
|
8493
8687
|
}, tagProps, {
|
|
8494
8688
|
closable: true,
|
|
@@ -8510,7 +8704,8 @@ function SearchSelect(props) {
|
|
|
8510
8704
|
children: ["+", omitTagCount, " \u2026", ' ']
|
|
8511
8705
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
|
|
8512
8706
|
style: {
|
|
8513
|
-
flex: 1
|
|
8707
|
+
flex: 1,
|
|
8708
|
+
width: showSearch ? 0 : 50
|
|
8514
8709
|
},
|
|
8515
8710
|
className: prefixCls + "-input-contents",
|
|
8516
8711
|
readOnly: !showSearch,
|
|
@@ -8529,6 +8724,7 @@ function SearchSelect(props) {
|
|
|
8529
8724
|
onClick: resetSelectedValue
|
|
8530
8725
|
})]
|
|
8531
8726
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
|
|
8727
|
+
className: prefixCls + "-search-" + showSearch,
|
|
8532
8728
|
readOnly: !showSearch,
|
|
8533
8729
|
size: size,
|
|
8534
8730
|
ref: inputRef,
|
|
@@ -9716,9 +9912,9 @@ function TableTr(props) {
|
|
|
9716
9912
|
|
|
9717
9913
|
if (keyName.fixed) {
|
|
9718
9914
|
if (keyName.fixed === 'right') {
|
|
9719
|
-
objs.className =
|
|
9915
|
+
objs.className = prefixCls + "-fixed-right";
|
|
9720
9916
|
} else {
|
|
9721
|
-
objs.className =
|
|
9917
|
+
objs.className = prefixCls + "-fixed-true";
|
|
9722
9918
|
}
|
|
9723
9919
|
}
|
|
9724
9920
|
|
|
@@ -9729,7 +9925,7 @@ function TableTr(props) {
|
|
|
9729
9925
|
children: objs.children
|
|
9730
9926
|
}),
|
|
9731
9927
|
key: colNum,
|
|
9732
|
-
className: prefixCls +
|
|
9928
|
+
className: [prefixCls + '-tr-children-' + (keyName.align || 'left'), keyName.className, objs.className].filter(it => it).join(' ').trim(),
|
|
9733
9929
|
onClick: evn => onCell(trData, {
|
|
9734
9930
|
rowNum,
|
|
9735
9931
|
colNum,
|
|
@@ -9804,54 +10000,55 @@ function Table(props) {
|
|
|
9804
10000
|
}
|
|
9805
10001
|
};
|
|
9806
10002
|
|
|
9807
|
-
var deepClumnsLocation = (params, fistIndex
|
|
10003
|
+
var deepClumnsLocation = (params, fistIndex) => {
|
|
9808
10004
|
var initialValue = 0,
|
|
9809
|
-
|
|
10005
|
+
headerIndex = 0,
|
|
9810
10006
|
deepParams = [];
|
|
9811
|
-
params.forEach(() => {
|
|
9812
|
-
var
|
|
9813
|
-
var i = "" + fistIndex + abs;
|
|
10007
|
+
params.forEach((_, index) => {
|
|
10008
|
+
var i = "" + fistIndex + headerIndex;
|
|
9814
10009
|
|
|
9815
|
-
if (
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
lastIndex -= 1;
|
|
9819
|
-
}
|
|
9820
|
-
|
|
9821
|
-
if (typeof params[abs] === 'number') {
|
|
9822
|
-
initialValue = params[abs] + initialValue;
|
|
9823
|
-
deepParams.push(params[abs]);
|
|
10010
|
+
if (typeof params[index] === 'number') {
|
|
10011
|
+
initialValue = params[index] + initialValue;
|
|
10012
|
+
deepParams.push(params[index]);
|
|
9824
10013
|
return;
|
|
9825
10014
|
}
|
|
9826
10015
|
|
|
9827
10016
|
if (finalLocationWidth.current[i]) {
|
|
9828
|
-
finalLocationWidth.current[i]
|
|
10017
|
+
finalLocationWidth.current[i].left = initialValue;
|
|
9829
10018
|
initialValue = finalLocationWidth.current[i].width + initialValue;
|
|
10019
|
+
|
|
10020
|
+
if (Array.isArray(params[index].children)) {
|
|
10021
|
+
deepParams.push(...params[index].children);
|
|
10022
|
+
} else {
|
|
10023
|
+
deepParams.push(finalLocationWidth.current[i].width);
|
|
10024
|
+
}
|
|
9830
10025
|
}
|
|
9831
10026
|
|
|
9832
|
-
|
|
9833
|
-
|
|
9834
|
-
|
|
10027
|
+
headerIndex += 1;
|
|
10028
|
+
});
|
|
10029
|
+
initialValue = 0, headerIndex = header[fistIndex].length - 1;
|
|
10030
|
+
|
|
10031
|
+
for (var _index = params.length - 1; _index >= 0; _index--) {
|
|
10032
|
+
var i = "" + fistIndex + headerIndex;
|
|
10033
|
+
|
|
10034
|
+
if (typeof params[_index] === 'number') {
|
|
10035
|
+
initialValue = params[_index] + initialValue;
|
|
10036
|
+
continue;
|
|
9835
10037
|
}
|
|
9836
10038
|
|
|
9837
10039
|
if (finalLocationWidth.current[i]) {
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
var parent = header.find(it => it.find(it => it.key === params[abs].key)) || [];
|
|
9841
|
-
var sub = parent.findIndex(it => it.key === params[abs].key);
|
|
9842
|
-
|
|
9843
|
-
if (finalLocationWidth.current["" + i[0] + sub]) {
|
|
9844
|
-
// 合并单元格
|
|
9845
|
-
deepParams.push(finalLocationWidth.current["" + i[0] + sub].width);
|
|
9846
|
-
}
|
|
10040
|
+
finalLocationWidth.current[i].right = initialValue;
|
|
10041
|
+
initialValue = finalLocationWidth.current[i].width + initialValue;
|
|
9847
10042
|
}
|
|
9848
|
-
|
|
9849
|
-
|
|
10043
|
+
|
|
10044
|
+
headerIndex -= 1;
|
|
10045
|
+
}
|
|
10046
|
+
|
|
10047
|
+
if (deepParams.filter(it => typeof it !== 'number').length) deepClumnsLocation(deepParams, fistIndex + 1);
|
|
9850
10048
|
};
|
|
9851
10049
|
|
|
9852
10050
|
var computed = () => {
|
|
9853
|
-
deepClumnsLocation(columns, 0
|
|
9854
|
-
deepClumnsLocation(columns, 0, 'right', false);
|
|
10051
|
+
deepClumnsLocation(columns, 0);
|
|
9855
10052
|
return finalLocationWidth.current;
|
|
9856
10053
|
};
|
|
9857
10054
|
|
|
@@ -10772,6 +10969,11 @@ function TreeChecked(_ref) {
|
|
|
10772
10969
|
|
|
10773
10970
|
|
|
10774
10971
|
|
|
10972
|
+
var SearchTagInput_TagSize = {
|
|
10973
|
+
large: 25,
|
|
10974
|
+
default: 20,
|
|
10975
|
+
small: 17
|
|
10976
|
+
};
|
|
10775
10977
|
|
|
10776
10978
|
function SearchTagInput(props) {
|
|
10777
10979
|
var {
|
|
@@ -10784,6 +10986,7 @@ function SearchTagInput(props) {
|
|
|
10784
10986
|
className,
|
|
10785
10987
|
style,
|
|
10786
10988
|
placeholder,
|
|
10989
|
+
tagProps = {},
|
|
10787
10990
|
content,
|
|
10788
10991
|
options,
|
|
10789
10992
|
values,
|
|
@@ -10904,11 +11107,11 @@ function SearchTagInput(props) {
|
|
|
10904
11107
|
return (_inputRef$current2 = inputRef.current) == null ? void 0 : _inputRef$current2.focus();
|
|
10905
11108
|
},
|
|
10906
11109
|
style: _extends({
|
|
10907
|
-
minWidth: 200,
|
|
11110
|
+
minWidth: (style == null ? void 0 : style.width) || 200,
|
|
10908
11111
|
maxWidth: 'none'
|
|
10909
11112
|
}, style),
|
|
10910
11113
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
10911
|
-
className: prefixCls + "-inner",
|
|
11114
|
+
className: [prefixCls + "-inner", prefixCls + "-" + size].filter(Boolean).join(' ').trim(),
|
|
10912
11115
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
10913
11116
|
style: {
|
|
10914
11117
|
display: 'flex',
|
|
@@ -10916,26 +11119,26 @@ function SearchTagInput(props) {
|
|
|
10916
11119
|
width: '100%'
|
|
10917
11120
|
},
|
|
10918
11121
|
children: [selectedOption.map((item, index) => {
|
|
10919
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, {
|
|
11122
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, _extends({
|
|
10920
11123
|
style: {
|
|
10921
|
-
height:
|
|
11124
|
+
height: SearchTagInput_TagSize[size],
|
|
10922
11125
|
margin: 1,
|
|
10923
11126
|
display: 'flex',
|
|
10924
11127
|
alignItems: 'center'
|
|
10925
11128
|
},
|
|
10926
11129
|
className: prefixCls + "-tag",
|
|
10927
11130
|
closable: true,
|
|
11131
|
+
color: "#393E48"
|
|
11132
|
+
}, tagProps, {
|
|
10928
11133
|
disabled: disabled,
|
|
10929
|
-
color: "#393E48",
|
|
10930
11134
|
onClose: e => {
|
|
10931
11135
|
e.stopPropagation();
|
|
10932
11136
|
removeSelectItem(index);
|
|
10933
11137
|
},
|
|
10934
11138
|
children: item.label
|
|
10935
|
-
}, index);
|
|
11139
|
+
}), index);
|
|
10936
11140
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
|
|
10937
11141
|
ref: inputRef,
|
|
10938
|
-
style: {},
|
|
10939
11142
|
className: prefixCls + "-input-contents",
|
|
10940
11143
|
size: size,
|
|
10941
11144
|
disabled: disabled,
|