@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.
Files changed (75) 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 +1 -1
  7. package/build/lowcode/render/default/view.js +9 -9
  8. package/build/lowcode/view.js +10 -10
  9. package/dist/{BizComps.js → SCM_Comps.js} +4 -4
  10. package/dist/SCM_Comps.js.map +1 -0
  11. package/es/components/z-Ellipsis/ellipsis.d.ts +4 -0
  12. package/es/components/z-Ellipsis/ellipsis.js +6 -0
  13. package/es/components/z-Ellipsis/index.d.ts +3 -0
  14. package/es/components/z-Ellipsis/index.js +2 -0
  15. package/es/components/z-button/z-button.js +3 -7
  16. package/es/components/z-form/z-form.d.ts +8 -2
  17. package/es/components/z-form/z-form.js +34 -2
  18. package/es/components/z-list/index.d.ts +3 -0
  19. package/es/components/z-list/index.js +2 -0
  20. package/es/components/z-list/list.d.ts +11 -0
  21. package/es/components/z-list/list.js +33 -0
  22. package/es/components/z-preview/index.d.ts +3 -0
  23. package/es/components/z-preview/index.js +2 -0
  24. package/es/components/z-preview/preview.d.ts +4 -0
  25. package/es/components/z-preview/preview.js +7 -0
  26. package/es/components/z-table/index.d.ts +3 -0
  27. package/es/components/z-table/index.js +2 -0
  28. package/es/components/z-table/table.d.ts +8 -0
  29. package/es/components/z-table/table.js +31 -0
  30. package/es/index.d.ts +8 -0
  31. package/es/index.js +4 -0
  32. package/es/utils/hoc.d.ts +6 -0
  33. package/es/utils/hoc.js +14 -0
  34. package/es/utils/index.d.ts +4 -0
  35. package/es/utils/index.js +4 -0
  36. package/es/utils/props/button.d.ts +9 -0
  37. package/es/utils/props/button.js +13 -0
  38. package/es/utils/props/form.d.ts +881 -0
  39. package/es/utils/props/form.js +125 -0
  40. package/es/utils/props/listTpl.d.ts +869 -0
  41. package/es/utils/props/listTpl.js +13 -0
  42. package/lib/components/z-Ellipsis/ellipsis.d.ts +4 -0
  43. package/lib/components/z-Ellipsis/ellipsis.js +13 -0
  44. package/lib/components/z-Ellipsis/index.d.ts +3 -0
  45. package/lib/components/z-Ellipsis/index.js +8 -0
  46. package/lib/components/z-button/z-button.js +2 -8
  47. package/lib/components/z-form/z-form.d.ts +8 -2
  48. package/lib/components/z-form/z-form.js +35 -3
  49. package/lib/components/z-list/index.d.ts +3 -0
  50. package/lib/components/z-list/index.js +8 -0
  51. package/lib/components/z-list/list.d.ts +11 -0
  52. package/lib/components/z-list/list.js +41 -0
  53. package/lib/components/z-preview/index.d.ts +3 -0
  54. package/lib/components/z-preview/index.js +8 -0
  55. package/lib/components/z-preview/preview.d.ts +4 -0
  56. package/lib/components/z-preview/preview.js +14 -0
  57. package/lib/components/z-table/index.d.ts +3 -0
  58. package/lib/components/z-table/index.js +8 -0
  59. package/lib/components/z-table/table.d.ts +8 -0
  60. package/lib/components/z-table/table.js +38 -0
  61. package/lib/index.d.ts +8 -0
  62. package/lib/index.js +9 -1
  63. package/lib/utils/hoc.d.ts +6 -0
  64. package/lib/utils/hoc.js +18 -0
  65. package/lib/utils/index.d.ts +4 -0
  66. package/lib/utils/index.js +9 -0
  67. package/lib/utils/props/button.d.ts +9 -0
  68. package/lib/utils/props/button.js +19 -0
  69. package/lib/utils/props/form.d.ts +881 -0
  70. package/lib/utils/props/form.js +131 -0
  71. package/lib/utils/props/listTpl.d.ts +869 -0
  72. package/lib/utils/props/listTpl.js +19 -0
  73. package/package.json +11 -6
  74. package/dist/BizComps.js.map +0 -1
  75. /package/dist/{BizComps.css → SCM_Comps.css} +0 -0
@@ -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;
@@ -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;
@@ -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 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,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>>;
@@ -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 };
@@ -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 };
@@ -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
+ };