uiw 4.21.0 → 4.21.3

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
@@ -1519,7 +1519,7 @@ function Portal(props) {
1519
1519
  ;// CONCATENATED MODULE: ../react-overlay/esm/index.js
1520
1520
 
1521
1521
 
1522
- var esm_excluded = ["className", "style", "isOpen", "prefixCls", "usePortal", "maskClosable", "backdropProps", "portalProps", "hasBackdrop", "unmountOnExit", "timeout", "transitionName", "onOpening", "onOpened", "onClosing", "onClosed", "onClose", "onEnter", "children", "dialogProps"];
1522
+ var esm_excluded = ["className", "style", "isOpen", "prefixCls", "usePortal", "maskClosable", "backdropProps", "portalProps", "hasBackdrop", "unmountOnExit", "timeout", "transitionName", "onOpening", "onOpened", "onClosing", "onClosed", "onClose", "onEnter", "onExiting", "onEntering", "onEntered", "onExit", "children", "dialogProps"];
1523
1523
 
1524
1524
  /**
1525
1525
  * Overlay 组件
@@ -1561,6 +1561,10 @@ function Overlay(props) {
1561
1561
  onClosed = noop,
1562
1562
  onClose = noop,
1563
1563
  onEnter: _onEnter = noop,
1564
+ onExiting: _onExiting = noop,
1565
+ onEntering: _onEntering = noop,
1566
+ onEntered: _onEntered = noop,
1567
+ onExit = noop,
1564
1568
  children,
1565
1569
  dialogProps = {}
1566
1570
  } = props,
@@ -1635,20 +1639,27 @@ function Overlay(props) {
1635
1639
  unmountOnExit: unmountOnExit,
1636
1640
  timeout: timeout,
1637
1641
  in: isOpen,
1638
- onEnter: (_, isAppearing) => {
1642
+ onEnter: isAppearing => {
1639
1643
  _onEnter(overlay.current, isAppearing);
1640
1644
  },
1641
- onEntering: (_, isAppearing) => {
1645
+ onEntering: isAppearing => {
1642
1646
  onOpening(overlay.current, isAppearing);
1647
+
1648
+ _onEntering(overlay.current);
1643
1649
  },
1644
- onEntered: (_, isAppearing) => {
1650
+ onEntered: isAppearing => {
1645
1651
  onOpened(overlay.current, isAppearing);
1652
+
1653
+ _onEntered(overlay.current);
1646
1654
  },
1647
1655
  onExiting: () => {
1648
1656
  onClosing(overlay.current);
1657
+
1658
+ _onExiting(overlay.current);
1649
1659
  },
1650
1660
  onExited: () => {
1651
1661
  handleClosed(overlay.current);
1662
+ onExit(overlay.current);
1652
1663
  },
1653
1664
  nodeRef: overlay
1654
1665
  }, otherProps, {
@@ -2387,7 +2398,7 @@ var react_button_group_esm_excluded = ["prefixCls", "vertical", "children", "cla
2387
2398
 
2388
2399
  ;// CONCATENATED MODULE: ../../node_modules/@uiw/formatter/esm/index.js
2389
2400
  /**!
2390
- * @uiw/formatter v1.3.2
2401
+ * @uiw/formatter v1.3.3
2391
2402
  * Get a formatted date.
2392
2403
  *
2393
2404
  * Copyright (c) 2022 Kenny Wang <wowohoo@qq.com>
@@ -2430,7 +2441,6 @@ formatter.utc = function (str, date) {
2430
2441
  };
2431
2442
 
2432
2443
 
2433
- //# sourceMappingURL=index.js.map
2434
2444
 
2435
2445
  ;// CONCATENATED MODULE: ../react-overlay-trigger/esm/utils.js
2436
2446
  var utils_canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
@@ -2882,7 +2892,8 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
2882
2892
  });
2883
2893
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => ({
2884
2894
  hide: () => _hide(),
2885
- show: () => _show()
2895
+ show: () => _show(),
2896
+ overlayDom: popupRef
2886
2897
  }));
2887
2898
  var child = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children);
2888
2899
 
@@ -2962,11 +2973,13 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
2962
2973
  }
2963
2974
 
2964
2975
  function handleShow() {
2976
+ var _props$children;
2977
+
2965
2978
  clearTimeouts();
2966
2979
  hoverStateRef.current = 'show';
2967
2980
  var delay = normalizeDelay(props.delay);
2968
2981
 
2969
- if (!delay.show) {
2982
+ if (!delay.show && !((_props$children = props.children) != null && _props$children.props.disabled)) {
2970
2983
  _show();
2971
2984
 
2972
2985
  return;
@@ -2975,6 +2988,7 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
2975
2988
  var handle = window.setTimeout(() => {
2976
2989
  if (hoverStateRef.current === 'show') _show();
2977
2990
  }, delay.show);
2991
+ clearTimeout(handle);
2978
2992
  timeoutRef.current.push(handle);
2979
2993
  }
2980
2994
 
@@ -4597,25 +4611,29 @@ var SubMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
4597
4611
  }
4598
4612
 
4599
4613
  function onExit(node) {
4600
- node && (node.style.height = node.scrollHeight + "px");
4614
+ node.style.height = node.scrollHeight + "px";
4601
4615
  setIsOpen(false);
4602
4616
  }
4603
4617
 
4604
4618
  function onExiting(node) {
4605
- node && (node.style.height = '0px');
4619
+ node.style.height = '0px';
4606
4620
  }
4607
4621
 
4608
4622
  function onEnter(node) {
4609
- node && (node.style.height = '1px');
4623
+ node.style.height = '1px';
4610
4624
  setIsOpen(true);
4611
4625
  }
4612
4626
 
4613
4627
  function onEntering(node) {
4614
- node && (node.style.height = node.scrollHeight + "px");
4628
+ node.style.height = node.scrollHeight + "px";
4615
4629
  }
4616
4630
 
4617
4631
  function onEntered(node) {
4618
- node && (node.style.height = 'initial');
4632
+ node.style.height = 'initial';
4633
+
4634
+ if (popupRef.current && popupRef.current.overlayDom) {
4635
+ node.style.height = popupRef.current.overlayDom.current.getBoundingClientRect().height + 'px';
4636
+ }
4619
4637
  }
4620
4638
 
4621
4639
  if (!collapse) {
@@ -5177,8 +5195,11 @@ var RadioButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
5177
5195
 
5178
5196
  function handleChange(e) {
5179
5197
  e.persist();
5180
- setChecked(!checked);
5181
- onChange && onChange(value);
5198
+
5199
+ if (!checked) {
5200
+ setChecked(!checked);
5201
+ onChange && onChange(value);
5202
+ }
5182
5203
  }
5183
5204
 
5184
5205
  var label = children || value;
@@ -9595,6 +9616,8 @@ var react_switch_esm_excluded = ["prefixCls"];
9595
9616
  // extracted by mini-css-extract-plugin
9596
9617
  /* harmony default export */ const react_table_esm_style = ({});
9597
9618
  ;// CONCATENATED MODULE: ../react-table/esm/util.js
9619
+
9620
+
9598
9621
  /**
9599
9622
  * Get colspan number
9600
9623
  * @param {Array} date
@@ -9750,6 +9773,10 @@ function getAllColumnsKeys(data, keys) {
9750
9773
  keys = keys.concat(getAllColumnsKeys(data[i].children || []));
9751
9774
  } else if (data[i].key) {
9752
9775
  keys.push(data[i]);
9776
+ } else {
9777
+ keys.push(_extends({}, data[i], {
9778
+ key: i.toString()
9779
+ }));
9753
9780
  }
9754
9781
  }
9755
9782
 
@@ -10348,7 +10375,7 @@ function Table(props) {
10348
10375
  }), data && data.length === 0 && empty && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
10349
10376
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
10350
10377
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
10351
- colSpan: columns.length,
10378
+ colSpan: self.keys.length,
10352
10379
  style: {
10353
10380
  position: 'relative',
10354
10381
  left: 0