uiw 4.15.1 → 4.16.2

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
@@ -322,6 +322,7 @@ __webpack_require__.d(__webpack_exports__, {
322
322
  "Calendar": () => (/* reexport */ Calendar),
323
323
  "Card": () => (/* reexport */ react_card_esm),
324
324
  "Carousel": () => (/* reexport */ react_carousel_esm),
325
+ "Cascader": () => (/* reexport */ react_cascader_esm),
325
326
  "Checkbox": () => (/* reexport */ react_checkbox_esm),
326
327
  "CheckboxGroup": () => (/* reexport */ CheckboxGroup),
327
328
  "Col": () => (/* reexport */ Col),
@@ -4187,6 +4188,601 @@ function Carousel(props, ref) {
4187
4188
 
4188
4189
  /* harmony default export */ const react_carousel_esm = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Carousel));
4189
4190
 
4191
+ ;// CONCATENATED MODULE: ../react-dropdown/esm/index.js
4192
+
4193
+
4194
+ var react_dropdown_esm_excluded = ["prefixCls", "placement", "className", "menu", "children", "disabled"];
4195
+
4196
+
4197
+
4198
+
4199
+ function Dropdown(props) {
4200
+ var {
4201
+ prefixCls = 'w-dropdown',
4202
+ placement = 'bottomLeft',
4203
+ className,
4204
+ menu,
4205
+ children,
4206
+ disabled
4207
+ } = props,
4208
+ other = _objectWithoutPropertiesLoose(props, react_dropdown_esm_excluded);
4209
+
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))
4220
+ }));
4221
+ }
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
4227
+
4228
+
4229
+ var MenuItem_excluded = ["prefixCls", "className", "tagName", "children", "disabled", "multiline", "icon", "text", "active", "addonAfter", "isSubMenuItem"];
4230
+
4231
+
4232
+
4233
+
4234
+
4235
+ var disabledProps = {
4236
+ href: undefined,
4237
+ onClick: undefined,
4238
+ onMouseDown: undefined,
4239
+ onMouseEnter: undefined,
4240
+ onMouseLeave: undefined,
4241
+ tabIndex: -1
4242
+ };
4243
+
4244
+ function Internal(props, ref) {
4245
+ var {
4246
+ prefixCls = 'w-menu-item',
4247
+ className,
4248
+ tagName: TagName = 'a',
4249
+ disabled = false,
4250
+ multiline = false,
4251
+ icon,
4252
+ text,
4253
+ active = false,
4254
+ addonAfter,
4255
+ isSubMenuItem
4256
+ } = props,
4257
+ htmlProps = _objectWithoutPropertiesLoose(props, MenuItem_excluded);
4258
+
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]
4271
+ }));
4272
+
4273
+ if (isSubMenuItem) {
4274
+ return tagComp;
4275
+ }
4276
+
4277
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
4278
+ children: [" ", tagComp, " "]
4279
+ });
4280
+ }
4281
+
4282
+ var MenuItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Internal);
4283
+ MenuItem.displayName = 'uiw.MenuItem';
4284
+
4285
+ ;// CONCATENATED MODULE: ../react-menu/esm/Divider.js
4286
+
4287
+
4288
+ var Divider_excluded = ["prefixCls", "className", "title"];
4289
+
4290
+
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)(!!overlayProps.isOpen);
4386
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
4387
+ if (collapse) 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/style/index.css
4538
+ // extracted by mini-css-extract-plugin
4539
+ /* harmony default export */ const react_cascader_esm_style = ({});
4540
+ ;// CONCATENATED MODULE: ../react-cascader/esm/index.js
4541
+
4542
+
4543
+
4544
+
4545
+
4546
+
4547
+
4548
+
4549
+
4550
+ function Cascader(props) {
4551
+ var {
4552
+ value,
4553
+ onChange,
4554
+ onSearch,
4555
+ allowClear,
4556
+ placeholder,
4557
+ prefixCls = 'w-cascader',
4558
+ className,
4559
+ style = {
4560
+ width: 200
4561
+ },
4562
+ option = [],
4563
+ others
4564
+ } = props;
4565
+ var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
4566
+ var [innerIsOpen, setInnerIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
4567
+ var [selectedValue, setSelectedValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
4568
+ var [selectIconType, setSelectIconType] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('');
4569
+ var [searchText, setSearchText] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('');
4570
+ var [searchOn, setSearchOn] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
4571
+ var [inputValue, setInputValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('');
4572
+ var [searchOption, setSearchOption] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)();
4573
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
4574
+ if (onSearch) {
4575
+ var tempOptions = [];
4576
+ iteratorOption(option, opt => {
4577
+ var label = opt.map(m => m.label).join(' / ');
4578
+ tempOptions.push({
4579
+ label,
4580
+ options: opt
4581
+ });
4582
+ });
4583
+ setSearchOption(tempOptions);
4584
+ }
4585
+ }, [onSearch]);
4586
+
4587
+ var iteratorOption = function iteratorOption(options, cb, opts) {
4588
+ if (opts === void 0) {
4589
+ opts = [];
4590
+ }
4591
+
4592
+ options.map(opt => {
4593
+ var optsTemp = [...opts, opt];
4594
+
4595
+ if (opt.children) {
4596
+ iteratorOption(opt.children, cb, optsTemp);
4597
+ } else {
4598
+ cb == null ? void 0 : cb(optsTemp);
4599
+ }
4600
+ });
4601
+ };
4602
+
4603
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
4604
+ if (value) {
4605
+ var valueTemp = [];
4606
+ var optChildren = option;
4607
+ value == null ? void 0 : value.map(item => {
4608
+ var findOpt = optChildren.find(opt => opt.value === item);
4609
+ optChildren = (findOpt == null ? void 0 : findOpt.children) || [];
4610
+ valueTemp.push(_extends({
4611
+ label: item,
4612
+ value: item
4613
+ }, findOpt));
4614
+ });
4615
+ setSelectedValue(valueTemp);
4616
+ }
4617
+ }, [value]);
4618
+
4619
+ function onVisibleChange(isOpen) {
4620
+ setInnerIsOpen(isOpen);
4621
+ }
4622
+
4623
+ function renderSelectIcon(type) {
4624
+ var selectIconType;
4625
+
4626
+ if (type === 'enter' && allowClear && selectedValue.length > 0) {
4627
+ selectIconType = 'close';
4628
+ } else {
4629
+ selectIconType = '';
4630
+ }
4631
+
4632
+ setSelectIconType(selectIconType);
4633
+ }
4634
+
4635
+ var searchItemClick = options => {
4636
+ setSearchText('');
4637
+ setInnerIsOpen(false);
4638
+ handelChange(false, options);
4639
+ };
4640
+
4641
+ var handleItemClick = (optionsItem, level) => {
4642
+ selectedValue.splice(level, selectedValue.length - level, optionsItem);
4643
+ handelChange(true, selectedValue);
4644
+ };
4645
+
4646
+ var handelChange = (isSeleted, selectedValue) => {
4647
+ setSelectedValue([...selectedValue]);
4648
+ var value = selectedValue.map(item => item.value);
4649
+ onChange == null ? void 0 : onChange(isSeleted, value, selectedValue);
4650
+ };
4651
+
4652
+ var onClear = e => {
4653
+ e.stopPropagation();
4654
+ handelChange(false, []);
4655
+ };
4656
+
4657
+ var handelSearch = searchText => {
4658
+ setSearchText(searchText);
4659
+ };
4660
+
4661
+ var inputChange = e => {
4662
+ if (!innerIsOpen) {
4663
+ setInnerIsOpen(!innerIsOpen);
4664
+ }
4665
+
4666
+ var value = e.target.value;
4667
+ onSearch && handelSearch(value);
4668
+ };
4669
+
4670
+ var widths = (style == null ? void 0 : style.width) * 0.5 || undefined;
4671
+
4672
+ var OptionIter = function OptionIter(option, level) {
4673
+ if (level === void 0) {
4674
+ level = 0;
4675
+ }
4676
+
4677
+ if (!option) return;
4678
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm, {
4679
+ bordered: true,
4680
+ style: {
4681
+ minHeight: 25,
4682
+ minWidth: widths,
4683
+ overflowY: 'scroll',
4684
+ width: widths
4685
+ },
4686
+ children: !option || option.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4687
+ style: {
4688
+ color: '#c7c7c7',
4689
+ fontSize: 12
4690
+ },
4691
+ children: '没有数据'
4692
+ }) : option.map((opt, index) => {
4693
+ var _selectedValue$level;
4694
+
4695
+ var active = ((_selectedValue$level = selectedValue[level]) == null ? void 0 : _selectedValue$level.value) === opt.value;
4696
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm.Item, {
4697
+ active: active,
4698
+ text: opt.label,
4699
+ addonAfter: opt.children ? /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
4700
+ type: "right"
4701
+ }) : undefined,
4702
+ onClick: () => handleItemClick(opt, level)
4703
+ }, index);
4704
+ })
4705
+ }, level);
4706
+ };
4707
+
4708
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
4709
+ var inputValue = selectedValue.map(opt => opt.label).join(' / ');
4710
+ setInputValue(inputValue);
4711
+ }, [selectedValue]);
4712
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown, _extends({
4713
+ className: cls,
4714
+ trigger: "click",
4715
+ style: _extends({
4716
+ marginTop: 5
4717
+ }, style),
4718
+ overlayStyl: {
4719
+ width: 100
4720
+ }
4721
+ }, others, {
4722
+ onVisibleChange: onVisibleChange,
4723
+ isOpen: innerIsOpen,
4724
+ menu: !searchText ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4725
+ style: {
4726
+ display: 'flex'
4727
+ },
4728
+ children: new Array(selectedValue.length + 1).fill(0).map((_, index) => {
4729
+ var _selectedValue;
4730
+
4731
+ var options = index ? (_selectedValue = selectedValue[index - 1]) == null ? void 0 : _selectedValue.children : option;
4732
+ return OptionIter(options, index);
4733
+ }).filter(m => !!m)
4734
+ }) : /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm, {
4735
+ bordered: true,
4736
+ style: {
4737
+ minHeight: 25,
4738
+ minWidth: style == null ? void 0 : style.width,
4739
+ overflowY: 'scroll',
4740
+ width: style == null ? void 0 : style.width
4741
+ },
4742
+ children: !searchOption || searchOption.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
4743
+ style: {
4744
+ color: '#c7c7c7',
4745
+ fontSize: 12
4746
+ },
4747
+ children: '没有数据'
4748
+ }) : searchOption.filter(opt => opt.label.includes(searchText.trim())).map((opt, index) => {
4749
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(react_menu_esm.Item, {
4750
+ text: opt.label,
4751
+ onClick: () => searchItemClick(opt.options) //
4752
+
4753
+ }, index);
4754
+ })
4755
+ }),
4756
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
4757
+ onMouseLeave: () => renderSelectIcon('leave'),
4758
+ onMouseOver: () => renderSelectIcon('enter'),
4759
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
4760
+ value: searchOn ? searchText : inputValue,
4761
+ onChange: inputChange,
4762
+ placeholder: searchOn ? inputValue : placeholder,
4763
+ style: {
4764
+ width: style == null ? void 0 : style.width
4765
+ },
4766
+ onFocus: () => onSearch && setSearchOn(true),
4767
+ onBlur: () => onSearch && setSearchOn(false),
4768
+ readOnly: !onSearch,
4769
+ addonAfter: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
4770
+ style: {
4771
+ width: 'auto'
4772
+ },
4773
+ children: selectIconType === 'close' && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
4774
+ type: selectIconType,
4775
+ onClick: onClear,
4776
+ className: prefixCls + "-close"
4777
+ })
4778
+ })
4779
+ })
4780
+ })
4781
+ }));
4782
+ }
4783
+
4784
+ /* harmony default export */ const react_cascader_esm = (Cascader);
4785
+
4190
4786
  ;// CONCATENATED MODULE: ../react-radio/esm/RadioAbstract.js
