@teamix/pro 1.2.26 → 1.2.30

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/dist/212.js +129 -129
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +18415 -16897
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/dist/pro.min.js.LICENSE.txt +2 -0
  7. package/es/actions/index.d.ts +2 -3
  8. package/es/actions/index.js +15 -19
  9. package/es/form/Filter/AdvancedFilter.js +1 -1
  10. package/es/form/Filter/Layout.d.ts +5 -0
  11. package/es/form/Filter/Layout.js +82 -0
  12. package/es/form/Filter/SimpleFilter.js +30 -6
  13. package/es/form/Filter/index2.d.ts +2 -1
  14. package/es/form/Filter/index2.js +97 -116
  15. package/es/form/Filter/index2.scss +16 -45
  16. package/es/form/Filter/layout.scss +36 -0
  17. package/es/form/Filter/useSpecialProps.d.ts +6 -0
  18. package/es/form/Filter/useSpecialProps.js +37 -0
  19. package/es/form/ProForm/customComponent.d.ts +3 -0
  20. package/es/form/ProForm/customComponent.js +20 -0
  21. package/es/form/ProForm/index.scss +5 -6
  22. package/es/form/ProForm/useFormDisplayValues.js +14 -24
  23. package/es/form/SchemaForm/adapterType.js +1 -0
  24. package/es/form/fieldTypeMap.js +2 -1
  25. package/es/form/index.d.ts +4 -2
  26. package/es/form/index.js +4 -2
  27. package/es/form/typing.d.ts +25 -1
  28. package/es/index.d.ts +1 -1
  29. package/es/index.js +1 -1
  30. package/es/info/index.scss +1 -1
  31. package/es/nocode/pages/renderer.js +1 -1
  32. package/es/table/components/Layout/index.js +74 -163
  33. package/es/table/components/Layout/index.scss +4 -3
  34. package/es/table/components/Pagination/index.js +1 -0
  35. package/es/table/components/ToolBar/FullScreenIcon.js +4 -9
  36. package/es/table/components/ToolBar/Fullscreen.js +21 -11
  37. package/es/table/index.js +84 -102
  38. package/es/table/index.scss +4 -0
  39. package/es/table/typing.d.ts +12 -10
  40. package/es/table/utils/columnRender.js +21 -3
  41. package/lib/actions/index.d.ts +2 -3
  42. package/lib/actions/index.js +15 -19
  43. package/lib/form/Filter/AdvancedFilter.js +1 -1
  44. package/lib/form/Filter/Layout.d.ts +5 -0
  45. package/lib/form/Filter/Layout.js +102 -0
  46. package/lib/form/Filter/SimpleFilter.js +29 -4
  47. package/lib/form/Filter/index2.d.ts +2 -1
  48. package/lib/form/Filter/index2.js +101 -114
  49. package/lib/form/Filter/index2.scss +16 -45
  50. package/lib/form/Filter/layout.scss +36 -0
  51. package/lib/form/Filter/useSpecialProps.d.ts +6 -0
  52. package/lib/form/Filter/useSpecialProps.js +46 -0
  53. package/lib/form/ProForm/customComponent.d.ts +3 -0
  54. package/lib/form/ProForm/customComponent.js +28 -0
  55. package/lib/form/ProForm/index.scss +5 -6
  56. package/lib/form/ProForm/useFormDisplayValues.js +17 -24
  57. package/lib/form/SchemaForm/adapterType.js +1 -0
  58. package/lib/form/fieldTypeMap.js +2 -1
  59. package/lib/form/index.d.ts +4 -2
  60. package/lib/form/index.js +19 -1
  61. package/lib/form/typing.d.ts +25 -1
  62. package/lib/index.d.ts +1 -1
  63. package/lib/index.js +1 -1
  64. package/lib/info/index.scss +1 -1
  65. package/lib/nocode/pages/renderer.js +1 -1
  66. package/lib/table/components/Layout/index.js +72 -163
  67. package/lib/table/components/Layout/index.scss +4 -3
  68. package/lib/table/components/Pagination/index.js +1 -0
  69. package/lib/table/components/ToolBar/FullScreenIcon.js +4 -9
  70. package/lib/table/components/ToolBar/Fullscreen.js +22 -11
  71. package/lib/table/index.js +81 -100
  72. package/lib/table/index.scss +4 -0
  73. package/lib/table/typing.d.ts +12 -10
  74. package/lib/table/utils/columnRender.js +21 -3
  75. package/package.json +4 -4
@@ -4,31 +4,12 @@ $query-filter: #{$teamix-pro-form}-query-filter;
4
4
 
5
5
  .#{$query-filter} {
6
6
  .#{$query-filter}-inline {
7
- display: flex;
8
- justify-content: space-between;
9
- }
10
- .#{$query-filter}-left {
11
- display: flex;
12
- }
13
- .#{$query-filter}-addonBefore {
14
- flex: 0 1 auto;
15
- margin-right: 8px;
16
- }
17
- .#{$query-filter}-inline-form {
18
- flex: 0 0 auto;
19
7
  margin-right: 8px;
