@teamix/pro 1.2.32 → 1.3.0

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 (113) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +16443 -17407
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/es/actions/dialog-form.js +58 -9
  6. package/es/form/Filter/AdvancedFilter.js +4 -4
  7. package/es/form/Filter/LightFilter.js +22 -15
  8. package/es/form/Filter/index.d.ts +5 -9
  9. package/es/form/Filter/index.js +463 -152
  10. package/es/form/Filter/index.scss +33 -11
  11. package/es/form/Filter/index2.d.ts +9 -5
  12. package/es/form/Filter/index2.js +154 -370
  13. package/es/form/Filter/index2.scss +11 -33
  14. package/es/form/Filter/useSpecialProps.d.ts +1 -1
  15. package/es/form/Filter/useSpecialProps.js +9 -9
  16. package/es/form/ProForm/index.js +4 -4
  17. package/es/form/ProForm/index.scss +13 -8
  18. package/es/form/SchemaForm/index.js +5 -5
  19. package/es/form/SchemaForm/initializeDataSource.d.ts +1 -1
  20. package/es/form/SchemaForm/initializeDataSource.js +2 -2
  21. package/es/form/SchemaForm/initializeRequest.d.ts +1 -1
  22. package/es/form/SchemaForm/initializeRequest.js +40 -5
  23. package/es/form/SchemaForm/reactions.d.ts +2 -2
  24. package/es/form/SchemaForm/reactions.js +39 -21
  25. package/es/form/index.d.ts +3 -3
  26. package/es/form/index.js +3 -3
  27. package/es/form/typing.d.ts +11 -2
  28. package/es/index.d.ts +4 -4
  29. package/es/index.js +4 -4
  30. package/es/info/components/ProInfoItem/index.js +2 -1
  31. package/es/info/components/ProInfoItem/index.scss +4 -0
  32. package/es/nocode/configurators/PageHeader.js +2 -2
  33. package/es/page-header/index.js +3 -3
  34. package/es/table/components/Layout/index.js +29 -23
  35. package/es/table/components/Layout/index.scss +7 -0
  36. package/es/table/components/Pagination/index.js +11 -1
  37. package/es/table/components/ToolBar/Fullscreen.js +32 -4
  38. package/es/table/components/ToolBar/index.scss +1 -0
  39. package/es/table/index.js +50 -31
  40. package/es/table/typing.d.ts +3 -0
  41. package/es/table/utils/columnRender.js +1 -1
  42. package/es/timeline/ProTimeLineItem/index.d.ts +5 -0
  43. package/es/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.js +59 -72
  44. package/es/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.scss +34 -86
  45. package/es/timeline/index.d.ts +10 -0
  46. package/es/{step → timeline}/index.js +33 -57
  47. package/es/timeline/index.scss +7 -0
  48. package/es/timeline/typing.d.ts +101 -0
  49. package/es/{step → timeline}/typing.js +0 -0
  50. package/lib/actions/dialog-form.js +57 -10
  51. package/lib/form/Filter/AdvancedFilter.js +4 -4
  52. package/lib/form/Filter/LightFilter.js +21 -15
  53. package/lib/form/Filter/index.d.ts +5 -9
  54. package/lib/form/Filter/index.js +478 -154
  55. package/lib/form/Filter/index.scss +33 -11
  56. package/lib/form/Filter/index2.d.ts +9 -5
  57. package/lib/form/Filter/index2.js +154 -383
  58. package/lib/form/Filter/index2.scss +11 -33
  59. package/lib/form/Filter/useSpecialProps.d.ts +1 -1
  60. package/lib/form/Filter/useSpecialProps.js +8 -8
  61. package/lib/form/ProForm/index.js +4 -4
  62. package/lib/form/ProForm/index.scss +13 -8
  63. package/lib/form/SchemaForm/index.js +5 -5
  64. package/lib/form/SchemaForm/initializeDataSource.d.ts +1 -1
  65. package/lib/form/SchemaForm/initializeDataSource.js +2 -2
  66. package/lib/form/SchemaForm/initializeRequest.d.ts +1 -1
  67. package/lib/form/SchemaForm/initializeRequest.js +40 -5
  68. package/lib/form/SchemaForm/reactions.d.ts +2 -2
  69. package/lib/form/SchemaForm/reactions.js +38 -20
  70. package/lib/form/index.d.ts +3 -3
  71. package/lib/form/index.js +8 -8
  72. package/lib/form/typing.d.ts +11 -2
  73. package/lib/index.d.ts +4 -4
  74. package/lib/index.js +10 -10
  75. package/lib/info/components/ProInfoItem/index.js +2 -1
  76. package/lib/info/components/ProInfoItem/index.scss +4 -0
  77. package/lib/nocode/configurators/PageHeader.js +2 -2
  78. package/lib/page-header/index.js +2 -2
  79. package/lib/table/components/Layout/index.js +29 -23
  80. package/lib/table/components/Layout/index.scss +7 -0
  81. package/lib/table/components/Pagination/index.js +10 -0
  82. package/lib/table/components/ToolBar/Fullscreen.js +30 -3
  83. package/lib/table/components/ToolBar/index.scss +1 -0
  84. package/lib/table/index.js +50 -31
  85. package/lib/table/typing.d.ts +3 -0
  86. package/lib/table/utils/columnRender.js +1 -1
  87. package/lib/timeline/ProTimeLineItem/index.d.ts +5 -0
  88. package/lib/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.js +58 -72
  89. package/lib/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.scss +34 -86
  90. package/lib/timeline/index.d.ts +10 -0
  91. package/lib/{step → timeline}/index.js +38 -58
  92. package/lib/timeline/index.scss +7 -0
  93. package/lib/timeline/typing.d.ts +101 -0
  94. package/lib/{step → timeline}/typing.js +0 -0
  95. package/package.json +1 -1
  96. package/dist/212.js +0 -155705
  97. package/dist/fonts/codicon.ttf +0 -0
  98. package/es/step/ProStepItem/components/HozStepItem/index.d.ts +0 -5
  99. package/es/step/ProStepItem/components/HozStepItem/index.js +0 -235
  100. package/es/step/ProStepItem/components/HozStepItem/index.scss +0 -279
  101. package/es/step/ProStepItem/components/VerStepItem/index.d.ts +0 -5
  102. package/es/step/ProStepItem/index.d.ts +0 -4
  103. package/es/step/ProStepItem/index.js +0 -57
  104. package/es/step/index.d.ts +0 -9
  105. package/es/step/typing.d.ts +0 -96
  106. package/lib/step/ProStepItem/components/HozStepItem/index.d.ts +0 -5
  107. package/lib/step/ProStepItem/components/HozStepItem/index.js +0 -258
  108. package/lib/step/ProStepItem/components/HozStepItem/index.scss +0 -279
  109. package/lib/step/ProStepItem/components/VerStepItem/index.d.ts +0 -5
  110. package/lib/step/ProStepItem/index.d.ts +0 -4
  111. package/lib/step/ProStepItem/index.js +0 -69
  112. package/lib/step/index.d.ts +0 -9
  113. package/lib/step/typing.d.ts +0 -96