4191
4787
 
4192
4788
 
@@ -4767,7 +5363,7 @@ function DateInputRange(props) {
4767
5363
  ;// CONCATENATED MODULE: ../react-date-input/esm/index.js
4768
5364
 
4769
5365
 
4770
- var react_date_input_esm_excluded = ["prefixCls", "className", "popoverProps", "datePickerProps", "allowClear", "format", "onChange"];
5366
+ var react_date_input_esm_excluded = ["prefixCls", "className", "popoverProps", "datePickerProps", "allowClear", "autoClose", "format", "onChange"];
4771
5367
 
4772
5368
 
4773
5369
 
@@ -4784,6 +5380,7 @@ function DateInput(props) {
4784
5380
  popoverProps,
4785
5381
  datePickerProps,
4786
5382
  allowClear = true,
5383
+ autoClose = false,
4787
5384
  format = 'YYYY/MM/DD',
4788
5385
  onChange
4789
5386
  } = props,
@@ -4799,6 +5396,7 @@ function DateInput(props) {
4799
5396
  }, [props.value]);
4800
5397
 
4801
5398
  function handleChange(cdate) {
5399
+ autoClose && setIsOpen(false);
4802
5400
  setDate(cdate);
4803
5401
  onChange && onChange(cdate);
4804
5402
  }
