@ztocwst/rc-pro-materials 0.1.0 → 0.1.2

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 (125) hide show
  1. package/build/lowcode/assets-daily.json +12 -12
  2. package/build/lowcode/assets-dev.json +3 -3
  3. package/build/lowcode/assets-prod.json +12 -12
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +6 -6
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/dist/{BizComps.css → SCM_Comps.css} +1 -1
  12. package/dist/{BizComps.js → SCM_Comps.js} +9 -9
  13. package/dist/SCM_Comps.js.map +1 -0
  14. package/es/components/z-Ellipsis/ellipsis.d.ts +4 -0
  15. package/es/components/z-Ellipsis/ellipsis.js +6 -0
  16. package/es/components/z-Ellipsis/index.d.ts +3 -0
  17. package/es/components/z-Ellipsis/index.js +2 -0
  18. package/es/components/z-box/box.d.ts +20 -0
  19. package/es/components/z-box/box.js +29 -0
  20. package/es/components/z-box/index.d.ts +3 -0
  21. package/es/components/z-box/index.js +2 -0
  22. package/es/components/z-box/index.less +4 -0
  23. package/es/components/z-button/z-button.js +3 -7
  24. package/es/components/z-config-provider/configProvider.d.ts +4 -0
  25. package/es/components/z-config-provider/configProvider.js +10 -0
  26. package/es/components/z-config-provider/index.d.ts +3 -0
  27. package/es/components/z-config-provider/index.js +2 -0
  28. package/es/components/z-div/div.d.ts +6 -0
  29. package/es/components/z-div/div.js +10 -0
  30. package/es/components/z-div/index.d.ts +2 -0
  31. package/es/components/z-div/index.js +2 -0
  32. package/es/components/z-form/z-form.d.ts +8 -2
  33. package/es/components/z-form/z-form.js +34 -2
  34. package/es/components/z-list/index.d.ts +3 -0
  35. package/es/components/z-list/index.js +2 -0
  36. package/es/components/z-list/list.d.ts +11 -0
  37. package/es/components/z-list/list.js +33 -0
  38. package/es/components/z-preview/index.d.ts +3 -0
  39. package/es/components/z-preview/index.js +2 -0
  40. package/es/components/z-preview/preview.d.ts +4 -0
  41. package/es/components/z-preview/preview.js +7 -0
  42. package/es/components/z-simple-bar/index.d.ts +3 -0
  43. package/es/components/z-simple-bar/index.js +2 -0
  44. package/es/components/z-simple-bar/index.less +9 -0
  45. package/es/components/z-simple-bar/z-simple-bar.d.ts +25 -0
  46. package/es/components/z-simple-bar/z-simple-bar.js +94 -0
  47. package/es/components/z-statistic/index.d.ts +3 -0
  48. package/es/components/z-statistic/index.js +2 -0
  49. package/es/components/z-statistic/index.less +22 -0
  50. package/es/components/z-statistic/statistic.d.ts +13 -0
  51. package/es/components/z-statistic/statistic.js +29 -0
  52. package/es/components/z-table/index.d.ts +3 -0
  53. package/es/components/z-table/index.js +2 -0
  54. package/es/components/z-table/table.d.ts +8 -0
  55. package/es/components/z-table/table.js +31 -0
  56. package/es/index.d.ts +18 -0
  57. package/es/index.js +10 -0
  58. package/es/style.js +2 -0
  59. package/es/utils/hoc.d.ts +6 -0
  60. package/es/utils/hoc.js +14 -0
  61. package/es/utils/index.d.ts +4 -0
  62. package/es/utils/index.js +4 -0
  63. package/es/utils/props/button.d.ts +9 -0
  64. package/es/utils/props/button.js +13 -0
  65. package/es/utils/props/form.d.ts +881 -0
  66. package/es/utils/props/form.js +125 -0
  67. package/es/utils/props/listTpl.d.ts +869 -0
  68. package/es/utils/props/listTpl.js +13 -0
  69. package/lib/components/z-Ellipsis/ellipsis.d.ts +4 -0
  70. package/lib/components/z-Ellipsis/ellipsis.js +13 -0
  71. package/lib/components/z-Ellipsis/index.d.ts +3 -0
  72. package/lib/components/z-Ellipsis/index.js +8 -0
  73. package/lib/components/z-box/box.d.ts +20 -0
  74. package/lib/components/z-box/box.js +35 -0
  75. package/lib/components/z-box/index.d.ts +3 -0
  76. package/lib/components/z-box/index.js +8 -0
  77. package/lib/components/z-box/index.less +4 -0
  78. package/lib/components/z-button/z-button.js +2 -8
  79. package/lib/components/z-config-provider/configProvider.d.ts +4 -0
  80. package/lib/components/z-config-provider/configProvider.js +18 -0
  81. package/lib/components/z-config-provider/index.d.ts +3 -0
  82. package/lib/components/z-config-provider/index.js +8 -0
  83. package/lib/components/z-div/div.d.ts +6 -0
  84. package/lib/components/z-div/div.js +15 -0
  85. package/lib/components/z-div/index.d.ts +2 -0
  86. package/lib/components/z-div/index.js +8 -0
  87. package/lib/components/z-form/z-form.d.ts +8 -2
  88. package/lib/components/z-form/z-form.js +35 -3
  89. package/lib/components/z-list/index.d.ts +3 -0
  90. package/lib/components/z-list/index.js +8 -0
  91. package/lib/components/z-list/list.d.ts +11 -0
  92. package/lib/components/z-list/list.js +41 -0
  93. package/lib/components/z-preview/index.d.ts +3 -0
  94. package/lib/components/z-preview/index.js +8 -0
  95. package/lib/components/z-preview/preview.d.ts +4 -0
  96. package/lib/components/z-preview/preview.js +14 -0
  97. package/lib/components/z-simple-bar/index.d.ts +3 -0
  98. package/lib/components/z-simple-bar/index.js +8 -0
  99. package/lib/components/z-simple-bar/index.less +9 -0
  100. package/lib/components/z-simple-bar/z-simple-bar.d.ts +25 -0
  101. package/lib/components/z-simple-bar/z-simple-bar.js +100 -0
  102. package/lib/components/z-statistic/index.d.ts +3 -0
  103. package/lib/components/z-statistic/index.js +8 -0
  104. package/lib/components/z-statistic/index.less +22 -0
  105. package/lib/components/z-statistic/statistic.d.ts +13 -0
  106. package/lib/components/z-statistic/statistic.js +35 -0
  107. package/lib/components/z-table/index.d.ts +3 -0
  108. package/lib/components/z-table/index.js +8 -0
  109. package/lib/components/z-table/table.d.ts +8 -0
  110. package/lib/components/z-table/table.js +38 -0
  111. package/lib/index.d.ts +18 -0
  112. package/lib/index.js +21 -1
  113. package/lib/style.js +2 -0
  114. package/lib/utils/hoc.d.ts +6 -0
  115. package/lib/utils/hoc.js +18 -0
  116. package/lib/utils/index.d.ts +4 -0
  117. package/lib/utils/index.js +9 -0
  118. package/lib/utils/props/button.d.ts +9 -0
  119. package/lib/utils/props/button.js +19 -0
  120. package/lib/utils/props/form.d.ts +881 -0
  121. package/lib/utils/props/form.js +131 -0
  122. package/lib/utils/props/listTpl.d.ts +869 -0
  123. package/lib/utils/props/listTpl.js +19 -0
  124. package/package.json +11 -6
  125. package/dist/BizComps.js.map +0 -1
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { ProEllipsisProps } from '@ztocwst/rc-pro';
3
+ declare const ZEllipsis: React.FC<ProEllipsisProps>;
4
+ export default ZEllipsis;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { ProEllipsis } from '@ztocwst/rc-pro';
3
+ var ZEllipsis = function ZEllipsis(props) {
4
+ return /*#__PURE__*/React.createElement(ProEllipsis, props);
5
+ };
6
+ export default ZEllipsis;
@@ -0,0 +1,3 @@
1
+ import ZEllipsis from './ellipsis';
2
+ export type { ProEllipsisProps } from '@ztocwst/rc-pro';
3
+ export default ZEllipsis;
@@ -0,0 +1,2 @@
1
+ import ZEllipsis from "./ellipsis";
2
+ export default ZEllipsis;
@@ -0,0 +1,20 @@
1
+ import { CSSProperties } from 'react';
2
+ import './index.less';
3
+ export interface TypeZBoxProps {
4
+ /** 对齐方向 */
5
+ direction: 'column' | 'row';
6
+ /** 主轴对齐 */
7
+ justify: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
8
+ /** 交叉轴对齐 */
9
+ align: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
10
+ /** 宽度 */
11
+ width: '' | '100%';
12
+ /** 间距 */
13
+ spacing: number;
14
+ style?: CSSProperties;
15
+ className?: string;
16
+ /** 是否换行 */
17
+ wrap: 'wrap' | 'nowrap';
18
+ }
19
+ declare const ZBox: React.FC<TypeZBoxProps>;
20
+ export default ZBox;
@@ -0,0 +1,29 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import "./index.less";
3
+ import classnames from 'classnames';
4
+ var ZBox = function ZBox(props) {
5
+ var _classnames;
6
+ var direction = props.direction,
7
+ justify = props.justify,
8
+ align = props.align,
9
+ width = props.width,
10
+ wrap = props.wrap,
11
+ spacing = props.spacing,
12
+ style = props.style,
13
+ className = props.className,
14
+ children = props.children;
15
+ var styleProps = {
16
+ flexFlow: direction,
17
+ justifyContent: justify,
18
+ alignItems: align,
19
+ width: width,
20
+ gap: spacing,
21
+ flexWrap: wrap
22
+ };
23
+ return /*#__PURE__*/React.createElement("div", {
24
+ className: classnames('rc-z-box', (_classnames = {}, _classnames[className] = !!className, _classnames)),
25
+ style: _extends({}, styleProps, style)
26
+ }, children);
27
+ };
28
+ ZBox.displayName = 'ZBox';
29
+ export default ZBox;
@@ -0,0 +1,3 @@
1
+ import ZBox from './box';
2
+ export type { TypeZBoxProps } from './box';
3
+ export default ZBox;
@@ -0,0 +1,2 @@
1
+ import ZBox from "./box";
2
+ export default ZBox;
@@ -0,0 +1,4 @@
1
+ .rc-z-box {
2
+ box-sizing: border-box;
3
+ display: flex;
4
+ }
@@ -1,14 +1,10 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  import * as React from 'react';
3
2
  import { ProButton } from '@ztocwst/rc-pro';
