@ztocwst/rc-pro-materials 0.1.33 → 0.1.35

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.
@@ -6,8 +6,11 @@
6
6
  border-radius: 8px;
7
7
  padding: 16px;
8
8
  overflow: hidden;
9
+ transition: all 0.3s ease-in 0s;
9
10
 
10
11
  &.animate:hover {
12
+ position: relative;
13
+ z-index: 99;
11
14
  transform: scale(1.05);
12
15
  transition: all 0.3s ease-in;
13
16
  }
@@ -47,6 +50,11 @@
47
50
  grid-gap: 10px;
48
51
  grid-template-columns: repeat(1, 1fr);
49
52
 
53
+ .z-pointer-block {
54
+ border: 0;
55
+ transition: all 0.3s ease-in 0s;
56
+ }
57
+
50
58
  .z-pointer-block.animate:hover {
51
59
  box-shadow: 0 4px 16px 2px rgba(0, 0, 0, 0.1);
52
60
  transform: scale(1.05);
@@ -54,7 +62,7 @@
54
62
  }
55
63
 
56
64
  // 流程指标块
57
- &.process .z-pointer-block,
65
+ &.process .z-pointer-block-panel,
58
66
  &.process > * {
59
67
  position: relative;
60
68
 
@@ -90,7 +98,7 @@
90
98
  }
91
99
 
92
100
  // 纵向