@@ -4811,10 +5409,13 @@ function DateInput(props) {
4811
5409
  });
4812
5410
  }
4813
5411
 
5412
+ var [isOpen, setIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
4814
5413
  return /*#__PURE__*/(0,jsx_runtime.jsx)(Popover, _extends({
4815
5414
  trigger: "focus",
4816
5415
  placement: "bottomLeft",
4817
- autoAdjustOverflow: true
5416
+ autoAdjustOverflow: true,
5417
+ isOpen: isOpen,
5418
+ onVisibleChange: open => setIsOpen(open)
4818
5419
  }, popoverProps, {
4819
5420
  content: /*#__PURE__*/(0,jsx_runtime.jsx)(DatePicker, _extends({
4820
5421
  date: value && new Date(value) || undefined,
@@ -5026,6 +5627,7 @@ function InternalDescriptions(props, ref) {
5026
5627
  className: prefixCls + "-title",
5027
5628
  children: title
5028
5629
  }), /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
5630
+ className: prefixCls + "-tbody",
5029
5631
  children: childs.map((child, index) => /*#__PURE__*/(0,jsx_runtime.jsx)(Row, {
5030
5632
  prefixCls: prefixCls,
5031
5633
  bordered: bordered,
@@ -5138,56 +5740,24 @@ var react_drawer_esm_excluded = ["prefixCls", "className", "style", "placement",
5138
5740
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
5139
5741
  className: prefixCls + "-wrapper",
5140
5742
  style: styl,
5141
- children: [(title || icon) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
5142
- className: prefixCls + "-header",
5143
- children: [iconView, titleView, title && isCloseButtonShown && /*#__PURE__*/(0,jsx_runtime.jsx)(esm, {
5144
- basic: true,
5145
- onClick: props.onClose,
5146
- icon: "close",
5147
- type: "light"
5148
- })]
5149
- }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
5150
- className: prefixCls + "-body",
5151
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({}, bodyProps, {
5152
- className: bodyCls,
5153
- children: props.children
5154
- }))
5155
- }), footerView]
5156
- })
5157
- }));
5158
- });
5159
-
5160
- ;// CONCATENATED MODULE: ../react-dropdown/esm/index.js
5161
-
5162
-
5163
- var react_dropdown_esm_excluded = ["prefixCls", "placement", "className", "menu", "children", "disabled"];
5164
-
5165
-
5166
-
5167
-
5168
- function Dropdown(props) {
5169
- var {
5170
- prefixCls = 'w-dropdown',
5171
- placement = 'bottomLeft',
5172
- className,
5173
- menu,
5174
- children,
5175
- disabled
5176
- } = props,
5177
- other = _objectWithoutPropertiesLoose(props, react_dropdown_esm_excluded);
5178
-
5179
- var cls = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => [prefixCls, className].filter(Boolean).join(' ').trim(), [prefixCls, className]);
5180
- return /*#__PURE__*/(0,jsx_runtime.jsx)(react_overlay_trigger_esm, _extends({
5181
- isOutside: true,
5182
- autoAdjustOverflow: true,
5183
- className: cls,
5184
- disabled: disabled,
5185
- placement: placement
5186
- }, other, {
5187
- overlay: menu,
5188
- children: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props))
5743
+ children: [(title || icon) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
5744
+ className: prefixCls + "-header",
5745
+ children: [iconView, titleView, title && isCloseButtonShown && /*#__PURE__*/(0,jsx_runtime.jsx)(esm, {
5746
+ basic: true,
5747
+ onClick: props.onClose,
5748
+ icon: "close",
5749
+ type: "light"
5750
+ })]
5751
+ }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
5752
+ className: prefixCls + "-body",
5753
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({}, bodyProps, {
5754
+ className: bodyCls,
5755
+ children: props.children
5756
+ }))
5757
+ }), footerView]
5758
+ })
5189
5759
  }));
5190
- }
5760
+ });
5191
5761
 
5192
5762
  ;// CONCATENATED MODULE: ../react-empty/esm/style/index.css
5193
5763
  // extracted by mini-css-extract-plugin
@@ -6324,427 +6894,113 @@ function LayoutSider(props) {
6324
6894
  });
6325
6895
  }
6326
6896
 
