@ztocwst/rc-pro-materials 0.2.16 → 0.2.18

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.
Files changed (25) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +5 -5
  6. package/build/lowcode/view.js +5 -5
  7. package/dist/SCM_Comps.js +3 -3
  8. package/dist/SCM_Comps.js.map +1 -1
  9. package/es/components/z-templates-data-common/components/link-renderer/index.d.ts +1 -1
  10. package/es/components/z-templates-data-common/components/link-renderer/index.js +30 -13
  11. package/es/components/z-templates-data-common/components/table-renderer/index.js +4 -1
  12. package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +1 -1
  13. package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +20 -1
  14. package/es/components/z-templates-data-common/data-common.d.ts +15 -0
  15. package/es/components/z-templates-data-common/data-common.helper.js +1 -1
  16. package/es/components/z-templates-data-common/data-common.js +65 -47
  17. package/lib/components/z-templates-data-common/components/link-renderer/index.d.ts +1 -1
  18. package/lib/components/z-templates-data-common/components/link-renderer/index.js +30 -13
  19. package/lib/components/z-templates-data-common/components/table-renderer/index.js +4 -1
  20. package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +1 -1
  21. package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +20 -1
  22. package/lib/components/z-templates-data-common/data-common.d.ts +15 -0
  23. package/lib/components/z-templates-data-common/data-common.helper.js +1 -1
  24. package/lib/components/z-templates-data-common/data-common.js +65 -47
  25. package/package.json +3 -3
@@ -35,50 +35,66 @@ var ZTemplatesDataCommon = /*#__PURE__*/_react["default"].forwardRef(function (p
35
35
  var onFinish = function onFinish(values) {
36
36
  chartRenderRef.current.queryChart(values);
37
37
  };
38
- var onConfirm = /*#__PURE__*/function () {
38
+ var onQueryValues = /*#__PURE__*/function () {
39
39
  var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
40
- var _yield$formRef$curren, _formRef$current, _formRef$current$vali, values;
40
+ var _formRef$current$vali, _formRef$current, _formRef$current$vali2;
41
41
  return _regenerator["default"].wrap(function _callee$(_context) {
42
42
  while (1) switch (_context.prev = _context.next) {
43
43
  case 0:
44
- _context.prev = 0;
45
- _context.next = 3;
46
- return (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : (_formRef$current$vali = _formRef$current.validateFieldsReturnFormatValue) === null || _formRef$current$vali === void 0 ? void 0 : _formRef$current$vali.call(_formRef$current);
44
+ return _context.abrupt("return", (_formRef$current$vali = (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : (_formRef$current$vali2 = _formRef$current.validateFields) === null || _formRef$current$vali2 === void 0 ? void 0 : _formRef$current$vali2.call(_formRef$current)) !== null && _formRef$current$vali !== void 0 ? _formRef$current$vali : {});
45
+ case 1:
46
+ case "end":
47
+ return _context.stop();
48
+ }
49
+ }, _callee);
50
+ }));
51
+ return function onQueryValues() {
52
+ return _ref.apply(this, arguments);
53
+ };
54
+ }();
55
+ var onQueryFormatValues = /*#__PURE__*/function () {
56
+ var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
57
+ var _formRef$current$vali3, _formRef$current2, _formRef$current2$val;
58
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
59
+ while (1) switch (_context2.prev = _context2.next) {
60
+ case 0:
61
+ return _context2.abrupt("return", (_formRef$current$vali3 = (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : (_formRef$current2$val = _formRef$current2.validateFieldsReturnFormatValue) === null || _formRef$current2$val === void 0 ? void 0 : _formRef$current2$val.call(_formRef$current2)) !== null && _formRef$current$vali3 !== void 0 ? _formRef$current$vali3 : {});
62
+ case 1:
63
+ case "end":
64
+ return _context2.stop();
65
+ }
66
+ }, _callee2);
67
+ }));
68
+ return function onQueryFormatValues() {
69
+ return _ref2.apply(this, arguments);
70
+ };
71
+ }();
72
+ var onConfirm = /*#__PURE__*/function () {
73
+ var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
74
+ var values;
75
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
76
+ while (1) switch (_context3.prev = _context3.next) {
77
+ case 0:
78
+ _context3.prev = 0;
79
+ _context3.next = 3;
80
+ return onQueryFormatValues();
47
81
  case 3:
48
- _context.t1 = _yield$formRef$curren = _context.sent;
49
- _context.t0 = _context.t1 !== null;
50
- if (!_context.t0) {
51
- _context.next = 7;
52
- break;
53
- }
54
- _context.t0 = _yield$formRef$curren !== void 0;
55
- case 7:
56
- if (!_context.t0) {
57
- _context.next = 11;
58
- break;
59
- }
60
- _context.t2 = _yield$formRef$curren;
61
- _context.next = 12;
62
- break;
63
- case 11:
64
- _context.t2 = {};
65
- case 12:
66
- values = _context.t2;
82
+ values = _context3.sent;
67
83
  chartRenderRef.current.queryChart(values);
68
- _context.next = 19;
84
+ _context3.next = 10;
69
85
  break;
70
- case 16:
71
- _context.prev = 16;
72
- _context.t3 = _context["catch"](0);
73
- console.error(_context.t3);
74
- case 19:
86
+ case 7:
87
+ _context3.prev = 7;
88
+ _context3.t0 = _context3["catch"](0);
89
+ console.error(_context3.t0);
90
+ case 10:
75
91
  case "end":
76
- return _context.stop();
92
+ return _context3.stop();
77
93
  }
78
- }, _callee, null, [[0, 16]]);
94
+ }, _callee3, null, [[0, 7]]);
79
95
  }));
