@zat-design/sisyphus-react 3.4.1-beta.6 → 3.4.1-beta.7

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.
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { RowProps, SpaceProps } from 'antd';
3
- import { FormInstance } from 'antd/es/form';
4
- import { NamePath } from 'antd/lib/form/interface';
3
+ import { FormInstance } from 'antd/es/form/Form';
5
4
  import { ProColumnProps, ProFormOtherProps } from '../../../propsType';
6
5
  export interface SpaceType extends SpaceProps {
7
6
  /**
@@ -15,15 +14,6 @@ export interface SpaceType extends SpaceProps {
15
14
  /** 间隔距离 */
16
15
  size?: number;
17
16
  }
18
- /**
19
- * 扩展函数的参数
20
- */
21
- type FunctionArgs<Values> = (value: any, record: any, { form, index, namePath, option, selectedOptions, dateString, }: {
22
- form: FormInstance<Values>;
23
- index?: number;
24
- namePath?: NamePath;
25
- [key: string]: any;
26
- }) => any;
27
17
  export interface GroupProps {
28
18
  children?: ProColumnProps[];
29
19
  space?: SpaceType;
@@ -33,6 +23,7 @@ export interface GroupProps {
33
23
  value?: any;
34
24
  id?: string;
35
25
  disabled?: boolean | (() => void);
36
- onFieldChange?: FunctionArgs<any>;
26
+ onFieldChange?: (value: any[] | null, record: any, { form, }: {
27
+ form: FormInstance;
28
+ }) => any;
37
29
  }
38
- export {};
@@ -167,7 +167,7 @@ export type ColumnPropsMap<Values = any, T = 'ProForm'> = {
167
167
  fieldProps?: FieldProps<ProTreeProps, Values, T>;
168
168
  } | {
169
169
  type?: 'Group';
170
- fieldProps?: FieldProps<GroupProps, Values, T>;
170
+ fieldProps?: GroupProps | ReactiveFunction<Values, GroupProps>;
171
171
  } | {
172
172
  type?: 'ProCollapse';
173
173
  fieldProps?: ProCollapseProps | ReactiveFunction<Values, ProCollapseProps>;
@@ -103,11 +103,12 @@ var ProIcon = function ProIcon(props) {
103
103
  }
104
104
  }
105
105
  }
106
- var RenderIcon = _jsx("span", {
106
+ var RenderIcon = _jsx("span", _objectSpread(_objectSpread({
107
107
  className: "anticon",
108
108
  style: {
109
109
  color: color
110
- },
110
+ }
111
+ }, reset), {}, {
111
112
  children: _jsx("svg", {
112
113
  className: proIconClassNames,
113
114
  "aria-hidden": "true",
@@ -121,7 +122,7 @@ var ProIcon = function ProIcon(props) {
121
122
  xlinkHref: "#icon-".concat(_type)
122
123
  })
123
124
  })
124
- });
125
+ }));
125
126
  return !isExtendButtonMode ? RenderIcon : _jsx(_Button, _objectSpread(_objectSpread(_objectSpread({
126
127
  type: isIconMode ? 'text' : (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.type) || 'link',
127
128
  className: proIconClassNames,
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { RowProps, SpaceProps } from 'antd';
3
- import { FormInstance } from 'antd/es/form';
4
- import { NamePath } from 'antd/lib/form/interface';
3
+ import { FormInstance } from 'antd/es/form/Form';
5
4
  import { ProColumnProps, ProFormOtherProps } from '../../../propsType';
6
5
  export interface SpaceType extends SpaceProps {
7
6
  /**
@@ -15,15 +14,6 @@ export interface SpaceType extends SpaceProps {
15
14
  /** 间隔距离 */
16
15
  size?: number;
17
16
  }
18
- /**
19
- * 扩展函数的参数
20
- */
21
- type FunctionArgs<Values> = (value: any, record: any, { form, index, namePath, option, selectedOptions, dateString, }: {
22
- form: FormInstance<Values>;
23
- index?: number;
24
- namePath?: NamePath;
25
- [key: string]: any;
26
- }) => any;
27
17
  export interface GroupProps {
28
18
  children?: ProColumnProps[];
29
19
  space?: SpaceType;
@@ -33,6 +23,7 @@ export interface GroupProps {
33
23
  value?: any;
34
24
  id?: string;
35
25
  disabled?: boolean | (() => void);
36
- onFieldChange?: FunctionArgs<any>;
26
+ onFieldChange?: (value: any[] | null, record: any, { form, }: {
27
+ form: FormInstance;
28
+ }) => any;
37
29
  }
38
- export {};
@@ -167,7 +167,7 @@ export type ColumnPropsMap<Values = any, T = 'ProForm'> = {
167
167
  fieldProps?: FieldProps<ProTreeProps, Values, T>;
168
168
  } | {
169
169
  type?: 'Group';
170
- fieldProps?: FieldProps<GroupProps, Values, T>;
170
+ fieldProps?: GroupProps | ReactiveFunction<Values, GroupProps>;
171
171
  } | {
172
172
  type?: 'ProCollapse';
173
173
  fieldProps?: ProCollapseProps | ReactiveFunction<Values, ProCollapseProps>;
@@ -110,11 +110,12 @@ var ProIcon = function ProIcon(props) {
110
110
  }
111
111
  }
112
112
  }
113
- var RenderIcon = (0, _jsxRuntime.jsx)("span", {
113
+ var RenderIcon = (0, _jsxRuntime.jsx)("span", (0, _objectSpread2.default)((0, _objectSpread2.default)({
114
114
  className: "anticon",
115
115
  style: {
116
116
  color: color
117
- },
117
+ }
118
+ }, reset), {}, {
118
119
  children: (0, _jsxRuntime.jsx)("svg", {
119
120
  className: proIconClassNames,
120
121
  "aria-hidden": "true",
@@ -128,7 +129,7 @@ var ProIcon = function ProIcon(props) {
128
129
  xlinkHref: "#icon-".concat(_type)
129
130
  })
130
131
  })
131
- });
132
+ }));
132
133
  return !isExtendButtonMode ? RenderIcon : (0, _jsxRuntime.jsx)(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
133
134
  type: isIconMode ? 'text' : (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.type) || 'link',
134
135
  className: proIconClassNames,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.4.1-beta.6",
3
+ "version": "3.4.1-beta.7",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",