6327
- ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Content.js
6328
-
6329
-
6330
- var Content_excluded = ["prefixCls", "className", "children"];
6331
-
6332
-
6333
- function LayoutContent(props) {
6334
- var {
6335
- prefixCls = 'w-layout-content',
6336
- className,
6337
- children
6338
- } = props,
6339
- other = _objectWithoutPropertiesLoose(props, Content_excluded);
6340
-
6341
- return /*#__PURE__*/(0,jsx_runtime.jsx)("main", _extends({
6342
- className: [prefixCls, className].filter(Boolean).join(' ').trim()
6343
- }, other, {
6344
- children: children
6345
- }));
6346
- }
6347
-
6348
- ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/style/index.css
6349
- // extracted by mini-css-extract-plugin
6350
- /* harmony default export */ const react_layout_esm_style = ({});
6351
- ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/index.js
6352
-
6353
-
6354
-
6355
-
6356
-
6357
-
6358
- Layout.Header = LayoutHeader;
6359
- Layout.Footer = LayoutFooter;
6360
- Layout.Sider = LayoutSider;
6361
- Layout.Content = LayoutContent;
6362
-
6363
-
6364
-
6365
-
6366
-
6367
- /* harmony default export */ const react_layout_esm = (Layout);
6368
-
6369
- ;// CONCATENATED MODULE: ../react-loader/esm/style/index.css
6370
- // extracted by mini-css-extract-plugin
6371
- /* harmony default export */ const react_loader_esm_style = ({});
6372
- ;// CONCATENATED MODULE: ../react-loader/esm/index.js
6373
-
6374
-
6375
- var react_loader_esm_excluded = ["prefixCls", "className", "size", "loading", "tip", "vertical", "color", "bgColor", "children", "indicator", "fullscreen"];
6376
-
6377
-
6378
-
6379
-
6380
- /* harmony default export */ const react_loader_esm = (function (props) {
6381
- if (props === void 0) {
6382
- props = {};
6383
- }
6384
-
6385
- var {
6386
- prefixCls = 'w-loader',
6387
- className,
6388
- size = 'default',
6389
- loading = true,
6390
- tip,
6391
- vertical,
6392
- color,
6393
- bgColor,
6394
- children,
6395
- indicator,
6396
- fullscreen = false
6397
- } = props,
6398
- otherProps = _objectWithoutPropertiesLoose(props, react_loader_esm_excluded);
6399
-
6400
- var cls = [prefixCls, className, size ? prefixCls + "-" + size : null].filter(Boolean).join(' ').trim();
6401
- var indicatorView = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
6402
- viewBox: "25 25 50 50",
6403
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
6404
- cx: "50",
6405
- cy: "50",
6406
- r: "20",
6407
- fill: "none",
6408
- strokeWidth: "5",
6409
- strokeMiterlimit: "10"
6410
- })
6411
- }), []);
6412
- var tipsView = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
6413
- className: [prefixCls + "-tips", fullscreen ? prefixCls + "-fullscreen" : null].filter(Boolean).join(' ').trim(),
6414
- style: {
6415
- color,
6416
- backgroundColor: bgColor
6417
- },
6418
- children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
6419
- className: prefixCls + "-tips-nested",
6420
- children: [indicator || indicatorView, tip && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
6421
- className: [prefixCls + "-text", vertical ? prefixCls + "-vertical" : null].filter(Boolean).join(' ').trim(),
6422
- children: tip
6423
- })]
6424
- })
6425
- }), [fullscreen, bgColor, prefixCls, vertical, tip]);
6426
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", _extends({
6427
- className: cls
6428
- }, otherProps, {
6429
- children: [(loading || fullscreen) && tipsView, children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props, {
6430
- className: [prefixCls + "-warp", loading ? prefixCls + "-blur" : null].filter(Boolean).join(' ').trim()
6431
- }))]
6432
- }));
6433
- });
6434
-
6435
- ;// CONCATENATED MODULE: ../react-menu/esm/style/item.css
6436
- // extracted by mini-css-extract-plugin
6437
- /* harmony default export */ const style_item = ({});
6438
- ;// CONCATENATED MODULE: ../react-menu/esm/MenuItem.js
6439
-
6440
-
6441
- var MenuItem_excluded = ["prefixCls", "className", "tagName", "children", "disabled", "multiline", "icon", "text", "active", "addonAfter", "isSubMenuItem"];
6442
-
6443
-
6444
-
6445
-
6446
-
6447
- var disabledProps = {
6448
- href: undefined,
6449
- onClick: undefined,
6450
- onMouseDown: undefined,
6451
- onMouseEnter: undefined,
6452
- onMouseLeave: undefined,
6453
- tabIndex: -1
6454
- };
6455
-
6456
- function Internal(props, ref) {
6457
- var {
6458
- prefixCls = 'w-menu-item',
6459
- className,
6460
- tagName: TagName = 'a',
6461
- disabled = false,
6462
- multiline = false,
6463
- icon,
6464
- text,
6465
- active = false,
6466
- addonAfter,
6467
- isSubMenuItem
6468
- } = props,
6469
- htmlProps = _objectWithoutPropertiesLoose(props, MenuItem_excluded);
6470
-
6471
- var anchorCls = [prefixCls, active ? 'active' : null, disabled ? 'w-disabled' : null, className].filter(Boolean).join(' ').trim();
6472
- var tagComp = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TagName, _extends({}, htmlProps, disabled ? disabledProps : {}, {
6473
- className: anchorCls,
6474
- ref
6475
- }), /*#__PURE__*/(0,jsx_runtime.jsxs)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment, {
6476
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
6477
- className: prefixCls + "-icon",
6478
- type: icon
6479
- }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
6480
- className: [prefixCls && prefixCls + "-text", !multiline && prefixCls + "-multiline"].filter(Boolean).join(' ').trim(),
6481
- children: text
6482
- }), addonAfter]
6483
- }));
6484
-
6485
- if (isSubMenuItem) {
6486
- return tagComp;
6487
- }
6488
-
6489
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
6490
- children: [" ", tagComp, " "]
6491
- });
6492
- }
6493
-
6494
- var MenuItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(Internal);
6495
- MenuItem.displayName = 'uiw.MenuItem';
6496
-
6497
- ;// CONCATENATED MODULE: ../react-menu/esm/Divider.js
6498
-
6499
-
6500
- var Divider_excluded = ["prefixCls", "className", "title"];
6501
-
6502
-
6503
- var MenuDivider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
6504
- var {
6505
- prefixCls = 'w-menu-divider',
6506
- className,
6507
- title
6508
- } = props,
6509
- htmlProps = _objectWithoutPropertiesLoose(props, Divider_excluded);
6510
-
6511
- var cls = [prefixCls, className].filter(Boolean).join(' ').trim();
6512
-
6513
- if (!title) {
6514
- return /*#__PURE__*/(0,jsx_runtime.jsx)("li", _extends({}, htmlProps, {
6515
- ref: ref,
6516
- className: cls
6517
- }));
6518
- }
6519
-
6520
- return /*#__PURE__*/(0,jsx_runtime.jsx)("li", _extends({}, htmlProps, {
6521
- ref: ref,
6522
- className: cls,
6523
- "data-menu": "divider",
6524
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
6525
- children: title
6526
- })
6527
- }));
6528
- });
6529
- MenuDivider.displayName = 'uiw.MenuDivider';
6530
-
6531
- ;// CONCATENATED MODULE: ../react-menu/esm/style/submenu.css
6532
- // extracted by mini-css-extract-plugin
6533
- /* harmony default export */ const submenu = ({});
6534
- ;// CONCATENATED MODULE: ../react-menu/esm/SubMenu.js
6535
-
6536
-
6537
- var SubMenu_excluded = ["prefixCls", "className", "disabled", "overlayProps", "children", "collapse", "inlineIndent", "inlineCollapsed"];
6538
-
6539
-
6540
-
6541
-
6542
-
6543
-
6544
-
6545
-
6546
- function checkedMenuItem(node) {
6547
- var isCheck = false;
6548
-
6549
- if (node) {
6550
- // eslint-disable-next-line
6551
- do {
6552
- if (!node.dataset.menu) {
6553
- isCheck = true;
6554
- }
6555
-
6556
- if (node.dataset.menu && /^(subitem|divider)$/.test(node.dataset.menu)) {
6557
- isCheck = false;
6558
- }
6559
- } while (!node.dataset.menu && (node = node.parentNode));
6560
- }
6561
-
6562
- return isCheck;
6563
- }
6564
-
6565
- function IconView(_ref) {
6566
- var {
6567
- prefixCls,
6568
- collapse,
6569
- isOpen
6570
- } = _ref;
6571
- return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
6572
- type: "caret-right",
6573
- className: [prefixCls ? prefixCls + "-collapse-icon" : null, !collapse && isOpen ? 'w-open' : null, !collapse && !isOpen ? 'w-close' : null].filter(Boolean).join(' ').trim()
6574
- }), [prefixCls, collapse, isOpen]);
6575
- }
6897
+ ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/Content.js
6576
6898
 
