@zat-design/sisyphus-react 3.4.2-beta.25 → 3.4.2-beta.27

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.
@@ -2691,7 +2691,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2691
2691
  .pro-form .ant-form-item.pro-form-item-changed .ant-select-selector input,
2692
2692
  .pro-form .ant-form-item.pro-form-item-changed .ant-picker input,
2693
2693
  .pro-form .ant-form-item.pro-form-item-changed .ant-input-number input {
2694
- background: var(--zaui-contract-bg, #fffaa1);
2694
+ background: transparent;
2695
2695
  }
2696
2696
  .pro-form .ant-form-item.pro-form-item-changed span.ant-input-affix-wrapper .ant-select-selection-placeholder,
2697
2697
  .pro-form .ant-form-item.pro-form-item-changed .ant-select-selector .ant-select-selection-placeholder,
package/dist/less.esm.css CHANGED
@@ -2691,7 +2691,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2691
2691
  .pro-form .ant-form-item.pro-form-item-changed .ant-select-selector input,
2692
2692
  .pro-form .ant-form-item.pro-form-item-changed .ant-picker input,
2693
2693
  .pro-form .ant-form-item.pro-form-item-changed .ant-input-number input {
2694
- background: var(--zaui-contract-bg, #fffaa1);
2694
+ background: transparent;
2695
2695
  }
2696
2696
  .pro-form .ant-form-item.pro-form-item-changed span.ant-input-affix-wrapper .ant-select-selection-placeholder,
2697
2697
  .pro-form .ant-form-item.pro-form-item-changed .ant-select-selector .ant-select-selection-placeholder,
@@ -300,7 +300,7 @@ var RenderField = function RenderField(_ref) {
300
300
  }
301
301
  _args = [].concat(args);
302
302
  rowPath = [].concat(_toConsumableArray(namePath), [index]);
303
- row = form.getFieldValue(rowPath, true);
303
+ row = type === 'Group' ? _args[1] : form.getFieldValue(rowPath, true);
304
304
  orgRow = cloneDeep(row);
305
305
  if (!onFieldChange) {
306
306
  _context.next = 18;
@@ -473,6 +473,7 @@ var RenderField = function RenderField(_ref) {
473
473
  disabled: _disabled,
474
474
  onChange: _onchange,
475
475
  onBlur: _onblur,
476
+ index: index,
476
477
  otherProps: {
477
478
  form: form,
478
479
  names: names,
@@ -482,8 +483,10 @@ var RenderField = function RenderField(_ref) {
482
483
  isView: isView
483
484
  }
484
485
  });
485
- if (type !== 'Group') {
486
- componentProps = omit(componentProps, ['onFieldChange']);
486
+ if (type === 'Group') {
487
+ componentProps.onFieldChange = _onchange;
488
+ } else {
489
+ componentProps = omit(componentProps, ['onFieldChange', 'namePath', 'index']);
487
490
  }
488
491
  // 单元格编辑时,设置各个单元格disabled属性
489
492
  if (isCell) {
@@ -534,6 +537,9 @@ var RenderField = function RenderField(_ref) {
534
537
  children: !originalDiffTip || ['FormList', 'ProEditTable'].includes(type) ? FormItem : _jsx(_Tooltip, {
535
538
  title: originalTitle,
536
539
  open: changed ? undefined : false,
540
+ getPopupContainer: function getPopupContainer(target) {
541
+ return target.parentElement;
542
+ },
537
543
  children: FormItem
538
544
  })
539
545
  });
@@ -23,7 +23,9 @@ var Group = function Group(props) {
23
23
  id = props.id,
24
24
  value = props.value,
25
25
  isView = props.isView,
26
- onFieldChange = props.onFieldChange;
26
+ index = props.index,
27
+ onFieldChange = props.onFieldChange,
28
+ namePath = props.namePath;
27
29
  var _ref = ProForm.useFieldProps() || {},
28
30
  names = _ref.names,
29
31
  name = _ref.name,
@@ -39,7 +41,8 @@ var Group = function Group(props) {
39
41
  }, item), {}, {
40
42
  isView: isView !== null && isView !== void 0 ? isView : item.isView,
41
43
  noStyle: (space === null || space === void 0 ? void 0 : space.compact) || (space === null || space === void 0 ? void 0 : space.separator),
42
- parentNames: id
44
+ parentNames: id,
45
+ namePath: namePath
43
46
  });
44
47
  });
45
48
  var node = _jsx(_Button, {
@@ -67,8 +70,10 @@ var Group = function Group(props) {
67
70
  var touchName = ((_document = document) === null || _document === void 0 ? void 0 : (_document$activeEleme = _document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.id) || '';
68
71
  // 模拟change,初始化不执行onFieldChange
69
72
  if (isFunction(onFieldChange) && form.isFieldsTouched(names) && transformNamesString(names).includes(touchName)) {
70
- onFieldChange(value, form.getFieldsValue(), {
71
- form: form
73
+ onFieldChange(value, namePath ? form.getFieldValue(namePath, true) : form.getFieldsValue(), {
74
+ form: form,
75
+ namePath: namePath,
76
+ index: index
72
77
  });
73
78
  }
74
79
  }, [value]);
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { RowProps, SpaceProps } from 'antd';
3
3
  import { FormInstance } from 'antd/es/form/Form';
4
+ import { NamePath } from 'antd/lib/form/interface';
4
5
  import { ProColumnProps, ProFormOtherProps } from '../../../propsType';
5
6
  export interface SpaceType extends SpaceProps {
6
7
  /**
@@ -24,7 +25,11 @@ export interface GroupProps {
24
25
  id?: string;
25
26
  disabled?: boolean | (() => void);
26
27
  isView?: boolean;
28
+ namePath?: NamePath;
29
+ index?: number;
27
30
  onFieldChange?: (value: any[] | null, record: any, { form, }: {
28
31
  form: FormInstance;
32
+ namePath?: NamePath;
33
+ index?: number;
29
34
  }) => any;
30
35
  }
@@ -447,6 +447,9 @@ var Render = function Render(props) {
447
447
  return _jsx(_Tooltip, {
448
448
  title: title,
449
449
  visible: changed ? undefined : false,
450
+ getPopupContainer: function getPopupContainer(target) {
451
+ return target.parentElement;
452
+ },
450
453
  children: formItem
451
454
  });
452
455
  };
@@ -131,7 +131,7 @@
131
131
  background: @zaui-contract-bg !important;
132
132
 
133
133
  input {
134
- background: @zaui-contract-bg;
134
+ background: transparent;
135
135
  }
136
136
  .@{ant-prefix}-select-selection-placeholder {
137
137
  z-index: 9;
@@ -303,7 +303,7 @@ var RenderField = function RenderField(_ref) {
303
303
  }
304
304
  _args = [].concat(args);
305
305
  rowPath = [].concat((0, _toConsumableArray2.default)(namePath), [index]);
306
- row = form.getFieldValue(rowPath, true);
306
+ row = type === 'Group' ? _args[1] : form.getFieldValue(rowPath, true);
307
307
  orgRow = (0, _lodash.cloneDeep)(row);
308
308
  if (!onFieldChange) {
309
309
  _context.next = 18;
@@ -476,6 +476,7 @@ var RenderField = function RenderField(_ref) {
476
476
  disabled: _disabled,
477
477
  onChange: _onchange,
478
478
  onBlur: _onblur,
479
+ index: index,
479
480
  otherProps: {
480
481
  form: form,
481
482
  names: names,
@@ -485,8 +486,10 @@ var RenderField = function RenderField(_ref) {
485
486
  isView: isView
486
487
  }
487
488
  });
488
- if (type !== 'Group') {
489
- componentProps = (0, _lodash.omit)(componentProps, ['onFieldChange']);
489
+ if (type === 'Group') {
490
+ componentProps.onFieldChange = _onchange;
491
+ } else {
492
+ componentProps = (0, _lodash.omit)(componentProps, ['onFieldChange', 'namePath', 'index']);
490
493
  }
491
494
  // 单元格编辑时,设置各个单元格disabled属性
492
495
  if (isCell) {
@@ -537,6 +540,9 @@ var RenderField = function RenderField(_ref) {
537
540
  children: !originalDiffTip || ['FormList', 'ProEditTable'].includes(type) ? FormItem : (0, _jsxRuntime.jsx)(_antd.Tooltip, {
538
541
  title: originalTitle,
539
542
  open: changed ? undefined : false,
543
+ getPopupContainer: function getPopupContainer(target) {
544
+ return target.parentElement;
545
+ },
540
546
  children: FormItem
541
547
  })
542
548
  });
@@ -27,7 +27,9 @@ var Group = function Group(props) {
27
27
  id = props.id,
28
28
  value = props.value,
29
29
  isView = props.isView,
30
- onFieldChange = props.onFieldChange;
30
+ index = props.index,
31
+ onFieldChange = props.onFieldChange,
32
+ namePath = props.namePath;
31
33
  var _ref = _ProForm.default.useFieldProps() || {},
32
34
  names = _ref.names,
33
35
  name = _ref.name,
@@ -43,7 +45,8 @@ var Group = function Group(props) {
43
45
  }, item), {}, {
44
46
  isView: isView !== null && isView !== void 0 ? isView : item.isView,
45
47
  noStyle: (space === null || space === void 0 ? void 0 : space.compact) || (space === null || space === void 0 ? void 0 : space.separator),
46
- parentNames: id
48
+ parentNames: id,
49
+ namePath: namePath
47
50
  });
48
51
  });
49
52
  var node = (0, _jsxRuntime.jsx)(_antd.Button, {
@@ -71,8 +74,10 @@ var Group = function Group(props) {
71
74
  var touchName = ((_document = document) === null || _document === void 0 ? void 0 : (_document$activeEleme = _document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.id) || '';
72
75
  // 模拟change,初始化不执行onFieldChange
73
76
  if ((0, _lodash.isFunction)(onFieldChange) && form.isFieldsTouched(names) && (0, _utils.transformNamesString)(names).includes(touchName)) {
74
- onFieldChange(value, form.getFieldsValue(), {
75
- form: form
77
+ onFieldChange(value, namePath ? form.getFieldValue(namePath, true) : form.getFieldsValue(), {
78
+ form: form,
79
+ namePath: namePath,
80
+ index: index
76
81
  });
77
82
  }
78
83
  }, [value]);
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { RowProps, SpaceProps } from 'antd';
3
3
  import { FormInstance } from 'antd/es/form/Form';
4
+ import { NamePath } from 'antd/lib/form/interface';
4
5
  import { ProColumnProps, ProFormOtherProps } from '../../../propsType';
5
6
  export interface SpaceType extends SpaceProps {
6
7
  /**
@@ -24,7 +25,11 @@ export interface GroupProps {
24
25
  id?: string;
25
26
  disabled?: boolean | (() => void);
26
27
  isView?: boolean;
28
+ namePath?: NamePath;
29
+ index?: number;
27
30
  onFieldChange?: (value: any[] | null, record: any, { form, }: {
28
31
  form: FormInstance;
32
+ namePath?: NamePath;
33
+ index?: number;
29
34
  }) => any;
30
35
  }
@@ -445,6 +445,9 @@ var Render = function Render(props) {
445
445
  return (0, _jsxRuntime.jsx)(_antd.Tooltip, {
446
446
  title: title,
447
447
  visible: changed ? undefined : false,
448
+ getPopupContainer: function getPopupContainer(target) {
449
+ return target.parentElement;
450
+ },
448
451
  children: formItem
449
452
  });
450
453
  };
@@ -131,7 +131,7 @@
131
131
  background: @zaui-contract-bg !important;
132
132
 
133
133
  input {
134
- background: @zaui-contract-bg;
134
+ background: transparent;
135
135
  }
136
136
  .@{ant-prefix}-select-selection-placeholder {
137
137
  z-index: 9;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.4.2-beta.25",
3
+ "version": "3.4.2-beta.27",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",