uiw 4.14.2 → 4.16.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.js CHANGED
@@ -321,6 +321,8 @@ __webpack_require__.d(__webpack_exports__, {
321
321
  "ButtonGroup": () => (/* reexport */ react_button_group_esm),
322
322
  "Calendar": () => (/* reexport */ Calendar),
323
323
  "Card": () => (/* reexport */ react_card_esm),
324
+ "Carousel": () => (/* reexport */ react_carousel_esm),
325
+ "Cascader": () => (/* reexport */ react_cascader_esm),
324
326
  "Checkbox": () => (/* reexport */ react_checkbox_esm),
325
327
  "CheckboxGroup": () => (/* reexport */ CheckboxGroup),
326
328
  "Col": () => (/* reexport */ Col),
@@ -3092,6 +3094,10 @@ class Popover extends (external_root_React_commonjs2_react_commonjs_react_amd_re
3092
3094
  })]
3093
3095
  }),
3094
3096
  children: typeof this.props.children === 'object' && this.props.children.type.name !== 'Icon' ? this.props.children : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
3097
+ style: {
3098
+ display: 'block',
3099
+ writingMode: 'vertical-rl'
3100
+ },
3095
3101
  children: this.props.children
3096
3102
  })
3097
3103
  }));
@@ -4021,201 +4027,824 @@ var react_card_esm_excluded = ["prefixCls", "className", "title", "extra", "foot
4021
4027
  }));
4022
4028
  }));
4023
4029
 
4024
- ;// CONCATENATED MODULE: ../react-radio/esm/RadioAbstract.js
4030
+ ;// CONCATENATED MODULE: ../react-carousel/esm/style/index.css
4031
+ // extracted by mini-css-extract-plugin
4032
+ /* harmony default export */ const react_carousel_esm_style = ({});
4033
+ ;// CONCATENATED MODULE: ../react-carousel/esm/index.js
4025
4034
 
4026
4035
 
4027
- var RadioAbstract_excluded = ["prefixCls", "type", "disabled", "value", "className", "style", "children", "size", "checked", "onChange"];
4028
4036
 
4029
4037
 
4030
4038
 
4031
- var RadioAbstract = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4039
+
4040
+ function Carousel(props, ref) {
4032
4041
  var {
4033
- prefixCls = 'w-radio',
4034
- type = 'radio',
4035
- disabled = false,
4036
- value = '',
4042
+ position = 0,
4043
+ direction = 'horizontal',
4044
+ width = 400,
4045
+ height = 200,
4046
+ palyTime = 2000,
4047
+ scrollTime = 200,
4048
+ autoPlay = true,
4049
+ afterChange,
4050
+ beforeChange,
4051
+ prefixCls = 'w-carousel',
4037
4052
  className,
4038
- style,
4039
- children,
4040
- size,
4041
- checked: prChecked = false,
4042
- onChange
4043
- } = props,
4044
- other = _objectWithoutPropertiesLoose(props, RadioAbstract_excluded);
4045
-
4046
- var [checked, setChecked] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(prChecked);
4047
- var [prevChecked, setPrevChecked] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)();
4053
+ style
4054
+ } = props;
4055
+ var cls = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => [prefixCls, className].filter(Boolean).join(' ').trim(), [prefixCls, className]);
4056
+ var [currentPosition, currentPositionSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(position);
4057
+ var [transitionInner, transitionInnerSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(scrollTime * 0.001 + "s ease-in-out");
4058
+ var positionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(currentPosition);
4059
+ var childCount = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.count(props.children) + 1;
4060
+
4061
+ var _stopPlay = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
4062
+ stop: () => {},
4063
+ after: afterChange,
4064
+ before: beforeChange
4065
+ });
4048
4066
 
4049
- if (prChecked !== prevChecked) {
4050
- setPrevChecked(prChecked);
4051
- }
4067
+ external_root_React_commonjs2_react_commonjs_react_amd_react_default().useImperativeHandle(ref, () => ({
4068
+ gotoSlide,
4069
+ prevSlide: () => gotoSlide(positionRef.current - 1),
4070
+ nextSlide: () => gotoSlide(positionRef.current + 1),
4071
+ stopPlay: () => _stopPlay.current.stop()
4072
+ }), [ref]);
4073
+
4074
+ var gotoSlide = slidNumber => {
4075
+ _stopPlay.current.stop();
4076
+
4077
+ var maxSlid = childCount - 1;
4078
+ var slidNumberTemp = slidNumber > maxSlid ? maxSlid : slidNumber;
4079
+ slidNumberTemp = slidNumber < 0 ? 0 : slidNumberTemp;
4080
+ positionRef.current = slidNumberTemp;
4081
+ currentPositionSet(slidNumberTemp);
4082
+ play();
4083
+ };
4052
4084
 
4053
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
4054
- if (prChecked !== prevChecked) {
4055
- setChecked(prChecked);
4085
+ var play = function play(ms) {
4086
+ if (ms === void 0) {
4087
+ ms = palyTime;
4056
4088
  }
4057
- }, [prevChecked]);
4058
- var cls = [prefixCls, className, disabled ? 'disabled' : null, size ? prefixCls + "-" + size : null].filter(Boolean).join(' ').trim();
4059
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
4060
- if (checked !== props.checked) {
4061
- setChecked(!!props.checked);
4089
+
4090
+ if (autoPlay) {
4091
+ var time = setInterval(() => {
4092
+ _stopPlay.current.after == null ? void 0 : _stopPlay.current.after(positionRef.current);
4093
+ positionRef.current++;
4094
+
4095
+ if (positionRef.current >= childCount) {
4096
+ positionRef.current = 0;
4097
+ }
4098
+
4099
+ currentPositionSet(positionRef.current);
4100
+ _stopPlay.current.before == null ? void 0 : _stopPlay.current.before(positionRef.current);
4101
+ }, ms);
4102
+
4103
+ _stopPlay.current.stop = () => {
4104
+ clearInterval(time);
4105
+ };
4062
4106
  }
4063
- }, [props.checked]);
4107
+ };
4064
4108
 
4065
- function handleChange(e) {
4066
- e.persist();
4067
- setChecked(e.target.checked);
4068
- onChange && onChange(e);
4069
- }
4109
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
4110
+ play();
4111
+ return () => {
4112
+ _stopPlay.current.stop();
4113
+ };
4114
+ }, [autoPlay]);
4115
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
4116
+ var time;
4070
4117
 
4071
- var label = children || value;
4072
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("label", {
4073
- className: cls,
4074
- style,
4075
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("input", _extends({}, _extends({}, other, {
4076
- type,
4077
- disabled,
4078
- value
4079
- }), {
4080
- checked: checked,
4081
- onChange: handleChange,
4082
- ref: ref
4083
- })), label && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4084
- className: prefixCls + "-text",
4085
- children: label
4086
- })]
4118
+ if (childCount === currentPosition + 1) {
4119
+ time = setTimeout(() => {
4120
+ _stopPlay.current.before = () => {
4121
+ transitionInnerSet(scrollTime * 0.001 + "s ease-in-out");
4122
+ _stopPlay.current.before = props.beforeChange;
4123
+ };
4124
+
4125
+ transitionInnerSet('none');
4126
+ gotoSlide(0);
4127
+ }, scrollTime);
4128
+ }
4129
+
4130
+ return () => {
4131
+ clearTimeout(time);
4132
+ };
4133
+ }, [currentPosition]);
4134
+ var childrens = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(props.children, child => {
4135
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4136
+ style: _extends({
4137
+ width,
4138
+ height
4139
+ }, style),
4140
+ children: child
4141
+ });
4087
4142
  });
4088
- });
4143
+ var innerStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
4144
+ var style = {
4145
+ transform: '',
4146
+ display: ''
4147
+ };
4089
4148
 
4090
- ;// CONCATENATED MODULE: ../react-radio/esm/style/index.css
4091
- // extracted by mini-css-extract-plugin
4092
- /* harmony default export */ const react_radio_esm_style = ({});
4093
- ;// CONCATENATED MODULE: ../react-radio/esm/Radio.js
4149
+ switch (direction) {
4150
+ case 'horizontal':
4151
+ style.transform = "translate3d(" + -(currentPosition * width) + "px, 0px, 0px)";
4152
+ style.display = 'flex';
4153
+ break;
4094
4154
 
4155
+ case 'vertical':
4156
+ style.transform = "translate3d(0px, " + -(currentPosition * height) + "px, 0px)";
4157
+ style.display = 'block';
4158
+ break;
4095
4159
 
4160
+ default:
4161
+ break;
4162
+ }
4096
4163
 
4164
+ return style;
4165
+ }, [direction, currentPosition, width, height]);
4166
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4167
+ className: cls,
4168
+ style: {
4169
+ width,
4170
+ height
4171
+ },
4172
+ children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
4173
+ className: cls + "-content",
4174
+ style: _extends({
4175
+ width: width * childCount,
4176
+ transition: transitionInner
4177
+ }, innerStyle),
4178
+ children: [childrens, /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4179
+ style: _extends({
4180
+ width,
4181
+ height
4182
+ }, style),
4183
+ children: childrens == null ? void 0 : childrens[0]
4184
+ })]
4185
+ })
4186
+ });
4187
+ }
4097
4188
 
4189
+ /* harmony default export */ const react_carousel_esm = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Carousel));
4098
4190
 
4099
- /* harmony default export */ const Radio = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4100
- return /*#__PURE__*/(0,jsx_runtime.jsx)(RadioAbstract, _extends({
4101
- ref: ref
4102
- }, props));
4103
- }));
4191
+ ;// CONCATENATED MODULE: ../react-dropdown/esm/index.js
4104
4192
 
4105
- ;// CONCATENATED MODULE: ../react-radio/esm/style/group.css
4106
- // extracted by mini-css-extract-plugin
4107
- /* harmony default export */ const group = ({});
4108
- ;// CONCATENATED MODULE: ../react-radio/esm/RadioGroup.js
4109
4193
 
4194
+ var react_dropdown_esm_excluded = ["prefixCls", "placement", "className", "menu", "children", "disabled"];
4110
4195
 
4111
- var RadioGroup_excluded = ["prefixCls", "className", "name", "value", "onChange", "children"];
4112
4196
 
4113
4197
 
4114
4198
 
4115
- /* harmony default export */ const RadioGroup = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4199
+ function Dropdown(props) {
4116
4200
  var {
4117
- prefixCls = 'w-radio-group',
4201
+ prefixCls = 'w-dropdown',
4202
+ placement = 'bottomLeft',
4118
4203
  className,
4119
- name,
4120
- value,
4121
- onChange,
4122
- children
4204
+ menu,
4205
+ children,
4206
+ disabled
4123
4207
  } = props,
4124
- other = _objectWithoutPropertiesLoose(props, RadioGroup_excluded);
4208
+ other = _objectWithoutPropertiesLoose(props, react_dropdown_esm_excluded);
4125
4209
 
4126
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({}, other, {
4127
- ref: ref,
4128
- className: [prefixCls, className].filter(Boolean).join(' ').trim(),
4129
- children: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.toArray(children).map(child => {
4130
- if (!child) return;
4131
- if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) return child;
4132
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, _extends({}, child.props || {}, {
4133
- checked: child.props.value === value,
4134
- name,
4135
- onChange
4136
- }));
4137
- })
4210
+ var cls = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => [prefixCls, className].filter(Boolean).join(' ').trim(), [prefixCls, className]);
4211
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(react_overlay_trigger_esm, _extends({
4212
+ isOutside: true,
4213
+ autoAdjustOverflow: true,
4214
+ className: cls,
4215
+ disabled: disabled,
4216
+ placement: placement
4217
+ }, other, {
4218
+ overlay: menu,
4219
+ children: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props))
4138
4220
  }));
