@zat-design/sisyphus-react 3.10.3-beta.2 → 3.10.3-beta.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.
@@ -22,25 +22,25 @@ var ConfirmWrapper = function ConfirmWrapper(props) {
22
22
  var _ProForm$useFieldProp = ProForm.useFieldProps(),
23
23
  form = _ProForm$useFieldProp.form;
24
24
  var handleChange = /*#__PURE__*/function () {
25
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {
25
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
26
26
  var _len,
27
27
  other,
28
28
  _key,
29
29
  _value,
30
30
  confirmProps,
31
- _args = arguments;
32
- return _regeneratorRuntime().wrap(function _callee$(_context) {
33
- while (1) switch (_context.prev = _context.next) {
31
+ _args2 = arguments;
32
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
33
+ while (1) switch (_context2.prev = _context2.next) {
34
34
  case 0:
35
- for (_len = _args.length, other = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
36
- other[_key - 1] = _args[_key];
35
+ for (_len = _args2.length, other = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
36
+ other[_key - 1] = _args2[_key];
37
37
  }
38
38
  _value = (value === null || value === void 0 ? void 0 : value.target) ? value.target.value : value;
39
39
  if (!isFunction(confirm)) {
40
- _context.next = 8;
40
+ _context2.next = 8;
41
41
  break;
42
42
  }
43
- _context.next = 5;
43
+ _context2.next = 5;
44
44
  return confirm(value, form.getFieldsValue(), {
45
45
  option: other[0],
46
46
  form: form,
@@ -50,13 +50,13 @@ var ConfirmWrapper = function ConfirmWrapper(props) {
50
50
  preValue: form.getFieldValue(otherProps.listName || otherProps.name)
51
51
  });
52
52
  case 5:
53
- _context.t0 = _context.sent;
54
- _context.next = 9;
53
+ _context2.t0 = _context2.sent;
54
+ _context2.next = 9;
55
55
  break;
56
56
  case 8:
57
- _context.t0 = confirm;
57
+ _context2.t0 = confirm;
58
58
  case 9:
59
- confirmProps = _context.t0;
59
+ confirmProps = _context2.t0;
60
60
  // 只处理 false, true 和 对象的情况
61
61
  if (confirmProps === false) {
62
62
  onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, [_value].concat(other));
@@ -70,21 +70,41 @@ var ConfirmWrapper = function ConfirmWrapper(props) {
70
70
  }
71
71
  if (isObject(confirmProps)) {
72
72
  _Modal.confirm(_objectSpread(_objectSpread(_objectSpread({}, 'title' in confirmProps || 'content' in confirmProps ? {} : defaultConfirmProps), confirmProps), {}, {
73
- onOk: function onOk() {
74
- var _confirmProps$onOk;
75
- for (var _len2 = arguments.length, arg = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
76
- arg[_key2] = arguments[_key2];
73
+ onOk: function () {
74
+ var _onOk = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
75
+ var _confirmProps$onOk;
76
+ var _len2,
77
+ arg,
78
+ _key2,
79
+ _args = arguments;
80
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
81
+ while (1) switch (_context.prev = _context.next) {
82
+ case 0:
83
+ for (_len2 = _args.length, arg = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
84
+ arg[_key2] = _args[_key2];
85
+ }
86
+ _context.next = 3;
87
+ return (_confirmProps$onOk = confirmProps.onOk) === null || _confirmProps$onOk === void 0 ? void 0 : _confirmProps$onOk.call.apply(_confirmProps$onOk, [confirmProps].concat(arg));
88
+ case 3:
89
+ onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, [_value].concat(other));
90
+ case 4:
91
+ case "end":
92
+ return _context.stop();
93
+ }
94
+ }, _callee);
95
+ }));
96
+ function onOk() {
97
+ return _onOk.apply(this, arguments);
77
98
  }
78
- (_confirmProps$onOk = confirmProps.onOk) === null || _confirmProps$onOk === void 0 ? void 0 : _confirmProps$onOk.call.apply(_confirmProps$onOk, [confirmProps].concat(arg));
79
- onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, [_value].concat(other));
80
- }
99
+ return onOk;
100
+ }()
81
101
  }));
82
102
  }
83
103
  case 13:
84
104
  case "end":
85
- return _context.stop();
105
+ return _context2.stop();
86
106
  }
87
- }, _callee);
107
+ }, _callee2);
88
108
  }));
