@teamix/pro 1.2.22 → 1.2.27
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/212.js +129 -129
- package/dist/pro.css +1 -1
- package/dist/pro.js +18718 -15882
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +2 -0
- package/es/actions/dialog.js +4 -3
- package/es/actions/index.d.ts +13 -9
- package/es/actions/index.js +63 -18
- package/es/actions/index.scss +12 -1
- package/es/form/Components/SelectTable/index.d.ts +24 -0
- package/es/form/Components/SelectTable/index.js +135 -0
- package/es/form/Components/SelectTable/index.scss +28 -0
- package/es/form/Components/SelectTable/table.d.ts +6 -0
- package/es/form/Components/SelectTable/table.js +64 -0
- package/es/form/Filter/AdvancedFilter.js +1 -1
- package/es/form/Filter/Layout.d.ts +5 -0
- package/es/form/Filter/Layout.js +82 -0
- package/es/form/Filter/SimpleFilter.js +30 -6
- package/es/form/Filter/index2.d.ts +2 -1
- package/es/form/Filter/index2.js +97 -116
- package/es/form/Filter/index2.scss +16 -45
- package/es/form/Filter/layout.scss +36 -0
- package/es/form/Filter/useSpecialProps.d.ts +6 -0
- package/es/form/Filter/useSpecialProps.js +37 -0
- package/es/form/ProForm/customComponent.d.ts +3 -0
- package/es/form/ProForm/customComponent.js +20 -0
- package/es/form/ProForm/index.scss +5 -6
- package/es/form/ProForm/useFormDisplayValues.js +14 -24
- package/es/form/SchemaForm/adapterType.js +1 -0
- package/es/form/SchemaForm/index.js +8 -6
- package/es/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/es/form/SchemaForm/initializeDataSource.js +2 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/es/form/SchemaForm/initializeRequest.js +2 -2
- package/es/form/SchemaForm/initializeRules.d.ts +1 -1
- package/es/form/SchemaForm/initializeRules.js +3 -3
- package/es/form/fieldTypeMap.js +2 -1
- package/es/form/index.d.ts +4 -2
- package/es/form/index.js +4 -2
- package/es/form/typing.d.ts +25 -1
- package/es/form/utils.d.ts +2 -2
- package/es/form/utils.js +2 -2
- package/es/index.d.ts +5 -2
- package/es/index.js +6 -3
- package/es/info/index.scss +1 -1
- package/es/nocode/pages/renderer.js +1 -1
- package/es/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
- package/es/step/ProStepItem/components/HozStepItem/index.js +235 -0
- package/es/step/ProStepItem/components/HozStepItem/index.scss +279 -0
- package/es/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
- package/es/step/ProStepItem/components/VerStepItem/index.js +295 -0
- package/es/step/ProStepItem/components/VerStepItem/index.scss +287 -0
- package/es/step/ProStepItem/index.d.ts +4 -0
- package/es/step/ProStepItem/index.js +57 -0
- package/es/step/index.d.ts +9 -0
- package/es/step/index.js +101 -0
- package/es/step/typing.d.ts +96 -0
- package/es/step/typing.js +1 -0
- package/es/table/components/Filter/index.js +2 -17
- package/es/table/components/Layout/index.js +63 -166
- package/es/table/components/Layout/index.scss +4 -3
- package/es/table/components/Pagination/index.d.ts +4 -1
- package/es/table/components/Pagination/index.js +105 -14
- package/es/table/components/Pagination/index.scss +33 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/es/table/components/ToolBar/Fullscreen.js +21 -11
- package/es/table/index.js +77 -102
- package/es/table/index.scss +5 -5
- package/es/table/typing.d.ts +19 -10
- package/es/table/utils/columnRender.js +21 -3
- package/es/table/utils/index.d.ts +7 -0
- package/es/table/utils/index.js +36 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/lib/actions/dialog.js +4 -3
- package/lib/actions/index.d.ts +13 -9
- package/lib/actions/index.js +63 -18
- package/lib/actions/index.scss +12 -1
- package/lib/form/Components/SelectTable/index.d.ts +24 -0
- package/lib/form/Components/SelectTable/index.js +157 -0
- package/lib/form/Components/SelectTable/index.scss +28 -0
- package/lib/form/Components/SelectTable/table.d.ts +6 -0
- package/lib/form/Components/SelectTable/table.js +76 -0
- package/lib/form/Filter/AdvancedFilter.js +1 -1
- package/lib/form/Filter/Layout.d.ts +5 -0
- package/lib/form/Filter/Layout.js +102 -0
- package/lib/form/Filter/SimpleFilter.js +29 -4
- package/lib/form/Filter/index2.d.ts +2 -1
- package/lib/form/Filter/index2.js +101 -114
- package/lib/form/Filter/index2.scss +16 -45
- package/lib/form/Filter/layout.scss +36 -0
- package/lib/form/Filter/useSpecialProps.d.ts +6 -0
- package/lib/form/Filter/useSpecialProps.js +46 -0
- package/lib/form/ProForm/customComponent.d.ts +3 -0
- package/lib/form/ProForm/customComponent.js +28 -0
- package/lib/form/ProForm/index.scss +5 -6
- package/lib/form/ProForm/useFormDisplayValues.js +17 -24
- package/lib/form/SchemaForm/adapterType.js +1 -0
- package/lib/form/SchemaForm/index.js +8 -6
- package/lib/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/lib/form/SchemaForm/initializeDataSource.js +2 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRequest.js +2 -2
- package/lib/form/SchemaForm/initializeRules.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRules.js +3 -3
- package/lib/form/fieldTypeMap.js +2 -1
- package/lib/form/index.d.ts +4 -2
- package/lib/form/index.js +19 -1
- package/lib/form/typing.d.ts +25 -1
- package/lib/form/utils.d.ts +2 -2
- package/lib/form/utils.js +2 -2
- package/lib/index.d.ts +5 -2
- package/lib/index.js +35 -3
- package/lib/info/index.scss +1 -1
- package/lib/nocode/pages/renderer.js +1 -1
- package/lib/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
- package/lib/step/ProStepItem/components/HozStepItem/index.js +258 -0
- package/lib/step/ProStepItem/components/HozStepItem/index.scss +279 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.js +315 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.scss +287 -0
- package/lib/step/ProStepItem/index.d.ts +4 -0
- package/lib/step/ProStepItem/index.js +69 -0
- package/lib/step/index.d.ts +9 -0
- package/lib/step/index.js +124 -0
- package/lib/step/typing.d.ts +96 -0
- package/lib/step/typing.js +5 -0
- package/lib/table/components/Filter/index.js +2 -17
- package/lib/table/components/Layout/index.js +61 -166
- package/lib/table/components/Layout/index.scss +4 -3
- package/lib/table/components/Pagination/index.d.ts +4 -1
- package/lib/table/components/Pagination/index.js +104 -13
- package/lib/table/components/Pagination/index.scss +33 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/lib/table/components/ToolBar/Fullscreen.js +22 -11
- package/lib/table/index.js +74 -98
- package/lib/table/index.scss +5 -5
- package/lib/table/typing.d.ts +19 -10
- package/lib/table/utils/columnRender.js +21 -3
- package/lib/table/utils/index.d.ts +7 -0
- package/lib/table/utils/index.js +38 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +13 -0
- package/package.json +4 -4
@@ -13,6 +13,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { useForm } from '@formily/react';
|
14
14
|
import { toJS } from '@formily/reactive';
|
15
15
|
import { isArr, isPlainObj, isSignificative, getValueByValue } from '@teamix/utils';
|
16
|
+
import fieldTypeMap from '../fieldTypeMap';
|
16
17
|
/**
|
17
18
|
* 获取表单值的可显示值
|
18
19
|
* @returns 如果某字段有dataSource,则返回value对应label
|
@@ -36,30 +37,17 @@ var getDisplayValues = function getDisplayValues(form, values) {
|
|
36
37
|
|
37
38
|
var getAddress = function getAddress(path) {
|
38
39
|
return form.indexes[path];
|
39
|
-
}; //
|
40
|
+
}; // 当前field
|
40
41
|
|
41
42
|
|
42
|
-
var
|
43
|
-
return !isPlainObj(value) && !isArr(value) && !getAddress(connectPath(path));
|
44
|
-
};
|
45
|
-
|
46
|
-
var isLayoutValue = function isLayoutValue(object) {
|
47
|
-
var _Object$entries$ = _slicedToArray(Object.entries(object)[0], 2),
|
48
|
-
key = _Object$entries$[0],
|
49
|
-
value = _Object$entries$[1];
|
50
|
-
|
51
|
-
return !isFieldValue(value, key);
|
52
|
-
};
|
53
|
-
|
54
|
-
var isArrayValue = function isArrayValue(array) {
|
55
|
-
return !isFieldValue(array[0], 0);
|
56
|
-
}; // 判断值的类型,递归获取每个值在该结构中的完整路径
|
43
|
+
var field = form.query(getAddress(prefix)).take(); // 是否真实字段值(自定义组件、布局组件、自增数组组件为非真实字段)
|
57
44
|
|
45
|
+
var isFieldValue = Object.keys(fieldTypeMap).includes(field === null || field === void 0 ? void 0 : field.component[0]); // 判断值的类型,递归获取每个值在该结构中的完整路径
|
58
46
|
|
59
47
|
if (!isSignificative(values)) {
|
60
48
|
displayValues = {};
|
61
|
-
} else if (isPlainObj(values) &&
|
62
|
-
//
|
49
|
+
} else if (isPlainObj(values) && !isFieldValue) {
|
50
|
+
// 如果值是布局对象的值
|
63
51
|
displayValues = {};
|
64
52
|
Object.entries(values).forEach(function (_ref) {
|
65
53
|
var _ref2 = _slicedToArray(_ref, 2),
|
@@ -68,8 +56,10 @@ var getDisplayValues = function getDisplayValues(form, values) {
|
|
68
56
|
|
69
57
|
displayValues[key] = getDisplayValues(form, value, connectPath(key));
|
70
58
|
});
|
71
|
-
} else if (isArr(values) &&
|
72
|
-
//
|
59
|
+
} else if (isArr(values) && !isFieldValue) {
|
60
|
+
// 如果值是自增数组的值
|
61
|
+
// ArrayItems为字符串数组时,由于form.indexes中对应address为最后一个组件,无法正常获取displayName
|
62
|
+
// 例如:arrayItemsString.0: "arrayItemsString.0.ArrayItemsRemove"
|
73
63
|
displayValues = [];
|
74
64
|
values.map(function (value, index) {
|
75
65
|
displayValues[index] = getDisplayValues(form, value, connectPath(index));
|
@@ -78,14 +68,14 @@ var getDisplayValues = function getDisplayValues(form, values) {
|
|
78
68
|
var _values$value;
|
79
69
|
|
80
70
|
// 通过值的完整路径获取字段address(从form实例的indexes中),然后获取该字段的value在该字段dataSource中对应的label
|
81
|
-
var
|
82
|
-
var realValue = (_values$value = values === null || values === void 0 ? void 0 : values.value) !== null && _values$value !== void 0 ? _values$value : values; // 针对单个字段的值是对象
|
71
|
+
var realValue = (_values$value = values === null || values === void 0 ? void 0 : values.value) !== null && _values$value !== void 0 ? _values$value : values; // 针对单个字段的值是对象,例如Select的useDetailValue
|
83
72
|
|
73
|
+
var displayValue = getValueByValue(field === null || field === void 0 ? void 0 : field.dataSource, realValue);
|
84
74
|
displayValues = {
|
85
75
|
title: field === null || field === void 0 ? void 0 : field.title,
|
86
76
|
component: field === null || field === void 0 ? void 0 : field.component[0],
|
87
|
-
value:
|
88
|
-
displayValue:
|
77
|
+
value: values,
|
78
|
+
displayValue: displayValue
|
89
79
|
};
|
90
80
|
}
|
91
81
|
|
@@ -106,8 +106,10 @@ export default /*#__PURE__*/memo(function (_ref) {
|
|
106
106
|
}, [scope]); // 格式化 schema
|
107
107
|
|
108
108
|
var formatSchema = useCallback(function (schema) {
|
109
|
+
var suffix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
109
110
|
var schemaProperties = {};
|
110
111
|
schema === null || schema === void 0 ? void 0 : schema.forEach(function (item, index) {
|
112
|
+
suffix = "".concat(suffix).concat(index);
|
111
113
|
var newItem = warning(item);
|
112
114
|
var _newItem = newItem,
|
113
115
|
originalComponent = _newItem.component; // 根据component的不同,初始化为内置的item
|
@@ -171,7 +173,7 @@ export default /*#__PURE__*/memo(function (_ref) {
|
|
171
173
|
component = _newItem2.component,
|
172
174
|
type = _newItem2.type,
|
173
175
|
_newItem2$name = _newItem2.name,
|
174
|
-
name = _newItem2$name === void 0 ? getFieldName(component === null || component === void 0 ? void 0 : component.replace(/\./g, ''),
|
176
|
+
name = _newItem2$name === void 0 ? getFieldName(component === null || component === void 0 ? void 0 : component.replace(/\./g, ''), suffix) : _newItem2$name,
|
175
177
|
decorator = _newItem2.decorator,
|
176
178
|
decoratorProps = _newItem2.decoratorProps,
|
177
179
|
dataSource = _newItem2.dataSource,
|
@@ -196,18 +198,18 @@ export default /*#__PURE__*/memo(function (_ref) {
|
|
196
198
|
var defaultDecoratorProps = _objectSpread(_objectSpread({}, tooltipProps), decoratorProps); // 初始化request
|
197
199
|
|
198
200
|
|
199
|
-
var _initializeRequest = initializeRequest(request,
|
201
|
+
var _initializeRequest = initializeRequest(request, suffix),
|
200
202
|
requestReactions = _initializeRequest.reactions,
|
201
203
|
requestScope = _initializeRequest.scope; // 初始化dataSource
|
202
204
|
|
203
205
|
|
204
|
-
var _initializeDataSource = initializeDataSource(dataSource,
|
206
|
+
var _initializeDataSource = initializeDataSource(dataSource, suffix),
|
205
207
|
defaultDataSource = _initializeDataSource.dataSource,
|
206
208
|
dataSourceReactions = _initializeDataSource.reactions,
|
207
209
|
dataSourceScope = _initializeDataSource.scope; // 初始化rules
|
208
210
|
|
209
211
|
|
210
|
-
var _initializeRules = initializeRules(rules,
|
212
|
+
var _initializeRules = initializeRules(rules, suffix),
|
211
213
|
defaultRules = _initializeRules.rules,
|
212
214
|
rulesScope = _initializeRules.scope; // 合并reactions,初始化reactions
|
213
215
|
|
@@ -235,11 +237,11 @@ export default /*#__PURE__*/memo(function (_ref) {
|
|
235
237
|
})); // 递归子组件
|
236
238
|
|
237
239
|
var recursiveProperties = (children === null || children === void 0 ? void 0 : children.length) ? {
|
238
|
-
properties: formatSchema(children)
|
240
|
+
properties: formatSchema(children, suffix)
|
239
241
|
} : {}; // 递归items(类似子组件,会先由各initialize方法格式化为固定形式,type不同不统一处理)
|
240
242
|
// 例如:[{ name: 'items', type: 'object', children: items }]
|
241
243
|
|
242
|
-
var recursiveItems = items ? formatSchema([items]) : {}; // 配置组件属性
|
244
|
+
var recursiveItems = items ? formatSchema([items], suffix) : {}; // 配置组件属性
|
243
245
|
|
244
246
|
schemaProperties[name] = _objectSpread(_objectSpread(_objectSpread({}, formatParam), recursiveProperties), recursiveItems);
|
245
247
|
});
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ProFormRequestConfig } from '../typing';
|
2
2
|
interface IInitializeDataSource {
|
3
|
-
(requestConfig?: ProFormRequestConfig | any,
|
3
|
+
(requestConfig?: ProFormRequestConfig | any, suffix?: string): {
|
4
4
|
dataSource?: any[];
|
5
5
|
reactions: any[];
|
6
6
|
scope: {
|
@@ -2,10 +2,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
2
2
|
|
3
3
|
import { isPlainObj } from '@teamix/utils';
|
4
4
|
|
5
|
-
var initializeDataSource = function initializeDataSource(dataSource,
|
5
|
+
var initializeDataSource = function initializeDataSource(dataSource, suffix) {
|
6
6
|
if (isPlainObj(dataSource)) {
|
7
7
|
var requestConfig = dataSource;
|
8
|
-
var requestConfigName = "$requestConfig_".concat(
|
8
|
+
var requestConfigName = "$requestConfig_".concat(suffix);
|
9
9
|
return {
|
10
10
|
reactions: ["{{$dataSource($request,".concat(requestConfigName, ",context)}}")],
|
11
11
|
scope: _defineProperty({}, requestConfigName, requestConfig)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
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; }
|
2
2
|
|
3
|
-
var initializeRequest = function initializeRequest(requestConfig,
|
3
|
+
var initializeRequest = function initializeRequest(requestConfig, suffix) {
|
4
4
|
if (requestConfig) {
|
5
|
-
var requestConfigName = "$requestConfig_".concat(
|
5
|
+
var requestConfigName = "$requestConfig_".concat(suffix);
|
6
6
|
return {
|
7
7
|
reactions: ["{{$common($request,".concat(requestConfigName, ",context)}}")],
|
8
8
|
scope: _defineProperty({}, requestConfigName, requestConfig)
|
@@ -18,13 +18,13 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
18
18
|
|
19
19
|
import { isArr, isPlainObj } from '@teamix/utils';
|
20
20
|
|
21
|
-
var initializeRules = function initializeRules(rules,
|
21
|
+
var initializeRules = function initializeRules(rules, suffix) {
|
22
22
|
var initializeValidator = function initializeValidator(rule) {
|
23
|
-
var
|
23
|
+
var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
24
24
|
|
25
25
|
if (isPlainObj(rule === null || rule === void 0 ? void 0 : rule.validator)) {
|
26
26
|
var requestConfig = rule.validator;
|
27
|
-
var requestConfigName = "$requestConfig_".concat(
|
27
|
+
var requestConfigName = "$requestConfig_".concat(suffix).concat(index);
|
28
28
|
return {
|
29
29
|
rules: _objectSpread(_objectSpread({}, rule), {}, {
|
30
30
|
validator: "{{$validator($request,".concat(requestConfigName, ",context)}}")
|
package/es/form/fieldTypeMap.js
CHANGED
package/es/form/index.d.ts
CHANGED
@@ -97,7 +97,8 @@ declare const formilyReact: {
|
|
97
97
|
useFieldSchema: () => originalFormilyReact.Schema<any, any, any, any, any, any, any, any, any>;
|
98
98
|
useFormEffects: (effects?: ((form: import("@formily/core").Form<any>) => void) | undefined) => void;
|
99
99
|
};
|
100
|
-
|
100
|
+
import { customComponent } from './ProForm/customComponent';
|
101
|
+
export { formilyReact, customComponent };
|
101
102
|
/**
|
102
103
|
* 导出常用formily内容
|
103
104
|
*/
|
@@ -110,7 +111,8 @@ export { createForm, FormConsumer, FormDialog, FormDrawer, FormStep, FormTab, Fo
|
|
110
111
|
*/
|
111
112
|
import { AdvancedFilter, SimpleFilter } from './Filter';
|
112
113
|
import { QueryFilter } from './Filter/index2';
|
113
|
-
|
114
|
+
import { QueryFilterLayout } from './Filter/Layout';
|
115
|
+
export { AdvancedFilter, SimpleFilter, QueryFilter, QueryFilterLayout };
|
114
116
|
/**
|
115
117
|
* 导出 ProForm 组件,支持快速搭建表单
|
116
118
|
*/
|
package/es/form/index.js
CHANGED
@@ -27,7 +27,8 @@ var formilyReact = _objectSpread(_objectSpread({}, originalFormilyReact), {}, {
|
|
27
27
|
useFormDisplayValues: useFormDisplayValues
|
28
28
|
});
|
29
29
|
|
30
|
-
|
30
|
+
import { customComponent } from './ProForm/customComponent';
|
31
|
+
export { formilyReact, customComponent };
|
31
32
|
/**
|
32
33
|
* 导出常用formily内容
|
33
34
|
*/
|
@@ -42,7 +43,8 @@ export { createForm, FormConsumer, FormDialog, FormDrawer, FormStep, FormTab, Fo
|
|
42
43
|
|
43
44
|
import { AdvancedFilter, SimpleFilter } from './Filter';
|
44
45
|
import { QueryFilter } from './Filter/index2';
|
45
|
-
|
46
|
+
import { QueryFilterLayout } from './Filter/Layout';
|
47
|
+
export { AdvancedFilter, SimpleFilter, QueryFilter, QueryFilterLayout };
|
46
48
|
/**
|
47
49
|
* 导出 ProForm 组件,支持快速搭建表单
|
48
50
|
*/
|
package/es/form/typing.d.ts
CHANGED
@@ -10,7 +10,7 @@ declare type FieldDisplayTypes = 'none' | 'hidden' | 'visible';
|
|
10
10
|
export interface ProFormInitializeItem {
|
11
11
|
(item: ProFormSchemaItem, props?: any): ProFormSchemaItem;
|
12
12
|
}
|
13
|
-
declare type IBaseComponent = 'Input' | 'Password' | 'TextArea' | 'NumberPicker' | 'Percent' | 'Money' | 'Select' | 'MultipleSelect' | 'TreeSelect' | 'Cascader' | 'MultipleCascader' | 'ArbitraryCascader' | 'Radio' | 'Checkbox' | 'Switch' | 'DatePicker' | 'TimePicker' | 'DateTimePicker' | 'WeekPicker' | 'MonthPicker' | 'YearPicker' | 'QuarterPicker' | 'DateRangePicker' | 'TimeRangePicker' | 'DateTimeRangePicker' | 'WeekRangePicker' | 'MonthRangePicker' | 'YearRangePicker' | 'QuarterRangePicker' | 'Transfer' | 'Upload' | 'ColorPicker' | 'ColorRadio' | 'IconPicker' | 'JsonInput' | 'TagPicker' | 'MultipleTagPicker' | 'Range' | 'Search';
|
13
|
+
declare type IBaseComponent = 'Input' | 'Password' | 'TextArea' | 'NumberPicker' | 'Percent' | 'Money' | 'Select' | 'MultipleSelect' | 'TreeSelect' | 'Cascader' | 'MultipleCascader' | 'ArbitraryCascader' | 'Radio' | 'Checkbox' | 'Switch' | 'DatePicker' | 'TimePicker' | 'DateTimePicker' | 'WeekPicker' | 'MonthPicker' | 'YearPicker' | 'QuarterPicker' | 'DateRangePicker' | 'TimeRangePicker' | 'DateTimeRangePicker' | 'WeekRangePicker' | 'MonthRangePicker' | 'YearRangePicker' | 'QuarterRangePicker' | 'Transfer' | 'Upload' | 'ColorPicker' | 'ColorRadio' | 'IconPicker' | 'JsonInput' | 'TagPicker' | 'MultipleTagPicker' | 'Range' | 'Search' | 'SelectGroup';
|
14
14
|
declare type IButtonComponent = 'Submit' | 'Reset';
|
15
15
|
declare type IComboComponent = 'ArrayCards' | 'ArrayCards.Addition' | 'ArrayCards.Remove' | 'ArrayCards.MoveUp' | 'ArrayCards.MoveDown' | 'ArrayCards.Index' | 'ArrayCollapse' | 'ArrayCollapse.CollapsePanel' | 'ArrayCollapse.Addition' | 'ArrayCollapse.Remove' | 'ArrayCollapse.MoveUp' | 'ArrayCollapse.MoveDown' | 'ArrayCollapse.Index' | 'ArrayTable' | 'ArrayTable.Column' | 'ArrayTable.SortHandle' | 'ArrayTable.Addition' | 'ArrayTable.Remove' | 'ArrayTable.MoveDown' | 'ArrayTable.MoveUp' | 'ArrayTable.Index' | 'ArrayItems' | 'ArrayItems.Item' | 'ArrayItems.SortHandle' | 'ArrayItems.Addition' | 'ArrayItems.Remove' | 'ArrayItems.MoveDown' | 'ArrayItems.MoveUp' | 'ArrayItems.Index' | 'Editable' | 'Editable.Popover' | 'Editable.Dialog' | 'Editable.Drawer';
|
16
16
|
declare type ILayoutComponent = 'FormFlex' | 'FormGrid' | 'FormGroup' | 'FormGroup.GroupPanel' | 'Search' | 'Search.SearchPanel' | 'FormTab' | 'FormTab.TabPane' | 'FormStep' | 'FormStep.StepPane' | 'FormCollapse' | 'FormCollapse.CollapsePanel' | 'FormButtonGroup' | 'FormDialog' | 'FormDrawer' | 'FormDialog.Footer' | 'FormDrawer.Footer';
|
@@ -70,20 +70,44 @@ export interface FilterProps extends ProFormProps {
|
|
70
70
|
onReset?: (payload?: any) => void;
|
71
71
|
onResetClick?: () => void;
|
72
72
|
}
|
73
|
+
export interface QueryFilterLayoutProps {
|
74
|
+
prefixCls?: string;
|
75
|
+
className?: string;
|
76
|
+
addonBefore?: ReactNode;
|
77
|
+
addonAfter?: ReactNode;
|
78
|
+
inlineContent?: ReactNode;
|
79
|
+
panelContent?: ReactNode;
|
80
|
+
count?: number;
|
81
|
+
expand?: boolean;
|
82
|
+
onExpand?: (expand: boolean) => void;
|
83
|
+
}
|
73
84
|
export interface QueryFilterProps extends ProFormProps {
|
74
85
|
/**
|
75
86
|
* @deprecated triggerType已弃用
|
76
87
|
*/
|
77
88
|
triggerType?: 'keydown' | 'change' | 'submit';
|
89
|
+
/** 表单展示形式 */
|
78
90
|
mode?: 'inline' | 'panel';
|
91
|
+
/** 面板是否默认展开,仅在 mode='panel' 时生效 */
|
79
92
|
expand?: boolean;
|
93
|
+
/** 顶部筛选区前缀 */
|
80
94
|
addonBefore?: ReactNode;
|
95
|
+
/** 顶部筛选区后缀 */
|
81
96
|
addonAfter?: ReactNode;
|
97
|
+
/** 顶部筛选区默认筛选项 */
|
82
98
|
defaultFilterValue?: string;
|
99
|
+
/** 透出内部表单实例 */
|
83
100
|
formRef?: React.MutableRefObject<any>;
|
101
|
+
/** onChange事件的防抖时间 */
|
102
|
+
filterDebounce?: number;
|
103
|
+
/** 表单初始化(含异步默认值)后回调函数 */
|
84
104
|
onInit?: (values: any) => boolean;
|
105
|
+
/** 表单筛选回调函数 */
|
85
106
|
onFilter?: (values: any) => void;
|
107
|
+
/** 表单重置回调函数 */
|
86
108
|
onReset?: (payload?: any) => void;
|
109
|
+
/** 高级筛选按钮切换 */
|
110
|
+
onExpand?: (expand: boolean) => void;
|
87
111
|
}
|
88
112
|
/**
|
89
113
|
* 兼容性导出
|
package/es/form/utils.d.ts
CHANGED
@@ -17,11 +17,11 @@ declare const mapMode: (props: any, field: any) => any;
|
|
17
17
|
/**
|
18
18
|
* 创建字段名称
|
19
19
|
* @param prefix 字段名称前缀,接收字段component名称,默认为FieldName
|
20
|
-
* @param
|
20
|
+
* @param suffix 字段后缀,唯一标识
|
21
21
|
* @returns 字段唯一名称
|
22
22
|
*/
|
23
23
|
interface IGetFieldName {
|
24
|
-
(prefix: string,
|
24
|
+
(prefix: string, suffix?: string): string;
|
25
25
|
}
|
26
26
|
declare const getFieldName: IGetFieldName;
|
27
27
|
/**
|
package/es/form/utils.js
CHANGED
@@ -115,8 +115,8 @@ var mapMode = function mapMode(props, field) {
|
|
115
115
|
|
116
116
|
var getFieldName = function getFieldName() {
|
117
117
|
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'FieldName';
|
118
|
-
var
|
119
|
-
return "".concat(prefix, "-").concat(
|
118
|
+
var suffix = arguments.length > 1 ? arguments[1] : undefined;
|
119
|
+
return "".concat(prefix, "-").concat(suffix);
|
120
120
|
};
|
121
121
|
/**
|
122
122
|
* 将ProForm的key映射为formily的key,然后筛除掉无效的key/value
|
package/es/index.d.ts
CHANGED
@@ -9,6 +9,7 @@ import ProPageHeader from './page-header';
|
|
9
9
|
import ProTable from './table';
|
10
10
|
import ProSkeleton from './skeleton';
|
11
11
|
import utils from './utils';
|
12
|
+
import { ProStep } from './step';
|
12
13
|
import * as nocode from './nocode';
|
13
14
|
import * as templates from './templates';
|
14
15
|
export * from './actions';
|
@@ -21,5 +22,7 @@ export * from './page-container';
|
|
21
22
|
export * from './page-header';
|
22
23
|
export * from './skeleton';
|
23
24
|
export * from './table';
|
24
|
-
|
25
|
-
export
|
25
|
+
export * from './utils';
|
26
|
+
export * from './step';
|
27
|
+
declare const version = "1.2.27";
|
28
|
+
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProStep, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
@@ -11,6 +11,7 @@ import ProTable from './table';
|
|
11
11
|
import ProSkeleton from './skeleton';
|
12
12
|
import utils from './utils'; // import ProSidebar from './sidebar'
|
13
13
|
|
14
|
+
import { ProStep } from './step';
|
14
15
|
import * as nocode from './nocode';
|
15
16
|
import * as templates from './templates';
|
16
17
|
import TeamixIcon from '@teamix/icon'; // 设置图标源
|
@@ -25,9 +26,11 @@ export * from './nocode';
|
|
25
26
|
export * from './page-container';
|
26
27
|
export * from './page-header';
|
27
28
|
export * from './skeleton';
|
28
|
-
export * from './table';
|
29
|
+
export * from './table';
|
30
|
+
export * from './utils'; // export * from './sidebar';
|
29
31
|
|
30
|
-
|
32
|
+
export * from './step';
|
33
|
+
var version = '1.2.27';
|
31
34
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
|
32
35
|
ProPageContainer, ProPageHeader, ProSkeleton, ProTable, // ProSidebar,
|
33
|
-
hooks, nocode, templates, utils };
|
36
|
+
ProStep, hooks, nocode, templates, utils };
|
package/es/info/index.scss
CHANGED
@@ -12,7 +12,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
12
12
|
|
13
13
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
14
14
|
|
15
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); }
|
15
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
16
16
|
|
17
17
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
18
18
|
|