6577
- var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(function (props, ref) {
6899
+
6900
+ var Content_excluded = ["prefixCls", "className", "children"];
6901
+
6902
+
6903
+ function LayoutContent(props) {
6578
6904
  var {
6579
- prefixCls = 'w-menu-subitem',
6905
+ prefixCls = 'w-layout-content',
6580
6906
  className,
6581
- disabled,
6582
- overlayProps = {},
6583
- children,
6584
- collapse = false,
6585
- inlineIndent
6907
+ children
6586
6908
  } = props,
6587
- other = _objectWithoutPropertiesLoose(props, SubMenu_excluded);
6909
+ other = _objectWithoutPropertiesLoose(props, Content_excluded);
6588
6910
 
6589
- var overlayTriggerProps = {};
6590
- var menuProps = {
6591
- bordered: true,
6592
- children,
6593
- inlineIndent,
6594
- className: [prefixCls ? prefixCls + "-overlay" : null].filter(Boolean).join(' ').trim()
6595
- };
6596
- var popupRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
6597
- var [isOpen, setIsOpen] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
6598
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
6599
- setIsOpen(false);
6600
- }, [collapse]);
6911
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("main", _extends({
6912
+ className: [prefixCls, className].filter(Boolean).join(' ').trim()
6913
+ }, other, {
6914
+ children: children
6915
+ }));
6916
+ }
6601
6917
 
6602
- function onClick(e) {
6603
- var target = e.currentTarget;
6604
- var related = e.relatedTarget || e.nativeEvent.target;
6605
- if (target.children.length < 1) return;
6918
+ ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/style/index.css
6919
+ // extracted by mini-css-extract-plugin
6920
+ /* harmony default export */ const react_layout_esm_style = ({});
6921
+ ;// CONCATENATED MODULE: ../../node_modules/@uiw/react-layout/esm/index.js
6606
6922
 
6607
- if (checkedMenuItem(related)) {
6608
- if (popupRef.current) {
6609
- popupRef.current.hide();
6610
- }
6611
- }
6612
- }
6613
6923
 
6614
- function onExit(node) {
6615
- node.style.height = node.scrollHeight + "px";
6616
- setIsOpen(false);
6617
- }
6618
6924
 
6619
- function onExiting(node) {
6620
- node.style.height = '0px';
6621
- }
6622
6925
 
6623
- function onEnter(node) {
6624
- node.style.height = '1px';
6625
- setIsOpen(true);
6626
- }
6627
6926
 
6628
- function onEntering(node) {
6629
- node.style.height = node.scrollHeight + "px";
6630
- }
6631
6927
 
6632
- function onEntered(node) {
6633
- node.style.height = 'initial';
6634
- }
6928
+ Layout.Header = LayoutHeader;
6929
+ Layout.Footer = LayoutFooter;
6930
+ Layout.Sider = LayoutSider;
6931
+ Layout.Content = LayoutContent;
6635
6932
 