@@ -11,13 +11,11 @@ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
- var _reactive = require("@formily/reactive");
15
-
16
14
  var _utils = require("@teamix/utils");
17
15
 
18
16
  var _ProForm = _interopRequireDefault(require("../ProForm"));
19
17
 
20
- var _excluded = ["form", "schema", "onSubmit", "onChange", "defaultFilterValue"];
18
+ var _excluded = ["form", "schema", "onSubmit", "onChange", "defaultFilterValue", "activeFilterValueRef"];
21
19
 
22
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
21
 
@@ -46,24 +44,32 @@ var LightFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
46
44
  onSubmit = props.onSubmit,
47
45
  onChange = props.onChange,
48
46
  defaultFilterValue = props.defaultFilterValue,
47
+ activeFilterValueRef = props.activeFilterValueRef,
49
48
  otherProps = _objectWithoutProperties(props, _excluded);
50
49
 
51
50
  var filterValue = (0, _react.useRef)(defaultFilterValue || ((_schema$ = schema[0]) === null || _schema$ === void 0 ? void 0 : _schema$.name));
52
51
  var prefixCls = (0, _utils.usePrefixCls)('', {
53
52
  prefix: 'teamix-pro-form-query-filter-light'
54
- }); // input类组件的按钮
55
-
56
- var onBtnClick = (0, _react.useCallback)(function () {
57
- onChange && onChange((0, _reactive.toJS)(form.values));
58
- }, [form]); // 筛选提交切换
53
+ });
54
+ (0, _react.useEffect)(function () {
55
+ if (activeFilterValueRef) {
56
+ activeFilterValueRef.current = filterValue.current;
57
+ }
58
+ }, []); // 筛选提交切换
59
59
 
