@teamix/pro 1.2.17 → 1.2.21
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 +49 -49
- package/dist/pro.css +1 -1
- package/dist/pro.js +2173 -744
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/base.d.ts +2 -1
- package/es/actions/base.js +1 -1
- package/es/actions/danger-pop-confirm.d.ts +5 -0
- package/es/actions/danger-pop-confirm.js +10 -0
- package/es/actions/dialog.d.ts +1 -1
- package/es/actions/dialog.js +34 -36
- package/es/actions/index.d.ts +3 -0
- package/es/actions/index.js +10 -0
- package/es/actions/pop-confirm.d.ts +9 -0
- package/es/actions/pop-confirm.js +9 -0
- package/es/form/Components/LightFilter/componentMap.d.ts +2 -1
- package/es/form/Components/LightFilter/componentMap.js +4 -2
- package/es/form/Components/LightFilter/index.d.ts +1 -0
- package/es/form/Components/LightFilter/index.js +34 -16
- package/es/form/Components/LightFilter/index.scss +14 -4
- package/es/form/Filter/AdvancedFilter.d.ts +7 -0
- package/es/form/Filter/AdvancedFilter.js +113 -0
- package/es/form/Filter/LightFilter.d.ts +7 -0
- package/es/form/Filter/LightFilter.js +79 -0
- package/es/form/Filter/SimpleFilter.d.ts +7 -0
- package/es/form/Filter/SimpleFilter.js +74 -0
- package/es/form/Filter/index2.js +288 -235
- package/es/form/Filter/index2.scss +3 -0
- package/es/form/ProForm/index.js +11 -7
- package/es/form/ProForm/index.scss +3 -0
- package/es/form/ProForm/useFieldRequest.js +1 -8
- package/es/form/ProForm/useFormDisplayValues.js +4 -2
- package/es/form/SchemaForm/index.js +19 -11
- package/es/form/SchemaForm/initializeDataSource.d.ts +2 -2
- package/es/form/SchemaForm/initializeDataSource.js +4 -9
- package/es/form/SchemaForm/initializeRequest.d.ts +2 -2
- package/es/form/SchemaForm/initializeRequest.js +4 -10
- package/es/form/SchemaForm/initializeRules.d.ts +7 -1
- package/es/form/SchemaForm/initializeRules.js +9 -13
- package/es/form/SchemaForm/reactions.d.ts +5 -5
- package/es/form/SchemaForm/reactions.js +27 -29
- package/es/form/typing.d.ts +11 -2
- package/es/form/utils.d.ts +8 -7
- package/es/form/utils.js +5 -4
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/table/components/Filter/index.js +1 -0
- package/es/table/components/Pagination/index.d.ts +3 -0
- package/es/table/components/Pagination/index.js +82 -0
- package/es/table/components/ToolBar/FilterColumnIcon.js +18 -5
- package/es/table/components/ToolBar/index.scss +8 -2
- package/es/table/index.js +71 -18
- package/es/table/index.scss +7 -1
- package/es/table/typing.d.ts +5 -0
- package/lib/actions/base.d.ts +2 -1
- package/lib/actions/base.js +1 -1
- package/lib/actions/danger-pop-confirm.d.ts +5 -0
- package/lib/actions/danger-pop-confirm.js +22 -0
- package/lib/actions/dialog.d.ts +1 -1
- package/lib/actions/dialog.js +35 -36
- package/lib/actions/index.d.ts +3 -0
- package/lib/actions/index.js +12 -0
- package/lib/actions/pop-confirm.d.ts +9 -0
- package/lib/actions/pop-confirm.js +23 -0
- package/lib/form/Components/LightFilter/componentMap.d.ts +2 -1
- package/lib/form/Components/LightFilter/componentMap.js +6 -4
- package/lib/form/Components/LightFilter/index.d.ts +1 -0
- package/lib/form/Components/LightFilter/index.js +31 -14
- package/lib/form/Components/LightFilter/index.scss +14 -4
- package/lib/form/Filter/AdvancedFilter.d.ts +7 -0
- package/lib/form/Filter/AdvancedFilter.js +133 -0
- package/lib/form/Filter/LightFilter.d.ts +7 -0
- package/lib/form/Filter/LightFilter.js +99 -0
- package/lib/form/Filter/SimpleFilter.d.ts +7 -0
- package/lib/form/Filter/SimpleFilter.js +93 -0
- package/lib/form/Filter/index2.js +291 -234
- package/lib/form/Filter/index2.scss +3 -0
- package/lib/form/ProForm/index.js +10 -6
- package/lib/form/ProForm/index.scss +3 -0
- package/lib/form/ProForm/useFieldRequest.js +1 -9
- package/lib/form/ProForm/useFormDisplayValues.js +3 -1
- package/lib/form/SchemaForm/index.js +19 -10
- package/lib/form/SchemaForm/initializeDataSource.d.ts +2 -2
- package/lib/form/SchemaForm/initializeDataSource.js +4 -11
- package/lib/form/SchemaForm/initializeRequest.d.ts +2 -2
- package/lib/form/SchemaForm/initializeRequest.js +4 -11
- package/lib/form/SchemaForm/initializeRules.d.ts +7 -1
- package/lib/form/SchemaForm/initializeRules.js +9 -16
- package/lib/form/SchemaForm/reactions.d.ts +5 -5
- package/lib/form/SchemaForm/reactions.js +29 -31
- package/lib/form/typing.d.ts +11 -2
- package/lib/form/utils.d.ts +8 -7
- package/lib/form/utils.js +6 -5
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/table/components/Pagination/index.d.ts +3 -0
- package/lib/table/components/Pagination/index.js +95 -0
- package/lib/table/components/ToolBar/FilterColumnIcon.js +18 -5
- package/lib/table/components/ToolBar/index.scss +8 -2
- package/lib/table/index.js +69 -17
- package/lib/table/index.scss +7 -1
- package/lib/table/typing.d.ts +5 -0
- package/package.json +3 -3
@@ -0,0 +1,74 @@
|
|
1
|
+
var _excluded = ["schema", "onChange", "onSubmit"];
|
2
|
+
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
|
+
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
|
+
|
7
|
+
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; }
|
8
|
+
|
9
|
+
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; }
|
10
|
+
|
11
|
+
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; }
|
12
|
+
|
13
|
+
import React, { memo, useMemo } from 'react';
|
14
|
+
import cls from 'classnames';
|
15
|
+
import { usePrefixCls } from '@teamix/utils';
|
16
|
+
import ProForm from '../ProForm';
|
17
|
+
|
18
|
+
var initializeSearch = function initializeSearch(schema) {
|
19
|
+
return schema.map(function (item) {
|
20
|
+
if (item.component === 'Search') {
|
21
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
22
|
+
decoratorProps: _objectSpread(_objectSpread({}, item.decoratorProps), {}, {
|
23
|
+
inset: false
|
24
|
+
}),
|
25
|
+
props: _objectSpread({
|
26
|
+
shape: 'simple'
|
27
|
+
}, item.props)
|
28
|
+
});
|
29
|
+
}
|
30
|
+
|
31
|
+
return item;
|
32
|
+
});
|
33
|
+
};
|
34
|
+
/**
|
35
|
+
* 简单筛选
|
36
|
+
*/
|
37
|
+
|
38
|
+
|
39
|
+
var SimpleFilter = /*#__PURE__*/memo(function (props) {
|
40
|
+
var schema = props.schema,
|
41
|
+
onChange = props.onChange,
|
42
|
+
onSubmit = props.onSubmit,
|
43
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
44
|
+
|
45
|
+
var prefixCls = usePrefixCls('', {
|
46
|
+
prefix: 'teamix-pro-form-query-filter-simple'
|
47
|
+
});
|
48
|
+
var simpleSchema = useMemo(function () {
|
49
|
+
return [{
|
50
|
+
component: 'FormFlex',
|
51
|
+
props: {
|
52
|
+
size: 8
|
53
|
+
},
|
54
|
+
children: initializeSearch(schema)
|
55
|
+
}, {
|
56
|
+
component: 'Submit',
|
57
|
+
props: {
|
58
|
+
style: {
|
59
|
+
display: 'none'
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}];
|
63
|
+
}, [schema]);
|
64
|
+
return /*#__PURE__*/React.createElement(ProForm, _objectSpread(_objectSpread({}, otherProps), {}, {
|
65
|
+
className: cls(prefixCls, props.className),
|
66
|
+
schema: simpleSchema,
|
67
|
+
feedbackLayout: "popover",
|
68
|
+
breakpoints: [],
|
69
|
+
inset: true,
|
70
|
+
onSubmit: onSubmit,
|
71
|
+
onChange: onChange
|
72
|
+
}));
|
73
|
+
});
|
74
|
+
export default SimpleFilter;
|