@ztocwst/rc-pro-materials 0.1.0 → 0.1.1
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 +12 -12
- package/build/lowcode/assets-dev.json +3 -3
- package/build/lowcode/assets-prod.json +12 -12
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.js +10 -10
- package/dist/{BizComps.js → SCM_Comps.js} +4 -4
- package/dist/SCM_Comps.js.map +1 -0
- package/es/components/z-Ellipsis/ellipsis.d.ts +4 -0
- package/es/components/z-Ellipsis/ellipsis.js +6 -0
- package/es/components/z-Ellipsis/index.d.ts +3 -0
- package/es/components/z-Ellipsis/index.js +2 -0
- package/es/components/z-button/z-button.js +3 -7
- package/es/components/z-form/z-form.d.ts +8 -2
- package/es/components/z-form/z-form.js +34 -2
- package/es/components/z-list/index.d.ts +3 -0
- package/es/components/z-list/index.js +2 -0
- package/es/components/z-list/list.d.ts +11 -0
- package/es/components/z-list/list.js +33 -0
- package/es/components/z-preview/index.d.ts +3 -0
- package/es/components/z-preview/index.js +2 -0
- package/es/components/z-preview/preview.d.ts +4 -0
- package/es/components/z-preview/preview.js +7 -0
- package/es/components/z-table/index.d.ts +3 -0
- package/es/components/z-table/index.js +2 -0
- package/es/components/z-table/table.d.ts +8 -0
- package/es/components/z-table/table.js +31 -0
- package/es/index.d.ts +8 -0
- package/es/index.js +4 -0
- package/es/utils/hoc.d.ts +6 -0
- package/es/utils/hoc.js +14 -0
- package/es/utils/index.d.ts +4 -0
- package/es/utils/index.js +4 -0
- package/es/utils/props/button.d.ts +9 -0
- package/es/utils/props/button.js +13 -0
- package/es/utils/props/form.d.ts +881 -0
- package/es/utils/props/form.js +125 -0
- package/es/utils/props/listTpl.d.ts +869 -0
- package/es/utils/props/listTpl.js +13 -0
- package/lib/components/z-Ellipsis/ellipsis.d.ts +4 -0
- package/lib/components/z-Ellipsis/ellipsis.js +13 -0
- package/lib/components/z-Ellipsis/index.d.ts +3 -0
- package/lib/components/z-Ellipsis/index.js +8 -0
- package/lib/components/z-button/z-button.js +2 -8
- package/lib/components/z-form/z-form.d.ts +8 -2
- package/lib/components/z-form/z-form.js +35 -3
- package/lib/components/z-list/index.d.ts +3 -0
- package/lib/components/z-list/index.js +8 -0
- package/lib/components/z-list/list.d.ts +11 -0
- package/lib/components/z-list/list.js +41 -0
- package/lib/components/z-preview/index.d.ts +3 -0
- package/lib/components/z-preview/index.js +8 -0
- package/lib/components/z-preview/preview.d.ts +4 -0
- package/lib/components/z-preview/preview.js +14 -0
- package/lib/components/z-table/index.d.ts +3 -0
- package/lib/components/z-table/index.js +8 -0
- package/lib/components/z-table/table.d.ts +8 -0
- package/lib/components/z-table/table.js +38 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +9 -1
- package/lib/utils/hoc.d.ts +6 -0
- package/lib/utils/hoc.js +18 -0
- package/lib/utils/index.d.ts +4 -0
- package/lib/utils/index.js +9 -0
- package/lib/utils/props/button.d.ts +9 -0
- package/lib/utils/props/button.js +19 -0
- package/lib/utils/props/form.d.ts +881 -0
- package/lib/utils/props/form.js +131 -0
- package/lib/utils/props/listTpl.d.ts +869 -0
- package/lib/utils/props/listTpl.js +19 -0
- package/package.json +11 -6
- package/dist/BizComps.js.map +0 -1
- /package/dist/{BizComps.css → SCM_Comps.css} +0 -0
|
@@ -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
|
-
|
|
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;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ProFormRenderProps } from '@ztocwst/rc-pro';
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
7
|
+
var formProps = processFormProps(props);
|
|
8
|
+
return /*#__PURE__*/React.createElement(ProFormRender, formProps);
|
|
5
9
|
};
|
|
6
|
-
|
|
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,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,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,13 @@ 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';
|
|
5
13
|
declare const bizCssPrefix = "bizpack";
|
|
6
14
|
export { bizCssPrefix };
|
package/es/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
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";
|
|
3
7
|
var bizCssPrefix = 'bizpack';
|
|
4
8
|
export { bizCssPrefix };
|
|
@@ -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>>;
|
package/es/utils/hoc.js
ADDED
|
@@ -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,9 @@
|
|
|
1
|
+
import { ProButtonProps } from '@ztocwst/rc-pro';
|
|
2
|
+
export declare const processButtonProps: (props: ProButtonProps) => {
|
|
3
|
+
items: import("@ztocwst/rc-pro").ProButtonItemsProps[];
|
|
4
|
+
spaceSize?: [import("antd/lib/space").SpaceSize, import("antd/lib/space").SpaceSize];
|
|
5
|
+
size?: import("antd/lib/button").ButtonSize;
|
|
6
|
+
onClick?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps) => void | Promise<any>;
|
|
7
|
+
onSuccess?: (item: import("@ztocwst/rc-pro").ProButtonItemsProps, data?: any) => void;
|
|
8
|
+
type?: "link";
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["items"];
|
|
4
|
+
export var processButtonProps = function processButtonProps(props) {
|
|
5
|
+
var items = props.items,
|
|
6
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
7
|
+
var _items_ = Array.isArray(items) ? items : [items];
|
|
8
|
+
return _extends({}, rest, {
|
|
9
|
+
items: _items_ === null || _items_ === void 0 ? void 0 : _items_.filter(function (e) {
|
|
10
|
+
return !!e;
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
};
|