@teamix/pro 1.2.24 → 1.2.29

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 (129) hide show
  1. package/dist/212.js +129 -129
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +18112 -15660
  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/dialog.js +1 -1
  8. package/es/actions/index.d.ts +12 -9
  9. package/es/actions/index.js +56 -15
  10. package/es/actions/index.scss +12 -1
  11. package/es/form/Filter/AdvancedFilter.js +1 -1
  12. package/es/form/Filter/Layout.d.ts +5 -0
  13. package/es/form/Filter/Layout.js +82 -0
  14. package/es/form/Filter/SimpleFilter.js +30 -6
  15. package/es/form/Filter/index2.d.ts +2 -1
  16. package/es/form/Filter/index2.js +97 -116
  17. package/es/form/Filter/index2.scss +16 -45
  18. package/es/form/Filter/layout.scss +36 -0
  19. package/es/form/Filter/useSpecialProps.d.ts +6 -0
  20. package/es/form/Filter/useSpecialProps.js +37 -0
  21. package/es/form/ProForm/customComponent.d.ts +3 -0
  22. package/es/form/ProForm/customComponent.js +20 -0
  23. package/es/form/ProForm/index.scss +5 -6
  24. package/es/form/ProForm/useFormDisplayValues.js +14 -24
  25. package/es/form/SchemaForm/adapterType.js +1 -0
  26. package/es/form/SchemaForm/index.js +8 -6
  27. package/es/form/SchemaForm/initializeDataSource.d.ts +1 -1
  28. package/es/form/SchemaForm/initializeDataSource.js +2 -2
  29. package/es/form/SchemaForm/initializeRequest.d.ts +1 -1
  30. package/es/form/SchemaForm/initializeRequest.js +2 -2
  31. package/es/form/SchemaForm/initializeRules.d.ts +1 -1
  32. package/es/form/SchemaForm/initializeRules.js +3 -3
  33. package/es/form/fieldTypeMap.js +2 -1
  34. package/es/form/index.d.ts +4 -2
  35. package/es/form/index.js +4 -2
  36. package/es/form/typing.d.ts +16 -1
  37. package/es/form/utils.d.ts +2 -2
  38. package/es/form/utils.js +2 -2
  39. package/es/index.d.ts +5 -2
  40. package/es/index.js +6 -3
  41. package/es/info/index.scss +1 -1
  42. package/es/nocode/pages/renderer.js +1 -1
  43. package/es/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
  44. package/es/step/ProStepItem/components/HozStepItem/index.js +235 -0
  45. package/es/step/ProStepItem/components/HozStepItem/index.scss +279 -0
  46. package/es/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
  47. package/es/step/ProStepItem/components/VerStepItem/index.js +295 -0
  48. package/es/step/ProStepItem/components/VerStepItem/index.scss +287 -0
  49. package/es/step/ProStepItem/index.d.ts +4 -0
  50. package/es/step/ProStepItem/index.js +57 -0
  51. package/es/step/index.d.ts +9 -0
  52. package/es/step/index.js +101 -0
  53. package/es/step/typing.d.ts +96 -0
  54. package/es/step/typing.js +1 -0
  55. package/es/table/components/Filter/index.js +2 -17
  56. package/es/table/components/Layout/index.js +63 -167
  57. package/es/table/components/Layout/index.scss +4 -3
  58. package/es/table/components/Pagination/index.js +1 -0
  59. package/es/table/components/ToolBar/FullScreenIcon.js +4 -9
  60. package/es/table/components/ToolBar/Fullscreen.js +21 -11
  61. package/es/table/index.js +89 -103
  62. package/es/table/typing.d.ts +14 -3
  63. package/es/table/utils/columnRender.js +21 -3
  64. package/es/table/utils/index.d.ts +7 -0
  65. package/es/table/utils/index.js +36 -0
  66. package/es/utils/index.d.ts +1 -0
  67. package/es/utils/index.js +1 -0
  68. package/lib/actions/dialog.js +1 -1
  69. package/lib/actions/index.d.ts +12 -9
  70. package/lib/actions/index.js +56 -15
  71. package/lib/actions/index.scss +12 -1
  72. package/lib/form/Filter/AdvancedFilter.js +1 -1
  73. package/lib/form/Filter/Layout.d.ts +5 -0
  74. package/lib/form/Filter/Layout.js +102 -0
  75. package/lib/form/Filter/SimpleFilter.js +29 -4
  76. package/lib/form/Filter/index2.d.ts +2 -1
  77. package/lib/form/Filter/index2.js +101 -114
  78. package/lib/form/Filter/index2.scss +16 -45
  79. package/lib/form/Filter/layout.scss +36 -0
  80. package/lib/form/Filter/useSpecialProps.d.ts +6 -0
  81. package/lib/form/Filter/useSpecialProps.js +46 -0
  82. package/lib/form/ProForm/customComponent.d.ts +3 -0
  83. package/lib/form/ProForm/customComponent.js +28 -0
  84. package/lib/form/ProForm/index.scss +5 -6
  85. package/lib/form/ProForm/useFormDisplayValues.js +17 -24
  86. package/lib/form/SchemaForm/adapterType.js +1 -0
  87. package/lib/form/SchemaForm/index.js +8 -6
  88. package/lib/form/SchemaForm/initializeDataSource.d.ts +1 -1
  89. package/lib/form/SchemaForm/initializeDataSource.js +2 -2
  90. package/lib/form/SchemaForm/initializeRequest.d.ts +1 -1
  91. package/lib/form/SchemaForm/initializeRequest.js +2 -2
  92. package/lib/form/SchemaForm/initializeRules.d.ts +1 -1
  93. package/lib/form/SchemaForm/initializeRules.js +3 -3
  94. package/lib/form/fieldTypeMap.js +2 -1
  95. package/lib/form/index.d.ts +4 -2
  96. package/lib/form/index.js +19 -1
  97. package/lib/form/typing.d.ts +16 -1
  98. package/lib/form/utils.d.ts +2 -2
  99. package/lib/form/utils.js +2 -2
  100. package/lib/index.d.ts +5 -2
  101. package/lib/index.js +35 -3
  102. package/lib/info/index.scss +1 -1
  103. package/lib/nocode/pages/renderer.js +1 -1
  104. package/lib/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
  105. package/lib/step/ProStepItem/components/HozStepItem/index.js +258 -0
  106. package/lib/step/ProStepItem/components/HozStepItem/index.scss +279 -0
  107. package/lib/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
  108. package/lib/step/ProStepItem/components/VerStepItem/index.js +315 -0
  109. package/lib/step/ProStepItem/components/VerStepItem/index.scss +287 -0
  110. package/lib/step/ProStepItem/index.d.ts +4 -0
  111. package/lib/step/ProStepItem/index.js +69 -0
  112. package/lib/step/index.d.ts +9 -0
  113. package/lib/step/index.js +124 -0
  114. package/lib/step/typing.d.ts +96 -0
  115. package/lib/step/typing.js +5 -0
  116. package/lib/table/components/Filter/index.js +2 -17
  117. package/lib/table/components/Layout/index.js +61 -167
  118. package/lib/table/components/Layout/index.scss +4 -3
  119. package/lib/table/components/Pagination/index.js +1 -0
  120. package/lib/table/components/ToolBar/FullScreenIcon.js +4 -9
  121. package/lib/table/components/ToolBar/Fullscreen.js +22 -11
  122. package/lib/table/index.js +85 -100
  123. package/lib/table/typing.d.ts +14 -3
  124. package/lib/table/utils/columnRender.js +21 -3
  125. package/lib/table/utils/index.d.ts +7 -0
  126. package/lib/table/utils/index.js +38 -0
  127. package/lib/utils/index.d.ts +1 -0
  128. package/lib/utils/index.js +13 -0
  129. package/package.json +4 -4
