@zat-design/sisyphus-react 3.2.0 → 3.2.1-beta.1

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 (112) hide show
  1. package/dist/index.esm.css +25 -21
  2. package/es/ProDownload/utils.js +0 -2
  3. package/es/ProForm/components/base/Checkbox/index.d.ts +1 -0
  4. package/es/ProForm/components/base/Checkbox/index.js +5 -3
  5. package/es/ProForm/components/base/DatePicker/index.js +3 -2
  6. package/es/ProForm/components/base/Input/index.js +4 -2
  7. package/es/ProForm/components/base/Input/propsType.d.ts +1 -0
  8. package/es/ProForm/components/base/InputNumber/index.d.ts +1 -0
  9. package/es/ProForm/components/base/InputNumber/index.js +5 -3
  10. package/es/ProForm/components/base/ProCascader/index.js +6 -6
  11. package/es/ProForm/components/base/Radio/index.d.ts +1 -0
  12. package/es/ProForm/components/base/Radio/index.js +4 -2
  13. package/es/ProForm/components/base/RangePicker/index.d.ts +1 -0
  14. package/es/ProForm/components/base/RangePicker/index.js +5 -3
  15. package/es/ProForm/components/base/Select/index.d.ts +1 -0
  16. package/es/ProForm/components/base/Select/index.js +4 -2
  17. package/es/ProForm/components/base/Switch/index.d.ts +1 -0
  18. package/es/ProForm/components/base/Switch/index.js +4 -2
  19. package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
  20. package/es/ProForm/components/base/SwitchCheckbox/index.js +4 -2
  21. package/es/ProForm/components/base/TextArea/index.d.ts +1 -0
  22. package/es/ProForm/components/base/TextArea/index.js +4 -3
  23. package/es/ProForm/components/base/TimePicker/index.d.ts +1 -0
  24. package/es/ProForm/components/base/TimePicker/index.js +4 -2
  25. package/es/ProForm/components/combination/Container/index.js +7 -5
  26. package/es/ProForm/components/combination/FormList/index.js +6 -5
  27. package/es/ProForm/components/combination/FormList/style/index.less +1 -1
  28. package/es/ProForm/components/combination/Group/index.js +6 -3
  29. package/es/ProForm/components/combination/ProAddressBar/index.js +29 -30
  30. package/es/ProForm/components/combination/ProCombination/index.js +10 -11
  31. package/es/ProForm/components/combination/ProModalSelect/index.js +4 -5
  32. package/es/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
  33. package/es/ProForm/components/combination/ProNumberRange/index.js +7 -7
  34. package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
  35. package/es/ProForm/components/combination/ProRangeLimit/index.js +4 -2
  36. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
  37. package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -2
  38. package/es/ProForm/components/render/Render.js +47 -18
  39. package/es/ProForm/components/render/RenderFields.d.ts +1 -0
  40. package/es/ProForm/components/render/RenderFields.js +4 -2
  41. package/es/ProForm/index.js +5 -2
  42. package/es/ProForm/propsType.d.ts +1 -0
  43. package/es/ProForm/style/index.less +43 -42
  44. package/es/ProForm/utils/useChanged.d.ts +1 -1
  45. package/es/ProForm/utils/useChanged.js +9 -8
  46. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +7 -13
  47. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +6 -7
  48. package/es/ProLayout/components/ProHeader/style/index.less +1 -1
  49. package/es/ProSelect/index.js +6 -3
  50. package/es/ProTree/style/index.less +2 -2
  51. package/es/ProTreeModal/style/index.less +13 -13
  52. package/lib/ProEditTable/components/RenderField/index.js +0 -2
  53. package/lib/ProForm/components/base/Checkbox/index.d.ts +1 -0
  54. package/lib/ProForm/components/base/Checkbox/index.js +5 -3
  55. package/lib/ProForm/components/base/DatePicker/index.js +3 -2
  56. package/lib/ProForm/components/base/Input/index.js +4 -2
  57. package/lib/ProForm/components/base/Input/propsType.d.ts +1 -0
  58. package/lib/ProForm/components/base/InputNumber/index.d.ts +1 -0
  59. package/lib/ProForm/components/base/InputNumber/index.js +5 -3
  60. package/lib/ProForm/components/base/ProCascader/index.js +6 -6
  61. package/lib/ProForm/components/base/Radio/index.d.ts +1 -0
  62. package/lib/ProForm/components/base/Radio/index.js +4 -2
  63. package/lib/ProForm/components/base/RangePicker/index.d.ts +1 -0
  64. package/lib/ProForm/components/base/RangePicker/index.js +6 -4
  65. package/lib/ProForm/components/base/Select/index.d.ts +1 -0
  66. package/lib/ProForm/components/base/Select/index.js +4 -2
  67. package/lib/ProForm/components/base/Switch/index.d.ts +1 -0
  68. package/lib/ProForm/components/base/Switch/index.js +4 -2
  69. package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
  70. package/lib/ProForm/components/base/SwitchCheckbox/index.js +4 -2
  71. package/lib/ProForm/components/base/TextArea/index.d.ts +1 -0
  72. package/lib/ProForm/components/base/TextArea/index.js +4 -3
  73. package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -0
  74. package/lib/ProForm/components/base/TimePicker/index.js +4 -2
  75. package/lib/ProForm/components/combination/Container/index.js +7 -5
  76. package/lib/ProForm/components/combination/FormList/index.js +6 -5
  77. package/lib/ProForm/components/combination/FormList/style/index.less +1 -1
  78. package/lib/ProForm/components/combination/Group/index.js +6 -3
  79. package/lib/ProForm/components/combination/ProAddressBar/index.js +29 -30
  80. package/lib/ProForm/components/combination/ProCombination/index.js +10 -11
  81. package/lib/ProForm/components/combination/ProModalSelect/index.js +4 -5
  82. package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
  83. package/lib/ProForm/components/combination/ProNumberRange/index.js +7 -7
  84. package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
  85. package/lib/ProForm/components/combination/ProRangeLimit/index.js +4 -2
  86. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
  87. package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -2
  88. package/lib/ProForm/components/old/InputRange/index.js +1 -0
  89. package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
  90. package/lib/ProForm/components/render/Render.js +46 -20
  91. package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
  92. package/lib/ProForm/components/render/RenderFields.js +4 -2
  93. package/lib/ProForm/index.js +5 -2
  94. package/lib/ProForm/propsType.d.ts +1 -0
  95. package/lib/ProForm/style/index.less +43 -42
  96. package/lib/ProForm/utils/useChanged.d.ts +1 -1
  97. package/lib/ProForm/utils/useChanged.js +9 -8
  98. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +6 -12
  99. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +6 -7
  100. package/lib/ProLayout/components/ProHeader/style/index.less +1 -1
  101. package/lib/ProSelect/index.js +6 -3
  102. package/lib/ProTable/components/TableResizable/index.js +0 -8
  103. package/lib/ProTabs/index.js +0 -1
  104. package/lib/ProThemeTools/index.js +0 -1
  105. package/lib/ProTree/components/Tree.js +0 -7
  106. package/lib/ProTree/index.js +1 -0
  107. package/lib/ProTree/style/index.less +2 -2
  108. package/lib/ProTreeModal/components/Tree.js +0 -1
  109. package/lib/ProTreeModal/style/index.less +13 -13
  110. package/lib/ProUpload/index.js +0 -7
  111. package/lib/old/ProCertValidity/index.js +1 -1
  112. package/package.json +1 -1