4139
- }));
4140
-
4141
- ;// CONCATENATED MODULE: ../react-radio/esm/index.js
4142
-
4143
-
4221
+ }
4144
4222
 
4223
+ ;// CONCATENATED MODULE: ../react-menu/esm/style/item.css
4224
+ // extracted by mini-css-extract-plugin
4225
+ /* harmony default export */ const style_item = ({});
4226
+ ;// CONCATENATED MODULE: ../react-menu/esm/MenuItem.js
4145
4227
 
4146
4228
 
4229
+ var MenuItem_excluded = ["prefixCls", "className", "tagName", "children", "disabled", "multiline", "icon", "text", "active", "addonAfter", "isSubMenuItem"];
4147
4230
 
4148
- ;// CONCATENATED MODULE: ../react-checkbox/esm/style/group.css
4149
- // extracted by mini-css-extract-plugin
4150
- /* harmony default export */ const style_group = ({});
4151
- ;// CONCATENATED MODULE: ../react-checkbox/esm/Group.js
4152
4231
 
4153
4232
 
4154
- var Group_excluded = ["prefixCls", "className", "name", "value", "onChange"];
4155
4233
 
4156
4234
 
4235
+ var disabledProps = {
4236
+ href: undefined,
4237
+ onClick: undefined,
4238
+ onMouseDown: undefined,
4239
+ onMouseEnter: undefined,
4240
+ onMouseLeave: undefined,
4241
+ tabIndex: -1
4242
+ };
4157
4243
 
4158
- var CheckboxGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4244
+ function Internal(props, ref) {
4159
4245
  var {
4160
- prefixCls = 'w-checkbox-group',
4246
+ prefixCls = 'w-menu-item',
4161
4247
  className,
4162
- name,
4163
- value,
4164
- onChange: _onChange
4248
+ tagName: TagName = 'a',
4249
+ disabled = false,
4250
+ multiline = false,
4251
+ icon,
4252
+ text,
4253
+ active = false,
4254
+ addonAfter,
4255
+ isSubMenuItem
4165
4256
  } = props,
4166
- other = _objectWithoutPropertiesLoose(props, Group_excluded);
4167
-
4168
- var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
4169
- var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
4170
- var childs = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.toArray(props.children);
4171
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => valueRef.current = value || [], [value]);
4172
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({}, other, {
4173
- className: cls,
4174
- ref: ref,
4175
- children: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(childs, element => {
4176
- if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(element)) return;
4177
-
4178
- if (Array.isArray(value) && element && element.props && element.props.value && value.includes(element.props.value)) {
4179
- if (!valueRef.current.includes(element.props.value)) {
4180
- valueRef.current.push(element.props.value);
4181
- }
4182
- }
4183
-
4184
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(element, Object.assign({}, element.props, {
4185
- name,
4186
- checked: valueRef.current.includes(element.props.value),
4187
- onChange: e => {
4188
- if (e.target.type && e.target.type !== 'checkbox') return;
4189
- var checked = e.target.checked;
4190
- var include = valueRef.current.includes(element.props.value);
4191
-
4192
- if (!include && checked) {
4193
- valueRef.current.push(element.props.value);
4194
- } else if (include && !checked) {
4195
- valueRef.current = valueRef.current.filter(val => val !== element.props.value);
4196
- }
4257
+ htmlProps = _objectWithoutPropertiesLoose(props, MenuItem_excluded);
4197
4258
 
4198
- _onChange && _onChange(e, valueRef.current);
4199
- }
4200
- }));
4201
- })
4259
+ var anchorCls = [prefixCls, active ? 'active' : null, disabled ? 'w-disabled' : null, className].filter(Boolean).join(' ').trim();
4260
+ var tagComp = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TagName, _extends({}, htmlProps, disabled ? disabledProps : {}, {
4261
+ className: anchorCls,
4262
+ ref
4263
+ }), /*#__PURE__*/(0,jsx_runtime.jsxs)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
4264
+ children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
4265
+ className: prefixCls + "-icon",
4266
+ type: icon
4267
+ }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4268
+ className: [prefixCls && prefixCls + "-text", !multiline && prefixCls + "-multiline"].filter(Boolean).join(' ').trim(),
4269
+ children: text
4270
+ }), addonAfter]
4202
4271
  }));
4203
- });
4204
-
4205
- ;// CONCATENATED MODULE: ../react-checkbox/esm/style/index.css
4206
- // extracted by mini-css-extract-plugin
4207
- /* harmony default export */ const react_checkbox_esm_style = ({});
4208
- ;// CONCATENATED MODULE: ../react-checkbox/esm/Checkbox.js
4209
4272
 
4273
+ if (isSubMenuItem) {
4274
+ return tagComp;
4275
+ }
4210
4276
 
4211
- var Checkbox_excluded = ["className", "prefixCls", "type", "indeterminate", "disabled", "value"];
4277
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
4278
+ children: [" ", tagComp, " "]
4279
+ });
4280
+ }
4212
4281
 
4282
+ var MenuItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Internal);
4283
+ MenuItem.displayName = 'uiw.MenuItem';
4213
4284
 
4285
+ ;// CONCATENATED MODULE: ../react-menu/esm/Divider.js
4214
4286
 
4215
4287
 
4288
+ var Divider_excluded = ["prefixCls", "className", "title"];
4216
4289
 
4217
4290
 