89
109
  return function handleChange(_x) {
90
110
  return _ref.apply(this, arguments);
@@ -28,25 +28,25 @@ var ConfirmWrapper = function ConfirmWrapper(props) {
28
28
  var _ProForm$useFieldProp = _index.default.useFieldProps(),
29
29
  form = _ProForm$useFieldProp.form;
30
30
  var handleChange = /*#__PURE__*/function () {
31
- var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(value) {
31
+ var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(value) {
32
32
  var _len,
33
33
  other,
34
34
  _key,
35
35
  _value,
36
36
  confirmProps,
37
- _args = arguments;
38
- return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
39
- while (1) switch (_context.prev = _context.next) {
37
+ _args2 = arguments;
38
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
39
+ while (1) switch (_context2.prev = _context2.next) {
40
40
  case 0:
41
- for (_len = _args.length, other = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
42
- other[_key - 1] = _args[_key];
41
+ for (_len = _args2.length, other = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
42
+ other[_key - 1] = _args2[_key];
43
43
  }
44
44
  _value = (value === null || value === void 0 ? void 0 : value.target) ? value.target.value : value;
45
45
  if (!(0, _lodash.isFunction)(confirm)) {
46
- _context.next = 8;
46
+ _context2.next = 8;
47
47
  break;
48
48
  }
49
- _context.next = 5;
49
+ _context2.next = 5;
50
50
  return confirm(value, form.getFieldsValue(), {
51
51
  option: other[0],
52
52
  form: form,
@@ -56,13 +56,13 @@ var ConfirmWrapper = function ConfirmWrapper(props) {
56
56
  preValue: form.getFieldValue(otherProps.listName || otherProps.name)
57
57
  });
58
58
  case 5:
59
- _context.t0 = _context.sent;
60
- _context.next = 9;
59
+ _context2.t0 = _context2.sent;
60
+ _context2.next = 9;
61
61
  break;
62
62
  case 8:
63
- _context.t0 = confirm;
63
+ _context2.t0 = confirm;
64
64
  case 9:
65
- confirmProps = _context.t0;
65
+ confirmProps = _context2.t0;
66
66
  // 只处理 false, true 和 对象的情况
67
67
  if (confirmProps === false) {
68
68
  onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, [_value].concat(other));
@@ -76,21 +76,41 @@ var ConfirmWrapper = function ConfirmWrapper(props) {
76
76
  }
77
77
  if ((0, _lodash.isObject)(confirmProps)) {
78
78
  _antd.Modal.confirm((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, 'title' in confirmProps || 'content' in confirmProps ? {} : defaultConfirmProps), confirmProps), {}, {
79
- onOk: function onOk() {
80
- var _confirmProps$onOk;
81
- for (var _len2 = arguments.length, arg = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
82
- arg[_key2] = arguments[_key2];
79
+ onOk: function () {
80
+ var _onOk = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
81
+ var _confirmProps$onOk;
82
+ var _len2,
83
+ arg,
84
+ _key2,
85
+ _args = arguments;
86
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
87
+ while (1) switch (_context.prev = _context.next) {
88
+ case 0:
89
+ for (_len2 = _args.length, arg = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
90
+ arg[_key2] = _args[_key2];
91
+ }
92
+ _context.next = 3;
93
+ return (_confirmProps$onOk = confirmProps.onOk) === null || _confirmProps$onOk === void 0 ? void 0 : _confirmProps$onOk.call.apply(_confirmProps$onOk, [confirmProps].concat(arg));
94
+ case 3:
95
+ onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, [_value].concat(other));
96
+ case 4:
97
+ case "end":
98
+ return _context.stop();
99
+ }
100
+ }, _callee);
101
+ }));
102
+ function onOk() {
103
+ return _onOk.apply(this, arguments);
83
104
  }
84
- (_confirmProps$onOk = confirmProps.onOk) === null || _confirmProps$onOk === void 0 ? void 0 : _confirmProps$onOk.call.apply(_confirmProps$onOk, [confirmProps].concat(arg));
85
- onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, [_value].concat(other));
86
- }
105
+ return onOk;
106
+ }()
87
107
  }));
88
108
  }
89
109
  case 13:
90
110
  case "end":
91
- return _context.stop();
111
+ return _context2.stop();
92
112
  }
93
- }, _callee);
113
+ }, _callee2);
94
114
  }));
95
115
  return function handleChange(_x) {
96
116
  return _ref.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.10.3-beta.2",
3
+ "version": "3.10.3-beta.3",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -1,5 +0,0 @@
1
- {
2
- "recommendations": [
3
- "kisstkondoros.vscode-codemetrics"
4
- ]
5
- }