@teamix/pro 1.4.5 → 1.4.6
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/dist/pro.css +1 -1
- package/dist/pro.js +939 -699
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/dialog-form.js +18 -11
- package/es/form/index.d.ts +8 -7
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/table/components/Pagination/index.js +3 -3
- package/es/table/index.js +1 -1
- package/lib/actions/dialog-form.js +17 -10
- package/lib/form/index.d.ts +8 -7
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/table/components/Pagination/index.js +3 -3
- package/lib/table/index.js +1 -1
- package/package.json +3 -5
@@ -29,7 +29,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
29
29
|
|
30
30
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
31
31
|
|
32
|
-
import React, { useState, useEffect, createRef } from 'react';
|
32
|
+
import React, { useState, useEffect, createRef, useMemo } from 'react';
|
33
33
|
import { useHistory } from 'react-router-dom';
|
34
34
|
import { Loading } from '@alicloudfe/components';
|
35
35
|
import ProForm, { createForm } from '../form';
|
@@ -93,15 +93,22 @@ var DialogForm = function DialogForm(props) {
|
|
93
93
|
innerFormRef = props.innerFormRef,
|
94
94
|
_props$validateFirst = props.validateFirst,
|
95
95
|
validateFirst = _props$validateFirst === void 0 ? true : _props$validateFirst;
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
96
|
+
var form = useMemo(function () {
|
97
|
+
return createForm({
|
98
|
+
initialValues: getTargetValue(initialValues, context),
|
99
|
+
validateFirst: validateFirst
|
100
|
+
});
|
101
|
+
}, [validateFirst, initialValues, context]);
|
102
|
+
|
103
|
+
var _useMemo = useMemo(function () {
|
104
|
+
return getSchemaAndFormProps(schema, formProps);
|
105
|
+
}, [schema, formProps]),
|
106
|
+
formSchema = _useMemo.schema,
|
107
|
+
others = _objectWithoutProperties(_useMemo, _excluded);
|
108
|
+
|
109
|
+
var otherFormProps = useMemo(function () {
|
110
|
+
return addContext(getTargetValue(others, context), context);
|
111
|
+
}, [context, JSON.stringify(others)]);
|
105
112
|
|
106
113
|
var _useState = useState(false),
|
107
114
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -134,7 +141,7 @@ var DialogForm = function DialogForm(props) {
|
|
134
141
|
}, /*#__PURE__*/React.createElement(ProForm, _objectSpread(_objectSpread({
|
135
142
|
form: form,
|
136
143
|
schema: formSchema
|
137
|
-
}, getDefaultFormPropsByDialogSize(size)),
|
144
|
+
}, getDefaultFormPropsByDialogSize(size)), otherFormProps)));
|
138
145
|
};
|
139
146
|
|
140
147
|
export function useDialogFormAction(action, context) {
|
package/es/form/index.d.ts
CHANGED
@@ -16,8 +16,8 @@ declare const formilyReact: {
|
|
16
16
|
};
|
17
17
|
useFormDisplayValues: () => any;
|
18
18
|
Schema: typeof originalFormilyReact.Schema;
|
19
|
-
FormProvider:
|
20
|
-
FormConsumer:
|
19
|
+
FormProvider: originalFormilyReact.ReactFC<originalFormilyReact.IProviderProps>;
|
20
|
+
FormConsumer: originalFormilyReact.ReactFC<originalFormilyReact.IFormSpyProps>;
|
21
21
|
ArrayField: {
|
22
22
|
<D extends originalFormilyReact.JSXComponent, C extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.IFieldProps<D, C, import("@formily/core").ArrayField<any, any>>): JSX.Element;
|
23
23
|
displayName: string;
|
@@ -30,8 +30,8 @@ declare const formilyReact: {
|
|
30
30
|
<D_2 extends originalFormilyReact.JSXComponent, C_2 extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.IVoidFieldProps<D_2, C_2, import("@formily/core").VoidField<any, any, any>>): JSX.Element;
|
31
31
|
displayName: string;
|
32
32
|
};
|
33
|
-
RecursionField:
|
34
|
-
ExpressionScope:
|
33
|
+
RecursionField: originalFormilyReact.ReactFC<originalFormilyReact.IRecursionFieldProps>;
|
34
|
+
ExpressionScope: originalFormilyReact.ReactFC<originalFormilyReact.IExpressionScopeProps>;
|
35
35
|
createSchemaField<Components extends originalFormilyReact.SchemaReactComponents>(options?: originalFormilyReact.ISchemaFieldReactFactoryOptions<Components> | undefined): {
|
36
36
|
<Decorator extends originalFormilyReact.JSXComponent, Component extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.ISchemaFieldProps<Decorator, Component, import("@formily/core").ObjectField<Decorator, Component>>): JSX.Element;
|
37
37
|
displayName: string;
|
@@ -81,17 +81,18 @@ declare const formilyReact: {
|
|
81
81
|
SchemaMarkupContext: import("react").Context<originalFormilyReact.Schema<any, any, any, any, any, any, any, any, any>>;
|
82
82
|
SchemaContext: import("react").Context<originalFormilyReact.Schema<any, any, any, any, any, any, any, any, any>>;
|
83
83
|
SchemaExpressionScopeContext: import("react").Context<any>;
|
84
|
+
SchemaComponentsContext: import("react").Context<originalFormilyReact.SchemaReactComponents>;
|
84
85
|
SchemaOptionsContext: import("react").Context<originalFormilyReact.ISchemaFieldReactFactoryOptions<any>>;
|
85
86
|
ContextCleaner: ({ children }: {
|
86
87
|
children: any;
|
87
88
|
}) => any;
|
88
|
-
mapProps<T extends originalFormilyReact.JSXComponent>(...args: originalFormilyReact.IStateMapper<import("react").ComponentProps<T>>[]): (target: T) => import("react").MemoExoticComponent<
|
89
|
-
mapReadPretty<T_1 extends originalFormilyReact.JSXComponent, C_4 extends originalFormilyReact.JSXComponent>(component: C_4, readPrettyProps?: import("react").ComponentProps<C_4> | undefined): (target: T_1) => import("react").MemoExoticComponent<
|
89
|
+
mapProps<T extends originalFormilyReact.JSXComponent>(...args: originalFormilyReact.IStateMapper<import("react").ComponentProps<T>>[]): (target: T) => import("react").MemoExoticComponent<originalFormilyReact.ReactFC<any>>;
|
90
|
+
mapReadPretty<T_1 extends originalFormilyReact.JSXComponent, C_4 extends originalFormilyReact.JSXComponent>(component: C_4, readPrettyProps?: import("react").ComponentProps<C_4> | undefined): (target: T_1) => import("react").MemoExoticComponent<originalFormilyReact.ReactFC<{
|
90
91
|
ref?: import("react").RefAttributes<any> | undefined;
|
91
92
|
}>>;
|
92
93
|
connect<T_2 extends originalFormilyReact.JSXComponent>(target: T_2, ...args: originalFormilyReact.IComponentMapper<T_2>[]): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<Partial<import("react").ComponentProps<T_2>>> & import("react").RefAttributes<unknown>>;
|
93
94
|
observer: typeof originalFormilyReact.observer;
|
94
|
-
Observer: import("react").MemoExoticComponent<
|
95
|
+
Observer: import("react").MemoExoticComponent<originalFormilyReact.ReactFC<import("@formily/reactive-react").IObserverProps>>;
|
95
96
|
useForm: <T_3 extends object = any>() => import("@formily/core").Form<T_3>;
|
96
97
|
useField: <T_4 = import("@formily/core").GeneralField>() => T_4;
|
97
98
|
useParentForm: () => import("@formily/core").Form<any> | import("@formily/core").ObjectField<any, any>;
|
package/es/index.d.ts
CHANGED
@@ -28,5 +28,5 @@ export * from './table';
|
|
28
28
|
export * from './sidebar';
|
29
29
|
export * from './utils';
|
30
30
|
export * from './timeline';
|
31
|
-
declare const version = "1.4.
|
31
|
+
declare const version = "1.4.6";
|
32
32
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
@@ -31,6 +31,6 @@ export * from './table';
|
|
31
31
|
export * from './sidebar';
|
32
32
|
export * from './utils';
|
33
33
|
export * from './timeline';
|
34
|
-
var version = '1.4.
|
34
|
+
var version = '1.4.6';
|
35
35
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
|
36
36
|
ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils };
|
@@ -98,7 +98,7 @@ export default (function (props) {
|
|
98
98
|
lineHeight: '18px'
|
99
99
|
}
|
100
100
|
}, getMessage('total', {
|
101
|
-
total: total
|
101
|
+
total: new Intl.NumberFormat().format(total)
|
102
102
|
}))
|
103
103
|
}, /*#__PURE__*/React.createElement("div", {
|
104
104
|
className: prefixCls('custom-total-content')
|
@@ -216,7 +216,7 @@ export default (function (props) {
|
|
216
216
|
return /*#__PURE__*/React.createElement(Pagination, _objectSpread(_objectSpread({}, commonPaginationProps), {}, {
|
217
217
|
totalRender: function totalRender(total) {
|
218
218
|
return getMessage('total', {
|
219
|
-
total: total
|
219
|
+
total: new Intl.NumberFormat().format(total)
|
220
220
|
});
|
221
221
|
}
|
222
222
|
}, otherProps));
|
@@ -226,7 +226,7 @@ export default (function (props) {
|
|
226
226
|
pageShowCount: 3,
|
227
227
|
totalRender: function totalRender(total) {
|
228
228
|
return getMessage('total', {
|
229
|
-
total: total
|
229
|
+
total: new Intl.NumberFormat().format(total)
|
230
230
|
});
|
231
231
|
}
|
232
232
|
}, otherProps));
|
package/es/table/index.js
CHANGED
@@ -936,7 +936,7 @@ var ProTable = function ProTable(props) {
|
|
936
936
|
// pageSizePosition="end"
|
937
937
|
totalRender: function totalRender(total) {
|
938
938
|
return getMessage('total', {
|
939
|
-
total: total
|
939
|
+
total: new Intl.NumberFormat().format(total)
|
940
940
|
});
|
941
941
|
},
|
942
942
|
pageSize: pageSize,
|
@@ -114,15 +114,22 @@ var DialogForm = function DialogForm(props) {
|
|
114
114
|
innerFormRef = props.innerFormRef,
|
115
115
|
_props$validateFirst = props.validateFirst,
|
116
116
|
validateFirst = _props$validateFirst === void 0 ? true : _props$validateFirst;
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
117
|
+
var form = (0, _react.useMemo)(function () {
|
118
|
+
return (0, _form.createForm)({
|
119
|
+
initialValues: (0, _utils.getTargetValue)(initialValues, context),
|
120
|
+
validateFirst: validateFirst
|
121
|
+
});
|
122
|
+
}, [validateFirst, initialValues, context]);
|
123
|
+
|
124
|
+
var _useMemo = (0, _react.useMemo)(function () {
|
125
|
+
return getSchemaAndFormProps(schema, formProps);
|
126
|
+
}, [schema, formProps]),
|
127
|
+
formSchema = _useMemo.schema,
|
128
|
+
others = _objectWithoutProperties(_useMemo, _excluded);
|
129
|
+
|
130
|
+
var otherFormProps = (0, _react.useMemo)(function () {
|
131
|
+
return (0, _utils2.addContext)((0, _utils.getTargetValue)(others, context), context);
|
132
|
+
}, [context, JSON.stringify(others)]);
|
126
133
|
|
127
134
|
var _useState = (0, _react.useState)(false),
|
128
135
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -155,7 +162,7 @@ var DialogForm = function DialogForm(props) {
|
|
155
162
|
}, /*#__PURE__*/_react.default.createElement(_form.default, _objectSpread(_objectSpread({
|
156
163
|
form: form,
|
157
164
|
schema: formSchema
|
158
|
-
}, getDefaultFormPropsByDialogSize(size)),
|
165
|
+
}, getDefaultFormPropsByDialogSize(size)), otherFormProps)));
|
159
166
|
};
|
160
167
|
|
161
168
|
function useDialogFormAction(action, context) {
|
package/lib/form/index.d.ts
CHANGED
@@ -16,8 +16,8 @@ declare const formilyReact: {
|
|
16
16
|
};
|
17
17
|
useFormDisplayValues: () => any;
|
18
18
|
Schema: typeof originalFormilyReact.Schema;
|
19
|
-
FormProvider:
|
20
|
-
FormConsumer:
|
19
|
+
FormProvider: originalFormilyReact.ReactFC<originalFormilyReact.IProviderProps>;
|
20
|
+
FormConsumer: originalFormilyReact.ReactFC<originalFormilyReact.IFormSpyProps>;
|
21
21
|
ArrayField: {
|
22
22
|
<D extends originalFormilyReact.JSXComponent, C extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.IFieldProps<D, C, import("@formily/core").ArrayField<any, any>>): JSX.Element;
|
23
23
|
displayName: string;
|
@@ -30,8 +30,8 @@ declare const formilyReact: {
|
|
30
30
|
<D_2 extends originalFormilyReact.JSXComponent, C_2 extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.IVoidFieldProps<D_2, C_2, import("@formily/core").VoidField<any, any, any>>): JSX.Element;
|
31
31
|
displayName: string;
|
32
32
|
};
|
33
|
-
RecursionField:
|
34
|
-
ExpressionScope:
|
33
|
+
RecursionField: originalFormilyReact.ReactFC<originalFormilyReact.IRecursionFieldProps>;
|
34
|
+
ExpressionScope: originalFormilyReact.ReactFC<originalFormilyReact.IExpressionScopeProps>;
|
35
35
|
createSchemaField<Components extends originalFormilyReact.SchemaReactComponents>(options?: originalFormilyReact.ISchemaFieldReactFactoryOptions<Components> | undefined): {
|
36
36
|
<Decorator extends originalFormilyReact.JSXComponent, Component extends originalFormilyReact.JSXComponent>(props: originalFormilyReact.ISchemaFieldProps<Decorator, Component, import("@formily/core").ObjectField<Decorator, Component>>): JSX.Element;
|
37
37
|
displayName: string;
|
@@ -81,17 +81,18 @@ declare const formilyReact: {
|
|
81
81
|
SchemaMarkupContext: import("react").Context<originalFormilyReact.Schema<any, any, any, any, any, any, any, any, any>>;
|
82
82
|
SchemaContext: import("react").Context<originalFormilyReact.Schema<any, any, any, any, any, any, any, any, any>>;
|
83
83
|
SchemaExpressionScopeContext: import("react").Context<any>;
|
84
|
+
SchemaComponentsContext: import("react").Context<originalFormilyReact.SchemaReactComponents>;
|
84
85
|
SchemaOptionsContext: import("react").Context<originalFormilyReact.ISchemaFieldReactFactoryOptions<any>>;
|
85
86
|
ContextCleaner: ({ children }: {
|
86
87
|
children: any;
|
87
88
|
}) => any;
|
88
|
-
mapProps<T extends originalFormilyReact.JSXComponent>(...args: originalFormilyReact.IStateMapper<import("react").ComponentProps<T>>[]): (target: T) => import("react").MemoExoticComponent<
|
89
|
-
mapReadPretty<T_1 extends originalFormilyReact.JSXComponent, C_4 extends originalFormilyReact.JSXComponent>(component: C_4, readPrettyProps?: import("react").ComponentProps<C_4> | undefined): (target: T_1) => import("react").MemoExoticComponent<
|
89
|
+
mapProps<T extends originalFormilyReact.JSXComponent>(...args: originalFormilyReact.IStateMapper<import("react").ComponentProps<T>>[]): (target: T) => import("react").MemoExoticComponent<originalFormilyReact.ReactFC<any>>;
|
90
|
+
mapReadPretty<T_1 extends originalFormilyReact.JSXComponent, C_4 extends originalFormilyReact.JSXComponent>(component: C_4, readPrettyProps?: import("react").ComponentProps<C_4> | undefined): (target: T_1) => import("react").MemoExoticComponent<originalFormilyReact.ReactFC<{
|
90
91
|
ref?: import("react").RefAttributes<any> | undefined;
|
91
92
|
}>>;
|
92
93
|
connect<T_2 extends originalFormilyReact.JSXComponent>(target: T_2, ...args: originalFormilyReact.IComponentMapper<T_2>[]): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<Partial<import("react").ComponentProps<T_2>>> & import("react").RefAttributes<unknown>>;
|
93
94
|
observer: typeof originalFormilyReact.observer;
|
94
|
-
Observer: import("react").MemoExoticComponent<
|
95
|
+
Observer: import("react").MemoExoticComponent<originalFormilyReact.ReactFC<import("@formily/reactive-react").IObserverProps>>;
|
95
96
|
useForm: <T_3 extends object = any>() => import("@formily/core").Form<T_3>;
|
96
97
|
useField: <T_4 = import("@formily/core").GeneralField>() => T_4;
|
97
98
|
useParentForm: () => import("@formily/core").Form<any> | import("@formily/core").ObjectField<any, any>;
|
package/lib/index.d.ts
CHANGED
@@ -28,5 +28,5 @@ export * from './table';
|
|
28
28
|
export * from './sidebar';
|
29
29
|
export * from './utils';
|
30
30
|
export * from './timeline';
|
31
|
-
declare const version = "1.4.
|
31
|
+
declare const version = "1.4.6";
|
32
32
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
|
package/lib/index.js
CHANGED
@@ -115,7 +115,7 @@ var _default = function _default(props) {
|
|
115
115
|
lineHeight: '18px'
|
116
116
|
}
|
117
117
|
}, (0, _utils.getMessage)('total', {
|
118
|
-
total: total
|
118
|
+
total: new Intl.NumberFormat().format(total)
|
119
119
|
}))
|
120
120
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
121
121
|
className: prefixCls('custom-total-content')
|
@@ -233,7 +233,7 @@ var _default = function _default(props) {
|
|
233
233
|
return /*#__PURE__*/_react.default.createElement(_components.Pagination, _objectSpread(_objectSpread({}, commonPaginationProps), {}, {
|
234
234
|
totalRender: function totalRender(total) {
|
235
235
|
return (0, _utils.getMessage)('total', {
|
236
|
-
total: total
|
236
|
+
total: new Intl.NumberFormat().format(total)
|
237
237
|
});
|
238
238
|
}
|
239
239
|
}, otherProps));
|
@@ -243,7 +243,7 @@ var _default = function _default(props) {
|
|
243
243
|
pageShowCount: 3,
|
244
244
|
totalRender: function totalRender(total) {
|
245
245
|
return (0, _utils.getMessage)('total', {
|
246
|
-
total: total
|
246
|
+
total: new Intl.NumberFormat().format(total)
|
247
247
|
});
|
248
248
|
}
|
249
249
|
}, otherProps));
|
package/lib/table/index.js
CHANGED
@@ -979,7 +979,7 @@ var ProTable = function ProTable(props) {
|
|
979
979
|
// pageSizePosition="end"
|
980
980
|
totalRender: function totalRender(total) {
|
981
981
|
return (0, _utils.getMessage)('total', {
|
982
|
-
total: total
|
982
|
+
total: new Intl.NumberFormat().format(total)
|
983
983
|
});
|
984
984
|
},
|
985
985
|
pageSize: pageSize,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teamix/pro",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.6",
|
4
4
|
"description": "TeamixPro大包",
|
5
5
|
"keywords": [
|
6
6
|
"aliyun",
|
@@ -36,17 +36,15 @@
|
|
36
36
|
],
|
37
37
|
"private": false,
|
38
38
|
"dependencies": {
|
39
|
-
"@formily
|
40
|
-
"@formily/react": "2.0.15",
|
41
|
-
"@teamix/formily": "2.0.15-1",
|
39
|
+
"@teamix/formily": "2.1.4",
|
42
40
|
"@teamix/hooks": "^0.1.0",
|
43
41
|
"@teamix/pop-confirm": "^1.2.4",
|
44
42
|
"@teamix/pro-field": "^1.0.0",
|
45
43
|
"@teamix/pro-page-container": "^1.0.0",
|
46
44
|
"@teamix/pro-skeleton": "^1.0.0",
|
45
|
+
"@teamix/result": "^1.0.29",
|
47
46
|
"@teamix/svg": "^1.0.11",
|
48
47
|
"@teamix/utils": "^0.1.0",
|
49
|
-
"@teamix/result": "^1.0.29",
|
50
48
|
"classnames": "^2.3.1",
|
51
49
|
"lodash.clonedeep": "^4.5.0",
|
52
50
|
"lodash.debounce": "^4.0.8",
|