4218
- function InternalCheckbox(props, ref) {
4291
+ var MenuDivider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4292
+ var {
4293
+ prefixCls = 'w-menu-divider',
4294
+ className,
4295
+ title
4296
+ } = props,
4297
+ htmlProps = _objectWithoutPropertiesLoose(props, Divider_excluded);
4298
+
4299
+ var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
4300
+
4301
+ if (!title) {
4302
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("li", _extends({}, htmlProps, {
4303
+ ref: ref,
4304
+ className: cls
4305
+ }));
4306
+ }
4307
+
4308
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("li", _extends({}, htmlProps, {
4309
+ ref: ref,
4310
+ className: cls,
4311
+ "data-menu": "divider",
4312
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
4313
+ children: title
4314
+ })
4315
+ }));
4316
+ });
4317
+ MenuDivider.displayName = 'uiw.MenuDivider';
4318
+
4319
+ ;// CONCATENATED MODULE: ../react-menu/esm/style/submenu.css
4320
+ // extracted by mini-css-extract-plugin
4321
+ /* harmony default export */ const submenu = ({});
4322
+ ;// CONCATENATED MODULE: ../react-menu/esm/SubMenu.js
4323
+
4324
+
4325
+ var SubMenu_excluded = ["prefixCls", "className", "disabled", "overlayProps", "children", "collapse", "inlineIndent", "inlineCollapsed"];
4326
+
4327
+
4328
+
4329
+
4330
+
4331
+
4332
+
4333
+
4334
+ function checkedMenuItem(node) {
4335
+ var isCheck = false;
4336
+
4337
+ if (node) {
4338
+ // eslint-disable-next-line
4339
+ do {
4340
+ if (!node.dataset.menu) {
4341
+ isCheck = true;
4342
+ }
4343
+
4344
+ if (node.dataset.menu && /^(subitem|divider)$/.test(node.dataset.menu)) {
4345
+ isCheck = false;
4346
+ }
4347
+ } while (!node.dataset.menu && (node = node.parentNode));
4348
+ }
4349
+
4350
+ return isCheck;
4351
+ }
4352
+
4353
+ function IconView(_ref) {
4354
+ var {
4355
+ prefixCls,
4356
+ collapse,
4357
+ isOpen
4358
+ } = _ref;
4359
+ return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
4360
+ type: "caret-right",
4361
+ className: [prefixCls ? prefixCls + "-collapse-icon" : null, !collapse && isOpen ? 'w-open' : null, !collapse && !isOpen ? 'w-close' : null].filter(Boolean).join(' ').trim()
4362
+ }), [prefixCls, collapse, isOpen]);
4363
+ }
4364
+
4365
+ var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
4366
+ var {
4367
+ prefixCls = 'w-menu-subitem',
4368
+ className,
4369
+ disabled,
4370
+ overlayProps = {},
4371
+ children,
4372
+ collapse = false,
4373
+ inlineIndent
4374
+ } = props,
4375
+ other = _objectWithoutPropertiesLoose(props, SubMenu_excluded);
4376
+
4377
+ var overlayTriggerProps = {};
4378
+ var menuProps = {
4379
+ bordered: true,
4380
+ children,
4381
+ inlineIndent,
4382
+ className: [prefixCls ? prefixCls + "-overlay" : null].filter(Boolean).join(' ').trim()
4383
+ };
4384
+ var popupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
4385
+ var [isOpen, setIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
4386
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
4387
+ setIsOpen(false);
4388
+ }, [collapse]);
4389
+
4390
+ function onClick(e) {
4391
+ var target = e.currentTarget;
4392
+ var related = e.relatedTarget || e.nativeEvent.target;
4393
+ if (target.children.length < 1) return;
4394
+
4395
+ if (checkedMenuItem(related)) {
4396
+ if (popupRef.current) {
4397
+ popupRef.current.hide();
4398
+ }
4399
+ }
4400
+ }
4401
+
4402
+ function onExit(node) {
4403
+ node.style.height = node.scrollHeight + "px";
4404
+ setIsOpen(false);
4405
+ }
4406
+
4407
+ function onExiting(node) {
4408
+ node.style.height = '0px';
4409
+ }
4410
+
4411
+ function onEnter(node) {
4412
+ node.style.height = '1px';
4413
+ setIsOpen(true);
4414
+ }
4415
+
4416
+ function onEntering(node) {
4417
+ node.style.height = node.scrollHeight + "px";
4418
+ }
4419
+
4420
+ function onEntered(node) {
4421
+ node.style.height = 'initial';
4422
+ }
4423
+
4424
+ if (!collapse) {
4425
+ delete menuProps.onClick;
4426
+ menuProps.bordered = false;
4427
+ overlayTriggerProps.className = prefixCls + "-collapse";
4428
+ overlayTriggerProps.appear = false;
4429
+ overlayTriggerProps.isOutside = true;
4430
+ overlayTriggerProps.isClickOutside = false;
4431
+ overlayTriggerProps.unmountOnExit = false;
4432
+ overlayTriggerProps.trigger = 'click';
4433
+ overlayTriggerProps.transitionName = "" + prefixCls;
4434
+ overlayTriggerProps.onExit = onExit;
4435
+ overlayTriggerProps.onExiting = onExiting;
4436
+ overlayTriggerProps.onEnter = onEnter;
4437
+ overlayTriggerProps.onEntered = onEntered;
4438
+ overlayTriggerProps.onEntering = onEntering;
4439
+ } else {
4440
+ overlayTriggerProps.className = prefixCls + "-popup";
4441
+ overlayTriggerProps.trigger = 'hover';
4442
+ overlayTriggerProps.usePortal = true;
4443
+ menuProps.onClick = onClick;
4444
+ }
4445
+
4446
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
4447
+ "data-menu": "subitem",
4448
+ ref: ref,
4449
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_overlay_trigger_esm, _extends({
4450
+ placement: "rightTop",
4451
+ autoAdjustOverflow: true,
4452
+ disabled: disabled,
4453
+ isOpen: isOpen,
4454
+ usePortal: false,
4455
+ isOutside: true
4456
+ }, overlayTriggerProps, overlayProps, {
4457
+ ref: popupRef,
4458
+ overlay: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_Menu, _extends({}, menuProps, {
4459
+ style: !collapse ? {
4460
+ paddingLeft: inlineIndent
4461
+ } : {}
4462
+ })),
4463
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem, _extends({}, other, {
4464
+ ref: null,
4465
+ disabled: disabled,
4466
+ isSubMenuItem: true,
4467
+ addonAfter: /*#__PURE__*/(0,jsx_runtime.jsx)(IconView, {
4468
+ collapse: collapse,
4469
+ prefixCls: prefixCls,
4470
+ isOpen: isOpen
4471
+ }),
4472
+ className: [prefixCls ? prefixCls + "-title" : null, !collapse ? prefixCls + "-collapse-title" : null, className].filter(Boolean).join(' ').trim()
4473
+ }))
4474
+ }))
4475
+ });
4476
+ });
4477
+ SubMenu.displayName = 'uiw.SubMenu';
4478
+
4479
+ ;// CONCATENATED MODULE: ../react-menu/esm/style/menu.css
4480
+ // extracted by mini-css-extract-plugin
4481
+ /* harmony default export */ const menu = ({});
4482
+ ;// CONCATENATED MODULE: ../react-menu/esm/Menu.js
4483
+
4484
+
4485
+ var Menu_excluded = ["prefixCls", "className", "children", "bordered", "theme", "inlineIndent", "inlineCollapsed"];
4486
+
4487
+
4488
+
4489
+
4490
+
4491
+
4492
+ var Menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4493
+ var {
4494
+ prefixCls = 'w-menu',
4495
+ className,
4496
+ children,
4497
+ bordered,
4498
+ theme = 'light',
4499
+ inlineIndent = 10,
4500
+ inlineCollapsed
4501
+ } = props,
4502
+ htmlProps = _objectWithoutPropertiesLoose(props, Menu_excluded);
4503
+
4504
+ var cls = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => [prefixCls, bordered ? 'w-bordered' : null, inlineCollapsed ? prefixCls + "-inline-collapsed" : null, theme ? prefixCls + "-" + theme : null, className].filter(Boolean).join(' ').trim(), [prefixCls, bordered, inlineCollapsed, theme, className]);
4505
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", _extends({}, htmlProps, {
4506
+ ref: ref,
4507
+ className: cls,
4508
+ "data-menu": "menu",
4509
+ children: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, (child, key) => {
4510
+ if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) return child;
4511
+ var props = {}; // Sub Menu
4512
+
4513
+ if (child.props.children && child.type === SubMenu) {
4514
+ props.inlineIndent = inlineIndent;
4515
+ }
4516
+
4517
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, Object.assign(_extends({}, props), child.props, {
4518
+ key: "" + key
4519
+ }));
4520
+ })
4521
+ }));
4522
+ });
4523
+ Menu.displayName = 'uiw.Menu';
4524
+ Menu.Item = MenuItem;
4525
+ Menu.SubMenu = SubMenu;
4526
+ Menu.Divider = MenuDivider;
4527
+ /* harmony default export */ const esm_Menu = (Menu);
4528
+
4529
+ ;// CONCATENATED MODULE: ../react-menu/esm/index.js
4530
+
4531
+
4532
+
4533
+
4534
+
4535
+ /* harmony default export */ const react_menu_esm = (esm_Menu);
4536
+
4537
+ ;// CONCATENATED MODULE: ../react-cascader/esm/index.js
4538
+
4539
+
4540
+
4541
+
4542
+
4543
+
4544
+
4545
+
4546
+ function Cascader(props) {
4547
+ var {
4548
+ placeholder,
4549
+ prefixCls = 'w-search-select',
4550
+ className,
4551
+ style = {
4552
+ width: 200
4553
+ },
4554
+ option = [],
4555
+ others
4556
+ } = props;
4557
+ var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
4558
+ var [innerIsOpen, setInnerIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
4559
+ var [selectedValue, setSelectedValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
4560
+
4561
+ function onVisibleChange(isOpen) {
4562
+ setInnerIsOpen(isOpen);
4563
+ }
4564
+
4565
+ var handleItemClick = (optionsItem, level) => {
4566
+ selectedValue.splice(level, selectedValue.length - level, optionsItem);
4567
+ setSelectedValue([...selectedValue]);
4568
+ handelChange();
4569
+ };
4570
+
4571
+ var handelChange = () => {
4572
+ var value = selectedValue.map(item => item.value);
4573
+ props.onChange == null ? void 0 : props.onChange(value, selectedValue);
4574
+ };
4575
+
4576
+ var widths = (style == null ? void 0 : style.width) * 0.6 || undefined;
4577
+
4578
+ var OptionIter = function OptionIter(option, level) {
4579
+ if (level === void 0) {
4580
+ level = 0;
4581
+ }
4582
+
4583
+ if (!option) return;
4584
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm, {
4585
+ bordered: true,
4586
+ style: {
4587
+ minHeight: 25,
4588
+ minWidth: widths,
4589
+ overflowY: 'scroll',
4590
+ width: widths
4591
+ },
4592
+ children: !option || option.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4593
+ style: {
4594
+ color: '#c7c7c7',
4595
+ fontSize: 12
4596
+ },
4597
+ children: '没有数据'
4598
+ }) : option.map((item, index) => {
4599
+ var _selectedValue$level;
4600
+
4601
+ var active = ((_selectedValue$level = selectedValue[level]) == null ? void 0 : _selectedValue$level.value) === item.value;
4602
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm.Item, {
4603
+ active: active,
4604
+ text: item.label,
4605
+ addonAfter: item.children ? /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
4606
+ type: "right"
4607
+ }) : undefined,
4608
+ onClick: () => handleItemClick(item, level)
4609
+ }, index);
4610
+ })
4611
+ }, level);
4612
+ };
4613
+
4614
+ var inputValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
4615
+ return selectedValue.map(item => item.label).join(' / ');
4616
+ }, [selectedValue.length]);
4617
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown, _extends({
4618
+ className: cls,
4619
+ trigger: "click",
4620
+ style: _extends({
4621
+ marginTop: 5
4622
+ }, style),
4623
+ overlayStyl: {
4624
+ width: 100
4625
+ }
4626
+ }, others, {
4627
+ onVisibleChange: onVisibleChange,
4628
+ isOpen: innerIsOpen,
4629
+ menu: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4630
+ style: {
4631
+ display: 'flex'
4632
+ },
4633
+ children: new Array(selectedValue.length + 1).fill(0).map((_, index) => {
4634
+ var _selectedValue;
4635
+
4636
+ var options = index ? (_selectedValue = selectedValue[index - 1]) == null ? void 0 : _selectedValue.children : option;
4637
+ return OptionIter(options, index);
4638
+ }).filter(m => !!m)
4639
+ }),
4640
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
4641
+ value: inputValue,
4642
+ onChange: () => {},
4643
+ placeholder: placeholder,
4644
+ style: {
4645
+ width: style == null ? void 0 : style.width
4646
+ }
4647
+ })
4648
+ }));
4649
+ }
4650
+
4651
+ /* harmony default export */ const react_cascader_esm = (Cascader);
4652
+
4653
+ ;// CONCATENATED MODULE: ../react-radio/esm/RadioAbstract.js
4654
+
4655
+
4656
+ var RadioAbstract_excluded = ["prefixCls", "type", "disabled", "value", "className", "style", "children", "size", "checked", "onChange"];
4657
+
4658
+
4659
+
4660
+ var RadioAbstract = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4661
+ var {
4662
+ prefixCls = 'w-radio',
4663
+ type = 'radio',
4664
+ disabled = false,
4665
+ value = '',
4666
+ className,
4667
+ style,
4668
+ children,
4669
+ size,
4670
+ checked: prChecked = false,
4671
+ onChange
4672
+ } = props,
4673
+ other = _objectWithoutPropertiesLoose(props, RadioAbstract_excluded);
4674
+
4675
+ var [checked, setChecked] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(prChecked);
4676
+ var [prevChecked, setPrevChecked] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)();
4677
+
4678
+ if (prChecked !== prevChecked) {
4679
+ setPrevChecked(prChecked);
4680
+ }
4681
+
4682
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
4683
+ if (prChecked !== prevChecked) {
4684
+ setChecked(prChecked);
4685
+ }
4686
+ }, [prevChecked]);
4687
+ var cls = [prefixCls, className, disabled ? 'disabled' : null, size ? prefixCls + "-" + size : null].filter(Boolean).join(' ').trim();
4688
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
4689
+ if (checked !== props.checked) {
4690
+ setChecked(!!props.checked);
4691
+ }
4692
+ }, [props.checked]);
4693
+
4694
+ function handleChange(e) {
4695
+ e.persist();
4696
+ setChecked(e.target.checked);
4697
+ onChange && onChange(e);
4698
+ }
4699
+
4700
+ var label = children || value;
4701
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("label", {
4702
+ className: cls,
4703
+ style,
4704
+ children: [/*#__PURE__*/(0,jsx_runtime.jsx)("input", _extends({}, _extends({}, other, {
4705
+ type,
4706
+ disabled,
4707
+ value
4708
+ }), {
4709
+ checked: checked,
4710
+ onChange: handleChange,
4711
+ ref: ref
4712
+ })), label && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4713
+ className: prefixCls + "-text",
4714
+ children: label
4715
+ })]
4716
+ });
4717
+ });
4718
+
4719
+ ;// CONCATENATED MODULE: ../react-radio/esm/style/index.css
4720
+ // extracted by mini-css-extract-plugin
4721
+ /* harmony default export */ const react_radio_esm_style = ({});
4722
+ ;// CONCATENATED MODULE: ../react-radio/esm/Radio.js
4723
+
4724
+
4725
+
4726
+
4727
+
4728
+ /* harmony default export */ const Radio = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4729
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(RadioAbstract, _extends({
4730
+ ref: ref
4731
+ }, props));
4732
+ }));
4733
+
4734
+ ;// CONCATENATED MODULE: ../react-radio/esm/style/group.css
4735
+ // extracted by mini-css-extract-plugin
4736
+ /* harmony default export */ const group = ({});
4737
+ ;// CONCATENATED MODULE: ../react-radio/esm/RadioGroup.js
4738
+
4739
+
4740
+ var RadioGroup_excluded = ["prefixCls", "className", "name", "value", "onChange", "children"];
4741
+
4742
+
4743
+
4744
+ /* harmony default export */ const RadioGroup = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4745
+ var {
4746
+ prefixCls = 'w-radio-group',
4747
+ className,
4748
+ name,
4749
+ value,
4750
+ onChange,
4751
+ children
4752
+ } = props,
4753
+ other = _objectWithoutPropertiesLoose(props, RadioGroup_excluded);
4754
+
4755
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({}, other, {
4756
+ ref: ref,
4757
+ className: [prefixCls, className].filter(Boolean).join(' ').trim(),
4758
+ children: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.toArray(children).map(child => {
4759
+ if (!child) return;
4760
+ if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) return child;
4761
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, _extends({}, child.props || {}, {
4762
+ checked: child.props.value === value,
4763
+ name,
4764
+ onChange
4765
+ }));
4766
+ })
4767
+ }));
4768
+ }));
4769
+
4770
+ ;// CONCATENATED MODULE: ../react-radio/esm/index.js
4771
+
4772
+
4773
+
4774
+
4775
+
4776
+
4777
+ ;// CONCATENATED MODULE: ../react-checkbox/esm/style/group.css
4778
+ // extracted by mini-css-extract-plugin
4779
+ /* harmony default export */ const style_group = ({});
4780
+ ;// CONCATENATED MODULE: ../react-checkbox/esm/Group.js
4781
+
4782
+
4783
+ var Group_excluded = ["prefixCls", "className", "name", "value", "onChange"];
4784
+
4785
+
4786
+
4787
+ var CheckboxGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4788
+ var {
4789
+ prefixCls = 'w-checkbox-group',
4790
+ className,
4791
+ name,
4792
+ value,
4793
+ onChange: _onChange
4794
+ } = props,
4795
+ other = _objectWithoutPropertiesLoose(props, Group_excluded);
4796
+
4797
+ var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
4798
+ var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
4799
+ var childs = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.toArray(props.children);
4800
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => valueRef.current = value || [], [value]);
4801
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({}, other, {
4802
+ className: cls,
4803
+ ref: ref,
4804
+ children: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(childs, element => {
4805
+ if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(element)) return;
4806
+
4807
+ if (Array.isArray(value) && element && element.props && element.props.value && value.includes(element.props.value)) {
4808
+ if (!valueRef.current.includes(element.props.value)) {
4809
+ valueRef.current.push(element.props.value);
4810
+ }
4811
+ }
4812
+
4813
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(element, Object.assign({}, element.props, {
4814
+ name,
4815
+ checked: valueRef.current.includes(element.props.value),
4816
+ onChange: e => {
4817
+ if (e.target.type && e.target.type !== 'checkbox') return;
4818
+ var checked = e.target.checked;
4819
+ var include = valueRef.current.includes(element.props.value);
4820
+
4821
+ if (!include && checked) {
4822
+ valueRef.current.push(element.props.value);
4823
+ } else if (include && !checked) {
4824
+ valueRef.current = valueRef.current.filter(val => val !== element.props.value);
4825
+ }
4826
+
4827
+ _onChange && _onChange(e, valueRef.current);
4828
+ }
4829
+ }));
4830
+ })
4831
+ }));
4832
+ });
4833
+
4834
+ ;// CONCATENATED MODULE: ../react-checkbox/esm/style/index.css
4835
+ // extracted by mini-css-extract-plugin
4836
+ /* harmony default export */ const react_checkbox_esm_style = ({});
4837
+ ;// CONCATENATED MODULE: ../react-checkbox/esm/Checkbox.js
4838
+
4839
+
4840
+ var Checkbox_excluded = ["className", "prefixCls", "type", "indeterminate", "disabled", "value"];
4841
+
4842
+
4843
+
4844
+
4845
+
4846
+
4847
+ function InternalCheckbox(props, ref) {
4219
4848
  var {
4220
4849
  className,
4221
4850
  prefixCls = 'w-checkbox',
@@ -4601,7 +5230,7 @@ function DateInputRange(props) {
4601
5230
  ;// CONCATENATED MODULE: ../react-date-input/esm/index.js
4602
5231
 
4603
5232
 
4604
- var react_date_input_esm_excluded = ["prefixCls", "className", "popoverProps", "datePickerProps", "allowClear", "format", "onChange"];
5233
+ var react_date_input_esm_excluded = ["prefixCls", "className", "popoverProps", "datePickerProps", "allowClear", "autoClose", "format", "onChange"];
4605
5234
 
4606
5235
 
4607
5236
 
@@ -4618,6 +5247,7 @@ function DateInput(props) {
4618
5247
  popoverProps,
4619
5248
  datePickerProps,
4620
5249
  allowClear = true,
5250
+ autoClose = false,
4621
5251
  format = 'YYYY/MM/DD',
4622
5252
  onChange
4623
5253
  } = props,
@@ -4633,6 +5263,7 @@ function DateInput(props) {
4633
5263
  }, [props.value]);
4634
5264
 
4635
5265
  function handleChange(cdate) {
5266
+ autoClose && setIsOpen(false);
4636
5267
  setDate(cdate);
4637
5268
  onChange && onChange(cdate);
4638
5269
  }
@@ -4645,10 +5276,13 @@ function DateInput(props) {
4645
5276
  });
4646
5277
  }