3
+ import { processButtonProps } from "../../utils";
4
4
  // import { bizCssPrefix } from '../../variables';
5
5
  // import './index.scss';
6
+
6
7
  var ZButton = function ZButton(props) {
7
- var _props$items;
8
- return /*#__PURE__*/React.createElement(ProButton, _extends({}, props, {
9
- items: props === null || props === void 0 ? void 0 : (_props$items = props.items) === null || _props$items === void 0 ? void 0 : _props$items.filter(function (e) {
10
- return !!e;
11
- })
12
- }));
8
+ return /*#__PURE__*/React.createElement(ProButton, processButtonProps(props));
13
9
  };
14
10
  export default ZButton;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { RcConfigConsumerProps } from '@ztocwst/rc-pro';
3
+ declare const ZConfigProvider: React.FC<RcConfigConsumerProps>;
4
+ export default ZConfigProvider;
@@ -0,0 +1,10 @@
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
2
+ var _excluded = ["children"];
3
+ import * as React from 'react';
4
+ import { RcConfigProvider } from '@ztocwst/rc-pro';
5
+ var ZConfigProvider = function ZConfigProvider(_ref) {
6
+ var children = _ref.children,
7
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
8
+ return /*#__PURE__*/React.createElement(RcConfigProvider, rest, children);
9
+ };
10
+ export default ZConfigProvider;
@@ -0,0 +1,3 @@
1
+ import ZConfigProvider from './configProvider';
2
+ export type { RcConfigConsumerProps } from '@ztocwst/rc-pro';
3
+ export default ZConfigProvider;
@@ -0,0 +1,2 @@
1
+ import ZConfigProvider from "./configProvider";
2
+ export default ZConfigProvider;
@@ -0,0 +1,6 @@
1
+ import { CSSProperties } from 'react';
2
+ declare const ZDiv: import("react").ForwardRefExoticComponent<{
3
+ className?: string;
4
+ style: CSSProperties;
5
+ } & import("react").RefAttributes<HTMLDivElement>>;
6
+ export default ZDiv;
@@ -0,0 +1,10 @@
1
+ import { forwardRef } from 'react';
2
+ var ZDiv = /*#__PURE__*/forwardRef(function (props, ref) {
3
+ return /*#__PURE__*/React.createElement("div", {
4
+ className: props.className,
5
+ style: props.style,
6
+ ref: ref
7
+ }, props.children);
8
+ });
9
+ ZDiv.displayName = 'ZDiv';
10
+ export default ZDiv;
@@ -0,0 +1,2 @@
1
+ import ZDiv from './div';
2
+ export default ZDiv;
@@ -0,0 +1,2 @@
1
+ import ZDiv from "./div";
2
+ export default ZDiv;
@@ -1,4 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import type { ProFormRenderProps } from '@ztocwst/rc-pro';
3
- declare const ZForm: React.FC<ProFormRenderProps>;
4
- export default ZForm;
3
+ export default class ZFormContainer extends React.Component<ProFormRenderProps, any> {
4
+ formRef: any;
5
+ currentRef: any;
6
+ constructor(props: any);
7
+ getFormRef: () => any;
8
+ getCurrentRef: () => any;
9
+ render(): React.JSX.Element;
10
+ }
@@ -1,6 +1,38 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
1
3
  import * as React from 'react';