80
96
  return function onConfirm() {
81
- return _ref.apply(this, arguments);
97
+ return _ref3.apply(this, arguments);
82
98
  };
83
99
  }();
84
100
  var onLink = function onLink(values) {
@@ -87,7 +103,9 @@ var ZTemplatesDataCommon = /*#__PURE__*/_react["default"].forwardRef(function (p
87
103
  };
88
104
  (0, _react.useImperativeHandle)(ref, function () {
89
105
  return {
90
- onLink: onLink
106
+ onLink: onLink,
107
+ onQueryValues: onQueryValues,
108
+ onQueryFormatValues: onQueryFormatValues
91
109
  };
92
110
  });
93
111
  var formProps = (0, _utils.processFormProps)(querySetting);
@@ -96,32 +114,32 @@ var ZTemplatesDataCommon = /*#__PURE__*/_react["default"].forwardRef(function (p
96
114
  formRef: formRef,
97
115
  onValuesChange: function onValuesChange(changeValues) {},
98
116
  onFinish: /*#__PURE__*/function () {
99
- var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(formatData) {
117
+ var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(formatData) {
100
118
  var _formProps$onFinish;
101
- return _regenerator["default"].wrap(function _callee2$(_context2) {
102
- while (1) switch (_context2.prev = _context2.next) {
119
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
120
+ while (1) switch (_context4.prev = _context4.next) {
103
121
  case 0:
104
- _context2.prev = 0;
105
- _context2.next = 3;
122
+ _context4.prev = 0;
123
+ _context4.next = 3;
106
124
  return (_formProps$onFinish = formProps.onFinish) === null || _formProps$onFinish === void 0 ? void 0 : _formProps$onFinish.call(formProps, formatData);
107
125
  case 3:
108
- _context2.next = 5;
126
+ _context4.next = 5;
109
127
  return onFinish === null || onFinish === void 0 ? void 0 : onFinish(formatData);
110
128
  case 5:
111
- _context2.next = 10;
129
+ _context4.next = 10;
112
130
  break;
113
131
  case 7:
114
- _context2.prev = 7;
115
- _context2.t0 = _context2["catch"](0);
116
- _message2["default"].error(_context2.t0);
132
+ _context4.prev = 7;
133
+ _context4.t0 = _context4["catch"](0);
134
+ _message2["default"].error(_context4.t0);
117
135
  case 10:
118
136
  case "end":
119
- return _context2.stop();
137
+ return _context4.stop();
120
138
  }
121
- }, _callee2, null, [[0, 7]]);
139
+ }, _callee4, null, [[0, 7]]);
122
140
  }));
123
141
  return function (_x) {
124
- return _ref2.apply(this, arguments);
142
+ return _ref4.apply(this, arguments);
125
143
  };
126
144
  }()
127
145
  })), /*#__PURE__*/_react["default"].createElement(_chartRenderer["default"], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztocwst/rc-pro-materials",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "description": "@ztocwst/rc-pro-materials",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -86,9 +86,9 @@
86
86
  },
87
87
  "componentConfig": {
88
88
  "isComponentLibrary": true,
89
- "materialSchema": "https://npm.ztocwst.com/@ztocwst/rc-pro-materials@0.2.16/build/lowcode/assets-prod.json"
89
+ "materialSchema": "https://npm.ztocwst.com/@ztocwst/rc-pro-materials@0.2.18/build/lowcode/assets-prod.json"
90
90
  },
91
- "homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.16/build/index.html",
91
+ "homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.18/build/index.html",
92
92
  "publishConfig": {
93
93
  "registry": "https://registry.npmjs.org/",
94
94
  "access": "public"