4647
5278
 
5279
+ var [isOpen, setIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
4648
5280
  return /*#__PURE__*/(0,jsx_runtime.jsx)(Popover, _extends({
4649
5281
  trigger: "focus",
4650
5282
  placement: "bottomLeft",
4651
- autoAdjustOverflow: true
5283
+ autoAdjustOverflow: true,
5284
+ isOpen: isOpen,
5285
+ onVisibleChange: open => setIsOpen(open)
4652
5286
  }, popoverProps, {
4653
5287
  content: /*#__PURE__*/(0,jsx_runtime.jsx)(DatePicker, _extends({
4654
5288
  date: value && new Date(value) || undefined,
@@ -4860,6 +5494,7 @@ function InternalDescriptions(props, ref) {
4860
5494
  className: prefixCls + "-title",
4861
5495
  children: title
4862
5496
  }), /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
5497
+ className: prefixCls + "-tbody",
4863
5498
  children: childs.map((child, index) => /*#__PURE__*/(0,jsx_runtime.jsx)(Row, {
4864
5499
  prefixCls: prefixCls,
4865
5500
  bordered: bordered,
@@ -4991,38 +5626,6 @@ var react_drawer_esm_excluded = ["prefixCls", "className", "style", "placement",
4991
5626
  }));
4992
5627
  });
4993
5628
 
4994
- ;// CONCATENATED MODULE: ../react-dropdown/esm/index.js
4995
-
4996
-
4997
- var react_dropdown_esm_excluded = ["prefixCls", "placement", "className", "menu", "children", "disabled"];
4998
-
4999
-
5000
-
5001
-
5002
- function Dropdown(props) {
5003
- var {
5004
- prefixCls = 'w-dropdown',
5005
- placement = 'bottomLeft',
5006
- className,
5007
- menu,
5008
- children,
5009
- disabled
5010
- } = props,
5011
- other = _objectWithoutPropertiesLoose(props, react_dropdown_esm_excluded);
5012
-
5013
- var cls = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => [prefixCls, className].filter(Boolean).join(' ').trim(), [prefixCls, className]);
5014
- return /*#__PURE__*/(0,jsx_runtime.jsx)(react_overlay_trigger_esm, _extends({
5015
- isOutside: true,
5016
- autoAdjustOverflow: true,
5017
- className: cls,
5018
- disabled: disabled,
5019
- placement: placement
5020
- }, other, {
5021
- overlay: menu,
5022
- children: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props))
5023
- }));
5024
- }
5025
-
5026
5629
  ;// CONCATENATED MODULE: ../react-empty/esm/style/index.css
5027
5630
  // extracted by mini-css-extract-plugin
5028
5631
  /* harmony default export */ const react_empty_esm_style = ({});
@@ -6063,522 +6666,208 @@ function LayoutHeader(props) {
6063
6666
  prefixCls = 'w-layout-header',
6064
6667
  className,
6065
6668
  children
6066
- } = _ref,
6067
- other = _objectWithoutPropertiesLoose(_ref, Header_excluded);
6068
-
6069
- return /*#__PURE__*/(0,jsx_runtime.jsx)("header", _extends({
6070
- className: [prefixCls, className].filter(Boolean).join(' ').trim()
6071
- }, other, {
6072
- children: children
6073
- }));
6074
- }
6075
-
6076
- ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Footer.js
6077
-
6078
-
6079
- var Footer_excluded = ["prefixCls", "className", "children"];
6080
-
6081
-
6082
- function LayoutFooter(props) {
6083
- var {
6084
- prefixCls = 'w-layout-footer',
6085
- className,
6086
- children
6087
- } = props,
6088
- other = _objectWithoutPropertiesLoose(props, Footer_excluded);
6089
-
6090
- return /*#__PURE__*/(0,jsx_runtime.jsx)("footer", _extends({
6091
- className: [prefixCls, className].filter(Boolean).join(' ').trim()
6092
- }, other, {
6093
- children: children
6094
- }));
6095
- }
6096
-
6097
- ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Sider.js
6098
-
6099
-
6100
- var Sider_excluded = ["prefixCls", "className", "style", "children", "width", "collapsedWidth", "collapsed", "siderHook"];
6101
-
6102
-
6103
-
6104
- function randomid() {
6105
- return parseInt(String(Math.random() * 1e15), 10).toString(36);
6106
- }
6107
-
6108
- function Sider(props) {
6109
- if (props === void 0) {
6110
- props = {};
6111
- }
6112
-
6113
- var {
6114
- prefixCls = 'w-layout-sider',
6115
- className,
6116
- style,
6117
- children,
6118
- width = 200,
6119
- collapsedWidth = 80,
6120
- collapsed = false,
6121
- siderHook
6122
- } = props,
6123
- other = _objectWithoutPropertiesLoose(props, Sider_excluded);
6124
-
6125
- var [sliderId] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)("w-layout-" + randomid());
6126
- var [rawWidth, setRawWidth] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(collapsed ? collapsedWidth : width);
6127
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
6128
- if (siderHook && !!siderHook.addSider) {
6129
- siderHook.addSider(sliderId);
6130
- }
6131
-
6132
- return () => {
6133
- if (siderHook && !!siderHook.removeSider) {
6134
- siderHook.removeSider(sliderId);
6135
- }
6136
- };
6137
- }, []);
6138
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => setRawWidth(collapsed ? collapsedWidth : width), [width, collapsedWidth, collapsed]);
6139
-
6140
- var divStyle = _extends({}, style, {
6141
- flex: "0 0 " + rawWidth,
6142
- maxWidth: rawWidth,
6143
- minWidth: rawWidth,
6144
- width: rawWidth
6145
- });
6146
-
6147
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
6148
- className: [prefixCls, className].filter(Boolean).join(' ').trim(),
6149
- style: divStyle
6150
- }, other, {
6151
- children: children
6152
- }));
6153
- }
6154
-
6155
- function LayoutSider(props) {
6156
- return /*#__PURE__*/(0,jsx_runtime.jsx)(LayoutContext.Consumer, {
6157
- children: context => /*#__PURE__*/(0,jsx_runtime.jsx)(Sider, _extends({}, props, context))
6158
- });
6159
- }
6160
-
6161
- ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Content.js
6162
-
6163
-
6164
- var Content_excluded = ["prefixCls", "className", "children"];
6165
-
6166
-
6167
- function LayoutContent(props) {
6168
- var {
6169
- prefixCls = 'w-layout-content',
6170
- className,
6171
- children
6172
- } = props,
6173
- other = _objectWithoutPropertiesLoose(props, Content_excluded);
6174
-
6175
- return /*#__PURE__*/(0,jsx_runtime.jsx)("main", _extends({
6176
- className: [prefixCls, className].filter(Boolean).join(' ').trim()
6177
- }, other, {
6178
- children: children
6179
- }));
6180
- }
6181
-
6182
- ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/style/index.css
6183
- // extracted by mini-css-extract-plugin
6184
- /* harmony default export */ const react_layout_esm_style = ({});
6185
- ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/index.js
6186
-
6187
-
6188
-
6189
-
6190
-
6191
-
6192
- Layout.Header = LayoutHeader;
6193
- Layout.Footer = LayoutFooter;
6194
- Layout.Sider = LayoutSider;
6195
- Layout.Content = LayoutContent;
6196
-
6197
-
6198
-
6199
-
6200
-
6201
- /* harmony default export */ const react_layout_esm = (Layout);
6202
-
6203
- ;// CONCATENATED MODULE: ../react-loader/esm/style/index.css
6204
- // extracted by mini-css-extract-plugin
6205
- /* harmony default export */ const react_loader_esm_style = ({});
6206
- ;// CONCATENATED MODULE: ../react-loader/esm/index.js
6207
-
6208
-
6209
- var react_loader_esm_excluded = ["prefixCls", "className", "size", "loading", "tip", "vertical", "color", "bgColor", "children", "indicator", "fullscreen"];
6210
-
6211
-
6212
-
6213
-
6214
- /* harmony default export */ const react_loader_esm = (function (props) {
6215
- if (props === void 0) {
6216
- props = {};
6217
- }
6218
-
6219
- var {
6220
- prefixCls = 'w-loader',
6221
- className,
6222
- size = 'default',
6223
- loading = true,
6224
- tip,
6225
- vertical,
6226
- color,
6227
- bgColor,
6228
- children,
6229
- indicator,
6230
- fullscreen = false
6231
- } = props,
6232
- otherProps = _objectWithoutPropertiesLoose(props, react_loader_esm_excluded);
6233
-
6234
- var cls = [prefixCls, className, size ? prefixCls + "-" + size : null].filter(Boolean).join(' ').trim();
6235
- var indicatorView = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
6236
- viewBox: "25 25 50 50",
6237
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
6238
- cx: "50",
6239
- cy: "50",
6240
- r: "20",
6241
- fill: "none",
6242
- strokeWidth: "5",
6243
- strokeMiterlimit: "10"
6244
- })
6245
- }), []);
6246
- var tipsView = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
6247
- className: [prefixCls + "-tips", fullscreen ? prefixCls + "-fullscreen" : null].filter(Boolean).join(' ').trim(),
6248
- style: {
6249
- color,
6250
- backgroundColor: bgColor
6251
- },
6252
- children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
6253
- className: prefixCls + "-tips-nested",
6254
- children: [indicator || indicatorView, tip && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
6255
- className: [prefixCls + "-text", vertical ? prefixCls + "-vertical" : null].filter(Boolean).join(' ').trim(),
6256
- children: tip
6257
- })]
6258
- })
6259
- }), [fullscreen, bgColor, prefixCls, vertical, tip]);
6260
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", _extends({
6261
- className: cls
6262
- }, otherProps, {
6263
- children: [(loading || fullscreen) && tipsView, children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props, {
6264
- className: [prefixCls + "-warp", loading ? prefixCls + "-blur" : null].filter(Boolean).join(' ').trim()
6265
- }))]
6266
- }));
6267
- });
6268
-
6269
- ;// CONCATENATED MODULE: ../react-menu/esm/style/item.css
6270
- // extracted by mini-css-extract-plugin
6271
- /* harmony default export */ const style_item = ({});
6272
- ;// CONCATENATED MODULE: ../react-menu/esm/MenuItem.js
6273
-
6274
-
6275
- var MenuItem_excluded = ["prefixCls", "className", "tagName", "children", "disabled", "multiline", "icon", "text", "active", "addonAfter", "isSubMenuItem"];
6276
-
6277
-
6278
-
6279
-
6280
-
6281
- var disabledProps = {
6282
- href: undefined,
6283
- onClick: undefined,
6284
- onMouseDown: undefined,
6285
- onMouseEnter: undefined,
6286
- onMouseLeave: undefined,
6287
- tabIndex: -1
6288
- };
6289
-
6290
- function Internal(props, ref) {
6291
- var {
6292
- prefixCls = 'w-menu-item',
6293
- className,
6294
- tagName: TagName = 'a',
6295
- disabled = false,
6296
- multiline = false,
6297
- icon,
6298
- text,
6299
- active = false,
6300
- addonAfter,
6301
- isSubMenuItem
6302
- } = props,
6303
- htmlProps = _objectWithoutPropertiesLoose(props, MenuItem_excluded);
6304
-
6305
- var anchorCls = [prefixCls, active ? 'active' : null, disabled ? 'w-disabled' : null, className].filter(Boolean).join(' ').trim();
6306
- var tagComp = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TagName, _extends({}, htmlProps, disabled ? disabledProps : {}, {
6307
- className: anchorCls,
6308
- ref
6309
- }), /*#__PURE__*/(0,jsx_runtime.jsxs)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
6310
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
6311
- className: prefixCls + "-icon",
6312
- type: icon
6313
- }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
6314
- className: [prefixCls && prefixCls + "-text", !multiline && prefixCls + "-multiline"].filter(Boolean).join(' ').trim(),
6315
- children: text
6316
- }), addonAfter]
6317
- }));
6318
-
6319
- if (isSubMenuItem) {
6320
- return tagComp;
6321
- }
6669
+ } = _ref,
6670
+ other = _objectWithoutPropertiesLoose(_ref, Header_excluded);
6322
6671
 