6636
- if (!collapse) {
6637
- delete menuProps.onClick;
6638
- menuProps.bordered = false;
6639
- overlayTriggerProps.className = prefixCls + "-collapse";
6640
- overlayTriggerProps.appear = false;
6641
- overlayTriggerProps.isOutside = true;
6642
- overlayTriggerProps.isClickOutside = false;
6643
- overlayTriggerProps.unmountOnExit = false;
6644
- overlayTriggerProps.trigger = 'click';
6645
- overlayTriggerProps.transitionName = "" + prefixCls;
6646
- overlayTriggerProps.onExit = onExit;
6647
- overlayTriggerProps.onExiting = onExiting;
6648
- overlayTriggerProps.onEnter = onEnter;
6649
- overlayTriggerProps.onEntered = onEntered;
6650
- overlayTriggerProps.onEntering = onEntering;
6651
- } else {
6652
- overlayTriggerProps.className = prefixCls + "-popup";
6653
- overlayTriggerProps.trigger = 'hover';
6654
- overlayTriggerProps.usePortal = true;
6655
- menuProps.onClick = onClick;
6656
- }
6657
6933
 
6658
- return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
6659
- "data-menu": "subitem",
6660
- ref: ref,
6661
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_overlay_trigger_esm, _extends({
6662
- placement: "rightTop",
6663
- autoAdjustOverflow: true,
6664
- disabled: disabled,
6665
- isOpen: isOpen,
6666
- usePortal: false,
6667
- isOutside: true
6668
- }, overlayTriggerProps, overlayProps, {
6669
- ref: popupRef,
6670
- overlay: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_Menu, _extends({}, menuProps, {
6671
- style: !collapse ? {
6672
- paddingLeft: inlineIndent
6673
- } : {}
6674
- })),
6675
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(MenuItem, _extends({}, other, {
6676
- ref: null,
6677
- disabled: disabled,
6678
- isSubMenuItem: true,
6679
- addonAfter: /*#__PURE__*/(0,jsx_runtime.jsx)(IconView, {
6680
- collapse: collapse,
6681
- prefixCls: prefixCls,
6682
- isOpen: isOpen
6683
- }),
6684
- className: [prefixCls ? prefixCls + "-title" : null, !collapse ? prefixCls + "-collapse-title" : null, className].filter(Boolean).join(' ').trim()
6685
- }))
6686
- }))
6687
- });
6688
- });
6689
- SubMenu.displayName = 'uiw.SubMenu';
6690
6934
 
6691
- ;// CONCATENATED MODULE: ../react-menu/esm/style/menu.css
6692
- // extracted by mini-css-extract-plugin
6693
- /* harmony default export */ const menu = ({});
6694
- ;// CONCATENATED MODULE: ../react-menu/esm/Menu.js
6695
6935
 
6696
6936
 
6697
- var Menu_excluded = ["prefixCls", "className", "children", "bordered", "theme", "inlineIndent", "inlineCollapsed"];
6937
+ /* harmony default export */ const react_layout_esm = (Layout);
6938
+
6939
+ ;// CONCATENATED MODULE: ../react-loader/esm/style/index.css
6940
+ // extracted by mini-css-extract-plugin
6941
+ /* harmony default export */ const react_loader_esm_style = ({});
6942
+ ;// CONCATENATED MODULE: ../react-loader/esm/index.js
6698
6943
 
6699
6944
 
6945
+ var react_loader_esm_excluded = ["prefixCls", "className", "size", "loading", "tip", "vertical", "color", "bgColor", "children", "indicator", "fullscreen"];
6700
6946
 
6701
6947
 
6702
6948
 
6703
6949
 
6704
- var Menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
6950
+ /* harmony default export */ const react_loader_esm = (function (props) {
6951
+ if (props === void 0) {
6952
+ props = {};
6953
+ }
6954
+
6705
6955
  var {
6706
- prefixCls = 'w-menu',
6956
+ prefixCls = 'w-loader',
6707
6957
  className,
6958
+ size = 'default',
6959
+ loading = true,
6960
+ tip,
6961
+ vertical,
6962
+ color,
6963
+ bgColor,
6708
6964
  children,
6709
- bordered,
6710
- theme = 'light',
6711
- inlineIndent = 10,
6712
- inlineCollapsed
6965
+ indicator,
6966
+ fullscreen = false
6713
6967
  } = props,
6714
- htmlProps = _objectWithoutPropertiesLoose(props, Menu_excluded);
6715
-
6716
- 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]);
6717
- return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", _extends({}, htmlProps, {
6718
- ref: ref,
6719
- className: cls,
6720
- "data-menu": "menu",
6721
- children: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, (child, key) => {
6722
- if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) return child;
6723
- var props = {}; // Sub Menu
6724
-
6725
- if (child.props.children && child.type === SubMenu) {
6726
- props.inlineIndent = inlineIndent;
6727
- }
6968
+ otherProps = _objectWithoutPropertiesLoose(props, react_loader_esm_excluded);
6728
6969
 
6729
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(child, Object.assign(_extends({}, props), child.props, {
6730
- key: "" + key
6731
- }));
6970
+ var cls = [prefixCls, className, size ? prefixCls + "-" + size : null].filter(Boolean).join(' ').trim();
6971
+ var indicatorView = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
6972
+ viewBox: "25 25 50 50",
6973
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
6974
+ cx: "50",
6975
+ cy: "50",
6976
+ r: "20",
6977
+ fill: "none",
6978
+ strokeWidth: "5",
6979
+ strokeMiterlimit: "10"
6980
+ })
6981
+ }), []);
6982
+ var tipsView = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
6983
+ className: [prefixCls + "-tips", fullscreen ? prefixCls + "-fullscreen" : null].filter(Boolean).join(' ').trim(),
6984
+ style: {
6985
+ color,
6986
+ backgroundColor: bgColor
6987
+ },
6988
+ children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
6989
+ className: prefixCls + "-tips-nested",
6990
+ children: [indicator || indicatorView, tip && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
6991
+ className: [prefixCls + "-text", vertical ? prefixCls + "-vertical" : null].filter(Boolean).join(' ').trim(),
6992
+ children: tip
6993
+ })]
6732
6994
  })