@@ -331,8 +331,7 @@
331
331
  line-height: initial !important;
332
332
  height: auto !important;
333
333
  margin: 0;
334
- padding-top: 12px;
335
- padding-bottom: calc(var(--zaui-space-size-md, 16px) * var(--zaui-size, 1) - var(--zaui-space-size-xs, 4px) * var(--zaui-size, 1));
334
+ padding: 12px 0;
336
335
  min-height: 48px;
337
336
  }
338
337
  .pro-layout-open-menu .ant-menu-title-content div {
@@ -818,7 +817,7 @@
818
817
  }
819
818
  .pro-header {
820
819
  background-color: var(--zaui-base-bg, #ffffff);
821
- padding: calc(var(--zaui-space-size-md, 16px) * var(--zaui-size, 1) + var(--zaui-space-size-sm, 8px) * var(--zaui-size, 1)) 0 0 0;
820
+ padding: 24px 0 0 0;
822
821
  }
823
822
  .pro-header.pro-header-no-back .pro-header-top {
824
823
  padding-left: 0;
@@ -1960,7 +1959,7 @@ div.pro-textarea-view::after {
1960
1959
  -webkit-align-items: center;
1961
1960
  -ms-flex-align: center;
1962
1961
  align-items: center;
1963
- height: calc(var(--zaui-height-size-lg, 32px) * var(--zaui-size, 1));
1962
+ height: 32px;
1964
1963
  margin-bottom: calc(var(--zaui-space-size-md, 16px) * var(--zaui-size, 1));
1965
1964
  padding: 0;
1966
1965
  padding-right: calc(var(--zaui-space-size-sm, 8px) * var(--zaui-size, 1));
@@ -2420,8 +2419,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2420
2419
  -webkit-align-items: center;
2421
2420
  -ms-flex-align: center;
2422
2421
  align-items: center;
2423
- margin-bottom: 0;
2424
2422
  height: auto;
2423
+ margin-bottom: 0;
2425
2424
  padding-top: 6px;
2426
2425
  }
2427
2426
  .pro-form.ant-form-vertical .pro-form-custom-footer .ant-space-align-center {
@@ -2506,13 +2505,18 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2506
2505
  .pro-form .ant-form-item.pro-form-item-changed span.ant-input-affix-wrapper,
2507
2506
  .pro-form .ant-form-item.pro-form-item-changed .ant-select-selector,
2508
2507
  .pro-form .ant-form-item.pro-form-item-changed .ant-picker {
2509
- background: var(--zaui-contract-bg, #fffaa1);
2508
+ background: var(--zaui-contract-bg, #fffaa1) !important;
2510
2509
  }
2511
2510
  .pro-form .ant-form-item.pro-form-item-changed span.ant-input-affix-wrapper input,
2512
2511
  .pro-form .ant-form-item.pro-form-item-changed .ant-select-selector input,
2513
2512
  .pro-form .ant-form-item.pro-form-item-changed .ant-picker input {
2514
2513
  background: var(--zaui-contract-bg, #fffaa1);
2515
2514
  }
2515
+ .pro-form .ant-form-item.pro-form-item-changed span.ant-input-affix-wrapper .ant-select-selection-placeholder,
2516
+ .pro-form .ant-form-item.pro-form-item-changed .ant-select-selector .ant-select-selection-placeholder,
2517
+ .pro-form .ant-form-item.pro-form-item-changed .ant-picker .ant-select-selection-placeholder {
2518
+ z-index: 9;
2519
+ }
2516
2520
  .pro-form .ant-form-item .ant-row {
2517
2521
  width: 100%;
2518
2522
  }
@@ -3094,8 +3098,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3094
3098
  margin-top: 2px;
3095
3099
  }
3096
3100
  .pro-tree-modal-content .ant-tree-switcher {
3097
- width: var(--zaui-font-size-xxl, 20px);
3098
- line-height: var(--zaui-font-size-xxl, 20px);
3101
+ width: 20px;
3102
+ line-height: 20px;
3099
3103
  }
3100
3104
  .pro-tree-modal-content .ant-tree-treenode {
3101
3105
  width: 100%;
@@ -3103,11 +3107,11 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3103
3107
  padding-bottom: var(--zaui-font-size-sm, 12px);
3104
3108
  color: var(--zaui-text);
3105
3109
  font-size: var(--zaui-font-size, 14px);
3106
- line-height: var(--zaui-font-size-xxl, 20px);
3110
+ line-height: 20px;
3107
3111
  }
3108
3112
  .pro-tree-modal-content .ant-tree-node-content-wrapper {
3109
- min-height: var(--zaui-font-size-xxl, 20px);
3110
- line-height: var(--zaui-font-size-xxl, 20px);
3113
+ min-height: 20px;
3114
+ line-height: 20px;
3111
3115
  }
3112
3116
  .pro-tree-modal-content .ant-tree-node-content-wrapper {
3113
3117
  width: 100%;
@@ -3126,7 +3130,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3126
3130
  height: 100%;
3127
3131
  color: var(--zaui-text);
3128
3132
  font-size: var(--zaui-font-size, 14px);
3129
- line-height: var(--zaui-font-size-xxl, 20px);
3133
+ line-height: 20px;
3130
3134
  border: 1px solid #e6e6e6;
3131
3135
  border-radius: var(--zaui-border-radius, 4px);
3132
3136
  /* 修改滚动条样式 */
@@ -3237,7 +3241,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3237
3241
  -ms-flex-pack: justify;
3238
3242
  justify-content: space-between;
3239
3243
  margin-bottom: calc(var(--zaui-space-size-md, 16px) * var(--zaui-size, 1));
3240
- line-height: var(--zaui-font-size-xxl, 20px);
3244
+ line-height: 20px;
3241
3245
  cursor: pointer;
3242
3246
  }
3243
3247
  .pro-tree-modal-checkbox-content-look {
@@ -3310,17 +3314,17 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3310
3314
  -webkit-justify-content: center;
3311
3315
  -ms-flex-pack: center;
3312
3316
  justify-content: center;
3313
- height: var(--zaui-font-size-xxl, 20px);
3317
+ height: 20px;
3314
3318
  margin-right: var(--zaui-space-size-sm, 8px);
3315
3319
  padding: 0 var(--zaui-space-size-xs);
3316
3320
  font-weight: 400;
3317
- line-height: var(--zaui-font-size-lg-title);
3321
+ line-height: 24px;
3318
3322
  white-space: nowrap;
3319
3323
  border-radius: var(--zaui-border-radius-card);
3320
3324
  }
3321
3325
  .pro-tree-modal-tree-node-tag span {
3322
3326
  font-size: var(--zaui-font-size-sm, 12px);
3323
- line-height: var(--zaui-font-size-xxl, 20px);
3327
+ line-height: 20px;
3324
3328
  text-align: center;
3325
3329
  -webkit-transform: scale(0.83, 0.83);
3326
3330
  transform: scale(0.83, 0.83);
@@ -3363,7 +3367,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3363
3367
  -ms-flex-pack: justify;
3364
3368
  justify-content: space-between;
3365
3369
  width: 100%;
3366
- height: var(--zaui-space-size-lg, 32px);
3370
+ height: 32px;
3367
3371
  padding: 2px var(--zaui-space-size-sm, 8px);
3368
3372
  color: var(--zaui-text, #343434);
3369
3373
  font-size: var(--zaui-font-size, 14px);
@@ -3372,7 +3376,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3372
3376
  border-radius: var(--zaui-border-radius, 4px);
3373
3377
  }
3374
3378
  .pro-transfer-right .checked-item .ant-tag .drag-icon {
3375
- height: var(--zaui-font-size-xxl, 20px);
3379
+ height: 20px;
3376
3380
  margin-right: var(--zaui-space-size-xs, 4px);
3377
3381
  cursor: move;
3378
3382
  }
@@ -3384,7 +3388,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3384
3388
  max-width: calc(100% - 42px);
3385
3389
  }
3386
3390
  .pro-transfer-right .checked-item .ant-tag .disabled-icon {
3387
- height: var(--zaui-font-size-xxl, 20px);
3391
+ height: 20px;
3388
3392
  margin-right: var(--zaui-space-size-xs, 4px);
3389
3393
  }
3390
3394
  .pro-transfer-right .checked-item .ant-tag .anticon-close {
@@ -3511,8 +3515,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3511
3515
  font-size: var(--zaui-font-size);
3512
3516
  }
3513
3517
  .pro-tree-content .ant-tree-node-content-wrapper {
3514
- min-height: var(--zaui-font-size-xxl);
3515
- line-height: var(--zaui-font-size-xxl);
3518
+ min-height: 20px;
3519
+ line-height: 20px;
3516
3520
  }
3517
3521
  .pro-tree-content .ant-tree-node-content-wrapper {
3518
3522
  width: 100%;
@@ -4,8 +4,6 @@ import _message from "antd/es/message";
4
4
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
5
  import _typeof from "@babel/runtime/helpers/esm/typeof";
6
6
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
7
- /* eslint-disable no-empty */
8
- /* eslint-disable prefer-promise-reject-errors */
9
7
  import { isFunction, get } from 'lodash';
10
8
  import locale from '../locale';
11
9
  var stringify = function stringify(data) {
@@ -8,6 +8,7 @@ export interface Props extends Omit<CheckboxGroupProps, 'options'> {
8
8
  value: string;
9
9
  };
10
10
  otherProps?: ProFormOtherProps;
11
+ isView?: boolean;
11
12
  }
12
13
  declare const Checkbox: React.FC<Props>;
13
14
  export default Checkbox;
@@ -7,15 +7,17 @@ import { createElement as _createElement } from "react";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import Container from '../../Container';
9
9
  import { useProConfig } from '../../../../ProConfigProvider';
10
+ import ProForm from '../../../index';
10
11
  var Checkbox = function Checkbox(props) {
11
12
  var dataSource = props.dataSource,
12
13
  otherProps = props.otherProps,
13
14
  fieldNames = props.fieldNames,
14
15
  rest = _objectWithoutProperties(props, _excluded);
15
- var _ref = otherProps || {},
16
- isView = _ref.isView,
17
- viewEmpty = _ref.viewEmpty;
18
16
  var initialConfig = useProConfig('Checkbox') || {};
17
+ var _ref = ProForm.useFieldProps() || {},
18
+ isViewCon = _ref.isView,
19
+ viewEmpty = _ref.viewEmpty;
20
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
19
21
  var _fieldNames = fieldNames || initialConfig.fieldNames || {
20
22
  label: 'label',
21
23
  value: 'value'
@@ -17,14 +17,15 @@ var DatePicker = function DatePicker(props) {
17
17
  format = _props$format === void 0 ? 'YYYY-MM-DD' : _props$format,
18
18
  rest = _objectWithoutProperties(props, _excluded);
19
19
  var _ref = ProForm.useFieldProps() || {},
20
- isView = _ref.isView,
20
+ isViewCon = _ref.isView,
21
21
  viewEmpty = _ref.viewEmpty,
22
22
  valueType = _ref.valueType;
23
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
23
24
  var initialConfig = useProConfig('DatePicker');
24
25
  var _className = classNames(_defineProperty({
25
26
  'full-form-item': true
26
27
  }, className, !!className));
27
- if (isView || (props === null || props === void 0 ? void 0 : props.isView)) {
28
+ if (isView) {
28
29
  var value = rest.value;
29
30
  var viewChildren = null;
30
31
  if (!value) {
@@ -8,6 +8,7 @@ import { omit } from 'lodash';
8
8
  import { useProConfig } from '../../../../ProConfigProvider';
9
9
  import Container from '../../Container';
10
10
  import locale from '../../../../locale';
11
+ import ProForm from '../../../index';
11
12
  // 参数优先级
12
13
  // 组件内默认值 < config默认值 < props
13
14
  var Input = function Input(props) {
@@ -17,9 +18,10 @@ var Input = function Input(props) {
17
18
  fieldName = props.fieldName,
18
19
  otherProps = props.otherProps,
19
20
  rest = _objectWithoutProperties(props, _excluded);
20
- var _ref = otherProps || {},
21
- isView = _ref.isView,
21
+ var _ref = ProForm.useFieldProps() || {},
22
+ isViewCon = _ref.isView,
22
23
  viewEmpty = _ref.viewEmpty;
24
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
23
25
  var initialConfig = useProConfig('Input');
24
26
  if (isView) {
25
27
  return _jsx(Container, {
@@ -11,4 +11,5 @@ export interface ProFieldProps<T = any> {
11
11
  }
12
12
  export interface IProps extends InputProps, ProFieldProps {
13
13
  otherProps?: ProFormOtherProps;
14
+ isView?: boolean;
14
15
  }
@@ -5,6 +5,7 @@ export interface Props extends Omit<InputNumberProps, 'onBlur'> {
5
5
  otherProps?: ProFormOtherProps;
6
6
  range?: string;
7
7
  onBlur?: (value?: number, record?: any, object?: any) => void;
8
+ isView?: boolean;
8
9
  }
9
10
  declare const InputNumber: React.FC<Props>;
10
11
  export default InputNumber;
@@ -17,6 +17,7 @@ import { useProConfig } from '../../../../ProConfigProvider';
17
17
  import Container from '../../Container';
18
18
  import { getDecimalDigits } from '../../../utils/index';
19
19
  import locale from '../../../../locale';
20
+ import ProForm from '../../../../ProForm';
20
21
  var calc = tools.calc;
21
22
  var rangeReg = /^[([](-?\d+(\.\d+)?)?,\s*(-?\d+(\.\d+)?)?[)\]]$/;
22
23
  /**
@@ -42,12 +43,13 @@ var InputNumber = function InputNumber(props) {
42
43
  max = props.max,
43
44
  onBlur = props.onBlur,
44
45
  rest = _objectWithoutProperties(props, _excluded);
45
- var _ref2 = otherProps || {},
46
- isView = _ref2.isView,
46
+ var _ref2 = ProForm.useFieldProps() || {},
47
+ isViewCon = _ref2.isView,
47
48
  viewEmpty = _ref2.viewEmpty,
48
- viewType = _ref2.viewType,
49
49
  valueType = _ref2.valueType,
50
+ viewType = _ref2.viewType,
50
51
  label = _ref2.label;
52
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
51
53
  var valueProps = {};
52
54
  if (valueType) {
53
55
  switch (valueType) {
@@ -4,10 +4,11 @@ import _Cascader from "antd/es/cascader";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
6
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
7
- var _excluded = ["useRequest", "isView", "otherProps", "dataSource", "options"];
7
+ var _excluded = ["useRequest", "otherProps", "dataSource", "options"];
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { useRequest } from 'ahooks';
10
10
  import Container from '../../Container';
11
+ import ProForm from '../../../../ProForm';
11
12
  var defaultFieldNames = {
12
13
  value: 'value',
13
14
  label: 'label',
@@ -41,19 +42,18 @@ var findTreeTarget = function findTreeTarget(dataSource, value, fieldNames) {
41
42
  var ProCascader = function ProCascader(props) {
42
43
  var _restProps$fieldNames;
43
44
  var requestProps = props.useRequest,
44
- isView = props.isView,
45
45
  otherProps = props.otherProps,
46
46
  dataSource = props.dataSource,
47
47
  options = props.options,
48
48
  restProps = _objectWithoutProperties(props, _excluded);
49
- var _ref2 = otherProps || {},
50
- formIsView = _ref2.isView;
49
+ var _ref2 = ProForm.useFieldProps() || {},
50
+ isViewCon = _ref2.isView;
51
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon;
51
52
  var _useRequest = useRequest(requestProps === null || requestProps === void 0 ? void 0 : requestProps.service, requestProps === null || requestProps === void 0 ? void 0 : requestProps.options),
52
53
  data = _useRequest.data;
53
- var _isView = isView || formIsView;
54
54
  var _dataSource = data || dataSource || options;
55
55
  var _fieldNames = (_restProps$fieldNames = restProps.fieldNames) !== null && _restProps$fieldNames !== void 0 ? _restProps$fieldNames : defaultFieldNames;
56
- if (_isView) {
56
+ if (isView) {
57
57
  var valueTarget = findTreeTarget(_dataSource, restProps.value, _fieldNames);
58
58
  var valueName = _fieldNames.value,
59
59
  label = _fieldNames.label;
@@ -9,6 +9,7 @@ export interface Props extends Omit<RadioProps, 'options' | 'onChange'> {
9
9
  value: string;
10
10
  };
11
11
  otherProps?: ProFormOtherProps;
12
+ isView?: boolean;
12
13
  }
13
14
  declare const Radio: React.FC<Props>;
14
15
  export default Radio;
@@ -6,6 +6,7 @@ var _excluded = ["dataSource", "fieldNames", "onChange", "value", "otherProps"];
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { useProConfig } from '../../../../ProConfigProvider';
8
8
  import Container from '../../Container';
9
+ import ProForm from '../../../../ProForm';
9
10
  var Radio = function Radio(props) {
10
11
  var dataSource = props.dataSource,
11
12
  fieldNames = props.fieldNames,
@@ -13,9 +14,10 @@ var Radio = function Radio(props) {
13
14
  value = props.value,
14
15
  otherProps = props.otherProps,
15
16
  rest = _objectWithoutProperties(props, _excluded);
16
- var _ref = otherProps || {},
17
- isView = _ref.isView,
17
+ var _ref = ProForm.useFieldProps() || {},
18
+ isViewCon = _ref.isView,
18
19
  viewEmpty = _ref.viewEmpty;
20
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon;
19
21
  var initialConfig = useProConfig('Radio') || {};
20
22
  var _fieldNames = fieldNames || initialConfig.fieldNames || {
21
23
  label: 'label',
@@ -5,6 +5,7 @@ export type Props = {
5
5
  otherProps?: ProFormOtherProps;
6
6
  separator?: any;
7
7
  showTime?: any;
8
+ isView?: boolean;
8
9
  } & Omit<RangePickerProps, 'separator'>;
9
10
  declare const RangePicker: React.FC<Props>;
10
11
  export default RangePicker;
@@ -9,6 +9,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { isFunction, isString, omit } from 'lodash';
10
10
  import moment from 'moment';
11
11
  import { useProConfig } from '../../../../ProConfigProvider';
12
+ import ProForm from '../../../../ProForm';
12
13
  import Container from '../../Container';
13
14
  var AntRangePicker = _DatePicker.RangePicker;
14
15
  var RangePicker = function RangePicker(props) {
@@ -18,11 +19,12 @@ var RangePicker = function RangePicker(props) {
18
19
  _props$separator = props.separator,
19
20
  separator = _props$separator === void 0 ? '~' : _props$separator,
20
21
  rest = _objectWithoutProperties(props, _excluded);
21
- var _ref = otherProps || {},
22
- isView = _ref.isView,
22
+ var initialConfig = useProConfig('AntRangePicker');
23
+ var _ref = ProForm.useFieldProps() || {},
24
+ isViewCon = _ref.isView,
23
25
  viewEmpty = _ref.viewEmpty,
24
26
  valueType = _ref.valueType;
25
- var initialConfig = useProConfig('AntRangePicker');
27
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon;
26
28
  if (isView) {
27
29
  var _props$value = props.value,
28
30
  value = _props$value === void 0 ? [] : _props$value;
@@ -5,6 +5,7 @@ export interface Props extends SelectProps {
5
5
  dataSource?: any[];
6
6
  scrollFollowParent?: boolean;
7
7
  otherProps?: ProFormOtherProps;
8
+ isView?: boolean;
8
9
  }
9
10
  declare const Select: React.FC<Props>;
10
11
  export default Select;
@@ -7,6 +7,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import Container from '../../Container';
8
8
  import { useProConfig } from '../../../../ProConfigProvider';
9
9
  import locale from '../../../../locale';
10
+ import ProForm from '../../../index';
10
11
  var Select = function Select(props) {
11
12
  var _props$dataSource = props.dataSource,
12
13
  dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
@@ -15,9 +16,10 @@ var Select = function Select(props) {
15
16
  _props$scrollFollowPa = props.scrollFollowParent,
16
17
  scrollFollowParent = _props$scrollFollowPa === void 0 ? true : _props$scrollFollowPa,
17
18
  rest = _objectWithoutProperties(props, _excluded);
18
- var _ref = otherProps || {},
19
- isView = _ref.isView,
19
+ var _ref = ProForm.useFieldProps() || {},
20
+ isViewCon = _ref.isView,
20
21
  viewEmpty = _ref.viewEmpty;
22
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
21
23
  var initialConfig = useProConfig('Select') || {};
22
24
  var _fieldNames = fieldNames || initialConfig.fieldNames || {
23
25
  label: 'label',
@@ -4,6 +4,7 @@ import { ProFormOtherProps } from '../../../propsType';
4
4
  export interface Props extends Omit<SwitchProps, 'value'> {
5
5
  value: any;
6
6
  otherProps?: ProFormOtherProps;
7
+ isView?: boolean;
7
8
  }
8
9
  declare const Switch: React.FC<Props>;
9
10
  export default Switch;
@@ -8,14 +8,16 @@ import { isNull, isUndefined } from 'lodash';
8
8
  import { useProConfig } from '../../../../ProConfigProvider';
9
9
  import Container from '../../Container';
10
10
  import locale from '../../../../locale';
11
+ import ProForm from '../../../../ProForm';
11
12
  var Switch = function Switch(props) {
12
13
  var disabled = props.disabled,
13
14
  otherProps = props.otherProps,
14
15
  res = _objectWithoutProperties(props, _excluded);
15
- var _ref = otherProps || {},
16
- isView = _ref.isView,
16
+ var _ref = ProForm.useFieldProps() || {},
17
+ isViewCon = _ref.isView,
17
18
  viewEmpty = _ref.viewEmpty,
18
19
  valueType = _ref.valueType;
20
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon;
19
21
  var config = useProConfig('Switch');
20
22
  if (isView) {
21
23
  if (isUndefined(res === null || res === void 0 ? void 0 : res.checked) || isNull(res === null || res === void 0 ? void 0 : res.checked) || valueType === 'switch' && isUndefined(res.value)) {
@@ -4,6 +4,7 @@ import { ProFormOtherProps } from '../../../propsType';
4
4
  export interface Props extends CheckboxProps {
5
5
  label?: string;
6
6
  otherProps?: ProFormOtherProps;
7
+ isView?: boolean;
7
8
  }
8
9
  declare const SwitchCheckbox: React.FC<Props>;
9
10
  export default SwitchCheckbox;
@@ -7,16 +7,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  import { isNull, isUndefined } from 'lodash';
8
8
  import { useProConfig } from '../../../../ProConfigProvider';
9
9
  import locale from '../../../../locale';
10
+ import ProForm from '../../../../ProForm';
10
11
  var SwitchCheckbox = function SwitchCheckbox(props) {
11
12
  var onChange = props.onChange,
12
13
  disabled = props.disabled,
13
14
  value = props.value,
14
15
  otherProps = props.otherProps,
15
16
  restProps = _objectWithoutProperties(props, _excluded);
16
- var _ref = otherProps || {},
17
- isView = _ref.isView,
17
+ var _ref = ProForm.useFieldProps() || {},
18
+ isViewCon = _ref.isView,
18
19
  viewEmpty = _ref.viewEmpty,
19
20
  valueType = _ref.valueType;
21
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon;
20
22
  var initialConfig = useProConfig('SwitchCheckbox');
21
23
  var changeVal = function changeVal(e) {
22
24
  onChange(e.target.checked);
@@ -4,6 +4,7 @@ import { ProFormOtherProps } from '../../../propsType';
4
4
  import './index.less';
5
5
  export interface Props extends TextAreaProps {
6
6
  otherProps?: ProFormOtherProps;
7
+ isView?: boolean;
7
8
  }
8
9
  declare const TextAreaDef: React.FC<Props>;
9
10
  export default TextAreaDef;
@@ -8,6 +8,7 @@ import { omit } from 'lodash';
8
8
  import classnames from 'classnames';
9
9
  import { useProConfig } from '../../../../ProConfigProvider';
10
10
  import locale from '../../../../locale';
11
+ import ProForm from '../../../../ProForm';
11
12
  import './index.less';
12
13
  var TextArea = _Input.TextArea;
13
14
  var TextAreaDef = function TextAreaDef(props) {
@@ -15,10 +16,10 @@ var TextAreaDef = function TextAreaDef(props) {
15
16
  otherProps = props.otherProps,
16
17
  className = props.className,
17
18
  rest = _objectWithoutProperties(props, _excluded);
18
- var _ref = otherProps || {},
19
+ var _ref = ProForm.useFieldProps() || {},
19
20
  label = _ref.label,
20
- isView = _ref.isView,
21
- viewEmpty = _ref.viewEmpty;
21
+ isViewCon = _ref.isView;
22
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon;
22
23
  var initialConfig = useProConfig('TextArea');
23
24
  var disabled = (initialConfig === null || initialConfig === void 0 ? void 0 : initialConfig.disabled) || rest.disabled;
24
25
  if (isView) {
@@ -8,6 +8,7 @@ export interface Props {
8
8
  onChange?: (value: string) => void;
9
9
  value?: string;
10
10
  otherProps?: ProFormOtherProps;
11
+ isView?: boolean;
11
12
  }
12
13
  declare const TimePicker: React.FC<Props & TimePickerProps>;
13
14
  export default TimePicker;
@@ -7,6 +7,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import moment from 'moment';
8
8
  import { useProConfig } from '../../../../ProConfigProvider';
9
9
  import Container from '../../Container';
10
+ import ProForm from '../../../../ProForm';
10
11
  import './style/index.less';
11
12
  var TimePicker = function TimePicker(props) {
12
13
  var _props$format = props.format,
@@ -15,11 +16,12 @@ var TimePicker = function TimePicker(props) {
15
16
  value = props.value,
16
17
  otherProps = props.otherProps,
17
18
  rest = _objectWithoutProperties(props, _excluded);
18
- var _ref = otherProps || {},
19
- isView = _ref.isView,
19
+ var _ref = ProForm.useFieldProps() || {},
20
+ isViewCon = _ref.isView,
20
21
  viewEmpty = _ref.viewEmpty,
21
22
  _ref$valueType = _ref.valueType,
22
23
  valueType = _ref$valueType === void 0 ? 'dateTime' : _ref$valueType;
24
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon;
23
25
  var initialConfig = useProConfig('AntTimePicker');
24
26
  var handleChange = function handleChange(value) {
25
27
  if (valueType === 'dateTime') {
@@ -6,16 +6,18 @@ import { omit } from 'lodash';
6
6
  import classnames from 'classnames';
7
7
  import RenderFields from '../../render/RenderFields';
8
8
  import ProCollapse from '../../../../ProLayout/components/ProCollapse';
9
+ import ProForm from '../../../../ProForm';
9
10
  var Container = function Container(props) {
10
11
  var children = props.children,
11
12
  otherProps = props.otherProps,
12
13
  className = props.className,
13
14
  container = props.container;
14
- var type = otherProps.type,
15
- form = otherProps.form,
16
- show = otherProps.show,
17
- required = otherProps.required,
18
- disabled = otherProps.disabled;
15
+ var _ref = ProForm.useFieldProps() || {},
16
+ type = _ref.type,
17
+ form = _ref.form,
18
+ show = _ref.show,
19
+ required = _ref.required,
20
+ disabled = _ref.disabled;
19
21
  var _className = classnames(_defineProperty({
20
22
  'pro-container': true,
21
23
  'pro-container-diy': type === 'Container'
@@ -11,9 +11,9 @@ import { namesPathTransform } from './utils';
11
11
  import ToolbarButton from './components/ToolbarButton';
12
12
  import BlockFields from './components/BlockFields';
13
13
  import LineFields from './components/LineFields';
14
+ import ProForm from '../../../../ProForm';
14
15
  var FormList = function FormList(props, ref) {
15
16
  var columns = props.columns,
16
- otherProps = props.otherProps,
17
17
  min = props.min,
18
18
  max = props.max,
19
19
  toolbarProps = props.toolbarProps,
@@ -29,10 +29,11 @@ var FormList = function FormList(props, ref) {
29
29
  key: String(item.key)
30
30
  });
31
31
  });
32
- var form = otherProps.form,
33
- name = otherProps.name,
34
- isView = otherProps.isView,
35
- disabled = otherProps.disabled;
32
+ var _ref = ProForm.useFieldProps() || {},
33
+ form = _ref.form,
34
+ name = _ref.name,
35
+ isView = _ref.isView,
36
+ disabled = _ref.disabled;
36
37
  var errors = meta.errors;
37
38
  var _namePath = toArray(name);
38
39
  var processColumns = useCallback(function (fieldName, namePath) {
@@ -44,7 +44,7 @@
44
44
  .pro-form-list-drag-handle {
45
45
  display : flex;
46
46
  align-items : center;
47
- height : @zaui-height-size-lg;
47
+ height : 32px;
48
48
  margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
49
49
  padding : 0;
50
50
  padding-right: @zaui-space-size-sm;
@@ -10,6 +10,7 @@ import { omit } from 'lodash';
10
10
  import classnames from 'classnames';
11
11
  import RenderFields from '../../render/RenderFields';
12
12
  import { insertSeparator, parseName } from './utils';
13
+ import ProForm from '../../../../ProForm';
13
14
  var Group = function Group(props) {
14
15
  var columns = props.children,
15
16
  otherProps = props.otherProps,
@@ -19,9 +20,11 @@ var Group = function Group(props) {
19
20
  size: 12
20
21
  } : _props$space,
21
22
  id = props.id;
22
- var name = otherProps.name,
23
- form = otherProps.form;
24
- if (!Array.isArray(otherProps === null || otherProps === void 0 ? void 0 : otherProps.names)) {
23
+ var _ref = ProForm.useFieldProps() || {},
24
+ names = _ref.names,
25
+ name = _ref.name,
26
+ form = _ref.form;
27
+ if (!Array.isArray(names)) {
25
28
  console.error('Warning: Composite form components whose type is Group must be configured with names');
26
29
  }
27
30
  var _parentNames = parseName(id);