6323
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
6324
- children: [" ", tagComp, " "]
6325
- });
6672
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("header", _extends({
6673
+ className: [prefixCls, className].filter(Boolean).join(' ').trim()
6674
+ }, other, {
6675
+ children: children
6676
+ }));
6326
6677
  }
6327
6678
 
6328
- var MenuItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Internal);
6329
- MenuItem.displayName = 'uiw.MenuItem';
6330
-
6331
- ;// CONCATENATED MODULE: ../react-menu/esm/Divider.js
6679
+ ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Footer.js
6332
6680
 
6333
6681
 
6334
- var Divider_excluded = ["prefixCls", "className", "title"];
6682
+ var Footer_excluded = ["prefixCls", "className", "children"];
6335
6683
 
6336
6684
 
6337
- var MenuDivider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
6685
+ function LayoutFooter(props) {
6338
6686
  var {
6339
- prefixCls = 'w-menu-divider',
6687
+ prefixCls = 'w-layout-footer',
6340
6688
  className,
6341
- title
6689
+ children
6342
6690
  } = props,
6343
- htmlProps = _objectWithoutPropertiesLoose(props, Divider_excluded);
6344
-
6345
- var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
6346
-
6347
- if (!title) {
6348
- return /*#__PURE__*/(0,jsx_runtime.jsx)("li", _extends({}, htmlProps, {
6349
- ref: ref,
6350
- className: cls
6351
- }));
6352
- }
6691
+ other = _objectWithoutPropertiesLoose(props, Footer_excluded);
6353
6692
 
6354
- return /*#__PURE__*/(0,jsx_runtime.jsx)("li", _extends({}, htmlProps, {
6355
- ref: ref,
6356
- className: cls,
6357
- "data-menu": "divider",
6358
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
6359
- children: title
6360
- })
6693
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("footer", _extends({
6694
+ className: [prefixCls, className].filter(Boolean).join(' ').trim()
6695
+ }, other, {
6696
+ children: children
6361
6697
  }));
6362
- });
6363
- MenuDivider.displayName = 'uiw.MenuDivider';
6364
-
6365
- ;// CONCATENATED MODULE: ../react-menu/esm/style/submenu.css
6366
- // extracted by mini-css-extract-plugin
6367
- /* harmony default export */ const submenu = ({});
6368
- ;// CONCATENATED MODULE: ../react-menu/esm/SubMenu.js
6369
-
6698
+ }
6370
6699
 
6371
- var SubMenu_excluded = ["prefixCls", "className", "disabled", "overlayProps", "children", "collapse", "inlineIndent", "inlineCollapsed"];
6700
+ ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Sider.js
6372
6701
 
6373
6702
 
6703
+ var Sider_excluded = ["prefixCls", "className", "style", "children", "width", "collapsedWidth", "collapsed", "siderHook"];
6374
6704
 
6375
6705
 
6376
6706
 
6707
+ function randomid() {
6708
+ return parseInt(String(Math.random() * 1e15), 10).toString(36);
6709
+ }
6377
6710
 
6711
+ function Sider(props) {
6712
+ if (props === void 0) {
6713
+ props = {};
6714
+ }
6378
6715
 
6716
+ var {
6717
+ prefixCls = 'w-layout-sider',
6718
+ className,
6719
+ style,
6720
+ children,
6721
+ width = 200,
6722
+ collapsedWidth = 80,
6723
+ collapsed = false,
6724
+ siderHook
6725
+ } = props,
6726
+ other = _objectWithoutPropertiesLoose(props, Sider_excluded);
6379
6727
 
6380
- function checkedMenuItem(node) {
6381
- var isCheck = false;
6728
+ var [sliderId] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)("w-layout-" + randomid());
6729
+ var [rawWidth, setRawWidth] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(collapsed ? collapsedWidth : width);
6730
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
6731
+ if (siderHook && !!siderHook.addSider) {
6732
+ siderHook.addSider(sliderId);
6733
+ }
6382
6734
 
6383
- if (node) {
6384
- // eslint-disable-next-line
6385
- do {
6386
- if (!node.dataset.menu) {
6387
- isCheck = true;
6735
+ return () => {
6736
+ if (siderHook && !!siderHook.removeSider) {
6737
+ siderHook.removeSider(sliderId);
6388
6738
  }
6739
+ };
6740
+ }, []);
6741
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => setRawWidth(collapsed ? collapsedWidth : width), [width, collapsedWidth, collapsed]);
6389
6742
 
6390
- if (node.dataset.menu && /^(subitem|divider)$/.test(node.dataset.menu)) {
6391
- isCheck = false;
6392
- }
6393
- } while (!node.dataset.menu && (node = node.parentNode));
6394
- }
6743
+ var divStyle = _extends({}, style, {
6744
+ flex: "0 0 " + rawWidth,
6745
+ maxWidth: rawWidth,
6746
+ minWidth: rawWidth,
6747
+ width: rawWidth
6748
+ });
6395
6749
 
6396
- return isCheck;
6750
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
6751
+ className: [prefixCls, className].filter(Boolean).join(' ').trim(),
6752
+ style: divStyle
6753
+ }, other, {
6754
+ children: children
6755
+ }));
6397
6756
  }
6398
6757
 
6399
- function IconView(_ref) {
6400
- var {
6401
- prefixCls,
6402
- collapse,
6403
- isOpen
6404
- } = _ref;
6405
- return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
6406
- type: "caret-right",
6407
- className: [prefixCls ? prefixCls + "-collapse-icon" : null, !collapse && isOpen ? 'w-open' : null, !collapse && !isOpen ? 'w-close' : null].filter(Boolean).join(' ').trim()
6408
- }), [prefixCls, collapse, isOpen]);
6758
+ function LayoutSider(props) {
6759
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(LayoutContext.Consumer, {
6760
+ children: context => /*#__PURE__*/(0,jsx_runtime.jsx)(Sider, _extends({}, props, context))
6761
+ });
6409
6762
  }
6410
6763
 