93
- &.vertical .z-pointer-block,
101
+ &.vertical .z-pointer-block-panel,
94
102
  &.vertical > * {
95
103
  &::before {
96
104
  position: absolute;
@@ -17,7 +17,7 @@ var ZAggBlock = function ZAggBlock(_ref) {
17
17
  _onClick = _ref.onClick,
18
18
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
19
19
  return /*#__PURE__*/React.createElement("div", {
20
- className: classnames('pointer-block-wrap', {
20
+ className: classnames("pointer-block-wrap", {
21
21
  animate: !!_onClick
22
22
  }),
23
23
  style: _extends({
@@ -12,7 +12,9 @@ var ZPointerBlock = function ZPointerBlock(props) {
12
12
  align = props.align,
13
13
  _onClick = props.onClick;
14
14
  return /*#__PURE__*/React.createElement("div", {
15
- className: classnames('z-pointer-block', {
15
+ className: "z-pointer-block-panel"
16
+ }, /*#__PURE__*/React.createElement("div", {
17
+ className: classnames("z-pointer-block", {
16
18
  // 聚合指标里可点击时添加css动效
17
19
  animate: !!_onClick
18
20
  }),
@@ -31,6 +33,6 @@ var ZPointerBlock = function ZPointerBlock(props) {
31
33
  groupSeparator: ""
32
34
  })), icon ? /*#__PURE__*/React.createElement(_Col, {
33
35
  className: "z-pointer-icon"
34
- }, icon) : null));
36
+ }, icon) : null)));
35
37
  };
36
38
  export default ZPointerBlock;
@@ -275,12 +275,12 @@ var LinkRenderer = function LinkRenderer(props) {
275
275
  className: "arrow-left",
276
276
  onClick: onBack
277
277
  }), /*#__PURE__*/React.createElement("span", null, linkState.chartTitle || linkPageTitle)), (linkPage === null || linkPage === void 0 ? void 0 : (_linkPage$filter = linkPage.filter(function (field) {
278
- return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName;
278
+ return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName && (field === null || field === void 0 ? void 0 : field.chartTitle) === linkState.chartTitle;
279
279
  })) === null || _linkPage$filter === void 0 ? void 0 : _linkPage$filter.length) <= 1 ? null : /*#__PURE__*/React.createElement(_Radio.Group, {
280
280
  value: "" + (linkState === null || linkState === void 0 ? void 0 : linkState.dataSetName) + separator + linkState.index,
281
281
  onChange: handleLinkChange
282
282
  }, linkPage === null || linkPage === void 0 ? void 0 : linkPage.map(function (field, index) {
283
- return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName ? /*#__PURE__*/React.createElement(_Radio.Button, {
283
+ return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName && (field === null || field === void 0 ? void 0 : field.chartTitle) === linkState.chartTitle ? /*#__PURE__*/React.createElement(_Radio.Button, {
284
284
  value: "" + (field === null || field === void 0 ? void 0 : field.dataSetName) + separator + index.toString(),
285
285
  key: "" + (field === null || field === void 0 ? void 0 : field.dataSetName) + separator + index.toString()
286
286
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,3 +1,5 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
1
3
  .link-head {
2
4
  display: flex;
3
5
  align-items: center;
@@ -24,8 +26,8 @@
24
26
  cursor: pointer;
25
27
  }
26
28
 
27
- // .link-label {
28
- // display: flex;
29
- // align-items: center;
30
- // }
29
+ .arrow-left:hover {
30
+ transition: all 0.3s ease-in;
31
+ color: var(--ant-primary-color, @primary-color);
32
+ }
31
33
  }
@@ -6,6 +6,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  import React, { useRef, useImperativeHandle } from 'react';
7
7
  import { ProFormRender } from '@ztocwst/rc-pro';
8
8
  import ChartRenderer from "./components/chart-renderer";
9
+ import { processFormProps } from "../../utils";
9
10
 
10
11
  /** 指标配置 */
11
12
 
@@ -83,18 +84,20 @@ var ZTemplatesDataCommon = /*#__PURE__*/React.forwardRef(function (props, ref) {
83
84
  onLink: onLink
84
85
  };
85
86
  });
86
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ProFormRender, _extends({}, querySetting, {
87
+ var formProps = processFormProps(querySetting);
88
+ console.log("formProps", formProps);
89
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ProFormRender, _extends({}, formProps, {
87
90
  formRef: formRef,
88
91
  onValuesChange: function onValuesChange(changeValues) {},
89
92
  onFinish: /*#__PURE__*/function () {
90
93
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(formatData) {
91
- var _querySetting$onFinis;
94
+ var _formProps$onFinish;
92
95
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
93
96
  while (1) switch (_context2.prev = _context2.next) {
94
97
  case 0:
95
98
  _context2.prev = 0;
96
99
  _context2.next = 3;
97
- return (_querySetting$onFinis = querySetting.onFinish) === null || _querySetting$onFinis === void 0 ? void 0 : _querySetting$onFinis.call(querySetting, formatData);
100
+ return (_formProps$onFinish = formProps.onFinish) === null || _formProps$onFinish === void 0 ? void 0 : _formProps$onFinish.call(formProps, formatData);
98
101
  case 3:
99
102
  _context2.next = 5;
100
103
  return onFinish === null || onFinish === void 0 ? void 0 : onFinish(formatData);
package/es/style.js CHANGED
@@ -10,6 +10,7 @@ import 'antd/lib/message/style';
10
10
  import 'antd/lib/tabs/style';
11
11
  import 'antd/lib/checkbox/style';
12
12
  import 'antd/lib/radio/style';
13
+ import 'antd/lib/spin/style';
13
14
  import 'antd/es/statistic/style';
14
15
  import 'antd/es/progress/style';
15
16
  import 'antd/es/table/style';
@@ -6,8 +6,11 @@
6
6
  border-radius: 8px;
7
7
  padding: 16px;
8
8
  overflow: hidden;
9
+ transition: all 0.3s ease-in 0s;
9
10
 
10
11
  &.animate:hover {
12
+ position: relative;
13
+ z-index: 99;
11
14
  transform: scale(1.05);
12
15
  transition: all 0.3s ease-in;
13
16
  }
@@ -47,6 +50,11 @@
47
50
  grid-gap: 10px;
48
51
  grid-template-columns: repeat(1, 1fr);
49
52
 
53
+ .z-pointer-block {
54
+ border: 0;
55
+ transition: all 0.3s ease-in 0s;
56
+ }
57
+
50
58
  .z-pointer-block.animate:hover {
51
59
  box-shadow: 0 4px 16px 2px rgba(0, 0, 0, 0.1);
52
60
  transform: scale(1.05);
@@ -54,7 +62,7 @@
54
62
  }
55
63
 
56
64
  // 流程指标块
57
- &.process .z-pointer-block,
65
+ &.process .z-pointer-block-panel,
58
66
  &.process > * {
59
67
  position: relative;
60
68
 
@@ -90,7 +98,7 @@
90
98
  }
91
99
 
92
100
  // 纵向
93
- &.vertical .z-pointer-block,
101
+ &.vertical .z-pointer-block-panel,
94
102
  &.vertical > * {
95
103
  &::before {
96
104
  position: absolute;
@@ -22,7 +22,7 @@ var ZAggBlock = function ZAggBlock(_ref) {
22
22
  _onClick = _ref.onClick,
23
23
  rest = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
24
24
  return /*#__PURE__*/_react["default"].createElement("div", {
25
- className: (0, _classnames["default"])('pointer-block-wrap', {
25
+ className: (0, _classnames["default"])("pointer-block-wrap", {
26
26
  animate: !!_onClick
27
27
  }),
28
28
  style: (0, _extends2["default"])({
@@ -17,7 +17,9 @@ var ZPointerBlock = function ZPointerBlock(props) {
17
17
  align = props.align,
18
18
  _onClick = props.onClick;
19
19
  return /*#__PURE__*/React.createElement("div", {
20
- className: (0, _classnames["default"])('z-pointer-block', {
20
+ className: "z-pointer-block-panel"
21
+ }, /*#__PURE__*/React.createElement("div", {
22
+ className: (0, _classnames["default"])("z-pointer-block", {
21
23
  // 聚合指标里可点击时添加css动效
22
24
  animate: !!_onClick
23
25
  }),
@@ -36,7 +38,7 @@ var ZPointerBlock = function ZPointerBlock(props) {
36
38
  groupSeparator: ""
37
39
  })), icon ? /*#__PURE__*/React.createElement(_col["default"], {
38
40
  className: "z-pointer-icon"
39
- }, icon) : null));
41
+ }, icon) : null)));
40
42
  };
41
43
  var _default = ZPointerBlock;
42
44
  exports["default"] = _default;
@@ -280,12 +280,12 @@ var LinkRenderer = function LinkRenderer(props) {
280
280
  className: "arrow-left",
281
281
  onClick: onBack
282
282
  }), /*#__PURE__*/React.createElement("span", null, linkState.chartTitle || linkPageTitle)), (linkPage === null || linkPage === void 0 ? void 0 : (_linkPage$filter = linkPage.filter(function (field) {
283
- return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName;
283
+ return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName && (field === null || field === void 0 ? void 0 : field.chartTitle) === linkState.chartTitle;
284
284
  })) === null || _linkPage$filter === void 0 ? void 0 : _linkPage$filter.length) <= 1 ? null : /*#__PURE__*/React.createElement(_radio["default"].Group, {
285
285
  value: "" + (linkState === null || linkState === void 0 ? void 0 : linkState.dataSetName) + _dataCommon.separator + linkState.index,
286
286
  onChange: handleLinkChange
287
287
  }, linkPage === null || linkPage === void 0 ? void 0 : linkPage.map(function (field, index) {
288
- return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName ? /*#__PURE__*/React.createElement(_radio["default"].Button, {
288
+ return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName && (field === null || field === void 0 ? void 0 : field.chartTitle) === linkState.chartTitle ? /*#__PURE__*/React.createElement(_radio["default"].Button, {
289
289
  value: "" + (field === null || field === void 0 ? void 0 : field.dataSetName) + _dataCommon.separator + index.toString(),
290
290
  key: "" + (field === null || field === void 0 ? void 0 : field.dataSetName) + _dataCommon.separator + index.toString()
291
291
  }, /*#__PURE__*/React.createElement("div", {
@@ -1,3 +1,5 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
1
3
  .link-head {
2
4
  display: flex;
3
5
  align-items: center;
@@ -24,8 +26,8 @@
24
26
  cursor: pointer;
25
27
  }
26
28
 
27
- // .link-label {
28
- // display: flex;
29
- // align-items: center;
30
- // }
29
+ .arrow-left:hover {
30
+ transition: all 0.3s ease-in;
31
+ color: var(--ant-primary-color, @primary-color);
32
+ }
31
33
  }
@@ -11,6 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var _rcPro = require("@ztocwst/rc-pro");
13
13
  var _chartRenderer = _interopRequireDefault(require("./components/chart-renderer"));
14
+ var _utils = require("../../utils");
14
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
17
  /** 指标配置 */
@@ -89,18 +90,20 @@ var ZTemplatesDataCommon = /*#__PURE__*/_react["default"].forwardRef(function (p
89
90
  onLink: onLink
90
91
  };
91
92
  });
92
- return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_rcPro.ProFormRender, (0, _extends2["default"])({}, querySetting, {
93
+ var formProps = (0, _utils.processFormProps)(querySetting);
94
+ console.log("formProps", formProps);
95
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_rcPro.ProFormRender, (0, _extends2["default"])({}, formProps, {
93
96
  formRef: formRef,
94
97
  onValuesChange: function onValuesChange(changeValues) {},
95
98
  onFinish: /*#__PURE__*/function () {
96
99
  var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(formatData) {
97
- var _querySetting$onFinis;
100
+ var _formProps$onFinish;
98
101
  return _regenerator["default"].wrap(function _callee2$(_context2) {
99
102
  while (1) switch (_context2.prev = _context2.next) {
100
103
  case 0:
101
104
  _context2.prev = 0;
102
105
  _context2.next = 3;
103
- return (_querySetting$onFinis = querySetting.onFinish) === null || _querySetting$onFinis === void 0 ? void 0 : _querySetting$onFinis.call(querySetting, formatData);
106
+ return (_formProps$onFinish = formProps.onFinish) === null || _formProps$onFinish === void 0 ? void 0 : _formProps$onFinish.call(formProps, formatData);
104
107
  case 3:
105
108
  _context2.next = 5;
106
109
  return onFinish === null || onFinish === void 0 ? void 0 : onFinish(formatData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztocwst/rc-pro-materials",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
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.onmicrosoft.cn/@ztocwst/rc-pro-materials@0.1.33/build/lowcode/assets-prod.json"
89
+ "materialSchema": "https://npm.onmicrosoft.cn/@ztocwst/rc-pro-materials@0.1.35/build/lowcode/assets-prod.json"
90
90
  },
91
- "homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.1.33/build/index.html",
91
+ "homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.1.35/build/index.html",
92
92
  "publishConfig": {
93
93
  "registry": "https://registry.npmjs.org/",
94
94
  "access": "public"