uiw 4.21.14 → 4.21.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/uiw.css CHANGED
@@ -30,6 +30,7 @@
30
30
  }
31
31
  .w-overlay-inline {
32
32
  position: absolute;
33
+ overflow: visible;
33
34
  overflow: initial;
34
35
  }
35
36
  .w-overlay-inline .w-overlay-container {
@@ -980,7 +981,9 @@ sup.w-badge-count {
980
981
  right: auto;
981
982
  bottom: auto;
982
983
  overflow: inherit;
984
+ width: auto;
983
985
  width: initial;
986
+ height: auto;
984
987
  height: initial;
985
988
  }
986
989
  .w-overlay.w-overlay-trigger .w-overlay-container {
@@ -1284,6 +1287,7 @@ sup.w-badge-count {
1284
1287
  }
1285
1288
  .w-timepicker-input .w-timepicker-close-btn {
1286
1289
  display: none;
1290
+ min-height: 0;
1287
1291
  min-height: initial;
1288
1292
  color: #a5a5a5;
1289
1293
  }
@@ -1756,9 +1760,13 @@ sup.w-badge-count {
1756
1760
  .w-menu-subitem-collapse {
1757
1761
  transition: height 300ms;
1758
1762
  position: relative !important;
1763
+ top: auto !important;
1759
1764
  top: initial !important;
1765
+ left: auto !important;
1760
1766
  left: initial !important;
1767
+ right: auto !important;
1761
1768
  right: initial !important;
1769
+ bottom: auto !important;
1762
1770
  bottom: initial !important;
1763
1771
  width: auto !important;
1764
1772
  overflow: hidden !important;
@@ -1868,6 +1876,7 @@ sup.w-badge-count {
1868
1876
  color: rgba(255, 255, 255, 0.65);
1869
1877
  }
1870
1878
  .w-menu-dark.w-bordered {
1879
+ box-shadow: none;
1871
1880
  box-shadow: initial;
1872
1881
  }
1873
1882
  .w-menu-dark .active {
@@ -3316,6 +3325,7 @@ a.w-list-item:hover:not(.w-disabled) {
3316
3325
  display: none !important;
3317
3326
  }
3318
3327
  .w-monthpicker .w-monthpicker-close-btn {
3328
+ min-height: 0;
3319
3329
  min-height: initial;
3320
3330
  color: #a5a5a5;
3321
3331
  cursor: pointer;
@@ -4276,6 +4286,7 @@ a.w-list-item:hover:not(.w-disabled) {
4276
4286
  padding-top: 5px;
4277
4287
  }
4278
4288
  .w-steps-dot .w-steps-item-description {
4289
+ max-width: none;
4279
4290
  max-width: initial;
4280
4291
  }
4281
4292
  .w-steps-dot .w-steps-item-error .w-steps-item-tail i:after {
@@ -4313,6 +4324,7 @@ a.w-list-item:hover:not(.w-disabled) {
4313
4324
  .w-steps-dot .w-steps-item-tail {
4314
4325
  padding: 0;
4315
4326
  width: 100%;
4327
+ position: static;
4316
4328
  position: initial;
4317
4329
  height: 2px;
4318
4330
  }
@@ -4496,6 +4508,7 @@ a.w-list-item:hover:not(.w-disabled) {
4496
4508
  }
4497
4509
  .w-slider-vertical .w-slider-bar {
4498
4510
  width: 4px;
4511
+ height: auto;
4499
4512
  height: initial;
4500
4513
  }
4501
4514
  .w-slider-vertical .w-slider-handle {
@@ -4691,12 +4704,10 @@ a.w-list-item:hover:not(.w-disabled) {
4691
4704
  text-align: right;
4692
4705
  }
4693
4706
  .w-table-fixed-true {
4694
- position: -webkit-sticky !important;
4695
4707
  position: sticky !important;
4696
4708
  z-index: 2 !important;
4697
4709
  }
4698
4710
  .w-table-fixed-right {
4699
- position: -webkit-sticky !important;
4700
4711
  position: sticky !important;
4701
4712
  z-index: 2 !important;
4702
4713
  }
@@ -5000,6 +5011,7 @@ a.w-list-item:hover:not(.w-disabled) {
5000
5011
  display: none;
5001
5012
  }
5002
5013
  .w-tree-label {
5014
+ line-height: normal;
5003
5015
  line-height: initial;
5004
5016
  }
5005
5017
  .w-tree-label > * {
package/dist/uiw.js CHANGED
@@ -328,7 +328,6 @@ __webpack_require__.d(__webpack_exports__, {
328
328
  "Circle": () => (/* reexport */ Circle),
329
329
  "Col": () => (/* reexport */ Col),
330
330
  "Collapse": () => (/* reexport */ react_collapse_esm),
331
- "ContextMenu": () => (/* reexport */ ContextMenu),
332
331
  "CopyToClipboard": () => (/* reexport */ CopyToClipboard),
333
332
  "DateInput": () => (/* reexport */ DateInput),
334
333
  "DateInputRange": () => (/* reexport */ DateInputRange),
@@ -421,7 +420,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
421
420
  }
422
421
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/extends.js
423
422
  function _extends() {
424
- _extends = Object.assign || function (target) {
423
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
425
424
  for (var i = 1; i < arguments.length; i++) {
426
425
  var source = arguments[i];
427
426
 
@@ -434,7 +433,6 @@ function _extends() {
434
433
 
435
434
  return target;
436
435
  };
437
-
438
436
  return _extends.apply(this, arguments);
439
437
  }
440
438
  // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
@@ -697,11 +695,10 @@ function _asyncToGenerator(fn) {
697
695
  }
698
696
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
699
697
  function _setPrototypeOf(o, p) {
700
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
698
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
701
699
  o.__proto__ = p;
702
700
  return o;
703
701
  };
704
-
705
702
  return _setPrototypeOf(o, p);
706
703
  }
707
704
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
@@ -765,6 +762,10 @@ var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_
765
762
  ;// CONCATENATED MODULE: ../../node_modules/react-transition-group/esm/TransitionGroupContext.js
766
763
 
767
764
  /* harmony default export */ const TransitionGroupContext = (external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null));
765
+ ;// CONCATENATED MODULE: ../../node_modules/react-transition-group/esm/utils/reflow.js
766
+ var forceReflow = function forceReflow(node) {
767
+ return node.scrollTop;
768
+ };
768
769
  ;// CONCATENATED MODULE: ../../node_modules/react-transition-group/esm/Transition.js
769
770
 
770
771
 
@@ -774,6 +775,7 @@ var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_
774
775
 
775
776
 
776
777
 
778
+
777
779
  var UNMOUNTED = 'unmounted';
778
780
  var EXITED = 'exited';
779
781
  var ENTERING = 'entering';
@@ -993,6 +995,14 @@ var Transition = /*#__PURE__*/function (_React$Component) {
993
995
  this.cancelNextCallback();
994
996
 
995
997
  if (nextStatus === ENTERING) {
998
+ if (this.props.unmountOnExit || this.props.mountOnEnter) {
999
+ var node = this.props.nodeRef ? this.props.nodeRef.current : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749
1000
+ // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.
1001
+ // To make the animation happen, we have to separate each rendering and avoid being processed as batched.
1002
+
1003
+ if (node) forceReflow(node);
1004
+ }
1005
+
996
1006
  this.performEnter(mounting);
997
1007
  } else {
998
1008
  this.performExit();
@@ -1207,6 +1217,7 @@ Transition.EXITING = EXITING;
1207
1217
 
1208
1218
 
1209
1219
 
1220
+
1210
1221
  var _addClass = function addClass(node, classes) {
1211
1222
  return node && classes && classes.split(' ').forEach(function (c) {
1212
1223
  return addClass_addClass(node, c);
@@ -1426,8 +1437,7 @@ var CSSTransition = /*#__PURE__*/function (_React$Component) {
1426
1437
 
1427
1438
 
1428
1439
  if (phase === 'active') {
1429
- /* eslint-disable no-unused-expressions */
1430
- node && node.scrollTop;
1440
+ if (node) forceReflow(node);
1431
1441
  }
1432
1442
 
1433
1443
  if (className) {
@@ -4773,7 +4783,8 @@ var Menu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_r
4773
4783
  })
4774
4784
  }));
4775
4785
  });
4776
- var ContextMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
4786
+
4787
+ var InternalContextMenu = (props, ref) => {
4777
4788
  var [contextHeight, setContextHeight] = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState({
4778
4789
  height: 0,
4779
4790
  ele: null
@@ -4786,7 +4797,9 @@ var ContextMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
4786
4797
  ref: ref
4787
4798
  }))
4788
4799
  });
4789
- });
4800
+ };
4801
+
4802
+ var ContextMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalContextMenu);
4790
4803
  Menu.displayName = 'uiw.Menu';
4791
4804
  ContextMenu.displayName = 'uiw.Menu';
4792
4805
  ContextMenu.Item = MenuItem;
@@ -5561,6 +5574,7 @@ function InternalCollapse(props, ref) {
5561
5574
  }
5562
5575
 
5563
5576
  var Collapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalCollapse);
5577
+ Collapse.displayName = 'Collapse';
5564
5578
  Collapse.Panel = Panel;
5565
5579
  /* harmony default export */ const esm_Collapse = (Collapse);
5566
5580
 
@@ -6427,7 +6441,7 @@ var FileList = props => {
6427
6441
  var [fileList, setFileList] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
6428
6442
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
6429
6443
  setFileList(inValue);
6430
- }, []);
6444
+ }, [value]);
6431
6445
  var handleClickInput = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => openFileDialog(inputRef), [inputRef]);