6411
- var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
6764
+ ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Content.js
6765
+
6766
+
6767
+ var Content_excluded = ["prefixCls", "className", "children"];
6768
+
6769
+
6770
+ function LayoutContent(props) {
6412
6771
  var {
6413
- prefixCls = 'w-menu-subitem',
6772
+ prefixCls = 'w-layout-content',
6414
6773
  className,
6415
- disabled,
6416
- overlayProps = {},
6417
- children,
6418
- collapse = false,
6419
- inlineIndent
6774
+ children
6420
6775
  } = props,
6421
- other = _objectWithoutPropertiesLoose(props, SubMenu_excluded);
6776
+ other = _objectWithoutPropertiesLoose(props, Content_excluded);
6422
6777
 
6423
- var overlayTriggerProps = {};
6424
- var menuProps = {
6425
- bordered: true,
6426
- children,
6427
- inlineIndent,
6428
- className: [prefixCls ? prefixCls + "-overlay" : null].filter(Boolean).join(' ').trim()
6429
- };
6430
- var popupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
6431
- var [isOpen, setIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
6432
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
6433
- setIsOpen(false);
6434
- }, [collapse]);
6778
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("main", _extends({
6779
+ className: [prefixCls, className].filter(Boolean).join(' ').trim()
6780
+ }, other, {
6781
+ children: children
6782
+ }));
6783
+ }
6435
6784
 
6436
- function onClick(e) {
6437
- var target = e.currentTarget;
6438
- var related = e.relatedTarget || e.nativeEvent.target;
6439
- if (target.children.length < 1) return;
6785
+ ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/style/index.css
6786
+ // extracted by mini-css-extract-plugin
6787
+ /* harmony default export */ const react_layout_esm_style = ({});
6788
+ ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/index.js
6440
6789
 
6441
- if (checkedMenuItem(related)) {
6442
- if (popupRef.current) {
6443
- popupRef.current.hide();
6444
- }
6445
- }
6446
- }
6447
6790
 
6448
- function onExit(node) {
6449
- node.style.height = node.scrollHeight + "px";
6450
- setIsOpen(false);
6451
- }
6452
6791
 
6453
- function onExiting(node) {
6454
- node.style.height = '0px';
6455
- }
6456
6792
 
6457
- function onEnter(node) {
6458
- node.style.height = '1px';
6459
- setIsOpen(true);
6460
- }
6461
6793
 
6462
- function onEntering(node) {
6463
- node.style.height = node.scrollHeight + "px";
6464
- }
6465
6794
 
6466
- function onEntered(node) {
6467
- node.style.height = 'initial';
6468
- }
6795
+ Layout.Header = LayoutHeader;
6796
+ Layout.Footer = LayoutFooter;
6797
+ Layout.Sider = LayoutSider;
6798
+ Layout.Content = LayoutContent;
6469
6799
 
6470
- if (!collapse) {
6471
- delete menuProps.onClick;
6472
- menuProps.bordered = false;
6473
- overlayTriggerProps.className = prefixCls + "-collapse";
6474
- overlayTriggerProps.appear = false;
6475
- overlayTriggerProps.isOutside = true;
6476
- overlayTriggerProps.isClickOutside = false;
6477
- overlayTriggerProps.unmountOnExit = false;
6478
- overlayTriggerProps.trigger = 'click';
6479
- overlayTriggerProps.transitionName = "" + prefixCls;
6480
- overlayTriggerProps.onExit = onExit;
6481
- overlayTriggerProps.onExiting = onExiting;
6482
- overlayTriggerProps.onEnter = onEnter;
6483
- overlayTriggerProps.onEntered = onEntered;
6484
- overlayTriggerProps.onEntering = onEntering;
6485
- } else {
6486
- overlayTriggerProps.className = prefixCls + "-popup";
6487
- overlayTriggerProps.trigger = 'hover';
6488
- overlayTriggerProps.usePortal = true;
6489
- menuProps.onClick = onClick;
6490
- }
6491
6800
 
6492
- return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
6493
- "data-menu": "subitem",
6494
- ref: ref,
6495
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_overlay_trigger_esm, _extends({
6496
- placement: "rightTop",
6497
- autoAdjustOverflow: true,
6498
- disabled: disabled,
6499
- isOpen: isOpen,
6500
- usePortal: false,
6501
- isOutside: true
6502
- }, overlayTriggerProps, overlayProps, {
6503
- ref: popupRef,
6504
- overlay: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_Menu, _extends({}, menuProps, {
6505
- style: !collapse ? {
6506
- paddingLeft: inlineIndent
6507
- } : {}
6508
- })),
6509
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem, _extends({}, other, {
6510
- ref: null,
6511
- disabled: disabled,
6512
- isSubMenuItem: true,
6513
- addonAfter: /*#__PURE__*/(0,jsx_runtime.jsx)(IconView, {
6514
- collapse: collapse,
6515
- prefixCls: prefixCls,
6516
- isOpen: isOpen
6517
- }),
6518
- className: [prefixCls ? prefixCls + "-title" : null, !collapse ? prefixCls + "-collapse-title" : null, className].filter(Boolean).join(' ').trim()
6519
- }))
6520
- }))
6521
- });
6522
- });
6523
- SubMenu.displayName = 'uiw.SubMenu';
6524
6801
 
6525
- ;// CONCATENATED MODULE: ../react-menu/esm/style/menu.css
6526
- // extracted by mini-css-extract-plugin
6527
- /* harmony default export */ const menu = ({});
6528
- ;// CONCATENATED MODULE: ../react-menu/esm/Menu.js
6529
6802
 
6530
6803
 
6531
- var Menu_excluded = ["prefixCls", "className", "children", "bordered", "theme", "inlineIndent", "inlineCollapsed"];
6804
+ /* harmony default export */ const react_layout_esm = (Layout);
6805
+
6806
+ ;// CONCATENATED MODULE: ../react-loader/esm/style/index.css
6807
+ // extracted by mini-css-extract-plugin
6808
+ /* harmony default export */ const react_loader_esm_style = ({});
6809
+ ;// CONCATENATED MODULE: ../react-loader/esm/index.js
6810
+
6532
6811
 
6812
+ var react_loader_esm_excluded = ["prefixCls", "className", "size", "loading", "tip", "vertical", "color", "bgColor", "children", "indicator", "fullscreen"];
6533
6813
 
6534
6814
 
6535
6815
 
6536
6816
 
6817
+ /* harmony default export */ const react_loader_esm = (function (props) {
6818
+ if (props === void 0) {
6819
+ props = {};
6820
+ }
6537
6821
 
6538
- var Menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
6539
6822
  var {
6540
- prefixCls = 'w-menu',
6823
+ prefixCls = 'w-loader',
6541
6824
  className,
6825
+ size = 'default',
6826
+ loading = true,
6827
+ tip,
6828
+ vertical,
6829
+ color,
6830
+ bgColor,
6542
6831
  children,
6543
- bordered,
6544
- theme = 'light',
6545
- inlineIndent = 10,
6546
- inlineCollapsed
6832
+ indicator,
6833
+ fullscreen = false
6547
6834
  } = props,
6548
- htmlProps = _objectWithoutPropertiesLoose(props, Menu_excluded);
6549
-
6550
- var cls = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => [prefixCls, bordered ? 'w-bordered' : null, inlineCollapsed ? prefixCls + "-inline-collapsed" : null, theme ? prefixCls + "-" + theme : null, className].filter(Boolean).join(' ').trim(), [prefixCls, bordered, inlineCollapsed, theme, className]);
6551
- return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", _extends({}, htmlProps, {
6552
- ref: ref,
6553
- className: cls,
6554
- "data-menu": "menu",
6555
- children: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, (child, key) => {
6556
- if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) return child;
6557
- var props = {}; // Sub Menu
6558
-
6559
- if (child.props.children && child.type === SubMenu) {
6560
- props.inlineIndent = inlineIndent;
6561
- }
6835
+ otherProps = _objectWithoutPropertiesLoose(props, react_loader_esm_excluded);
6562
6836
 
6563
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, Object.assign(_extends({}, props), child.props, {
6564
- key: "" + key
6565
- }));
6837
+ var cls = [prefixCls, className, size ? prefixCls + "-" + size : null].filter(Boolean).join(' ').trim();
6838
+ var indicatorView = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
6839
+ viewBox: "25 25 50 50",
6840
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
6841
+ cx: "50",
6842
+ cy: "50",
6843
+ r: "20",
6844
+ fill: "none",
6845
+ strokeWidth: "5",
6846
+ strokeMiterlimit: "10"
6847
+ })
6848
+ }), []);
6849
+ var tipsView = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
6850
+ className: [prefixCls + "-tips", fullscreen ? prefixCls + "-fullscreen" : null].filter(Boolean).join(' ').trim(),
6851
+ style: {
6852
+ color,
6853
+ backgroundColor: bgColor
6854
+ },
6855
+ children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
6856
+ className: prefixCls + "-tips-nested",
6857
+ children: [indicator || indicatorView, tip && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
6858
+ className: [prefixCls + "-text", vertical ? prefixCls + "-vertical" : null].filter(Boolean).join(' ').trim(),
6859
+ children: tip
6860
+ })]
6566
6861
  })
6862
+ }), [fullscreen, bgColor, prefixCls, vertical, tip]);
6863
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", _extends({
6864
+ className: cls
6865
+ }, otherProps, {
6866
+ children: [(loading || fullscreen) && tipsView, children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props, {
6867
+ className: [prefixCls + "-warp", loading ? prefixCls + "-blur" : null].filter(Boolean).join(' ').trim()
6868
+ }))]
6567
6869
  }));
6568
6870
  });
6569
- Menu.displayName = 'uiw.Menu';
6570
- Menu.Item = MenuItem;
6571
- Menu.SubMenu = SubMenu;
6572
- Menu.Divider = MenuDivider;
6573
- /* harmony default export */ const esm_Menu = (Menu);
6574
-
6575
- ;// CONCATENATED MODULE: ../react-menu/esm/index.js
6576
-
6577
-
6578
-
6579
-
6580
-
6581
- /* harmony default export */ const react_menu_esm = (esm_Menu);
6582
6871
 
6583
6872
  ;// CONCATENATED MODULE: ../react-message/esm/style/index.css
6584
6873
  // extracted by mini-css-extract-plugin