@@ -56,7 +56,7 @@ require("./index.scss");
56
56
  var _excluded = ["type"],
57
57
  _excluded2 = ["config", "icon", "iconSize", "type", "context", "children", "visible", "onClick"],
58
58
  _excluded3 = ["loading"],
59
- _excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type"],
59
+ _excluded4 = ["icon", "iconSize", "label", "actions", "children", "context", "type", "className", "noArrow"],
60
60
  _excluded5 = ["context", "text"],
61
61
  _excluded6 = ["key", "actions"],
62
62
  _excluded7 = ["key", "config"],
@@ -248,6 +248,12 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
248
248
  };
249
249
 
250
250
  function renderCommonActionButtonMenuItem(action, key, context) {
251
+ if (action.type === 'divider') {
252
+ return /*#__PURE__*/_react.default.createElement(_components.Menu.Divider, {
253
+ key: key
254
+ });
255
+ }
256
+
251
257
  var menuBtn = action;
252
258
 
253
259
  if (menuBtn.actions && menuBtn.actions.length && menuBtn.disabled !== true) {
@@ -275,6 +281,8 @@ var ProActionMenuButton = function ProActionMenuButton(props) {
275
281
  context = props.context,
276
282
  _props$type2 = props.type,
277
283
  type = _props$type2 === void 0 ? 'primary' : _props$type2,
284
+ className = props.className,
285
+ noArrow = props.noArrow,
278
286
  others = _objectWithoutProperties(props, _excluded4);
279
287
 
280
288
  return /*#__PURE__*/_react.default.createElement(_components.MenuButton, _objectSpread({
@@ -288,31 +296,55 @@ var ProActionMenuButton = function ProActionMenuButton(props) {
288
296
  v2: true
289
297
  },
290
298
  type: type,
291
- label: buttonContent(label || children, icon, iconSize, context)
299
+ label: buttonContent(label || children, icon, iconSize, context),
300
+ className: (0, _classnames.default)(className, {
301
+ 'teamix-pro-actions-text-menu-btn-no-arrow': noArrow
302
+ })
292
303
  }, others), actions.map(function (action, i) {
293
304
  return renderCommonActionButtonMenuItem(action, action.key || i, context);
294
305
  }));
295
- }; // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
306
+ }; // 超出 max,则折叠起来
296
307
 
297
308
 
298
309
  exports.ProActionMenuButton = ProActionMenuButton;
299
310
 
300
- function formatGroupActions(actions, max, moreConfig) {
301
- var MAX = max < 1 ? MAX_ACTTIONS : max;
302
-
303
- if (actions.length <= MAX) {
311
+ function foldExtraActions(actions, max, moreConfig) {
312
+ if (actions.length <= max) {
304
313
  return actions;
305
314
  }
306
315
 
307
- return [].concat(_toConsumableArray(actions.slice(0, MAX - 1)), [_objectSpread(_objectSpread({
316
+ return [].concat(_toConsumableArray(actions.slice(0, max - 1)), [_objectSpread(_objectSpread({
308
317
  key: '__teamix_pro_action_group_more_btn'
309
318
  }, moreConfig), {}, {
310
- actions: actions.slice(MAX - 1)
319
+ actions: actions.slice(max - 1)
311
320
  })]);
321
+ } // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
322
+ // divider 不计数
323
+
324
+
325
+ function formatGroupActions(actions, max, moreConfig) {
326
+ var MAX = max < 1 ? MAX_ACTTIONS : max;
327
+ var count = 0;
328
+ var index = 0;
329
+
330
+ for (; index < actions.length && count < MAX; index++) {
331
+ if (actions[index].type !== 'divider') {
332
+ count += 1;
333
+ }
334
+ }
335
+
336
+ return foldExtraActions(actions, Math.max(index, MAX), moreConfig);
312
337
  } // 渲染一个 button 或者 menu button
313
338
 
314
339
 
315
340
  function renderCommonActionButton(button, context, isTypeText) {
341
+ if (button.type === 'divider') {
342
+ return /*#__PURE__*/_react.default.createElement(_components.Divider, {
343
+ key: button.key,
344
+ direction: "ver"
345
+ });
346
+ }
347
+
316
348
  var buttonContext = button.context,
317
349
  text = button.text,
318
350
  others = _objectWithoutProperties(button, _excluded5);
@@ -330,18 +362,27 @@ function renderCommonActionButton(button, context, isTypeText) {
330
362
  }
331
363
 
332
364
  function getDefaultMoreButton(type, more) {
333
- var moreConfig = typeof more === 'string' ? {
334
- children: more
335
- } : more;
336
365
  var defaultConfig = type === 'button' ? {
337
366
  children: (0, _utils.getMessage)('more')
338
367
  } : {
339
368
  icon: 'more-line',
340
- // iconSize: 'small',
341
369
  autoWidth: false,
342
- className: 'teamix-pro-actions-text-menu-btn-no-arrow'
370
+ noArrow: true
343
371
  };
344
- return Object.assign(defaultConfig, moreConfig);
372
+
373
+ if (!more) {
374
+ return defaultConfig;
375
+ }
376
+
377
+ var moreConfig = typeof more === 'string' ? {
378
+ children: more
379
+ } : more;
380
+
381
+ if (type === 'button') {
382
+ return Object.assign(defaultConfig, moreConfig);
383
+ }
384
+
385
+ return moreConfig;
345
386
  }
346
387
 
347
388
  var MAX_ACTTIONS = 4;
@@ -2,12 +2,23 @@
2
2
  display: flex;
3
3
  align-items: center;
4
4
  flex-wrap: wrap;
5
+
6
+ & > .next-divider {
7
+ & + .next-divider {
8
+ display: none;
9
+ }
10
+ }
11
+
5
12
  &.teamix-pro-actions-type-button {
6
13
  & > button {
7
14
  &:not(:last-child) {
8
15
  margin-right: var(--s-2);
9
16
  }
10
17
  }
18
+ & > .next-divider {
19
+ margin-left: 0;
20
+ margin-right: var(--s-2);
21
+ }
11
22
  }
12
23
 
13
24
  &.teamix-pro-actions-type-text:not(.teamix-pro-actions-divider) {
@@ -109,4 +120,4 @@
109
120
  }
110
121
  }
111
122
  }
112
- }
123
+ }
@@ -72,7 +72,7 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
72
72
  props: {
73
73
  breakpoints: [480, 720, 990, 1200, Infinity],
74
74
  maxColumns: [1, 2, 3, 3, 4],
75
- maxWidth: [480, 360, 330, 330, 300],
75
+ maxWidth: [480, 360, 330, 400],
76
76
  columnGap: 16,
77
77
  rowGap: 12
78
78
  },
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { QueryFilterLayoutProps } from '../typing';
3
+ import './layout.scss';
4
+ declare const QueryFilterLayout: React.FC<QueryFilterLayoutProps>;
5
+ export { QueryFilterLayout };
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.QueryFilterLayout = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _components = require("@alicloudfe/components");
15
+
16
+ var _icon = _interopRequireDefault(require("@teamix/icon"));
17
+
18
+ var _utils = require("@teamix/utils");
19
+
20
+ require("./layout.scss");
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
+
24
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
+
26
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+
28
+ 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; }
29
+
30
+ 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; }
31
+
32
+ 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; }
33
+
34
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
35
+
36
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
37
+
38
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
39
+
40
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
41
+
42
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
43
+
44
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
+
46
+ var QueryFilterLayout = function QueryFilterLayout(_ref) {
47
+ var className = _ref.className,
48
+ addonBefore = _ref.addonBefore,
49
+ addonAfter = _ref.addonAfter,
50
+ inlineContent = _ref.inlineContent,
51
+ panelContent = _ref.panelContent,
52
+ count = _ref.count,
53
+ expand = _ref.expand,
54
+ onExpand = _ref.onExpand,
55
+ children = _ref.children;
56
+ var prefixCls = (0, _utils.usePrefixCls)('', {
57
+ prefix: 'teamix-pro-form-query-filter-layout'
58
+ });
59
+
60
+ var _useState = (0, _react.useState)(!!expand),
61
+ _useState2 = _slicedToArray(_useState, 2),
62
+ visible = _useState2[0],
63
+ setVisible = _useState2[1];
64
+
65
+ var onClick = (0, _react.useCallback)(function () {
66
+ setVisible(!visible);
67
+ onExpand === null || onExpand === void 0 ? void 0 : onExpand(!visible);
68
+ }, [visible]);
69
+ return /*#__PURE__*/_react.default.createElement("div", {
70
+ className: (0, _classnames.default)(prefixCls, className)
71
+ }, /*#__PURE__*/_react.default.createElement("div", {
72
+ className: "".concat(prefixCls, "-inline")
73
+ }, /*#__PURE__*/_react.default.createElement("div", {
74
+ className: "".concat(prefixCls, "-left")
75
+ }, addonBefore ? /*#__PURE__*/_react.default.createElement("div", {
76
+ className: "".concat(prefixCls, "-addonBefore")
77
+ }, addonBefore) : null, inlineContent, (0, _utils.isValid)(panelContent) ? /*#__PURE__*/_react.default.createElement("div", {
78
+ className: "".concat(prefixCls, "-toggle")
79
+ }, /*#__PURE__*/_react.default.createElement(_components.Badge, {
80
+ count: count,
81
+ style: _objectSpread({
82
+ backgroundColor: 'var(--color-brand1-6, #0064c8)',
83
+ color: 'var(--color-white, #fff)'
84
+ }, visible ? {
85
+ display: 'none'
86
+ } : {})
87
+ }, /*#__PURE__*/_react.default.createElement(_components.Button, {
88
+ onClick: onClick
89
+ }, visible ? /*#__PURE__*/_react.default.createElement(_icon.default, {
90
+ type: "up-line"
91
+ }) : /*#__PURE__*/_react.default.createElement(_icon.default, {
92
+ type: "filter-line"
93
+ }), (0, _utils.getMessage)('advancedFilter')))) : null), addonAfter ? /*#__PURE__*/_react.default.createElement("div", {
94
+ className: "".concat(prefixCls, "-addonAfter")
95
+ }, addonAfter) : null), /*#__PURE__*/_react.default.createElement("div", {
96
+ className: (0, _classnames.default)("".concat(prefixCls, "-panel"), visible && (0, _utils.isValid)(panelContent) ? '' : "".concat(prefixCls, "-panel-hidden"))
97
+ }, panelContent), /*#__PURE__*/_react.default.createElement("div", {
98
+ className: "".concat(prefixCls, "-children")
99
+ }, children));
100
+ };
101
+
102
+ exports.QueryFilterLayout = QueryFilterLayout;
@@ -33,9 +33,12 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
33
33
 
34
34
  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; }
35
35
 
36
+ // 初始化Search组件,内置部分属性
36
37
  var initializeSearch = function initializeSearch(schema) {
37
- return schema.map(function (item) {
38
+ var searchName;
39
+ var initializedSchema = schema.map(function (item) {
38
40
  if (item.component === 'Search') {
41
+ searchName = item.name;
39
42
  return _objectSpread(_objectSpread({}, item), {}, {
40
43
  decoratorProps: _objectSpread(_objectSpread({}, item.decoratorProps), {}, {
41
44
  inset: false
@@ -48,6 +51,10 @@ var initializeSearch = function initializeSearch(schema) {
48
51
 
49
52
  return item;
50
53
  });
54
+ return {
55
+ searchName: searchName,
56
+ initializedSchema: initializedSchema
57
+ };
51
58
  };
52
59
  /**
53
60
  * 简单筛选
@@ -55,6 +62,8 @@ var initializeSearch = function initializeSearch(schema) {
55
62
 
56
63
 
57
64
  var SimpleFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
65
+ var searchValue = (0, _react.useRef)(undefined);
66
+
58
67
  var schema = props.schema,
59
68
  onChange = props.onChange,
60
69
  onSubmit = props.onSubmit,
@@ -63,13 +72,18 @@ var SimpleFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
63
72
  var prefixCls = (0, _utils.usePrefixCls)('', {
64
73
  prefix: 'teamix-pro-form-query-filter-simple'
65
74
  });
75
+
76
+ var _initializeSearch = initializeSearch(schema),
77
+ searchName = _initializeSearch.searchName,
78
+ initializedSchema = _initializeSearch.initializedSchema;
79
+
66
80
  var simpleSchema = (0, _react.useMemo)(function () {
67
81
  return [{
68
82
  component: 'FormFlex',
69
83
  props: {
70
84
  size: 8
71
85
  },
72
- children: initializeSearch(schema)
86
+ children: initializedSchema
73
87
  }, {
74
88
  component: 'Submit',
75
89
  props: {
@@ -78,7 +92,18 @@ var SimpleFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
78
92
  }
79
93
  }
80
94
  }];
81
- }, [schema]);
95
+ }, [initializedSchema]);
96
+ var onInnerChange = (0, _react.useCallback)(function (values, value, name) {
97
+ // 处理Search组件,Select切换时不触发onChange
98
+ if (searchName === name) {
99
+ if (searchValue.current !== value[1]) {
100
+ onChange === null || onChange === void 0 ? void 0 : onChange(values, name, value);
101
+ searchValue.current = value[1];
102
+ }
103
+ } else {
104
+ onChange === null || onChange === void 0 ? void 0 : onChange(values, name, value);
105
+ }
106
+ }, [searchName, searchValue.current]);
82
107
  return /*#__PURE__*/_react.default.createElement(_ProForm.default, _objectSpread(_objectSpread({}, otherProps), {}, {
83
108
  className: (0, _classnames.default)(prefixCls, props.className),
84
109
  schema: simpleSchema,
@@ -86,7 +111,7 @@ var SimpleFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
86
111
  breakpoints: [],
87
112
  inset: true,
88
113
  onSubmit: onSubmit,
89
- onChange: onChange
114
+ onChange: onInnerChange
90
115
  }));
91
116
  });
92
117
  var _default = SimpleFilter;
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
+ import { QueryFilterLayout } from './Layout';
2
3
  import type { QueryFilterProps } from '../typing';
3
4
  import './index2.scss';
4
5
  /**
5
6
  * 查询筛选
6
7
  */
7
8
  declare const QueryFilter: React.FC<QueryFilterProps>;
8
- export { QueryFilter };
9
+ export { QueryFilter, QueryFilterLayout };