6432
6446
  var onFileUpload = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
6433
6447
  if (inputRef.current) inputRef.current.value = '';
@@ -6703,6 +6717,7 @@ var Form_excluded = ["prefixCls", "className", "fields", "children", "resetOnSub
6703
6717
 
6704
6718
 
6705
6719
 
6720
+
6706
6721
  function newFormState(fields, cb) {
6707
6722
  var state = {
6708
6723
  initial: {},
@@ -6733,8 +6748,7 @@ function newInitialValue(value) {
6733
6748
 
6734
6749
  var isPromise = promise => promise && typeof promise.then === 'function';
6735
6750
 
6736
- function Form(_ref, ref //| React.RefObject<FormRefType>,
6737
- ) {
6751
+ function Form(props, ref) {
6738
6752
  var {
6739
6753
  prefixCls = 'w-form',
6740
6754
  className,
@@ -6745,13 +6759,13 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
6745
6759
  onChange,
6746
6760
  onSubmit,
6747
6761
  afterSubmit
6748
- } = _ref,
6749
- others = _objectWithoutPropertiesLoose(_ref, Form_excluded);
6762
+ } = props,
6763
+ others = _objectWithoutPropertiesLoose(props, Form_excluded);
6750
6764
 
6751
- var initData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => newFormState(fields, _ref2 => {
6765
+ var initData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => newFormState(fields, _ref => {
6752
6766
  var {
6753
6767
  initialValue
6754
- } = _ref2;
6768
+ } = _ref;
6755
6769
  initialValue = newInitialValue(initialValue);
6756
6770
  return {
6757
6771
  initialValue,
@@ -6770,28 +6784,27 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
6770
6784
  var formUnits = {};
6771
6785
 
6772
6786
  for (var name in fields) {
6773
- var props = fields[name];
6774
- if (!props) continue;
6787
+ var itemProps = fields[name];
6788
+ if (!itemProps) continue;
6775
6789
  var error = data.errors[name];
6776
6790
 
6777
- if (typeof props.initialValue === 'boolean') {
6778
- props.checked = props.initialValue;
6791
+ if (typeof itemProps.initialValue === 'boolean') {
6792
+ itemProps.checked = itemProps.initialValue;
6779
6793
  }
6780
6794
 
6781
- var childField = controlField(_extends({}, props, {
6795
+ var childField = controlField(_extends({}, itemProps, {
6782
6796
  name
6783
6797
  }));
6784
- var help = error || props.help;
6785
- var labelFor = props.labelFor;
6786
- formUnits[name] = /*#__PURE__*/(0,jsx_runtime.jsx)(FormItem, _extends({}, _extends({}, props, {
6798
+ var help = error || itemProps.help;
6799
+ var labelFor = itemProps.labelFor;
6800
+ formUnits[name] = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement)(FormItem, _extends({}, itemProps, {
6787
6801
  key: name,
6788
6802
  children: childField,
6789
- help,
6790
- labelFor,
6791
- state: data,
6792
- name,
6803
+ help: help,
6804
+ labelFor: labelFor,
6805
+ name: name,
6793
6806
  hasError: !!error
6794
- })));
6807
+ }));
6795
6808
  }
6796
6809
 
6797
6810
  function setFields(fields) {
@@ -6908,10 +6921,10 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
6908
6921
 
6909
6922
  for (var _name in fields) {
6910
6923
  if (Object.prototype.hasOwnProperty.call(fields, _name)) {
6911
- var _props = fields[_name];
6912
- if (!_props) continue;
6924
+ var fieldsProps = fields[_name];
6925
+ if (!fieldsProps) continue;
6913
6926
 
6914
- if (_props.validator && _props.validator(current[_name])) {
6927
+ if (fieldsProps.validator && fieldsProps.validator(current[_name])) {
6915
6928
  passesValidators = false;
6916
6929
  break;
6917
6930
  }
@@ -6928,8 +6941,8 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
6928
6941
 
6929
6942
  var initials = _extends({}, initial);
6930
6943
 
6931
- Object.entries(initials).map(_ref3 => {
6932
- var [key, value] = _ref3;
6944
+ Object.entries(initials).map(_ref2 => {
6945
+ var [key, value] = _ref2;
6933
6946
 
6934
6947
  if (Array.isArray(value)) {
6935
6948
  initials[key] = [...value];
@@ -6942,13 +6955,13 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
6942
6955
  }));
6943
6956
  }
6944
6957
 
6945
- function controlField(_ref4) {
6958
+ function controlField(_ref3) {
6946
6959
  var {
6947
6960
  children,
6948
6961
  validator,
6949
6962
  name
6950
- } = _ref4,
6951
- other = _objectWithoutPropertiesLoose(_ref4, Form_excluded2);
6963
+ } = _ref3,
6964
+ other = _objectWithoutPropertiesLoose(_ref3, Form_excluded2);
6952
6965
 
6953
6966
  var element = typeof children !== 'function' ? children : children({
6954
6967
  onChange: handleChange(name, validator),
@@ -6965,7 +6978,7 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
6965
6978
  props.id = element.props.id;
6966
6979
  props.value = hasCurrentValue ? data.current && data.current[name] : props.value; // : element.props.value;
6967
6980
 
6968
- var type = element.props.type; // console.log('type', element)
6981
+ var type = element.props.type;
6969
6982
 
6970
6983
  if (type === 'checkbox' || type === 'switch' || typeof props.value === 'boolean') {
6971
6984
  props.checked = !!props.value;
@@ -6976,10 +6989,9 @@ function Form(_ref, ref //| React.RefObject<FormRefType>,
6976
6989
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(element, props);
6977
6990
  }
6978
6991
 
6979
- return /*#__PURE__*/(0,jsx_runtime.jsx)("form", _extends({}, _extends({}, others, {
6992
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("form", _extends({}, others, {
6980
6993
  className: [prefixCls, className].filter(Boolean).join(' ').trim(),
6981
- onSubmit: handleSubmit
6982
- }), {
6994
+ onSubmit: handleSubmit,
6983
6995
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("fieldset", {
6984
6996
  disabled: data.submitting,
6985
6997
  children: typeof children === 'function' ? children({
@@ -7050,7 +7062,6 @@ var react_list_esm_excluded = ["prefixCls", "bordered", "striped", "noHover", "a
7050
7062
 
7051
7063
 
7052
7064
 
7053
-
7054
7065
  function InternalList(props, ref) {
7055
7066
  var {
7056
7067
  prefixCls = 'w-list',
@@ -7059,7 +7070,7 @@ function InternalList(props, ref) {
7059
7070
  noHover = false,
7060
7071
  active = false,
7061
7072
  size = 'default',
7062
- renderItem = noop,
7073
+ renderItem,
7063
7074
  className,
7064
7075
  children,
7065
7076
  header,
@@ -7071,7 +7082,7 @@ function InternalList(props, ref) {
7071
7082
  var items;
7072
7083
 
7073
7084
  if (dataSource && dataSource.length > 0) {
7074
- items = dataSource.map((item, index) => renderItem(item, index));
7085
+ items = dataSource.map((item, index) => renderItem && renderItem(item, index));
7075
7086
  } else {
7076
7087
  items = children;
7077
7088
  }
@@ -7859,7 +7870,8 @@ var react_select_esm_excluded = ["prefixCls", "className", "size"];
7859
7870
 
7860
7871
 
7861
7872
 
7862
- var Select = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
7873
+
7874
+ var InternalSelect = (props, ref) => {
7863
7875
  var {
7864
7876
  prefixCls = 'w-select',
7865
7877
  className,
@@ -7871,7 +7883,9 @@ var Select = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd
7871
7883
  ref: ref,
7872
7884
  className: [prefixCls, className, size ? prefixCls + "-" + size : null].filter(Boolean).join(' ').trim()
7873
7885
  }));
7874
- });
7886
+ };
7887
+
7888
+ var Select = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalSelect);
7875
7889
  Select.Option = Option;
7876
7890
  Select.Group = Group;
7877
7891
  /* harmony default export */ const react_select_esm = (Select);