@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.
Files changed (103) hide show
  1. package/dist/212.js +49 -49
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +2173 -744
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/es/actions/base.d.ts +2 -1
  7. package/es/actions/base.js +1 -1
  8. package/es/actions/danger-pop-confirm.d.ts +5 -0
  9. package/es/actions/danger-pop-confirm.js +10 -0
  10. package/es/actions/dialog.d.ts +1 -1
  11. package/es/actions/dialog.js +34 -36
  12. package/es/actions/index.d.ts +3 -0
  13. package/es/actions/index.js +10 -0
  14. package/es/actions/pop-confirm.d.ts +9 -0
  15. package/es/actions/pop-confirm.js +9 -0
  16. package/es/form/Components/LightFilter/componentMap.d.ts +2 -1
  17. package/es/form/Components/LightFilter/componentMap.js +4 -2
  18. package/es/form/Components/LightFilter/index.d.ts +1 -0
  19. package/es/form/Components/LightFilter/index.js +34 -16
  20. package/es/form/Components/LightFilter/index.scss +14 -4
  21. package/es/form/Filter/AdvancedFilter.d.ts +7 -0
  22. package/es/form/Filter/AdvancedFilter.js +113 -0
  23. package/es/form/Filter/LightFilter.d.ts +7 -0
  24. package/es/form/Filter/LightFilter.js +79 -0
  25. package/es/form/Filter/SimpleFilter.d.ts +7 -0
  26. package/es/form/Filter/SimpleFilter.js +74 -0
  27. package/es/form/Filter/index2.js +288 -235
  28. package/es/form/Filter/index2.scss +3 -0
  29. package/es/form/ProForm/index.js +11 -7
  30. package/es/form/ProForm/index.scss +3 -0
  31. package/es/form/ProForm/useFieldRequest.js +1 -8
  32. package/es/form/ProForm/useFormDisplayValues.js +4 -2
  33. package/es/form/SchemaForm/index.js +19 -11
  34. package/es/form/SchemaForm/initializeDataSource.d.ts +2 -2
  35. package/es/form/SchemaForm/initializeDataSource.js +4 -9
  36. package/es/form/SchemaForm/initializeRequest.d.ts +2 -2
  37. package/es/form/SchemaForm/initializeRequest.js +4 -10
  38. package/es/form/SchemaForm/initializeRules.d.ts +7 -1
  39. package/es/form/SchemaForm/initializeRules.js +9 -13
  40. package/es/form/SchemaForm/reactions.d.ts +5 -5
  41. package/es/form/SchemaForm/reactions.js +27 -29
  42. package/es/form/typing.d.ts +11 -2
  43. package/es/form/utils.d.ts +8 -7
  44. package/es/form/utils.js +5 -4
  45. package/es/index.d.ts +1 -1
  46. package/es/index.js +1 -1
  47. package/es/table/components/Filter/index.js +1 -0
  48. package/es/table/components/Pagination/index.d.ts +3 -0
  49. package/es/table/components/Pagination/index.js +82 -0
  50. package/es/table/components/ToolBar/FilterColumnIcon.js +18 -5
  51. package/es/table/components/ToolBar/index.scss +8 -2
  52. package/es/table/index.js +71 -18
  53. package/es/table/index.scss +7 -1
  54. package/es/table/typing.d.ts +5 -0
  55. package/lib/actions/base.d.ts +2 -1
  56. package/lib/actions/base.js +1 -1
  57. package/lib/actions/danger-pop-confirm.d.ts +5 -0
  58. package/lib/actions/danger-pop-confirm.js +22 -0
  59. package/lib/actions/dialog.d.ts +1 -1
  60. package/lib/actions/dialog.js +35 -36
  61. package/lib/actions/index.d.ts +3 -0
  62. package/lib/actions/index.js +12 -0
  63. package/lib/actions/pop-confirm.d.ts +9 -0
  64. package/lib/actions/pop-confirm.js +23 -0
  65. package/lib/form/Components/LightFilter/componentMap.d.ts +2 -1
  66. package/lib/form/Components/LightFilter/componentMap.js +6 -4
  67. package/lib/form/Components/LightFilter/index.d.ts +1 -0
  68. package/lib/form/Components/LightFilter/index.js +31 -14
  69. package/lib/form/Components/LightFilter/index.scss +14 -4
  70. package/lib/form/Filter/AdvancedFilter.d.ts +7 -0
  71. package/lib/form/Filter/AdvancedFilter.js +133 -0
  72. package/lib/form/Filter/LightFilter.d.ts +7 -0
  73. package/lib/form/Filter/LightFilter.js +99 -0
  74. package/lib/form/Filter/SimpleFilter.d.ts +7 -0
  75. package/lib/form/Filter/SimpleFilter.js +93 -0
  76. package/lib/form/Filter/index2.js +291 -234
  77. package/lib/form/Filter/index2.scss +3 -0
  78. package/lib/form/ProForm/index.js +10 -6
  79. package/lib/form/ProForm/index.scss +3 -0
  80. package/lib/form/ProForm/useFieldRequest.js +1 -9
  81. package/lib/form/ProForm/useFormDisplayValues.js +3 -1
  82. package/lib/form/SchemaForm/index.js +19 -10
  83. package/lib/form/SchemaForm/initializeDataSource.d.ts +2 -2
  84. package/lib/form/SchemaForm/initializeDataSource.js +4 -11
  85. package/lib/form/SchemaForm/initializeRequest.d.ts +2 -2
  86. package/lib/form/SchemaForm/initializeRequest.js +4 -11
  87. package/lib/form/SchemaForm/initializeRules.d.ts +7 -1
  88. package/lib/form/SchemaForm/initializeRules.js +9 -16
  89. package/lib/form/SchemaForm/reactions.d.ts +5 -5
  90. package/lib/form/SchemaForm/reactions.js +29 -31
  91. package/lib/form/typing.d.ts +11 -2
  92. package/lib/form/utils.d.ts +8 -7
  93. package/lib/form/utils.js +6 -5
  94. package/lib/index.d.ts +1 -1
  95. package/lib/index.js +1 -1
  96. package/lib/table/components/Pagination/index.d.ts +3 -0
  97. package/lib/table/components/Pagination/index.js +95 -0
  98. package/lib/table/components/ToolBar/FilterColumnIcon.js +18 -5
  99. package/lib/table/components/ToolBar/index.scss +8 -2
  100. package/lib/table/index.js +69 -17
  101. package/lib/table/index.scss +7 -1
  102. package/lib/table/typing.d.ts +5 -0
  103. 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;