@@ -7786,7 +8075,7 @@ var react_tag_esm_excluded = ["prefixCls", "className", "style", "title", "child
7786
8075
  className: cls,
7787
8076
  style: styl
7788
8077
  }, other, {
7789
- children: [title || children, closable ? /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
8078
+ children: [title || children, !disabled && closable ? /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
7790
8079
  onClick: onClose,
7791
8080
  className: prefixCls + "-close",
7792
8081
  width: "15",
@@ -7819,6 +8108,8 @@ var react_search_select_esm_excluded = ["allowClear", "disabled", "size", "maxTa
7819
8108
 
7820
8109
 
7821
8110
  function SearchSelect(props) {
8111
+ var _style$width;
8112
+
7822
8113
  var {
7823
8114
  allowClear = false,
7824
8115
  disabled = false,
@@ -7863,6 +8154,11 @@ function SearchSelect(props) {
7863
8154
  selectedValueChange(defaultValue);
7864
8155
  }
7865
8156
  }, []);
8157
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
8158
+ if (disabled) {
8159
+ setInnerIsOpen(false);
8160
+ }
8161
+ }, [disabled]);
7866
8162
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
7867
8163
  if (valueVerify(value)) {
7868
8164
  selectedValueChange(value);
@@ -7995,7 +8291,10 @@ function SearchSelect(props) {
7995
8291
  style: {
7996
8292
  marginTop: 5
7997
8293
  },
7998
- disabled: option && option.length > 0 ? false : true
8294
+ overlayStyl: {
8295
+ width: 100
8296
+ },
8297
+ disabled: disabled
7999
8298
  }, others, {
8000
8299
  onVisibleChange: onVisibleChange,
8001
8300
  isOpen: innerIsOpen,
@@ -8004,9 +8303,9 @@ function SearchSelect(props) {
8004
8303
  style: {
8005
8304
  minHeight: 25,
8006
8305
  maxHeight: 280,
8007
- minWidth: 200,
8306
+ minWidth: (_style$width = style == null ? void 0 : style.width) != null ? _style$width : 200,
8008
8307
  overflowY: 'scroll',
8009
- width: divRef.current ? divRef.current.offsetWidth : 'auto'
8308
+ width: style == null ? void 0 : style.width
8010
8309
  },
8011
8310
  children: !option || option.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
8012
8311
  style: {
@@ -8056,6 +8355,7 @@ function SearchSelect(props) {
8056
8355
  color: "#393E48"
8057
8356
  }, tagProps, {
8058
8357
  closable: true,
8358
+ disabled: disabled,
8059
8359
  onClose: e => {
8060
8360
  e.stopPropagation();
8061
8361
  handleItemsClick(index, item);
@@ -8085,7 +8385,7 @@ function SearchSelect(props) {
8085
8385
  value: selectedLabel,
8086
8386
  placeholder: selectedValue.length ? '' : placeholder
8087
8387
  })]
8088
- }), (selectIconType === 'close' || selectIconType === 'loading' && loading) && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
8388
+ }), !disabled && (selectIconType === 'close' || selectIconType === 'loading' && loading) && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
8089
8389
  type: selectIconType,
8090
8390
  spin: loading && selectIconType === 'loading',
8091
8391
  onClick: resetSelectedValue
@@ -8098,7 +8398,7 @@ function SearchSelect(props) {
8098
8398
  onChange: e => handleInputChange(e.target.value),
8099
8399
  value: selectedLabel,
8100
8400
  placeholder: placeholder,
8101
- addonAfter: (selectIconType === 'close' || selectIconType === 'loading' && loading) && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
8401
+ addonAfter: !disabled && (selectIconType === 'close' || selectIconType === 'loading' && loading) && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
8102
8402
  type: selectIconType,
8103
8403
  spin: loading && selectIconType === 'loading',
8104
8404
  onClick: resetSelectedValue
@@ -8851,59 +9151,6 @@ var react_switch_esm_excluded = ["prefixCls"];
8851
9151
  ;// CONCATENATED MODULE: ../react-table/esm/style/index.css
8852
9152
  // extracted by mini-css-extract-plugin
8853
9153
  /* harmony default export */ const react_table_esm_style = ({});
8854
- ;// CONCATENATED MODULE: ../react-table/esm/Thead.js
8855
-
8856
-
8857
- var Thead_excluded = ["prefixCls", "className", "data", "onCellHead"],
8858
- Thead_excluded2 = ["title", "key", "render", "children", "ellipsis"];
8859
-
8860
-
8861
-
8862
-
8863
- function TheadComponent(props) {
8864
- if (props === void 0) {
8865
- props = {};
8866
- }
8867
-
8868
- var {
8869
- prefixCls = 'w-table',
8870
- className,
8871
- data = [],
8872
- onCellHead = noop
8873
- } = props,
8874
- other = _objectWithoutPropertiesLoose(props, Thead_excluded);
8875
-
8876
- return /*#__PURE__*/(0,jsx_runtime.jsx)("thead", _extends({
8877
- className: [prefixCls, className].filter(Boolean).join(' ').trim()
8878
- }, other, {
8879
- children: data && data.length > 0 && data.map((tds, rowNum) => /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
8880
- children: (tds || []).map((item, colNum) => {
8881
- var {
8882
- title,
8883
- ellipsis
8884
- } = item,
8885
- thProps = _objectWithoutPropertiesLoose(item, Thead_excluded2);
8886
-
8887
- var titleNode = typeof title === 'function' ? title(item, colNum, rowNum) : title;
8888
-
8889
- if (thProps.colSpan === 0) {
8890
- return null;
8891
- }
8892
-
8893
- if (ellipsis) {
8894
- thProps.className = (thProps.className || '') + " " + prefixCls + "-ellipsis";
8895
- }
8896
-
8897
- return /*#__PURE__*/(0,jsx_runtime.jsx)("th", _extends({}, thProps, {
8898
- className: prefixCls + "-tr-children-" + ((item == null ? void 0 : item.align) || 'left') + " " + (className || ''),
8899
- onClick: evn => onCellHead(item, colNum, rowNum, evn),
8900
- children: titleNode
8901
- }), colNum);
8902
- })
8903
- }, rowNum))
8904
- }));
8905
- }
8906
-
8907
9154
  ;// CONCATENATED MODULE: ../react-table/esm/util.js
8908
9155
  /**
8909
9156
  * Get colspan number
@@ -9065,6 +9312,130 @@ function getAllColumnsKeys(data, keys) {
9065
9312
 
9066
9313
  return keys;
9067
9314
  }
9315
+ function locationFixed(fixed, location, index) {
9316
+ var _location$index, _location$index2;
9317
+
9318
+ if (!fixed) return {};
9319
+ if (fixed === 'right') return {
9320
+ right: (_location$index = location[index]) == null ? void 0 : _location$index.right
9321
+ };
9322
+ return {
9323
+ left: (_location$index2 = location[index]) == null ? void 0 : _location$index2.left
9324
+ };
9325
+ }
9326
+
9327
+ ;// CONCATENATED MODULE: ../react-table/esm/ThComponent.js
9328
+
9329
+
9330
+ var ThComponent_excluded = ["title", "key", "render", "children", "ellipsis", "fixed"];
9331
+
9332
+
9333
+
9334
+
9335
+ class ThComponent extends external_root_React_commonjs2_react_commonjs_react_amd_react_.Component {
9336
+ componentDidMount() {
9337
+ var rect = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this);
9338
+ this.props.updateLocation({
9339
+ width: rect.getBoundingClientRect().width
9340
+ }, this.props.colNum);
9341
+ }
9342
+
9343
+ render() {
9344
+ var {
9345
+ colNum,
9346
+ prefixCls,
9347
+ item,
9348
+ titleNode,
9349
+ onCellHead,
9350
+ rowNum,
9351
+ locationWidth
9352
+ } = this.props;
9353
+
9354
+ var {
9355
+ fixed = false
9356
+ } = item,
9357
+ thProps = _objectWithoutPropertiesLoose(item, ThComponent_excluded);
9358
+
9359
+ var cls = '';
9360
+
9361
+ if (fixed) {
9362
+ if (fixed === 'right') {
9363
+ cls = prefixCls + '-fixed-right';
9364
+ } else {
9365
+ cls = prefixCls + '-fixed-true';
9366
+ }
9367
+ }
9368
+
9369
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("th", _extends({}, thProps, {
9370
+ style: _extends({}, thProps.style, locationFixed(fixed, locationWidth, colNum)),
9371
+ className: prefixCls + "-tr-children-" + ((item == null ? void 0 : item.align) || 'left') + " " + (item.className || '') + " " + cls,
9372
+ onClick: evn => onCellHead == null ? void 0 : onCellHead(item, colNum, rowNum, evn),
9373
+ children: titleNode
9374
+ }), colNum);
9375
+ }
9376
+
9377
+ }
9378
+
9379
+ ;// CONCATENATED MODULE: ../react-table/esm/Thead.js
9380
+
9381
+
9382
+ var Thead_excluded = ["prefixCls", "className", "data", "onCellHead", "locationWidth", "updateLocation"],
9383
+ Thead_excluded2 = ["title", "key", "render", "children", "ellipsis", "fixed"];
9384
+
9385
+
9386
+
9387
+
9388
+
9389
+ function TheadComponent(props) {
9390
+ if (props === void 0) {
9391
+ props = {};
9392
+ }
9393
+
9394
+ var {
9395
+ prefixCls = 'w-table',
9396
+ className,
9397
+ data = [],
9398
+ onCellHead = noop,
9399
+ locationWidth,
9400
+ updateLocation
9401
+ } = props,
9402
+ other = _objectWithoutPropertiesLoose(props, Thead_excluded);
9403
+
9404
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("thead", _extends({
9405
+ className: [prefixCls, className].filter(Boolean).join(' ').trim()
9406
+ }, other, {
9407
+ children: data && data.length > 0 && data.map((tds, rowNum) => /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
9408
+ children: (tds || []).map((item, colNum) => {
9409
+ var {
9410
+ title,
9411
+ ellipsis,
9412
+ fixed = false
9413
+ } = item,
9414
+ thProps = _objectWithoutPropertiesLoose(item, Thead_excluded2);
9415
+
9416
+ var titleNode = /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
9417
+ className: ellipsis ? (thProps.className || '') + " " + prefixCls + "-ellipsis" : undefined,
9418
+ children: typeof title === 'function' ? title(item, colNum, rowNum) : title
9419
+ });
9420
+
9421
+ if (thProps.colSpan === 0) {
9422
+ return null;
9423
+ }
9424
+
9425
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(ThComponent, {
9426
+ colNum: colNum,
9427
+ item: item,
9428
+ prefixCls: prefixCls,
9429
+ onCellHead: onCellHead,
9430
+ rowNum: rowNum,
9431
+ titleNode: titleNode,
9432
+ locationWidth: locationWidth,
9433
+ updateLocation: updateLocation
9434
+ }, colNum);
9435
+ })
9436
+ }, rowNum))
9437
+ }));
9438
+ }
9068
9439
 
9069
9440
  ;// CONCATENATED MODULE: ../react-table/esm/Expandable.js
9070
9441
 
@@ -9106,6 +9477,7 @@ function ExpandableComponent(_ref) {
9106
9477
 
9107
9478
 
9108
9479
 
9480
+
9109
9481
  function TableTr(props) {
9110
9482
  var {
9111
9483
  rowKey,
@@ -9118,12 +9490,15 @@ function TableTr(props) {
9118
9490
  isExpandedDom,
9119
9491
  hierarchy,
9120
9492
  indentSize,
9121
- childrenColumnName
9493
+ childrenColumnName,
9494
+ locationWidth
9122
9495
  } = props;
9123
9496
  var [isOpacity, setIsOpacity] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
9497
+ var [childrenIndex, setChildrenIndex] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0);
9124
9498
  var [expandIndex, setExpandIndex] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
9125
9499
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
9126
9500
  setIsOpacity(!!(data != null && data.find(it => it[childrenColumnName])));
9501
+ setChildrenIndex((keys == null ? void 0 : keys.findIndex(it => it.key === 'uiw-expanded')) === -1 ? 0 : 1);
9127
9502
  }, [data]);
9128
9503
  var IconDom = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
9129
9504
  return (key, isOpacity) => {
@@ -9177,13 +9552,9 @@ function TableTr(props) {
9177
9552
  }
9178
9553
  }
9179
9554
 
9180
- if (ellipsis && ellipsis[keyName.key]) {
9181
- objs.className = prefixCls + "-ellipsis";
9182
- }
9183
-
9184
9555
  var isHasChildren = Array.isArray(trData[childrenColumnName]);
9185
9556
 
9186
- if (colNum === 0 && (isOpacity || hierarchy || isHasChildren)) {
9557
+ if (colNum === childrenIndex && (isOpacity || hierarchy || isHasChildren)) {
9187
9558
  objs.children = /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
9188
9559
  children: [IconDom(key, isHasChildren), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
9189
9560
  style: {
@@ -9193,10 +9564,22 @@ function TableTr(props) {
9193
9564
  });
9194
9565
  }
9195
9566
 
9567
+ if (keyName.fixed) {
9568
+ if (keyName.fixed === 'right') {
9569
+ objs.className = objs.className + " " + prefixCls + "-fixed-right";
9570
+ } else {
9571
+ objs.className = objs.className + " " + prefixCls + "-fixed-true";
9572
+ }
9573
+ }
9574
+
9196
9575
  return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement)("td", _extends({}, objs, {
9197
- key: colNum // style={keyName?.style}
9198
- ,
9199
- className: objs.className + " " + prefixCls + "-tr-children-" + ((keyName == null ? void 0 : keyName.align) || 'left') + " " + (keyName.className || ''),
9576
+ style: _extends({}, locationFixed(keyName.fixed, locationWidth, colNum)),
9577
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
9578
+ className: ellipsis && ellipsis[keyName.key] ? prefixCls + "-ellipsis" : undefined,
9579
+ children: objs.children
9580
+ }),
9581
+ key: colNum,
9582
+ className: prefixCls + "-tr-children-" + (keyName.align || 'left') + " " + (keyName.className || '') + " " + (objs.className || ''),
9200
9583
  onClick: evn => onCell(trData, {
9201
9584
  rowNum,
9202
9585
  colNum,
@@ -9204,10 +9587,10 @@ function TableTr(props) {
9204
9587
  }, evn)
9205
9588
  }));
9206
9589
  })
9207
- }, key), expandIndex.includes(key) && /*#__PURE__*/(0,jsx_runtime.jsx)(TableTr, _extends({}, props, {
9590
+ }, key), isExpandedDom(trData, rowNum), expandIndex.includes(key) && /*#__PURE__*/(0,jsx_runtime.jsx)(TableTr, _extends({}, props, {
9208
9591
  data: trData[childrenColumnName],
9209
9592
  hierarchy: hierarchy + 1
9210
- })), isExpandedDom(trData, rowNum)]
9593
+ }))]
9211
9594
  }, rowNum);
