shineout 3.6.5-beta.10 → 3.6.5-beta.12

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.10'
517
+ version: '3.6.5-beta.12'
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.10');
12220
+ /* harmony default export */ var version = ('3.6.5-beta.12');
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",
@@ -49769,6 +49776,7 @@ var useForm = function useForm(props) {
49769
49776
  });
49770
49777
  var submit = use_persist_fn(function () {
49771
49778
  var withValidate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
49779
+ var callback = arguments.length > 1 ? arguments[1] : undefined;
49772
49780
  if (disabled) return;
49773
49781
  if (context.submitLock) {
49774
49782
  return;
@@ -49786,32 +49794,29 @@ var useForm = function useForm(props) {
49786
49794
  while (1) switch (_context.prev = _context.next) {
49787
49795
  case 0:
49788
49796
  if (withValidate) {
49789
- _context.next = 3;
49797
+ _context.next = 4;
49790
49798
  break;
49791
49799
  }
49792
49800
  (_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 || _props$onSubmit.call(props, (_context$value = context.value) !== null && _context$value !== void 0 ? _context$value : {});
49801
+ callback === null || callback === void 0 || callback();
49793
49802
  return _context.abrupt("return");
49794
- case 3:
49795
- _context.next = 5;
49803
+ case 4:
49804
+ _context.next = 6;
49796
49805
  return validateFields(undefined, {
49797
49806
  ignoreBind: true
49798
49807
  }).catch(function (e) {
49799
49808
  return e;
49800
49809
  });
49801
- case 5:
49810
+ case 6:
49802
49811
  result = _context.sent;
49803
- if (!(result === true)) {
49804
- _context.next = 11;
49805
- break;
49812
+ if (result === true) {
49813
+ (_props$onSubmit2 = props.onSubmit) === null || _props$onSubmit2 === void 0 || _props$onSubmit2.call(props, (_context$value2 = context.value) !== null && _context$value2 !== void 0 ? _context$value2 : {});
49814
+ if (activeEl) activeEl.focus();
49815
+ } else {
49816
+ handleSubmitError(result);
49806
49817
  }
49807
- (_props$onSubmit2 = props.onSubmit) === null || _props$onSubmit2 === void 0 || _props$onSubmit2.call(props, (_context$value2 = context.value) !== null && _context$value2 !== void 0 ? _context$value2 : {});
49808
- if (activeEl) activeEl.focus();
49809
- _context.next = 13;
49810
- break;
49811
- case 11:
49812
- handleSubmitError(result);
49813
- return _context.abrupt("return");
49814
- case 13:
49818
+ callback === null || callback === void 0 || callback();
49819
+ case 9:
49815
49820
  case "end":
49816
49821
  return _context.stop();
49817
49822
  }
@@ -65441,6 +65446,7 @@ var TransferOperate = function TransferOperate(props) {
65441
65446
 
65442
65447
 
65443
65448
 
65449
+
65444
65450
  var Transfer = function Transfer(props) {
65445
65451
  var _jssStyle$transfer;
65446
65452
  var jssStyle = props.jssStyle,
@@ -65515,7 +65521,7 @@ var Transfer = function Transfer(props) {
65515
65521
  sourceSelectedKeys = _useTransfer.sourceSelectedKeys,
65516
65522
  targetSelectedKeys = _useTransfer.targetSelectedKeys,
65517
65523
  onFilter = _useTransfer.onFilter,
65518
- onSelectChange = _useTransfer.onSelectChange;
65524
+ _onSelectChange = _useTransfer.onSelectChange;
65519
65525
  var styles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$transfer = jssStyle.transfer) === null || _jssStyle$transfer === void 0 ? void 0 : _jssStyle$transfer.call(jssStyle)) || {};
65520
65526
  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));
65521
65527
  var renderOperations = function renderOperations() {
@@ -65589,7 +65595,15 @@ var Transfer = function Transfer(props) {
65589
65595
  searchPlaceholder: placeholder,
65590
65596
  renderFilter: renderFilter,
65591
65597
  onFilter: onFilterProp ? onFilter : undefined,
65592
- onSelectChange: onSelectChange
65598
+ onSelectChange: function onSelectChange(keys) {
65599
+ if (isSource) {
65600
+ var newAllKeys = Array.from(new Set([].concat(toConsumableArray_default()(keys), toConsumableArray_default()(targetSelectedKeys || []))));
65601
+ _onSelectChange(newAllKeys, keys, targetSelectedKeys);
65602
+ } else {
65603
+ var _newAllKeys = Array.from(new Set([].concat(toConsumableArray_default()(keys), toConsumableArray_default()(sourceSelectedKeys || []))));
65604
+ _onSelectChange(_newAllKeys, sourceSelectedKeys, keys);
65605
+ }
65606
+ }
65593
65607
  });
65594
65608
  };
65595
65609
  var renderSourceList = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
@@ -70059,7 +70073,7 @@ var upload_interface = __webpack_require__(8821);
70059
70073
 
70060
70074
 
70061
70075
  /* harmony default export */ var src_0 = ({
70062
- version: '3.6.5-beta.10'
70076
+ version: '3.6.5-beta.12'
70063
70077
  });
70064
70078
  }();
70065
70079
  /******/ return __webpack_exports__;