20
8
  margin-bottom: 8px;
21
9
  }
22
- .#{$query-filter}-inline-form-hidden {
10
+ .#{$query-filter}-inline-hidden {
23
11
  display: none;
24
12
  }
25
- .#{$query-filter}-toggle {
26
- margin-bottom: 8px;
27
- }
28
- .#{$query-filter}-addonAfter {
29
- flex: 0 1 auto;
30
- margin-left: 8px;
31
- }
32
13
  .#{$query-filter}-tag-title {
33
14
  margin-right: 12px;
34
15
  color: var(--color-text1-8, #848484);
@@ -42,34 +23,24 @@ $query-filter: #{$teamix-pro-form}-query-filter;
42
23
  }
43
24
  }
44
25
  }
45
- .#{$query-filter}-tag-hidden {
46
- display: none;
47
- }
48
- .#{$query-filter}-advanced-wrap {
49
- padding: 16px;
50
- background-color: var(--color-fill1-2, #f7f7f7);
51
- }
52
- .#{$query-filter}-advanced-wrap-hidden {
53
- display: none;
54
- }
26
+ }
55
27
 
56
- .#{$query-filter}-advanced {
57
- .#{$css-prefix}formily-button-group {
58
- margin-top: 0;
59
- }
28
+ .#{$query-filter}-advanced {
29
+ .#{$css-prefix}formily-button-group {
30
+ margin-top: 0;
60
31
  }
61
- .#{$query-filter}-advanced,
62
- .#{$query-filter}-simple,
63
- .#{$query-filter}-light {
64
- .#{$form-item-cls}-feedback-layout-popover {
65
- margin-bottom: 0;
66
- }
67
- .#{$css-prefix}date-picker2-input {
68
- .#{$css-prefix}input {
32
+ }
33
+ .#{$query-filter}-advanced,
34
+ .#{$query-filter}-simple,
35
+ .#{$query-filter}-light {
36
+ .#{$form-item-cls}-feedback-layout-popover {
37
+ margin-bottom: 0;
38
+ }
39
+ .#{$css-prefix}date-picker2-input {
40
+ .#{$css-prefix}input {
41
+ width: inherit;
42
+ input {
69
43
  width: inherit;
70
- input {
71
- width: inherit;
72
- }
73
44
  }
74
45
  }
75
46
  }
@@ -0,0 +1,36 @@
1
+ @import '../global.scss';
2
+
3
+ $query-filter-layout: #{$teamix-pro-form}-query-filter-layout;
4
+
5
+ .theme-hybridcloud-dark {
6
+ --panel-filter-bg: #1f1f1f;
7
+ }
8
+
9
+ .#{$query-filter-layout} {
10
+ .#{$query-filter-layout}-inline {
11
+ display: flex;
12
+ justify-content: space-between;
13
+ }
14
+ .#{$query-filter-layout}-left {
15
+ display: flex;
16
+ }
17
+ .#{$query-filter-layout}-addonBefore {
18
+ flex: 0 1 auto;
19
+ margin-right: 8px;
20
+ }
21
+ .#{$query-filter-layout}-toggle {
22
+ margin-bottom: 8px;
23
+ }
24
+ .#{$query-filter-layout}-addonAfter {
25
+ flex: 0 1 auto;
26
+ margin-left: 8px;
27
+ }
28
+ .#{$query-filter-layout}-panel {
29
+ margin-bottom: 8px;
30
+ padding: 16px;
31
+ background-color: var(--panel-filter-bg, var(--color-fill1-2));
32
+ }
33
+ .#{$query-filter-layout}-panel-hidden {
34
+ display: none;
35
+ }
36
+ }
@@ -0,0 +1,6 @@
1
+ declare const useSpecialProps: (props: any) => {
2
+ hasDefault: boolean;
3
+ hasAsyncDefault: boolean;
4
+ hasRequired: boolean;
5
+ };
6
+ export default useSpecialProps;
@@ -0,0 +1,37 @@
1
+ import { isSignificative, isStr, isPlainObj } from '@teamix/utils'; // 获取Schema是否包含默认值、异步默认值、必选校验等
2
+
3
+ var useSpecialProps = function useSpecialProps(props) {
4
+ var initialValues = props.initialValues,
5
+ initialRequest = props.initialRequest;
6
+ var hasDefault = !!initialValues;
7
+ var hasAsyncDefault = !!initialRequest;
8
+ var hasRequired = false;
9
+
10
+ var hasDefaultOrRule = function hasDefaultOrRule(schema) {
11
+ schema.forEach(function (item) {
12
+ var value = item.default,
13
+ required = item.required,
14
+ rules = item.rules,
15
+ request = item.request,
16
+ dataSource = item.dataSource,
17
+ children = item.children;
18
+ hasDefault = hasDefault || isSignificative(value);
19
+ hasRequired = hasRequired || required || !!rules;
20
+ hasAsyncDefault = hasAsyncDefault || !!request || // 如果dataSource是异步且default取自dataSource
21
+ !!(isPlainObj(dataSource) && isStr(value) && value.indexOf('.dataSource'));
22
+
23
+ if (children === null || children === void 0 ? void 0 : children.length) {
24
+ hasDefaultOrRule(children);
25
+ }
26
+ });
27
+ };
28
+
29
+ hasDefaultOrRule(props.schema);
30
+ return {
31
+ hasDefault: hasDefault,
32
+ hasAsyncDefault: hasAsyncDefault,
33
+ hasRequired: hasRequired
34
+ };
35
+ };
36
+
37
+ export default useSpecialProps;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const customComponent: (component: React.FC<any>) => React.ForwardRefExoticComponent<Pick<Partial<any>, string | number | symbol> & React.RefAttributes<unknown>>;
3
+ export { customComponent };
@@ -0,0 +1,20 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
5
+ 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; }
6
+
7
+ import { connect, mapProps } from '@formily/react';
8
+ import { toJS } from '@formily/reactive';
9
+
10
+ var customComponent = function customComponent(component) {
11
+ return connect(component, mapProps(function (props, field) {
12
+ return _objectSpread(_objectSpread({}, props), {}, {
13
+ field: field,
14
+ form: field.form,
15
+ values: toJS(field.form.values)
16
+ });
17
+ }));
18
+ };
19
+
20
+ export { customComponent };
@@ -186,18 +186,17 @@
186
186
  }