60
60
  var onFilterChange = (0, _react.useCallback)(function (value) {
61
61
  filterValue.current = value;
62
- }, [form]); // onChange
63
62
 
64
- var onCurrentChange = (0, _react.useCallback)(function (values) {
65
- onChange && onChange(_defineProperty({}, filterValue.current, values[filterValue.current]));
66
- }, [onChange, filterValue.current]);
63
+ if (activeFilterValueRef) {
64
+ activeFilterValueRef.current = value;
65
+ }
66
+ }, [form]); // 实际输出onFilter
67
+
68
+ var onFilter = (0, _react.useCallback)(function () {
69
+ var key = filterValue.current;
70
+ var value = form.values[key];
71
+ onChange === null || onChange === void 0 ? void 0 : onChange(_defineProperty({}, key, value));
72
+ }, [onChange]);
67
73
  var LightSchema = (0, _react.useMemo)(function () {
68
74
  return [{
69
75
  component: 'LightFilter',
@@ -71,7 +77,7 @@ var LightFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
71
77
  defaultFilterValue: defaultFilterValue,
72
78
  onFilterChange: onFilterChange,
73
79
  buttonProps: {
74
- onClick: onBtnClick
80
+ onClick: onFilter
75
81
  }
76
82
  },
77
83
  children: schema
@@ -83,7 +89,7 @@ var LightFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
83
89
  }
84
90
  }
85
91
  }];
86
- }, [schema, onBtnClick, onFilterChange, defaultFilterValue]);
92
+ }, [schema, onFilter, onFilterChange, defaultFilterValue]);
87
93
  return /*#__PURE__*/_react.default.createElement(_ProForm.default, _objectSpread(_objectSpread({}, otherProps), {}, {
88
94
  form: form,
89
95
  className: (0, _classnames.default)(prefixCls, props.className),
@@ -92,7 +98,7 @@ var LightFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
92
98
  breakpoints: [],
93
99
  bordered: false,
94
100
  onSubmit: onSubmit,
95
- onChange: onCurrentChange
101
+ onChange: onFilter
96
102
  }));
97
103
  });
98
104
  var _default = LightFilter;
@@ -1,13 +1,9 @@
1
1
  import React from 'react';
2
- import type { IFilterProps } from '../typing';
2
+ import { QueryFilterLayout } from './Layout';
3
+ import type { QueryFilterProps } from '../typing';
3
4
  import './index.scss';
4
5
  /**
5
- * 简单筛选
6
+ * 查询筛选
6
7
  */
7
- declare const SimpleFilter: React.FC<IFilterProps>;
8
- /**
9
- * 高级筛选
10
- */
11
- declare const AdvancedFilter: React.FC<IFilterProps>;
12
- export { AdvancedFilter, SimpleFilter };
13
- export default AdvancedFilter;
8
+ declare const QueryFilter: React.FC<QueryFilterProps>;
9
+ export { QueryFilter, QueryFilterLayout };