@ztocwst/rc-pro-materials 0.1.1 → 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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +6 -6
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/dist/SCM_Comps.css +1 -1
- package/dist/SCM_Comps.js +8 -8
- package/dist/SCM_Comps.js.map +1 -1
- package/es/components/z-box/box.d.ts +20 -0
- package/es/components/z-box/box.js +29 -0
- package/es/components/z-box/index.d.ts +3 -0
- package/es/components/z-box/index.js +2 -0
- package/es/components/z-box/index.less +4 -0
- package/es/components/z-config-provider/configProvider.d.ts +4 -0
- package/es/components/z-config-provider/configProvider.js +10 -0
- package/es/components/z-config-provider/index.d.ts +3 -0
- package/es/components/z-config-provider/index.js +2 -0
- package/es/components/z-div/div.d.ts +6 -0
- package/es/components/z-div/div.js +10 -0
- package/es/components/z-div/index.d.ts +2 -0
- package/es/components/z-div/index.js +2 -0
- package/es/components/z-simple-bar/index.d.ts +3 -0
- package/es/components/z-simple-bar/index.js +2 -0
- package/es/components/z-simple-bar/index.less +9 -0
- package/es/components/z-simple-bar/z-simple-bar.d.ts +25 -0
- package/es/components/z-simple-bar/z-simple-bar.js +94 -0
- package/es/components/z-statistic/index.d.ts +3 -0
- package/es/components/z-statistic/index.js +2 -0
- package/es/components/z-statistic/index.less +22 -0
- package/es/components/z-statistic/statistic.d.ts +13 -0
- package/es/components/z-statistic/statistic.js +29 -0
- package/es/index.d.ts +10 -0
- package/es/index.js +6 -0
- package/es/style.js +2 -0
- package/lib/components/z-box/box.d.ts +20 -0
- package/lib/components/z-box/box.js +35 -0
- package/lib/components/z-box/index.d.ts +3 -0
- package/lib/components/z-box/index.js +8 -0
- package/lib/components/z-box/index.less +4 -0
- package/lib/components/z-config-provider/configProvider.d.ts +4 -0
- package/lib/components/z-config-provider/configProvider.js +18 -0
- package/lib/components/z-config-provider/index.d.ts +3 -0
- package/lib/components/z-config-provider/index.js +8 -0
- package/lib/components/z-div/div.d.ts +6 -0
- package/lib/components/z-div/div.js +15 -0
- package/lib/components/z-div/index.d.ts +2 -0
- package/lib/components/z-div/index.js +8 -0
- package/lib/components/z-simple-bar/index.d.ts +3 -0
- package/lib/components/z-simple-bar/index.js +8 -0
- package/lib/components/z-simple-bar/index.less +9 -0
- package/lib/components/z-simple-bar/z-simple-bar.d.ts +25 -0
- package/lib/components/z-simple-bar/z-simple-bar.js +100 -0
- package/lib/components/z-statistic/index.d.ts +3 -0
- package/lib/components/z-statistic/index.js +8 -0
- package/lib/components/z-statistic/index.less +22 -0
- package/lib/components/z-statistic/statistic.d.ts +13 -0
- package/lib/components/z-statistic/statistic.js +35 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +13 -1
- package/lib/style.js +2 -0
- package/package.json +3 -3
|
@@ -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,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,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,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,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;
|
package/es/index.d.ts
CHANGED
|
@@ -10,5 +10,15 @@ export type { ProPreviewProps } from '@ztocwst/rc-pro';
|
|
|
10
10
|
export { default as ZPreview } from './components/z-preview';
|
|
11
11
|
export type { RcListItem } from '@ztocwst/rc-pro';
|
|
12
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';
|
|
13
23
|
declare const bizCssPrefix = "bizpack";
|
|
14
24
|
export { bizCssPrefix };
|
package/es/index.js
CHANGED
|
@@ -4,5 +4,11 @@ export { default as ZEllipsis } from "./components/z-Ellipsis";
|
|
|
4
4
|
export { default as ZTable } from "./components/z-table";
|
|
5
5
|
export { default as ZPreview } from "./components/z-preview";
|
|
6
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';
|
|
7
13
|
var bizCssPrefix = 'bizpack';
|
|
8
14
|
export { bizCssPrefix };
|
package/es/style.js
CHANGED
|
@@ -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,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
+
require("./index.less");
|
|
8
|
+
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var ZBox = function ZBox(props) {
|
|
10
|
+
var _classnames;
|
|
11
|
+
var direction = props.direction,
|
|
12
|
+
justify = props.justify,
|
|
13
|
+
align = props.align,
|
|
14
|
+
width = props.width,
|
|
15
|
+
wrap = props.wrap,
|
|
16
|
+
spacing = props.spacing,
|
|
17
|
+
style = props.style,
|
|
18
|
+
className = props.className,
|
|
19
|
+
children = props.children;
|
|
20
|
+
var styleProps = {
|
|
21
|
+
flexFlow: direction,
|
|
22
|
+
justifyContent: justify,
|
|
23
|
+
alignItems: align,
|
|
24
|
+
width: width,
|
|
25
|
+
gap: spacing,
|
|
26
|
+
flexWrap: wrap
|
|
27
|
+
};
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: (0, _classnames2["default"])('rc-z-box', (_classnames = {}, _classnames[className] = !!className, _classnames)),
|
|
30
|
+
style: (0, _extends2["default"])({}, styleProps, style)
|
|
31
|
+
}, children);
|
|
32
|
+
};
|
|
33
|
+
ZBox.displayName = 'ZBox';
|
|
34
|
+
var _default = ZBox;
|
|
35
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _box = _interopRequireDefault(require("./box"));
|
|
7
|
+
var _default = _box["default"];
|
|
8
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _rcPro = require("@ztocwst/rc-pro");
|
|
9
|
+
var _excluded = ["children"];
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
var ZConfigProvider = function ZConfigProvider(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
rest = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
15
|
+
return /*#__PURE__*/React.createElement(_rcPro.RcConfigProvider, rest, children);
|
|
16
|
+
};
|
|
17
|
+
var _default = ZConfigProvider;
|
|
18
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _configProvider = _interopRequireDefault(require("./configProvider"));
|
|
7
|
+
var _default = _configProvider["default"];
|
|
8
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
var _react = require("react");
|
|
6
|
+
var ZDiv = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
7
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
className: props.className,
|
|
9
|
+
style: props.style,
|
|
10
|
+
ref: ref
|
|
11
|
+
}, props.children);
|
|
12
|
+
});
|
|
13
|
+
ZDiv.displayName = 'ZDiv';
|
|
14
|
+
var _default = ZDiv;
|
|
15
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _div = _interopRequireDefault(require("./div"));
|
|
7
|
+
var _default = _div["default"];
|
|
8
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _zSimpleBar = _interopRequireDefault(require("./z-simple-bar"));
|
|
7
|
+
var _default = _zSimpleBar["default"];
|
|
8
|
+
exports["default"] = _default;
|
|
@@ -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;
|