187
187
 
188
188
  // 数组类组件添加按钮
189
- .#{$form-array}-base-addition {
189
+ .#{$css-prefix}btn.#{$form-array}-base-addition {
190
+ border-style: dashed;
190
191
  .#{$css-prefix}formily-icon {
191
192
  margin-right: 4px;
192
193
  }
193
194
  }
194
195
  // 数组类ArrayItem Icon 居中
195
196
  .#{$form-array}-items-item-inner {
196
- > .#{$css-prefix}box {
197
- > .#{$css-prefix}space-item {
198
- > .#{$css-prefix}formily-icon {
199
- margin-top: 9px;
200
- }
197
+ .#{$css-prefix}space-item {
198
+ > .#{$css-prefix}formily-icon {
199
+ margin-top: 9px;
201
200
  }
202
201
  }
203
202
  }
@@ -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
- }; // 判断布局、自增的值还是字段的值(字段值是对象、数组,内部的值特点为非数组、对象的叶子值,并且在form没有路径)
40
+ }; // 当前field
40
41
 
41
42
 
42
- var isFieldValue = function isFieldValue(value, path) {
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) && isLayoutValue(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) && isArrayValue(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 field = form.query(getAddress(prefix)).take();
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: realValue,
88
- displayValue: getValueByValue(field === null || field === void 0 ? void 0 : field.dataSource, realValue)
77
+ value: values,
78
+ displayValue: displayValue
89
79
  };
90
80
  }
91
81
 
@@ -46,6 +46,7 @@ var typeMap = (_typeMap = {
46
46
  MultipleTagPicker: 'array',
47
47
  Range: 'string',
48
48
  Search: 'array',
49
+ SelectGroup: 'array',
49
50
  ArrayCollapse: 'array',
50
51
  ArrayCards: 'array',
51
52
  ArrayTable: 'array',
@@ -37,6 +37,7 @@ var fieldTypeMap = {
37
37
  TagPicker: 'tagPicker',
38
38
  MultipleTagPicker: 'multipleTagPicker',
39
39
  Range: 'range',
40
- Search: 'search'
40
+ Search: 'search',
41
+ SelectGroup: 'selectGroup'
41
42
  };
42
43
  export default fieldTypeMap;
@@ -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
- export { formilyReact };
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
- export { AdvancedFilter, SimpleFilter, QueryFilter };
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
- export { formilyReact };
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
- export { AdvancedFilter, SimpleFilter, QueryFilter };
46
+ import { QueryFilterLayout } from './Filter/Layout';
47
+ export { AdvancedFilter, SimpleFilter, QueryFilter, QueryFilterLayout };
46
48
  /**
47
49
  * 导出 ProForm 组件,支持快速搭建表单
48
50
  */
@@ -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/index.d.ts CHANGED
@@ -24,5 +24,5 @@ export * from './skeleton';
24
24
  export * from './table';
25
25
  export * from './utils';
26
26
  export * from './step';
27
- declare const version = "1.2.26";
27
+ declare const version = "1.2.30";
28
28
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProStep, hooks, nocode, templates, utils, };
package/es/index.js CHANGED
@@ -30,7 +30,7 @@ export * from './table';
30
30
  export * from './utils'; // export * from './sidebar';
31
31
 
32
32
  export * from './step';
33
- var version = '1.2.26';
33
+ var version = '1.2.30';
34
34
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
35
35
  ProPageContainer, ProPageHeader, ProSkeleton, ProTable, // ProSidebar,
36
36
  ProStep, hooks, nocode, templates, utils };
@@ -1,6 +1,6 @@
1
1
  .teamix-pro-info {
2
2
  color: var(--color-brand1-6);
3
-
3
+
4
4
  .teamix-pro-info-content-row {
5
5
  width: 100%;
6
6
  }
@@ -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"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
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