shineout 3.6.5-beta.9 → 3.6.5

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'
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');
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",
@@ -49447,7 +49454,8 @@ var useForm = function useForm(props) {
49447
49454
  size = props.size,
49448
49455
  colon = props.colon,
49449
49456
  formName = props.name,
49450
- scrollParent = props.scrollParent;
49457
+ scrollParent = props.scrollParent,
49458
+ isControl = props.isControl;
49451
49459
  var deepSetOptions = {
49452
49460
  removeUndefined: removeUndefined,
49453
49461
  forceSet: true
@@ -49768,6 +49776,7 @@ var useForm = function useForm(props) {
49768
49776
  });
49769
49777
  var submit = use_persist_fn(function () {
49770
49778
  var withValidate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
49779
+ var callback = arguments.length > 1 ? arguments[1] : undefined;
49771
49780
  if (disabled) return;
49772
49781
  if (context.submitLock) {
49773
49782
  return;
@@ -49785,32 +49794,29 @@ var useForm = function useForm(props) {
49785
49794
  while (1) switch (_context.prev = _context.next) {
49786
49795
  case 0:
49787
49796
  if (withValidate) {
49788
- _context.next = 3;
49797
+ _context.next = 4;
49789
49798
  break;
49790
49799
  }
49791
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();
49792
49802
  return _context.abrupt("return");
49793
- case 3:
49794
- _context.next = 5;
49803
+ case 4:
49804
+ _context.next = 6;
49795
49805
  return validateFields(undefined, {
49796
49806
  ignoreBind: true
49797
49807
  }).catch(function (e) {
49798
49808
  return e;
49799
49809
  });
49800
- case 5:
49810
+ case 6:
49801
49811
  result = _context.sent;
49802
- if (!(result === true)) {
49803
- _context.next = 11;
49804
- 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);
49805
49817
  }
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:
49818
+ callback === null || callback === void 0 || callback();
49819
+ case 9:
49814
49820
  case "end":
49815
49821
  return _context.stop();
49816
49822
  }
@@ -50011,7 +50017,7 @@ var useForm = function useForm(props) {
50011
50017
  context.removeLock = false;
50012
50018
  // 内部 onChange 改的 value, 不需要更新
50013
50019
  if (props.value === context.value) {
50014
- // if (!isControl) update();
50020
+ if (!isControl) update();
50015
50021
  return;
50016
50022
  }
50017
50023
  if (initValidate && !context.resetTime) {
@@ -65440,6 +65446,7 @@ var TransferOperate = function TransferOperate(props) {
65440
65446
 
65441
65447
 
65442
65448
 
65449
+
65443
65450
  var Transfer = function Transfer(props) {
65444
65451
  var _jssStyle$transfer;
65445
65452
  var jssStyle = props.jssStyle,
@@ -65514,7 +65521,7 @@ var Transfer = function Transfer(props) {
65514
65521
  sourceSelectedKeys = _useTransfer.sourceSelectedKeys,
65515
65522
  targetSelectedKeys = _useTransfer.targetSelectedKeys,
65516
65523
  onFilter = _useTransfer.onFilter,
65517
- onSelectChange = _useTransfer.onSelectChange;
65524
+ _onSelectChange = _useTransfer.onSelectChange;
65518
65525
  var styles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$transfer = jssStyle.transfer) === null || _jssStyle$transfer === void 0 ? void 0 : _jssStyle$transfer.call(jssStyle)) || {};
65519
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));
65520
65527
  var renderOperations = function renderOperations() {
@@ -65588,7 +65595,15 @@ var Transfer = function Transfer(props) {
65588
65595
  searchPlaceholder: placeholder,
65589
65596
  renderFilter: renderFilter,
65590
65597
  onFilter: onFilterProp ? onFilter : undefined,
65591
- 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
+ }
65592
65607
  });
65593
65608
  };
65594
65609
  var renderSourceList = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
@@ -70058,7 +70073,7 @@ var upload_interface = __webpack_require__(8821);
70058
70073
 
70059
70074
 
70060
70075
  /* harmony default export */ var src_0 = ({
70061
- version: '3.6.5-beta.9'
70076
+ version: '3.6.5'
70062
70077
  });
70063
70078
  }();
70064
70079
  /******/ return __webpack_exports__;