shineout 3.6.5-beta.9 → 3.6.5-fix.1

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/cjs/index.js CHANGED
@@ -514,5 +514,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
514
514
  // 此文件由脚本自动生成,请勿直接修改。
515
515
  // This file was generated automatically by a script. Please do not modify it directly.
516
516
  var _default = exports.default = {
517
- version: '3.6.5-beta.9'
517
+ version: '3.6.5-fix.1'
518
518
  };
package/dist/shineout.js CHANGED
@@ -12217,7 +12217,7 @@ var handleStyle = function handleStyle(style) {
12217
12217
  };
12218
12218
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12219
12219
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12220
- /* harmony default export */ var version = ('3.6.5-beta.9');
12220
+ /* harmony default export */ var version = ('3.6.5-fix.1');
12221
12221
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12222
12222
 
12223
12223
 
@@ -33995,9 +33995,16 @@ var accordion_jssStyle = {
33995
33995
  var ModalSubmit = function ModalSubmit(props) {
33996
33996
  var modalFormContext = useFormFooter();
33997
33997
  var handleClick = usePersistFn(function (e) {
33998
- var _props$onClick;
33999
- (_props$onClick = props.onClick) === null || _props$onClick === void 0 || _props$onClick.call(props, e);
34000
- modalFormContext === null || modalFormContext === void 0 || modalFormContext.func.submit();
33998
+ var _modalFormContext$fun;
33999
+ if (modalFormContext !== null && modalFormContext !== void 0 && (_modalFormContext$fun = modalFormContext.func) !== null && _modalFormContext$fun !== void 0 && _modalFormContext$fun.hasSubmit) {
34000
+ modalFormContext === null || modalFormContext === void 0 || modalFormContext.func.submit(true, function () {
34001
+ var _props$onClick;
34002
+ return (_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props, e);
34003
+ });
34004
+ } else {
34005
+ var _props$onClick2;
34006
+ (_props$onClick2 = props.onClick) === null || _props$onClick2 === void 0 || _props$onClick2.call(props, e);
34007
+ }
34001
34008
  });
34002
34009
  return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, objectSpread2_default()(objectSpread2_default()({
34003
34010
  htmlType: "button",
@@ -34922,19 +34929,18 @@ function useInputAble(props) {
34922
34929
  var render = useRender(syncValue);
34923
34930
  var shouldUseState = delay || !control;
34924
34931
  var value = shouldUseState ? stateValue : valuePo;
34925
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
34926
- if (context.timer) {
34927
- clearTimeout(context.timer);
34928
- context.timer = null;
34929
- }
34932
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
34930
34933
  if (delay && control && props.value !== stateValue) {
34931
34934
  changeStateValue(props.value);
34935
+ } else if (context.timer) {
34936
+ clearTimeout(context.timer);
34937
+ context.timer = null;
34932
34938
  }
34933
34939
  }, [props.value, delay, control]);
34934
34940
  var forceDelayChange = use_persist_fn(function () {
34935
- if (context.timer && context.delayChange) {
34941
+ if (context.delayChange) context.delayChange();
34942
+ if (context.timer) {
34936
34943
  clearTimeout(context.timer);
34937
- context.delayChange();
34938
34944
  context.timer = null;
34939
34945
  context.delayChange = null;
34940
34946
  }
@@ -49447,7 +49453,8 @@ var useForm = function useForm(props) {
49447
49453
  size = props.size,
49448
49454
  colon = props.colon,
49449
49455
  formName = props.name,
49450
- scrollParent = props.scrollParent;
49456
+ scrollParent = props.scrollParent,
49457
+ isControl = props.isControl;
49451
49458
  var deepSetOptions = {
49452
49459
  removeUndefined: removeUndefined,
49453
49460
  forceSet: true
@@ -49768,6 +49775,7 @@ var useForm = function useForm(props) {
49768
49775
  });
49769
49776
  var submit = use_persist_fn(function () {
49770
49777
  var withValidate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
49778
+ var callback = arguments.length > 1 ? arguments[1] : undefined;
49771
49779
  if (disabled) return;
49772
49780
  if (context.submitLock) {
49773
49781
  return;
@@ -49785,32 +49793,29 @@ var useForm = function useForm(props) {
49785
49793
  while (1) switch (_context.prev = _context.next) {
49786
49794
  case 0:
49787
49795
  if (withValidate) {
49788
- _context.next = 3;
49796
+ _context.next = 4;
49789
49797
  break;
49790
49798
  }
49791
49799
  (_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 || _props$onSubmit.call(props, (_context$value = context.value) !== null && _context$value !== void 0 ? _context$value : {});
49800
+ callback === null || callback === void 0 || callback();
49792
49801
  return _context.abrupt("return");
49793
- case 3:
49794
- _context.next = 5;
49802
+ case 4:
49803
+ _context.next = 6;
49795
49804
  return validateFields(undefined, {
49796
49805
  ignoreBind: true
49797
49806
  }).catch(function (e) {
49798
49807
  return e;
49799
49808
  });
49800
- case 5:
49809
+ case 6:
49801
49810
  result = _context.sent;
49802
- if (!(result === true)) {
49803
- _context.next = 11;
49804
- break;
49811
+ if (result === true) {
49812
+ (_props$onSubmit2 = props.onSubmit) === null || _props$onSubmit2 === void 0 || _props$onSubmit2.call(props, (_context$value2 = context.value) !== null && _context$value2 !== void 0 ? _context$value2 : {});
49813
+ if (activeEl) activeEl.focus();
49814
+ } else {
49815
+ handleSubmitError(result);
49805
49816
  }
49806
- (_props$onSubmit2 = props.onSubmit) === null || _props$onSubmit2 === void 0 || _props$onSubmit2.call(props, (_context$value2 = context.value) !== null && _context$value2 !== void 0 ? _context$value2 : {});
49807
- if (activeEl) activeEl.focus();
49808
- _context.next = 13;
49809
- break;
49810
- case 11:
49811
- handleSubmitError(result);
49812
- return _context.abrupt("return");
49813
- case 13:
49817
+ callback === null || callback === void 0 || callback();
49818
+ case 9:
49814
49819
  case "end":
49815
49820
  return _context.stop();
49816
49821
  }
@@ -50011,7 +50016,7 @@ var useForm = function useForm(props) {
50011
50016
  context.removeLock = false;
50012
50017
  // 内部 onChange 改的 value, 不需要更新
50013
50018
  if (props.value === context.value) {
50014
- // if (!isControl) update();
50019
+ if (!isControl) update();
50015
50020
  return;
50016
50021
  }
50017
50022
  if (initValidate && !context.resetTime) {
@@ -65440,6 +65445,7 @@ var TransferOperate = function TransferOperate(props) {
65440
65445
 
65441
65446
 
65442
65447
 
65448
+
65443
65449
  var Transfer = function Transfer(props) {
65444
65450
  var _jssStyle$transfer;
65445
65451
  var jssStyle = props.jssStyle,
@@ -65514,7 +65520,7 @@ var Transfer = function Transfer(props) {
65514
65520
  sourceSelectedKeys = _useTransfer.sourceSelectedKeys,
65515
65521
  targetSelectedKeys = _useTransfer.targetSelectedKeys,
65516
65522
  onFilter = _useTransfer.onFilter,
65517
- onSelectChange = _useTransfer.onSelectChange;
65523
+ _onSelectChange = _useTransfer.onSelectChange;
65518
65524
  var styles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$transfer = jssStyle.transfer) === null || _jssStyle$transfer === void 0 ? void 0 : _jssStyle$transfer.call(jssStyle)) || {};
65519
65525
  var rootClass = classnames_default()(styles.rootClass, styles.transfer, className, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, styles.simple, simple), styles.small, size === 'small'), styles.large, size === 'large'), styles.equalPanelWidth, equalPanelWidth));
65520
65526
  var renderOperations = function renderOperations() {
@@ -65588,7 +65594,15 @@ var Transfer = function Transfer(props) {
65588
65594
  searchPlaceholder: placeholder,
65589
65595
  renderFilter: renderFilter,
65590
65596
  onFilter: onFilterProp ? onFilter : undefined,
65591
- onSelectChange: onSelectChange
65597
+ onSelectChange: function onSelectChange(keys) {
65598
+ if (isSource) {
65599
+ var newAllKeys = Array.from(new Set([].concat(toConsumableArray_default()(keys), toConsumableArray_default()(targetSelectedKeys || []))));
65600
+ _onSelectChange(newAllKeys, keys, targetSelectedKeys);
65601
+ } else {
65602
+ var _newAllKeys = Array.from(new Set([].concat(toConsumableArray_default()(keys), toConsumableArray_default()(sourceSelectedKeys || []))));
65603
+ _onSelectChange(_newAllKeys, sourceSelectedKeys, keys);
65604
+ }
65605
+ }
65592
65606
  });
65593
65607
  };
65594
65608
  var renderSourceList = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
@@ -70058,7 +70072,7 @@ var upload_interface = __webpack_require__(8821);
70058
70072
 
70059
70073
 
70060
70074
  /* harmony default export */ var src_0 = ({
70061
- version: '3.6.5-beta.9'
70075
+ version: '3.6.5-fix.1'
70062
70076
  });
70063
70077
  }();
70064
70078
  /******/ return __webpack_exports__;