2
4
  import { ProFormRender } from '@ztocwst/rc-pro';
5
+ import { processFormProps } from "../../utils";
3
6
  var ZForm = function ZForm(props) {
4
- return /*#__PURE__*/React.createElement(ProFormRender, props);
7
+ var formProps = processFormProps(props);
8
+ return /*#__PURE__*/React.createElement(ProFormRender, formProps);
5
9
  };
6
- export default ZForm;
10
+
11
+ // export default ZForm;
12
+ var ZFormContainer = /*#__PURE__*/function (_React$Component) {
13
+ _inheritsLoose(ZFormContainer, _React$Component);
14
+ function ZFormContainer(props) {
15
+ var _this;
16
+ _this = _React$Component.call(this, props) || this;
17
+ _this.formRef = void 0;
18
+ _this.currentRef = void 0;
19
+ _this.getFormRef = function () {
20
+ return _this.formRef.current;
21
+ };
22
+ _this.getCurrentRef = function () {
23
+ return _this.currentRef.current;
24
+ };
25
+ _this.formRef = /*#__PURE__*/React.createRef();
26
+ _this.currentRef = /*#__PURE__*/React.createRef();
27
+ return _this;
28
+ }
29
+ var _proto = ZFormContainer.prototype;
30
+ _proto.render = function render() {
31
+ return /*#__PURE__*/React.createElement(ZForm, _extends({}, this.props, {
32
+ formRef: this.formRef,
33
+ currentRef: this.currentRef
34
+ }));
35
+ };
36
+ return ZFormContainer;
37
+ }(React.Component);
38
+ export { ZFormContainer as default };
@@ -0,0 +1,3 @@
1
+ import ZList from './list';
2
+ export type { RcListItem } from '@ztocwst/rc-pro';
3
+ export default ZList;
@@ -0,0 +1,2 @@
1
+ import ZList from "./list";
2
+ export default ZList;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 模板列表
3
+ */
4
+ import * as React from 'react';
5
+ import type { RcListItem } from '@ztocwst/rc-pro';
6
+ export default class ZTplListContainer extends React.Component<RcListItem, any> {
7
+ listRef: any;
8
+ constructor(props: any);
9
+ getListRef: () => any;
10
+ render(): React.JSX.Element;
11
+ }
@@ -0,0 +1,33 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
3
+ /**
4
+ * 模板列表
5
+ */
6
+ import * as React from 'react';
7
+ import { RcListTpl } from '@ztocwst/rc-pro';
8
+ import { processListTplProps } from "../../utils";
9
+ var ZList = function ZList(props) {
10
+ console.log(processListTplProps(props), 'listTpl props');
11
+ return /*#__PURE__*/React.createElement(RcListTpl, processListTplProps(props));
12
+ };
13
+ var ZTplListContainer = /*#__PURE__*/function (_React$Component) {
14
+ _inheritsLoose(ZTplListContainer, _React$Component);
15
+ function ZTplListContainer(props) {
16
+ var _this;
17
+ _this = _React$Component.call(this, props) || this;
18
+ _this.listRef = void 0;
19
+ _this.getListRef = function () {
20
+ return _this.listRef.current;
21
+ };
22
+ _this.listRef = /*#__PURE__*/React.createRef();
23
+ return _this;
24
+ }
25
+ var _proto = ZTplListContainer.prototype;
26
+ _proto.render = function render() {
27
+ return /*#__PURE__*/React.createElement(ZList, _extends({}, this.props, {
28
+ listRef: this.listRef
29
+ }));
30
+ };
31
+ return ZTplListContainer;
32
+ }(React.Component);
33
+ export { ZTplListContainer as default };
@@ -0,0 +1,3 @@
1
+ import ZPreview from './preview';
2
+ export type { ProPreviewProps } from '@ztocwst/rc-pro';
3
+ export default ZPreview;
@@ -0,0 +1,2 @@
1
+ import ZPreview from "./preview";
2
+ export default ZPreview;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { ProPreviewProps } from '@ztocwst/rc-pro';
3
+ declare const ZPreview: React.FC<ProPreviewProps>;
4
+ export default ZPreview;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { ProPreview } from '@ztocwst/rc-pro';
3
+ var ZPreview = function ZPreview(props) {
4
+ console.log(props, 22);
5
+ return /*#__PURE__*/React.createElement(ProPreview, props);
6
+ };
7
+ export default ZPreview;
@@ -0,0 +1,3 @@
1
+ import ZSimpleBar from './z-simple-bar';
2
+ export type { TypeZSimpleBarProps } from './z-simple-bar';
3
+ export default ZSimpleBar;
@@ -0,0 +1,2 @@
1
+ import ZSimpleBar from "./z-simple-bar";
2
+ export default ZSimpleBar;
@@ -0,0 +1,9 @@
1
+ .z-simple-bar {
2
+ .bar-item {
3
+ margin-bottom: 20px;
4
+
5
+ &:last-child {
6
+ margin-bottom: 0;
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ import { ProgressProps } from 'antd';
3
+ import './index.less';
4
+ export interface TypeZSimpleBarProps extends Omit<ProgressProps, 'format'> {
5
+ /** 数据源 */
6
+ data: any[];
7
+ /** 行key */
8
+ rowKey?: string;
9
+ /**
10
+ * 双行显示
11
+ * @type boolean
12
+ * @default false
13
+ */
14
+ wrap?: boolean;
15
+ /** 标题字段 */
16
+ titleField?: string | ((v: any, index: number) => React.ReactNode);
17
+ /** 值字段 */
18
+ valueField?: string | ((v: any, index: number) => React.ReactNode);
19
+ /** 百分比字段 */
20
+ percentField?: string | ((v: any, index: number) => React.ReactNode);
21
+ /** 百分比内容格式化,中转其本身的format */
22
+ format?: (percent: number, successPercent: number, item: any, index: number) => string;
23
+ }
24
+ declare const ZSimpleBar: (props: TypeZSimpleBarProps) => import("react").JSX.Element;
25
+ export default ZSimpleBar;
@@ -0,0 +1,94 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _Progress from "antd/es/progress";
3
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
4
+ var _excluded = ["wrap", "titleField", "valueField"],
5
+ _excluded2 = ["data", "wrap", "titleField", "valueField", "percentField", "rowKey", "format"];
6
+ import "./index.less";
7
+ var Bar = function Bar(props) {
8
+ var wrap = props.wrap,
9
+ titleField = props.titleField,
10
+ valueField = props.valueField,
11
+ rest = _objectWithoutPropertiesLoose(props, _excluded);
12
+ if (wrap) {
13
+ return /*#__PURE__*/React.createElement("div", {
14
+ className: "bar-item"
15
+ }, /*#__PURE__*/React.createElement("div", {
16
+ style: {
17
+ display: 'flex',
18
+ // gap: 10,
19
+ justifyContent: 'space-between'
20
+ }
21
+ }, /*#__PURE__*/React.createElement("span", null, titleField), valueField && /*#__PURE__*/React.createElement("span", null, valueField)), /*#__PURE__*/React.createElement(_Progress, rest));
22
+ }
23
+ return /*#__PURE__*/React.createElement("div", {
24
+ className: "bar-item",
25
+ style: {
26
+ display: 'flex',
27
+ // todo 配置
28
+ gap: 6
29
+ }
30
+ }, /*#__PURE__*/React.createElement("span", null, titleField), /*#__PURE__*/React.createElement(_Progress, _extends({
31
+ style: {
32
+ flex: 1
33
+ }
34
+ }, rest)), valueField && /*#__PURE__*/React.createElement("span", null, valueField));
35
+ };
36
+ var ZSimpleBar = function ZSimpleBar(props) {
37
+ var data = props.data,
38
+ wrap = props.wrap,
39
+ titleField = props.titleField,
40
+ valueField = props.valueField,
41
+ percentField = props.percentField,
42
+ _props$rowKey = props.rowKey,
43
+ rowKey = _props$rowKey === void 0 ? 'id' : _props$rowKey,
44
+ _format = props.format,
45
+ rest = _objectWithoutPropertiesLoose(props, _excluded2);
46
+ var getTitle = function getTitle(item, index) {
47
+ if (typeof titleField === 'function') {
48
+ return titleField(item, index);
49
+ }
50
+ if (typeof titleField === 'string') {
51
+ return item[titleField];
52
+ }
53
+ return titleField;
54
+ };
55
+ var getValue = function getValue(item, index) {
56
+ if (typeof valueField === 'function') {
57
+ return valueField(item, index);
58
+ }
59
+ if (typeof valueField === 'string') {
60
+ return item[valueField];
61
+ }
62
+ return valueField;
63
+ };
64
+ var getPercent = function getPercent(item, index) {
65
+ if (typeof percentField === 'function') {
66
+ return percentField(item, index);
67
+ }
68
+ if (typeof percentField === 'string') {
69
+ return item[percentField];
70
+ }
71
+ return percentField;
72
+ };
73
+ return /*#__PURE__*/React.createElement("div", {
74
+ className: "z-simple-bar"
75
+ }, data === null || data === void 0 ? void 0 : data.map(function (record, index) {
76
+ var _titleField = getTitle(record, index);
77
+ var _valueField = getValue(record, index);
78
+ var _percent = getPercent(record, index);
79
+ return /*#__PURE__*/React.createElement(Bar, _extends({
80
+ key: record[rowKey] || index,
81
+ wrap: wrap,
82
+ titleField: _titleField,
83
+ valueField: _valueField
84
+ // 百分比内容格式处理
85
+ }, _format ? {
86
+ format: function format(percent, successPercent) {
87
+ return _format(percent, successPercent, record, index);
88
+ }
89
+ } : {}, _percent ? {
90
+ percent: _percent
91
+ } : {}, rest));
92
+ }));
93
+ };
94
+ export default ZSimpleBar;
@@ -0,0 +1,3 @@
1
+ import ZStatistic from './statistic';
2
+ export type { TypeZStatisticProps } from './statistic';
3
+ export default ZStatistic;
@@ -0,0 +1,2 @@
1
+ import ZStatistic from "./statistic";
2
+ export default ZStatistic;
@@ -0,0 +1,22 @@
1
+ .statistic-wrap {
2
+ display: flex;
3
+ flex-direction: row;
4
+
5
+ .statistic-title-suffix {
6
+ margin-left: 4px;
7
+ }
8
+
9
+ .statistic-left {
10
+ flex: 1;
11
+ }
12
+
13
+ .statistic-right {
14
+ text-align: right;
15
+ }
16
+
17
+ .statistic-right-title-extra {
18
+ margin-bottom: 4px;
19
+ font-size: 14px;
20
+ min-height: 22px;
21
+ }
22
+ }
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { StatisticProps } from 'antd';
3
+ import './index.less';
4
+ export interface TypeZStatisticProps extends StatisticProps {
5
+ /** 标题后缀 */
6
+ titleSuffix?: string | React.ReactNode;
7
+ /** 标题附加内容 */
8
+ titleExtra?: string | React.ReactNode;
9
+ /** 值附加内容 */
10
+ valueExtra?: string | React.ReactNode;
11
+ }
12
+ declare const ZStatistic: (props: TypeZStatisticProps) => import("react").JSX.Element;
13
+ export default ZStatistic;
@@ -0,0 +1,29 @@
1
+ import _Statistic from "antd/es/statistic";
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
4
+ var _excluded = ["title", "titleSuffix", "titleExtra", "valueExtra", "style"];
5
+ import "./index.less";
6
+ var ZStatistic = function ZStatistic(props) {
7
+ var title = props.title,
8
+ titleSuffix = props.titleSuffix,
9
+ titleExtra = props.titleExtra,
10
+ valueExtra = props.valueExtra,
11
+ style = props.style,
12
+ rest = _objectWithoutPropertiesLoose(props, _excluded);
13
+ var _title = /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement("span", {
14
+ className: "statistic-title-suffix"
15
+ }, titleSuffix));
16
+ return /*#__PURE__*/React.createElement("div", {
17
+ className: "statistic-wrap",
18
+ style: style
19
+ }, /*#__PURE__*/React.createElement("div", {
20
+ className: "statistic-left"
21
+ }, /*#__PURE__*/React.createElement(_Statistic, _extends({}, rest, {
22
+ title: _title
23
+ }))), titleExtra || valueExtra ? /*#__PURE__*/React.createElement("div", {
24
+ className: "statistic-right"
25
+ }, /*#__PURE__*/React.createElement("div", {
26
+ className: "statistic-right-title-extra"
27
+ }, titleExtra), /*#__PURE__*/React.createElement("div", null, valueExtra)) : null);
28
+ };
29
+ export default ZStatistic;
@@ -0,0 +1,3 @@
1
+ import ZTable from './table';
2
+ export type { ProTableProps } from '@ztocwst/rc-pro';
3
+ export default ZTable;
@@ -0,0 +1,2 @@
1
+ import ZTable from "./table";
2
+ export default ZTable;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import type { ProTableProps } from '@ztocwst/rc-pro';
3
+ export default class ZTableContainer extends React.Component<ProTableProps, any> {
4
+ tableRef: any;
5
+ constructor(props: any);
6
+ getTableRef: () => any;
7
+ render(): React.JSX.Element;
8
+ }
@@ -0,0 +1,31 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
3
+ import * as React from 'react';
4
+ import { ProTable } from '@ztocwst/rc-pro';
5
+ var ZTable = /*#__PURE__*/React.forwardRef(function (props, ref) {
6
+ return /*#__PURE__*/React.createElement(ProTable, {
7
+ config: props,
8
+ ref: ref
9
+ });
10
+ });
11
+ var ZTableContainer = /*#__PURE__*/function (_React$Component) {
12
+ _inheritsLoose(ZTableContainer, _React$Component);
13
+ function ZTableContainer(props) {
14
+ var _this;
15
+ _this = _React$Component.call(this, props) || this;
16
+ _this.tableRef = void 0;
17
+ _this.getTableRef = function () {
18
+ return _this.tableRef.current;
19
+ };
20
+ _this.tableRef = /*#__PURE__*/React.createRef();
21
+ return _this;
22
+ }
23
+ var _proto = ZTableContainer.prototype;
24
+ _proto.render = function render() {
25
+ return /*#__PURE__*/React.createElement(ZTable, _extends({}, this.props, {
26
+ ref: this.tableRef
27
+ }));
28
+ };
29
+ return ZTableContainer;
30
+ }(React.Component);
31
+ export { ZTableContainer as default };
package/es/index.d.ts CHANGED
@@ -2,5 +2,23 @@ export type { ProButtonProps } from '@ztocwst/rc-pro/es/components/ProButton';
2
2
  export { default as ZButton } from './components/z-button';
3
3
  export type { ProFormRenderProps } from '@ztocwst/rc-pro';
4
4
  export { default as ZForm } from './components/z-form';
5
+ export type { ProEllipsisProps } from '@ztocwst/rc-pro';
6
+ export { default as ZEllipsis } from './components/z-Ellipsis';
7
+ export type { ProTableProps } from '@ztocwst/rc-pro';
8
+ export { default as ZTable } from './components/z-table';
9
+ export type { ProPreviewProps } from '@ztocwst/rc-pro';
10
+ export { default as ZPreview } from './components/z-preview';
11
+ export type { RcListItem } from '@ztocwst/rc-pro';
12
+ export { default as ZList } from './components/z-list';
13
+ export type { RcConfigConsumerProps } from '@ztocwst/rc-pro';
14
+ export { default as ZConfigProvider } from './components/z-config-provider';
15
+ export type { TypeZBoxProps } from './components/z-box';
16
+ export { default as ZBox } from './components/z-box';
17
+ export { default as ZDiv } from './components/z-div';
18
+ export type { TypeZStatisticProps } from './components/z-statistic';
19
+ export { default as ZStatistic } from './components/z-statistic';
20
+ export type { TypeZSimpleBarProps } from './components/z-simple-bar';
21
+ export { default as ZSimpleBar } from './components/z-simple-bar';
22
+ export { Statistic } from 'antd';
5
23
  declare const bizCssPrefix = "bizpack";
6
24
  export { bizCssPrefix };
package/es/index.js CHANGED
@@ -1,4 +1,14 @@
1
1
  export { default as ZButton } from "./components/z-button";
2
2
  export { default as ZForm } from "./components/z-form";
3
+ export { default as ZEllipsis } from "./components/z-Ellipsis";
4
+ export { default as ZTable } from "./components/z-table";
5
+ export { default as ZPreview } from "./components/z-preview";
6
+ export { default as ZList } from "./components/z-list";
7
+ export { default as ZConfigProvider } from "./components/z-config-provider";
8
+ export { default as ZBox } from "./components/z-box";
9
+ export { default as ZDiv } from "./components/z-div";
10
+ export { default as ZStatistic } from "./components/z-statistic";
11
+ export { default as ZSimpleBar } from "./components/z-simple-bar";
12
+ export { Statistic } from 'antd';
3
13
  var bizCssPrefix = 'bizpack';
4
14
  export { bizCssPrefix };
package/es/style.js CHANGED
@@ -1 +1,3 @@
1
+ import 'antd/es/statistic/style';
2
+ import 'antd/es/progress/style';
1
3
  import './index.scss';
@@ -0,0 +1,6 @@
1
+ import { ComponentType } from 'react';
2
+ /**
3
+ * 简单包装,不做任何处理
4
+ * 部分组件ref比较特殊,包一层会解决这个问题
5
+ */
6
+ export declare function withWrap(Comp: ComponentType<any>): import("react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any>>;
@@ -0,0 +1,14 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import { forwardRef } from 'react';
3
+
4
+ /**
5
+ * 简单包装,不做任何处理
6
+ * 部分组件ref比较特殊,包一层会解决这个问题
7
+ */
8
+ export function withWrap(Comp) {
9
+ return /*#__PURE__*/forwardRef(function (props, ref) {
10
+ return /*#__PURE__*/React.createElement(Comp, _extends({}, props, {
11
+ ref: ref
12
+ }));
13
+ });
14
+ }
@@ -0,0 +1,4 @@
1
+ import { processButtonProps } from './props/button';
2
+ import { processFormProps } from './props/form';
3
+ import { processListTplProps } from './props/listTpl';
4
+ export { processFormProps, processListTplProps, processButtonProps };