@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.
- package/dist/pro.css +1 -1
- package/dist/pro.js +16443 -17407
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/dialog-form.js +58 -9
- package/es/form/Filter/AdvancedFilter.js +4 -4
- package/es/form/Filter/LightFilter.js +22 -15
- package/es/form/Filter/index.d.ts +5 -9
- package/es/form/Filter/index.js +463 -152
- package/es/form/Filter/index.scss +33 -11
- package/es/form/Filter/index2.d.ts +9 -5
- package/es/form/Filter/index2.js +154 -370
- package/es/form/Filter/index2.scss +11 -33
- package/es/form/Filter/useSpecialProps.d.ts +1 -1
- package/es/form/Filter/useSpecialProps.js +9 -9
- package/es/form/ProForm/index.js +4 -4
- package/es/form/ProForm/index.scss +13 -8
- package/es/form/SchemaForm/index.js +5 -5
- 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 +40 -5
- package/es/form/SchemaForm/reactions.d.ts +2 -2
- package/es/form/SchemaForm/reactions.js +39 -21
- package/es/form/index.d.ts +3 -3
- package/es/form/index.js +3 -3
- package/es/form/typing.d.ts +11 -2
- package/es/index.d.ts +4 -4
- package/es/index.js +4 -4
- package/es/info/components/ProInfoItem/index.js +2 -1
- package/es/info/components/ProInfoItem/index.scss +4 -0
- package/es/nocode/configurators/PageHeader.js +2 -2
- package/es/page-header/index.js +3 -3
- package/es/table/components/Layout/index.js +29 -23
- package/es/table/components/Layout/index.scss +7 -0
- package/es/table/components/Pagination/index.js +11 -1
- package/es/table/components/ToolBar/Fullscreen.js +32 -4
- package/es/table/components/ToolBar/index.scss +1 -0
- package/es/table/index.js +50 -31
- package/es/table/typing.d.ts +3 -0
- package/es/table/utils/columnRender.js +1 -1
- package/es/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/es/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.js +59 -72
- package/es/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.scss +34 -86
- package/es/timeline/index.d.ts +10 -0
- package/es/{step → timeline}/index.js +33 -57
- package/es/timeline/index.scss +7 -0
- package/es/timeline/typing.d.ts +101 -0
- package/es/{step → timeline}/typing.js +0 -0
- package/lib/actions/dialog-form.js +57 -10
- package/lib/form/Filter/AdvancedFilter.js +4 -4
- package/lib/form/Filter/LightFilter.js +21 -15
- package/lib/form/Filter/index.d.ts +5 -9
- package/lib/form/Filter/index.js +478 -154
- package/lib/form/Filter/index.scss +33 -11
- package/lib/form/Filter/index2.d.ts +9 -5
- package/lib/form/Filter/index2.js +154 -383
- package/lib/form/Filter/index2.scss +11 -33
- package/lib/form/Filter/useSpecialProps.d.ts +1 -1
- package/lib/form/Filter/useSpecialProps.js +8 -8
- package/lib/form/ProForm/index.js +4 -4
- package/lib/form/ProForm/index.scss +13 -8
- package/lib/form/SchemaForm/index.js +5 -5
- 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 +40 -5
- package/lib/form/SchemaForm/reactions.d.ts +2 -2
- package/lib/form/SchemaForm/reactions.js +38 -20
- package/lib/form/index.d.ts +3 -3
- package/lib/form/index.js +8 -8
- package/lib/form/typing.d.ts +11 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +10 -10
- package/lib/info/components/ProInfoItem/index.js +2 -1
- package/lib/info/components/ProInfoItem/index.scss +4 -0
- package/lib/nocode/configurators/PageHeader.js +2 -2
- package/lib/page-header/index.js +2 -2
- package/lib/table/components/Layout/index.js +29 -23
- package/lib/table/components/Layout/index.scss +7 -0
- package/lib/table/components/Pagination/index.js +10 -0
- package/lib/table/components/ToolBar/Fullscreen.js +30 -3
- package/lib/table/components/ToolBar/index.scss +1 -0
- package/lib/table/index.js +50 -31
- package/lib/table/typing.d.ts +3 -0
- package/lib/table/utils/columnRender.js +1 -1
- package/lib/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/lib/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.js +58 -72
- package/lib/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.scss +34 -86
- package/lib/timeline/index.d.ts +10 -0
- package/lib/{step → timeline}/index.js +38 -58
- package/lib/timeline/index.scss +7 -0
- package/lib/timeline/typing.d.ts +101 -0
- package/lib/{step → timeline}/typing.js +0 -0
- package/package.json +1 -1
- package/dist/212.js +0 -155705
- package/dist/fonts/codicon.ttf +0 -0
- package/es/step/ProStepItem/components/HozStepItem/index.d.ts +0 -5
- package/es/step/ProStepItem/components/HozStepItem/index.js +0 -235
- package/es/step/ProStepItem/components/HozStepItem/index.scss +0 -279
- package/es/step/ProStepItem/components/VerStepItem/index.d.ts +0 -5
- package/es/step/ProStepItem/index.d.ts +0 -4
- package/es/step/ProStepItem/index.js +0 -57
- package/es/step/index.d.ts +0 -9
- package/es/step/typing.d.ts +0 -96
- package/lib/step/ProStepItem/components/HozStepItem/index.d.ts +0 -5
- package/lib/step/ProStepItem/components/HozStepItem/index.js +0 -258
- package/lib/step/ProStepItem/components/HozStepItem/index.scss +0 -279
- package/lib/step/ProStepItem/components/VerStepItem/index.d.ts +0 -5
- package/lib/step/ProStepItem/index.d.ts +0 -4
- package/lib/step/ProStepItem/index.js +0 -69
- package/lib/step/index.d.ts +0 -9
- 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
|
-
});
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
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
|
-
|
65
|
-
|
66
|
-
|
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:
|
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,
|
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:
|
101
|
+
onChange: onFilter
|
96
102
|
}));
|
97
103
|
});
|
98
104
|
var _default = LightFilter;
|
@@ -1,13 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import
|
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
|
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 };
|