6995
+ }), [fullscreen, bgColor, prefixCls, vertical, tip]);
6996
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", _extends({
6997
+ className: cls
6998
+ }, otherProps, {
6999
+ children: [(loading || fullscreen) && tipsView, children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, Object.assign({}, children.props, {
7000
+ className: [prefixCls + "-warp", loading ? prefixCls + "-blur" : null].filter(Boolean).join(' ').trim()
7001
+ }))]
6733
7002
  }));
6734
7003
  });
6735
- Menu.displayName = 'uiw.Menu';
6736
- Menu.Item = MenuItem;
6737
- Menu.SubMenu = SubMenu;
6738
- Menu.Divider = MenuDivider;
6739
- /* harmony default export */ const esm_Menu = (Menu);
6740
-
6741
- ;// CONCATENATED MODULE: ../react-menu/esm/index.js
6742
-
6743
-
6744
-
6745
-
6746
-
6747
- /* harmony default export */ const react_menu_esm = (esm_Menu);
6748
7004
 
6749
7005
  ;// CONCATENATED MODULE: ../react-message/esm/style/index.css
6750
7006
  // extracted by mini-css-extract-plugin
@@ -8263,6 +8519,7 @@ function SearchSelect(props) {
8263
8519
  placeholder: selectedValue.length ? '' : placeholder
8264
8520
  })]
8265
8521
  }), !disabled && (selectIconType === 'close' || selectIconType === 'loading' && loading) && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
8522
+ className: prefixCls + "-multiple-colse",
8266
8523
  type: selectIconType,
8267
8524
  spin: loading && selectIconType === 'loading',
8268
8525
  onClick: resetSelectedValue
@@ -8277,6 +8534,8 @@ function SearchSelect(props) {
8277
8534
  placeholder: placeholder,
8278
8535
  addonAfter: !disabled && (selectIconType === 'close' || selectIconType === 'loading' && loading) && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
8279
8536
  type: selectIconType,
8537
+ className: prefixCls + "-singe-colse",
8538
+ color: "#393e48",
8280
8539
  spin: loading && selectIconType === 'loading',
8281
8540
  onClick: resetSelectedValue
8282
8541
  })
@@ -9214,7 +9473,7 @@ class ThComponent extends external_root_React_commonjs2_react_commonjs_react_amd
9214
9473
  var rect = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this);
9215
9474
  this.props.updateLocation({
9216
9475
  width: rect.getBoundingClientRect().width
9217
- }, this.props.colNum);
9476
+ }, "" + this.props.rowNum + this.props.colNum, this.props.item.key, this.props.item.colSpan);
9218
9477
  }
9219
9478
 
9220
9479
  render() {
@@ -9244,7 +9503,7 @@ class ThComponent extends external_root_React_commonjs2_react_commonjs_react_amd
9244
9503
  }
9245
9504
 
9246
9505
  return /*#__PURE__*/(0,jsx_runtime.jsx)("th", _extends({}, thProps, {
9247
- style: _extends({}, thProps.style, locationFixed(fixed, locationWidth, colNum)),
9506
+ style: _extends({}, thProps.style, locationFixed(fixed, locationWidth, "" + rowNum + colNum)),
9248
9507
  className: prefixCls + "-tr-children-" + ((item == null ? void 0 : item.align) || 'left') + " " + (item.className || '') + " " + cls,
9249
9508
  onClick: evn => onCellHead == null ? void 0 : onCellHead(item, colNum, rowNum, evn),
9250
9509
  children: titleNode
@@ -9368,7 +9627,8 @@ function TableTr(props) {
9368
9627
  hierarchy,
9369
9628
  indentSize,
9370
9629
  childrenColumnName,
9371
- locationWidth
9630
+ locationWidth,
9631
+ header
9372
9632
  } = props;
9373
9633
  var [isOpacity, setIsOpacity] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
9374
9634
  var [childrenIndex, setChildrenIndex] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0);
@@ -9396,6 +9656,15 @@ function TableTr(props) {
9396
9656
  };
9397
9657
  }, [expandIndex]);
9398
9658
 
9659
+ var getIndex = key => {
9660
+ var j = 0;
9661
+ var i = header.findIndex(it => {
9662
+ j = it.findIndex(item => item.key === key);
9663
+ return j > -1;
9664
+ });
9665
+ return "" + i + j;
9666
+ };
9667
+
9399
9668
  if (!Array.isArray(data) || !data.length) {
9400
9669
  return null;
9401
9670
  }
@@ -9450,7 +9719,7 @@ function TableTr(props) {
9450
9719
  }
9451
9720
 