9212
9595
  })
9213
9596
  });
@@ -9216,7 +9599,7 @@ function TableTr(props) {
9216
9599
  ;// CONCATENATED MODULE: ../react-table/esm/index.js
9217
9600
 
9218
9601
 
9219
- var react_table_esm_excluded = ["prefixCls", "className", "columns", "data", "title", "footer", "bordered", "onCell", "onCellHead", "empty", "children", "expandable", "rowKey"];
9602
+ var react_table_esm_excluded = ["prefixCls", "className", "columns", "data", "title", "footer", "bordered", "onCell", "onCellHead", "empty", "children", "expandable", "rowKey", "scroll"];
9220
9603
 
9221
9604
 
9222
9605
 
@@ -9245,15 +9628,64 @@ function Table(props) {
9245
9628
  onCellHead = noop,
9246
9629
  empty,
9247
9630
  expandable,
9248
- rowKey
9631
+ rowKey,
9632
+ scroll
9249
9633
  } = props,
9250
9634
  other = _objectWithoutPropertiesLoose(props, react_table_esm_excluded);
9251
9635
 
9252
9636
  var [expandIndex, setExpandIndex] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
9637
+ var [locationWidth, setLocationWidth] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({});
9638
+ var finalLocationWidth = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
9639
+
9640
+ var updateLocation = (params, index) => {
9641
+ finalLocationWidth.current = _extends({}, finalLocationWidth.current, {
9642
+ [index]: _extends({}, finalLocationWidth.current[index], params)
9643
+ });
9644
+
9645
+ if (index === columns.length - 1) {
9646
+ setLocationWidth(computed());
9647
+ }
9648
+ };
9649
+
9650
+ var computed = () => {
9651
+ var left = 0,
9652
+ right = 0;
9653
+
9654
+ for (var _index = 0; _index < columns.length; _index++) {
9655
+ if (finalLocationWidth.current[_index]) {
9656
+ finalLocationWidth.current[_index].left = left;
9657
+ left = finalLocationWidth.current[_index].width + left;
9658
+ }
9659
+ }
9660
+
9661
+ for (var _index2 = columns.length - 1; _index2 > -1; _index2--) {
9662
+ if (finalLocationWidth.current[_index2]) {
9663
+ finalLocationWidth.current[_index2].right = right;
9664
+ right = finalLocationWidth.current[_index2].width + right;
9665
+ }
9666
+ }
9667
+
9668
+ return finalLocationWidth.current;
9669
+ };
9670
+
9253
9671
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
9672
+ var childKey = (expandable == null ? void 0 : expandable.childrenColumnName) || 'children';
9673
+
9674
+ var deep = params => {
9675
+ var arr1 = [];
9676
+ var arr = params.map((it, index) => {
9677
+ if (Array.isArray(it[childKey])) {
9678
+ arr1.push(...deep(it[childKey]));
9679
+ }
9680
+
9681
+ return rowKey ? it[rowKey] : index;
9682
+ });
9683
+ return [...arr1, ...arr];
9684
+ };
9685
+
9254
9686
  if (expandable) {
9255
9687
  if (expandable.defaultExpandAllRows) {
9256
- setExpandIndex(data.map((it, index) => rowKey ? it[rowKey] : index));
9688
+ setExpandIndex(deep(data));
9257
9689
  return;
9258
9690
  }
9259
9691
 
@@ -9357,31 +9789,54 @@ function Table(props) {
9357
9789
  selfColumns
9358
9790
  };
9359
9791
  }, [columns, expandIndex]);
9792
+ var style = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
9793
+ var style = {
9794
+ table: {},
9795
+ div: {}
9796
+ };
9797
+
9798
+ if (scroll) {
9799
+ if (scroll.x !== undefined) {
9800
+ style.table.minWidth = '100%';
9801
+ style.table.width = scroll.x;
9802
+ style.div.overflowX = 'auto';
9803
+ style.div.overflowY = 'hidden';
9804
+ }
9805
+
9806
+ if (scroll.y !== undefined) {
9807
+ style.div.maxHeight = scroll.y;
9808
+ style.div.overflowY = 'scroll';
9809
+ }
9810
+ }
9811
+
9812
+ return style;
9813
+ }, [scroll]);
9360
9814
  var cls = [prefixCls, className, bordered ? prefixCls + "-bordered" : null].filter(Boolean).join(' ').trim();
9361
9815
  var {
9362
9816
  header,
9363
9817
  render,
9364
9818
  ellipsis
9365
9819
  } = getLevelItems(self.selfColumns);
9366
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
9820
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
9367
9821
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
9368
- style: {
9369
- overflowY: 'scroll'
9370
- },
9371
9822
  className: cls
9372
9823
  }, other, {
9824
+ style: _extends({}, other.style, style.div),
9373
9825
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
9374
- style: ellipsis ? {
9375
- tableLayout: 'fixed'
9376
- } : {},
9826
+ style: _extends({
9827
+ tableLayout: ellipsis ? 'fixed' : 'auto'
9828
+ }, style.table),
9377
9829
  children: [title && /*#__PURE__*/(0,jsx_runtime.jsx)("caption", {
9378
9830
  children: title
9379
9831
  }), columns && columns.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(TheadComponent, {
9380
9832
  onCellHead: onCellHead,
9381
- data: header
9833
+ data: header,
9834
+ locationWidth: locationWidth,
9835
+ updateLocation: updateLocation
9382
9836
  }), data && data.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
9383
9837
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(TableTr, {
9384
9838
  rowKey: rowKey,
9839
+ locationWidth: locationWidth,
9385
9840
  data: data,
9386
9841
  keys: self.keys,
9387
9842
  render: render,
@@ -9390,7 +9845,7 @@ function Table(props) {
9390
9845
  onCell: onCell,
9391
9846
  hierarchy: 0,
9392
9847
  isExpandedDom: isExpandedDom,
9393
- indentSize: (expandable == null ? void 0 : expandable.indentSize) || 16,
9848
+ indentSize: typeof (expandable == null ? void 0 : expandable.indentSize) === 'number' ? expandable == null ? void 0 : expandable.indentSize : 16,
9394
9849
  childrenColumnName: (expandable == null ? void 0 : expandable.childrenColumnName) || 'children'
9395
9850
  })
9396
9851
  }), data && data.length === 0 && empty && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
@@ -9541,7 +9996,7 @@ function Tabs(props) {
9541
9996
  if (activeItem.current && type === 'line') {
9542
9997
  setSlideStyle({
9543
9998
  width: activeItem.current.clientWidth,
9544
- left: activeItem.current.offsetLeft + 15
9999
+ left: activeItem.current.offsetLeft
9545
10000
  });
9546
10001
  }
9547
10002
  }
@@ -9560,17 +10015,17 @@ function Tabs(props) {
9560
10015
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
9561
10016
  className: prefixCls + "-bar",
9562
10017
  ref: divContentRef,
9563
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
10018
+ children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
9564
10019
  className: prefixCls + "-nav",
9565
10020
  style: {
9566
10021
  width: 'max-content'
9567
10022
  },
9568
- children: renderNav(children)
10023
+ children: [renderNav(children), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
10024
+ style: slideStyle,
10025
+ className: prefixCls + "-slide"
10026
+ })]
9569
10027
  })
9570
10028
  })
9571
- }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
9572
- style: slideStyle,
9573
- className: prefixCls + "-slide"
9574
10029
  }), hiddenNav.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(Popover, {
9575
10030
  trigger: "click",
9576
10031
  placement: "bottomRight",
@@ -10238,6 +10693,7 @@ function SearchTagInput(props) {
10238
10693
  setInnerIsOpen(isOpen);
10239
10694
  if (!isOpen) searchValueChange('');
10240
10695
  },
10696
+ disabled: disabled,
10241
10697
  isOpen: innerIsOpen,
10242
10698
  menu: /*#__PURE__*/(0,jsx_runtime.jsx)(react_card_esm, {
10243
10699
  bodyStyle: emptyOption === true ? {
@@ -10275,6 +10731,7 @@ function SearchTagInput(props) {
10275
10731
  },
10276
10732
  className: prefixCls + "-tag",
10277
10733
  closable: true,
10734
+ disabled: disabled,
10278
10735
  color: "#393E48",
10279
10736
  onClose: e => {
10280
10737
  e.stopPropagation();
@@ -10284,10 +10741,7 @@ function SearchTagInput(props) {
10284
10741
  }, index);
10285
10742
  }), /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
10286
10743
  ref: inputRef,
10287
- style: {
10288
- flex: 1,
10289
- minWidth: 30
10290
- },
10744
+ style: {},
10291
10745
  className: prefixCls + "-input-contents",
10292
10746
  size: size,
10293
10747
  disabled: disabled,
@@ -10296,7 +10750,7 @@ function SearchTagInput(props) {
10296
10750
  value: searchValue,
10297
10751
  placeholder: selectedOption.length ? '' : placeholder
10298
10752
  })]
10299
- }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
10753
+ }), !disabled && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
10300
10754
  style: {
10301
10755
  height: 25,
10302
10756
  width: 14