9452
9721
  return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement)("td", _extends({}, objs, {
9453
- style: _extends({}, locationFixed(keyName.fixed, locationWidth, colNum)),
9722
+ style: keyName.fixed ? _extends({}, locationFixed(keyName.fixed, locationWidth, "" + getIndex(keyName.key || 'undefined'))) : {},
9454
9723
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
9455
9724
  className: ellipsis && ellipsis[keyName.key] ? prefixCls + "-ellipsis" : undefined,
9456
9725
  children: objs.children
@@ -9514,34 +9783,71 @@ function Table(props) {
9514
9783
  var [locationWidth, setLocationWidth] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({});
9515
9784
  var finalLocationWidth = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
9516
9785
 
9517
- var updateLocation = (params, index) => {
9786
+ var updateLocation = function updateLocation(params, index, key, colSpan) {
9787
+ if (colSpan === void 0) {
9788
+ colSpan = 0;
9789
+ }
9790
+
9518
9791
  finalLocationWidth.current = _extends({}, finalLocationWidth.current, {
9519
- [index]: _extends({}, finalLocationWidth.current[index], params)
9792
+ [index]: _extends({}, finalLocationWidth.current[index], params, {
9793
+ key: key,
9794
+ colSpan
9795
+ })
9520
9796
  });
9521
9797
 
9522
- if (index === columns.length - 1) {
9798
+ if (index === "" + (header.length - 1) + (header[header.length - 1].length - 1)) {
9523
9799
  setLocationWidth(computed());
9524
9800
  }
9525
9801
  };
9526
9802
 
9527
- var computed = () => {
9528
- var left = 0,
9529
- right = 0;
9803
+ var deepClumnsLocation = (params, fistIndex, leftOrRight, isReverse) => {
9804
+ var initialValue = 0,
9805
+ lastIndex = isReverse ? 0 : params.length - 1,
9806
+ deepParams = [];
9807
+ params.forEach(() => {
9808
+ var abs = Math.abs(lastIndex);
9809
+ var i = "" + fistIndex + abs;
9530
9810
 
9531
- for (var _index = 0; _index < columns.length; _index++) {
9532
- if (finalLocationWidth.current[_index]) {
9533
- finalLocationWidth.current[_index].left = left;
9534
- left = finalLocationWidth.current[_index].width + left;
9811
+ if (isReverse) {
9812
+ lastIndex += 1;
9813
+ } else {
9814
+ lastIndex -= 1;
9535
9815
  }
9536
- }
9537
9816
 
9538
- for (var _index2 = columns.length - 1; _index2 > -1; _index2--) {
9539
- if (finalLocationWidth.current[_index2]) {
9540
- finalLocationWidth.current[_index2].right = right;
9541
- right = finalLocationWidth.current[_index2].width + right;
9817
+ if (typeof params[abs] === 'number') {
9818
+ initialValue = params[abs] + initialValue;
9819
+ deepParams.push(params[abs]);
9820
+ return;
9542
9821
  }
9543
- }
9544
9822
 
9823
+ if (finalLocationWidth.current[i]) {
9824
+ finalLocationWidth.current[i][leftOrRight] = initialValue;
9825
+ initialValue = finalLocationWidth.current[i].width + initialValue;
9826
+ }
9827
+
9828
+ if (Array.isArray(params[abs].children)) {
9829
+ deepParams.push(...params[abs].children);
9830
+ return;
9831
+ }
9832
+
9833
+ if (finalLocationWidth.current[i]) {
9834
+ deepParams.push(finalLocationWidth.current[i].width);
9835
+ } else {
9836
+ var parent = header.find(it => it.find(it => it.key === params[abs].key)) || [];
9837
+ var sub = parent.findIndex(it => it.key === params[abs].key);
9838
+
9839
+ if (finalLocationWidth.current["" + i[0] + sub]) {
9840
+ // 合并单元格
9841
+ deepParams.push(finalLocationWidth.current["" + i[0] + sub].width);
9842
+ }
9843
+ }
9844
+ });
9845
+ if (deepParams.filter(it => typeof it !== 'number').length) deepClumnsLocation(deepParams, fistIndex + 1, leftOrRight, isReverse);
9846
+ };
9847
+
9848
+ var computed = () => {
9849
+ deepClumnsLocation(columns, 0, 'left', true);
9850
+ deepClumnsLocation(columns, 0, 'right', false);
9545
9851
  return finalLocationWidth.current;
9546
9852
  };
9547
9853
 
@@ -9715,6 +10021,7 @@ function Table(props) {
9715
10021
  rowKey: rowKey,
9716
10022
  locationWidth: locationWidth,
9717
10023
  data: data,
10024
+ header: header,
9718
10025
  keys: self.keys,
9719
10026
  render: render,
9720
10027
  ellipsis: ellipsis,
@@ -9722,7 +10029,7 @@ function Table(props) {
9722
10029
  onCell: onCell,
9723
10030
  hierarchy: 0,
9724
10031
  isExpandedDom: isExpandedDom,
9725
- indentSize: (expandable == null ? void 0 : expandable.indentSize) || 16,
10032
+ indentSize: typeof (expandable == null ? void 0 : expandable.indentSize) === 'number' ? expandable == null ? void 0 : expandable.indentSize : 16,
9726
10033
  childrenColumnName: (expandable == null ? void 0 : expandable.childrenColumnName) || 'children'
9727
10034
  })
9728
10035
  }), data && data.length === 0 && empty && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
@@ -9782,6 +10089,7 @@ var react_tabs_esm_excluded = ["prefixCls", "className", "children", "type", "ac
9782
10089
 
9783
10090
 
9784
10091
  Tabs.Pane = Pane;
10092
+ var labelWidth = 0;
9785
10093
  function Tabs(props) {
9786
10094
  var _flowNav$nav;
9787
10095
 
@@ -9827,12 +10135,16 @@ function Tabs(props) {
9827
10135
  flowNavSet(_extends({}, flowNav));
9828
10136
  }
9829
10137
  }, []);
9830
- var divNavRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((node, key) => {
10138
+ var divNavRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((node, key, itemKey) => {
9831
10139
  if (node !== null) {
9832
10140
  node.addEventListener('click', e => {
9833
10141
  activeItem.current = node;
9834
10142
  });
9835
10143
  divNavWidthChange(node.getBoundingClientRect().width, key);
10144
+
10145
+ if (itemKey === props.activeKey && type === 'line' && labelWidth === 0) {
10146
+ activeItem.current = node;
10147
+ }
9836
10148
  }
9837
10149
  }, []);
9838
10150
 
@@ -9871,6 +10183,7 @@ function Tabs(props) {
9871
10183
 
9872
10184
  function calcSlideStyle() {
9873
10185
  if (activeItem.current && type === 'line') {
10186
+ labelWidth = activeItem.current.clientWidth;
9874
10187
  setSlideStyle({
9875
10188
  width: activeItem.current.clientWidth,
9876
10189
  left: activeItem.current.offsetLeft
@@ -9948,7 +10261,7 @@ function Tabs(props) {
9948
10261
  }
9949
10262
 
9950
10263
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
9951
- ref: _ref => divNavRef(_ref, key)
10264
+ ref: _ref => divNavRef(_ref, key, item.key)
9952
10265
  }, divProps), key);
9953
10266
  });
9954
10267
  }