@zat-design/sisyphus-react 3.4.3 → 3.4.4

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 (97) hide show
  1. package/dist/index.esm.css +35 -31
  2. package/dist/less.esm.css +20 -4
  3. package/es/ProConfigProvider/index.d.ts +1 -1
  4. package/es/ProConfigProvider/index.js +22 -1
  5. package/es/ProEditLabel/style/index.less +0 -1
  6. package/es/ProEditTable/components/DndWrapper/index.js +1 -1
  7. package/es/ProEditTable/components/RenderField/index.js +20 -14
  8. package/es/ProEditTable/index.js +17 -10
  9. package/es/ProEnum/components/Group.js +2 -19
  10. package/es/ProForm/components/base/DatePicker/index.js +3 -1
  11. package/es/ProForm/components/base/TextArea/index.js +4 -4
  12. package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +1 -0
  13. package/es/ProForm/components/combination/FormList/components/ActionButton.js +12 -10
  14. package/es/ProForm/components/combination/FormList/components/BlockFields.js +6 -1
  15. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +2 -5
  16. package/es/ProForm/components/combination/Group/index.js +3 -2
  17. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +2 -1
  18. package/es/ProForm/components/combination/ProModalSelect/index.js +116 -63
  19. package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +2 -2
  20. package/es/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
  21. package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
  22. package/es/ProForm/components/render/ConfirmWrapper.js +8 -2
  23. package/es/ProForm/components/render/Render.js +12 -9
  24. package/es/ProForm/components/render/RenderFields.d.ts +1 -1
  25. package/es/ProForm/components/render/propsType.d.ts +4 -4
  26. package/es/ProForm/index.js +4 -5
  27. package/es/ProForm/propsType.d.ts +2 -2
  28. package/es/ProForm/style/index.less +23 -5
  29. package/es/ProForm/utils/diffOriginal.js +17 -32
  30. package/es/ProForm/utils/index.d.ts +1 -1
  31. package/es/ProForm/utils/index.js +14 -4
  32. package/es/ProForm/utils/rulesCreator.d.ts +7 -1
  33. package/es/ProForm/utils/rulesCreator.js +45 -3
  34. package/es/ProForm/utils/useRules.js +36 -11
  35. package/es/ProForm/utils/useShouldUpdate.js +4 -4
  36. package/es/ProLayout/components/ProCollapse/index.js +23 -1
  37. package/es/ProLayout/components/ProCollapse/style/index.less +1 -1
  38. package/es/ProThemeTools/component/PrdTools/index.js +12 -50
  39. package/es/ProThemeTools/index.js +0 -1
  40. package/es/ProTree/components/ProTreeSelect/style/index.less +1 -1
  41. package/es/ProTree/style/index.less +5 -0
  42. package/es/ProUpload/style/index.less +1 -1
  43. package/es/assets/view.svg +20 -1
  44. package/es/locale/en_US.d.ts +4 -2
  45. package/es/locale/en_US.js +4 -2
  46. package/es/locale/zh_CN.d.ts +4 -2
  47. package/es/locale/zh_CN.js +4 -2
  48. package/es/style/components.less +0 -3
  49. package/es/style/theme/antd.less +14 -28
  50. package/lib/ProConfigProvider/index.d.ts +1 -1
  51. package/lib/ProConfigProvider/index.js +21 -0
  52. package/lib/ProEditLabel/style/index.less +0 -1
  53. package/lib/ProEditTable/components/DndWrapper/index.js +1 -1
  54. package/lib/ProEditTable/components/RenderField/index.js +18 -12
  55. package/lib/ProEditTable/index.js +17 -10
  56. package/lib/ProEnum/components/Group.js +2 -19
  57. package/lib/ProForm/components/base/DatePicker/index.js +3 -1
  58. package/lib/ProForm/components/base/TextArea/index.js +5 -5
  59. package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +1 -0
  60. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +12 -10
  61. package/lib/ProForm/components/combination/FormList/components/BlockFields.js +6 -1
  62. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +2 -5
  63. package/lib/ProForm/components/combination/Group/index.js +3 -2
  64. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +2 -1
  65. package/lib/ProForm/components/combination/ProModalSelect/index.js +123 -74
  66. package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +2 -2
  67. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
  68. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
  69. package/lib/ProForm/components/render/ConfirmWrapper.js +8 -2
  70. package/lib/ProForm/components/render/Render.js +12 -9
  71. package/lib/ProForm/components/render/RenderFields.d.ts +1 -1
  72. package/lib/ProForm/components/render/propsType.d.ts +4 -4
  73. package/lib/ProForm/index.js +4 -5
  74. package/lib/ProForm/propsType.d.ts +2 -2
  75. package/lib/ProForm/style/index.less +23 -5
  76. package/lib/ProForm/utils/diffOriginal.js +16 -31
  77. package/lib/ProForm/utils/index.d.ts +1 -1
  78. package/lib/ProForm/utils/index.js +14 -4
  79. package/lib/ProForm/utils/rulesCreator.d.ts +7 -1
  80. package/lib/ProForm/utils/rulesCreator.js +45 -2
  81. package/lib/ProForm/utils/useRules.js +36 -11
  82. package/lib/ProForm/utils/useShouldUpdate.js +4 -4
  83. package/lib/ProLayout/components/ProCollapse/index.js +23 -1
  84. package/lib/ProLayout/components/ProCollapse/style/index.less +1 -1
  85. package/lib/ProThemeTools/component/PrdTools/index.js +12 -50
  86. package/lib/ProThemeTools/index.js +0 -1
  87. package/lib/ProTree/components/ProTreeSelect/style/index.less +1 -1
  88. package/lib/ProTree/style/index.less +5 -0
  89. package/lib/ProUpload/style/index.less +1 -1
  90. package/lib/assets/view.svg +20 -1
  91. package/lib/locale/en_US.d.ts +4 -2
  92. package/lib/locale/en_US.js +4 -2
  93. package/lib/locale/zh_CN.d.ts +4 -2
  94. package/lib/locale/zh_CN.js +4 -2
  95. package/lib/style/components.less +0 -3
  96. package/lib/style/theme/antd.less +14 -28
  97. package/package.json +2 -2
@@ -5,6 +5,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
5
5
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
6
  import { useState } from 'react';
7
7
  import _, { isObject, isFunction, cloneDeep, get, set, omit, isNaN } from 'lodash';
8
+ import moment from 'moment';
8
9
  export var getLayout = function getLayout(params) {
9
10
  var _params$span = params.span,
10
11
  span = _params$span === void 0 ? 8 : _params$span,
@@ -42,7 +43,7 @@ export var useControlled = function useControlled(props) {
42
43
  export var isSelect = function isSelect(props) {
43
44
  var dataSource = props.dataSource,
44
45
  type = props.type;
45
- return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || ['Select', 'ProSelect', 'ProEnum', 'DatePicker', 'RangePicker', 'ProAddressBar', 'ProTimeLimit', 'ProModalSelect', 'ProTreeModal', 'ProUpload'].includes(type);
46
+ return (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || ['Select', 'ProSelect', 'ProEnum', 'DatePicker', 'RangePicker', 'ProAddressBar', 'ProTimeLimit', 'ProModalSelect', 'ProTreeModal', 'ProUpload', 'TimePicker'].includes(type);
46
47
  };
47
48
  /**
48
49
  * Input TextArea 移除前后空格
@@ -122,8 +123,8 @@ export var splitNameStr = function splitNameStr(name) {
122
123
  // 过滤掉字段名中包含 '-' 的字段
123
124
  export var filterInternalFields = function filterInternalFields(values) {
124
125
  var nextValues = values;
125
- // fix: braft-editor对象不可遍历
126
- if (values === null || values === void 0 ? void 0 : values._immutable) {
126
+ // fix: braft-editor对象不可遍历 Moment不过滤
127
+ if ((values === null || values === void 0 ? void 0 : values._immutable) || moment.isMoment(values)) {
127
128
  return nextValues;
128
129
  }
129
130
  if (Array.isArray(nextValues)) {
@@ -171,10 +172,15 @@ export var isNullValue = function isNullValue(value) {
171
172
  * @param arr 值
172
173
  * @returns boole
173
174
  */
174
- export var isNotFullArray = function isNotFullArray(arr, length) {
175
+ export var isNotFullArray = function isNotFullArray(arr, length, required) {
175
176
  if (!Array.isArray(arr)) {
176
177
  return false;
177
178
  }
179
+ if (Array.isArray(required) && required.some(function (item) {
180
+ return item === false;
181
+ })) {
182
+ return false;
183
+ }
178
184
  if (arr.length < length) return true;
179
185
  return arr.some(function (item) {
180
186
  if (item === undefined || item === null) {
@@ -295,6 +301,10 @@ export function initialValuesToNames() {
295
301
  values[key] = formInitialValue;
296
302
  }
297
303
  }
304
+ // 给FormList默认增加一行
305
+ if (item.type === 'FormList' && !item.initialValue && !get(values, item.name)) {
306
+ item.initialValue = [{}];
307
+ }
298
308
  });
299
309
  return values;
300
310
  }
@@ -1 +1,7 @@
1
- export declare const rulesCreator: (rules: any, label: any, isSelect: any) => any[];
1
+ export declare const rulesCreator: ({ rules, label, isSelect, names, required }: {
2
+ rules: any;
3
+ label: any;
4
+ isSelect: any;
5
+ names: any;
6
+ required: any;
7
+ }) => any[];
@@ -1,10 +1,24 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import { validate, regExp } from '@zat-design/utils';
3
- import { isString } from 'lodash';
3
+ import { isString, isNumber } from 'lodash';
4
4
  import { isNullValue } from './index';
5
- import locale from '../../locale';
6
- export var rulesCreator = function rulesCreator(rules, label, isSelect) {
5
+ import locale, { formatMessage } from '../../locale';
6
+ var getNonEmptyValuesByIndex = function getNonEmptyValuesByIndex(required, valueArray) {
7
+ var result = [];
8
+ required.forEach(function (item, index) {
9
+ if (item && !valueArray[index] && !isNumber(valueArray[index])) {
10
+ result.push(index + 1);
11
+ }
12
+ });
13
+ return result;
14
+ };
15
+ export var rulesCreator = function rulesCreator(_ref) {
7
16
  var _result;
17
+ var rules = _ref.rules,
18
+ label = _ref.label,
19
+ isSelect = _ref.isSelect,
20
+ names = _ref.names,
21
+ required = _ref.required;
8
22
  var message = "".concat(isSelect ? "".concat(locale.ProForm.selectPlaceHolder) : "".concat(locale.ProForm.inputPlaceholder)).concat(locale.ProForm.ruleText).concat(isString(label) ? label : '');
9
23
  var result = [];
10
24
  result = rules.map(function (ruleItem) {
@@ -29,6 +43,34 @@ export var rulesCreator = function rulesCreator(rules, label, isSelect) {
29
43
  }
30
44
  return rule;
31
45
  });
46
+ if ((names === null || names === void 0 ? void 0 : names.length) && (required === null || required === void 0 ? void 0 : required.length)) {
47
+ var customRequired = {
48
+ validator: function validator(rules, value) {
49
+ var _errorValues3;
50
+ var errorValues = getNonEmptyValuesByIndex(required, value);
51
+ if ((value === null || value === void 0 ? void 0 : value.length) === 2) {
52
+ var _errorValues;
53
+ errorValues = errorValues.map(function (item) {
54
+ var _locale$ProForm;
55
+ return locale === null || locale === void 0 ? void 0 : (_locale$ProForm = locale.ProForm) === null || _locale$ProForm === void 0 ? void 0 : _locale$ProForm.ruleStartEndText[item - 1];
56
+ });
57
+ if ((_errorValues = errorValues) === null || _errorValues === void 0 ? void 0 : _errorValues.length) {
58
+ var _locale$ProForm2, _errorValues2;
59
+ return Promise.reject(new Error("".concat(locale === null || locale === void 0 ? void 0 : (_locale$ProForm2 = locale.ProForm) === null || _locale$ProForm2 === void 0 ? void 0 : _locale$ProForm2.inputPlaceholder).concat((_errorValues2 = errorValues) === null || _errorValues2 === void 0 ? void 0 : _errorValues2.join(','))));
60
+ }
61
+ }
62
+ // 校验为true的值是否存在
63
+ if (Array.isArray(value) && ((_errorValues3 = errorValues) === null || _errorValues3 === void 0 ? void 0 : _errorValues3.length)) {
64
+ var _locale$ProForm3, _errorValues4;
65
+ return Promise.reject(new Error("".concat(formatMessage(locale === null || locale === void 0 ? void 0 : (_locale$ProForm3 = locale.ProForm) === null || _locale$ProForm3 === void 0 ? void 0 : _locale$ProForm3.halfRuleText, {
66
+ total: (_errorValues4 = errorValues) === null || _errorValues4 === void 0 ? void 0 : _errorValues4.join(',')
67
+ }))));
68
+ }
69
+ return Promise.resolve();
70
+ }
71
+ };
72
+ result.push(customRequired);
73
+ }
32
74
  if (!((_result = result) === null || _result === void 0 ? void 0 : _result.length)) {
33
75
  result = [{
34
76
  required: false
@@ -13,19 +13,26 @@ var useRules = function useRules(props) {
13
13
  labelRequired = props.labelRequired,
14
14
  type = props.type;
15
15
  var _label = isString(label) ? label : '';
16
+ var requiredRule = Array.isArray(rules) && (rules === null || rules === void 0 ? void 0 : rules.find(function (rule) {
17
+ return 'required' in rule;
18
+ }));
19
+ var allRequired = required === true || Array.isArray(required) && required.every(function (item) {
20
+ return item === true;
21
+ });
16
22
  // 根据 required 添加 rules, names 字段会添加数组的必填校验
17
23
  var internalRule = useMemo(function () {
18
24
  var result = {
19
25
  rules: rules || []
20
26
  };
21
- if (required === true) {
22
- var requiredRule = Array.isArray(rules) && (rules === null || rules === void 0 ? void 0 : rules.find(function (rule) {
23
- return 'required' in rule;
24
- }));
27
+ // Group required: true时,直接走完整校验
28
+ if (allRequired && type === 'Group') {
29
+ return result;
30
+ }
31
+ if (allRequired) {
25
32
  if (!requiredRule) {
26
33
  var message = isSelect ? "".concat(locale.ProForm.selectPlaceHolder).concat(_label) : "".concat(locale.ProForm.inputPlaceholder).concat(_label);
27
34
  var rule = {
28
- required: required,
35
+ required: allRequired,
29
36
  message: message
30
37
  };
31
38
  // names字段的必填校验
@@ -43,22 +50,40 @@ var useRules = function useRules(props) {
43
50
  return result;
44
51
  }, [rules, required]);
45
52
  // type转换为内置rules
46
- internalRule.rules = internalRule.rules && rulesCreator(internalRule.rules, _label, isSelect);
53
+ internalRule.rules = internalRule.rules && rulesCreator({
54
+ rules: internalRule.rules,
55
+ label: _label,
56
+ isSelect: isSelect,
57
+ names: names,
58
+ required: required
59
+ });
47
60
  useEffect(function () {
61
+ if (type === 'Group' && (allRequired || requiredRule)) {
62
+ var customRequired = {
63
+ validator: function validator(rules, value) {
64
+ // 完整性校验, 数组有值且值不完整则校验不通过
65
+ if (Array.isArray(value) && isNotFullArray(value, names.length, required)) {
66
+ return Promise.reject(new Error("".concat(locale.ProForm.completeText).concat(_label)));
67
+ }
68
+ return Promise.resolve();
69
+ }
70
+ };
71
+ // 插入rules第一条,完整性校验大于自定义
72
+ internalRule.rules.unshift(customRequired);
73
+ return;
74
+ }
48
75
  // 添加完整性校验
49
76
  if (names && !isBoolean(labelRequired)) {
50
- var customRequired = {
77
+ var _customRequired = {
51
78
  validator: function validator(rules, value) {
52
79
  // 完整性校验, 空数组不校验, 数组有值且值不完整则校验不通过
53
- if (Array.isArray(value) && !isNullArray(value) && isNotFullArray(value, names.length)) {
80
+ if (Array.isArray(value) && !isNullArray(value) && isNotFullArray(value, names.length, required)) {
54
81
  return Promise.reject(new Error("".concat(locale.ProForm.completeText).concat(_label)));
55
82
  }
56
83
  return Promise.resolve();
57
84
  }
58
85
  };
59
- if (!(type === 'Group' && Array.isArray(names) && !required)) {
60
- internalRule.rules.push(customRequired);
61
- }
86
+ internalRule.rules.unshift(_customRequired);
62
87
  }
63
88
  }, [internalRule]);
64
89
  return internalRule;
@@ -84,11 +84,11 @@ var useShouldUpdate = function useShouldUpdate(props) {
84
84
  disabledRef.current = disabled;
85
85
  }
86
86
  if (isFunction(required)) {
87
- requiredRef.current = Boolean(required(values, {
87
+ requiredRef.current = required(values, {
88
88
  form: form,
89
89
  index: index,
90
90
  namePath: namePath
91
- }));
91
+ });
92
92
  } else {
93
93
  requiredRef.current = required;
94
94
  }
@@ -133,11 +133,11 @@ var useShouldUpdate = function useShouldUpdate(props) {
133
133
  index: index,
134
134
  namePath: namePath
135
135
  })) : disabled;
136
- var _required = isFunction(required) ? Boolean(required(_currentValues, {
136
+ var _required = isFunction(required) ? required(_currentValues, {
137
137
  form: form,
138
138
  index: index,
139
139
  namePath: namePath
140
- })) : required;
140
+ }) : required;
141
141
  var _rules = isFunction(rules) ? rules(_currentValues, {
142
142
  form: form,
143
143
  index: index,
@@ -7,6 +7,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
7
7
  import "antd/es/collapse/style";
8
8
  import _Collapse from "antd/es/collapse";
9
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ import { useLayoutEffect } from 'react';
10
11
  import { CaretRightOutlined } from '@ant-design/icons';
11
12
  import classNames from 'classnames';
12
13
  import { ReactSVG } from 'react-svg';
@@ -38,7 +39,8 @@ var ProCollapse = function ProCollapse(props) {
38
39
  'pro-collapse': true,
39
40
  'pro-collapse-level2': level === '2',
40
41
  'pro-collapse-list': titleList === null || titleList === void 0 ? void 0 : titleList.length,
41
- 'pro-collapse-no-title': !title
42
+ 'pro-collapse-no-title': !title,
43
+ 'pro-collapse-no-level1-title': !title && level !== '2'
42
44
  }, "".concat(className), className));
43
45
  var content = _jsx("div", {
44
46
  className: "pro-collapse-content",
@@ -107,6 +109,26 @@ var ProCollapse = function ProCollapse(props) {
107
109
  }), content]
108
110
  });
109
111
  };
112
+ // 当pro-layout-content只存在一个card时,高度动态计算
113
+ useLayoutEffect(function () {
114
+ var proCollapseContent = document.querySelector('.pro-layout-content');
115
+ if (!proCollapseContent) {
116
+ return;
117
+ }
118
+ var proCollapseNoTitles = proCollapseContent.querySelectorAll('.pro-collapse-no-level1-title');
119
+ var proCollapses = proCollapseContent.querySelectorAll('.pro-collapse');
120
+ if (proCollapseNoTitles.length === 1 && proCollapses.length === 1) {
121
+ var rect = proCollapseNoTitles[0].getBoundingClientRect();
122
+ if ((rect === null || rect === void 0 ? void 0 : rect.height) < window.innerHeight - rect.top) {
123
+ proCollapseNoTitles[0].style.minHeight = "calc(100vh - ".concat(rect.top + 16, "px)");
124
+ }
125
+ }
126
+ return function () {
127
+ if (proCollapseNoTitles.length === 1 && proCollapses.length === 1) {
128
+ proCollapseNoTitles[0].style.minHeight = 'auto'; // 移除 minHeight 的设置
129
+ }
130
+ };
131
+ });
110
132
  return _jsx("div", {
111
133
  id: id,
112
134
  style: style,
@@ -23,7 +23,7 @@
23
23
 
24
24
  &.@{ant-prefix}-collapse {
25
25
  .pro-collapse-panel {
26
- margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
26
+ margin-bottom: 16px;
27
27
  }
28
28
  }
29
29
 
@@ -12,6 +12,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
13
13
  import { useState, useEffect } from 'react';
14
14
  import { setThemes } from '../../utils/index';
15
+ import { useProConfig } from '../../../ProConfigProvider';
15
16
  import locale from '../../../locale';
16
17
  var connect = function connect(Component) {
17
18
  var ComponentWrapper = function ComponentWrapper(props) {
@@ -29,6 +30,10 @@ var PrdTools = function PrdTools(_ref) {
29
30
  tableBorder = _ref.tableBorder,
30
31
  tableStripe = _ref.tableStripe,
31
32
  prefixCls = _ref.prefixCls;
33
+ var _useProConfig = useProConfig(),
34
+ config = _useProConfig.state,
35
+ dispatch = _useProConfig.dispatch;
36
+ var ProForm = config.ProForm;
32
37
  var _useState = useState([{
33
38
  color: '#006AFF',
34
39
  active: true
@@ -146,35 +151,16 @@ var PrdTools = function PrdTools(_ref) {
146
151
  }), _jsx("div", {
147
152
  className: "pro-theme-tools-item",
148
153
  children: _jsxs(_Radio.Group, {
149
- value: state.zauiFormAlign,
154
+ value: ProForm === null || ProForm === void 0 ? void 0 : ProForm.labelAlign,
150
155
  onChange: function onChange(e) {
151
- var after = e.target.value === 'left' ? 'inline' : 'none';
152
- var before = e.target.value === 'right' ? 'inline' : 'none';
153
- // 遍历添加className
154
- var formItemLabels = document.querySelectorAll(".".concat(prefixCls, "-form-item-label"));
155
- // 遍历元素列表,为每个元素添加新的 class
156
- formItemLabels.forEach(function (label) {
157
- var _label$classList, _label$classList$valu, _label$classList2, _label$classList2$val;
158
- if (!label) {
159
- return false;
160
- }
161
- if (e.target.value === 'left' && !((_label$classList = label.classList) === null || _label$classList === void 0 ? void 0 : (_label$classList$valu = _label$classList.value) === null || _label$classList$valu === void 0 ? void 0 : _label$classList$valu.includes("".concat(prefixCls, "-form-item-label-left")))) {
162
- label.classList.add("".concat(prefixCls, "-form-item-label-left"));
163
- }
164
- if (e.target.value === 'right' && ((_label$classList2 = label.classList) === null || _label$classList2 === void 0 ? void 0 : (_label$classList2$val = _label$classList2.value) === null || _label$classList2$val === void 0 ? void 0 : _label$classList2$val.includes("".concat(prefixCls, "-form-item-label-left")))) {
165
- label.classList.remove("".concat(prefixCls, "-form-item-label-left"));
156
+ dispatch({
157
+ type: 'setWithLocal',
158
+ payload: {
159
+ ProForm: {
160
+ labelAlign: e.target.value
161
+ }
166
162
  }
167
163
  });
168
- setState(_objectSpread(_objectSpread({}, state), {}, {
169
- zauiFormAlign: e.target.value,
170
- zauiFormRequiredAfter: after,
171
- zauiFormRequiredBefore: before
172
- }));
173
- setThemes({
174
- 'zaui-form-align': e.target.value,
175
- 'zaui-form-required-after': after,
176
- 'zaui-form-required-before': before
177
- });
178
164
  },
179
165
  children: [_jsx(_Radio.Button, {
180
166
  value: "left",
@@ -185,30 +171,6 @@ var PrdTools = function PrdTools(_ref) {
185
171
  })]
186
172
  })
187
173
  })]
188
- }), _jsxs("div", {
189
- className: "pro-theme-tools-box pro-theme-tools-space pro-theme-tools-small-space",
190
- children: [_jsx("div", {
191
- className: "pro-theme-tools-item",
192
- children: _jsx("p", {
193
- children: "".concat(locale.ProThemeTools.bigText)
194
- })
195
- }), _jsx("div", {
196
- className: "pro-theme-tools-item",
197
- children: _jsx(_Switch, {
198
- checkedChildren: "".concat(locale.ProThemeTools.switchText[0]),
199
- unCheckedChildren: "".concat(locale.ProThemeTools.switchText[1]),
200
- checked: state.zauiBigText,
201
- onClick: function onClick(value) {
202
- setState(_objectSpread(_objectSpread({}, state), {}, {
203
- zauiBaseFontSize: value ? 2 : 0,
204
- zauiBigText: value
205
- }));
206
- setThemes({
207
- 'zaui-base-font-size': value ? '2px' : '0px'
208
- });
209
- }
210
- })
211
- })]
212
174
  }), tableBorder && _jsxs("div", {
213
175
  className: "pro-theme-tools-box pro-theme-tools-space pro-theme-tools-small-space",
214
176
  children: [_jsx("div", {
@@ -70,7 +70,6 @@ var ProThemeTools = function ProThemeTools(_ref) {
70
70
  setThemes({
71
71
  'zaui-brand': '#006AFF',
72
72
  'zaui-text': '#343434',
73
- 'zaui-form-align': 'left',
74
73
  'zaui-form-required-after': 'inline',
75
74
  'zaui-form-required-before': 'none',
76
75
  'zaui-size': 1,
@@ -113,4 +113,4 @@
113
113
  }
114
114
  }
115
115
  }
116
- }
116
+ }
@@ -336,3 +336,8 @@
336
336
  .pro-form.pro-form-view .@{ant-prefix}-form-item .pro-tree .@{ant-prefix}-tree-checkbox * {
337
337
  height: 16px !important;
338
338
  }
339
+
340
+ // 解决双滚动条
341
+ .@{ant-prefix}-select-dropdown.pro-tree-select-drop-down-container.checkable-tree{
342
+ overflow: hidden!important;
343
+ }
@@ -324,7 +324,7 @@
324
324
  }
325
325
 
326
326
  .proupload-modal-preview {
327
- .ant-modal {
327
+ .@{ant-prefix}-modal {
328
328
  width: 600px;
329
329
  }
330
330
  }
@@ -1 +1,20 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1664364279428" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2737" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M801.605818 104.727273a117.666909 117.666909 0 0 1 117.434182 109.940363l0.232727 7.726546v246.597818a34.909091 34.909091 0 0 1-69.492363 4.747636l-0.325819-4.747636V222.394182c0-24.669091-18.618182-44.962909-42.635636-47.569455l-5.213091-0.279272H222.394182c-24.669091 0-44.962909 18.618182-47.569455 42.635636l-0.279272 5.213091v579.211636c0 24.669091 18.618182 44.962909 42.635636 47.569455l5.213091 0.279272h243.246545a34.909091 34.909091 0 0 1 4.747637 69.492364l-4.747637 0.325818H222.394182a117.666909 117.666909 0 0 1-117.434182-109.940363l-0.232727-7.726546V222.394182a117.666909 117.666909 0 0 1 109.940363-117.434182l7.726546-0.232727h579.211636zM448.558545 585.728a34.909091 34.909091 0 1 1 0 69.818182h-116.363636a34.909091 34.909091 0 1 1 0-69.818182h116.363636z m232.727273-232.727273a34.909091 34.909091 0 1 1 0 69.818182h-349.090909a34.909091 34.909091 0 1 1 0-69.818182h349.090909z" p-id="2738"></path><path d="M699.764364 490.356364a186.181818 186.181818 0 1 1 0 372.363636 186.181818 186.181818 0 0 1 0-372.363636z m0 69.818181a116.363636 116.363636 0 1 0 0 232.727273 116.363636 116.363636 0 0 0 0-232.727273z" p-id="2739"></path><path d="M798.673455 769.349818a34.909091 34.909091 0 0 1 49.338181 0l82.292364 82.245818a34.909091 34.909091 0 1 1-49.338182 49.384728l-82.292363-82.292364a34.909091 34.909091 0 0 1 0-49.338182z" p-id="2740"></path></svg>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="19px" height="15px" viewBox="0 0 19 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>icon-dropdown-searchlist</title>
4
+ <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="询报价录入交互说明" transform="translate(-531, -308)" fill="#999999" fill-rule="nonzero">
6
+ <g id="Dropdown/下拉弹窗切换/default备份-2" transform="translate(215, 299)">
7
+ <g id="编组-2" transform="translate(288, 1)">
8
+ <g id="编组" transform="translate(22, 0)">
9
+ <g id="icon-dropdown-searchlist" transform="translate(6, 8)">
10
+ <path d="M18.8595156,13.853235 L15.9118005,9.83277831 C16.9574103,8.79234063 17.6131433,7.33016175 17.6131433,5.70884872 C17.6131433,2.56113225 15.1539732,0 12.1315716,0 C9.10917008,0 6.65,2.56113225 6.65,5.70884872 C6.65,8.85656518 9.10917008,11.4176974 12.1315716,11.4176974 C13.1052358,11.4176974 14.0179175,11.1493815 14.811375,10.6841104 L17.7693681,14.7188392 C17.9043518,14.9029496 18.1078551,15 18.3147844,15 C18.4593609,15 18.6059929,14.952902 18.7293283,14.8537108 C19.0314999,14.6139391 19.0890564,14.1657945 18.8595156,13.853235 Z M8.02107811,5.70813511 C8.02107811,3.34681256 9.86494177,1.42649857 12.1322568,1.42649857 C14.3995719,1.42649857 16.2434356,3.34681256 16.2434356,5.70813511 C16.2434356,8.06945766 14.3995719,9.98977165 12.1322568,9.98977165 C9.86494177,9.98977165 8.02107811,8.06945766 8.02107811,5.70813511 Z" id="形状"></path>
11
+ <path d="M4.9875,2.34375 L0.7125,2.34375 C0.3192,2.34375 0,2.02875 0,1.640625 C0,1.2525 0.3192,0.9375 0.7125,0.9375 L4.9875,0.9375 C5.3808,0.9375 5.7,1.2525 5.7,1.640625 C5.7,2.02875 5.3808,2.34375 4.9875,2.34375 Z" id="路径"></path>
12
+ <path d="M3.95833333,7.96875 L0.791666667,7.96875 C0.354666667,7.96875 0,7.65445313 0,7.265625 C0,6.8775 0.354666667,6.5625 0.791666667,6.5625 L3.95833333,6.5625 C4.39533333,6.5625 4.75,6.8775 4.75,7.265625 C4.75,7.65445313 4.39533333,7.96875 3.95833333,7.96875 Z" id="路径"></path>
13
+ <path d="M7.89230769,13.59375 L0.657692308,13.59375 C0.294646154,13.59375 0,13.2794531 0,12.890625 C0,12.5017969 0.294646154,12.1875 0.657692308,12.1875 L7.89230769,12.1875 C8.25535385,12.1875 8.55,12.5017969 8.55,12.890625 C8.55,13.2794531 8.25535385,13.59375 7.89230769,13.59375 Z" id="路径"></path>
14
+ </g>
15
+ </g>
16
+ </g>
17
+ </g>
18
+ </g>
19
+ </g>
20
+ </svg>
@@ -27,12 +27,14 @@ declare const _default: {
27
27
  inputPlaceholder: string;
28
28
  selectPlaceHolder: string;
29
29
  switchText: string[];
30
+ ruleStartEndText: string[];
30
31
  search: string;
31
32
  reset: string;
32
33
  ruleText: string;
33
34
  completeText: string;
34
- formList_actions: string[];
35
- formList_confirmMessage: string;
35
+ halfRuleText: string;
36
+ formListActions: string[];
37
+ formListConfirmMessage: string;
36
38
  };
37
39
  ProAction: {
38
40
  errorMessage: string;
@@ -27,12 +27,14 @@ export default {
27
27
  inputPlaceholder: 'Please enter',
28
28
  selectPlaceHolder: 'Please select',
29
29
  switchText: ['Yes', 'No'],
30
+ ruleStartEndText: ['start value', 'end value'],
30
31
  search: 'Search',
31
32
  reset: 'Reset',
32
33
  ruleText: 'correct',
33
34
  completeText: 'enter in full',
34
- formList_actions: ['Add', 'Delete', 'Copy', 'Move up', 'Move down', 'Add a new line'],
35
- formList_confirmMessage: 'Are you sure delete it?'
35
+ halfRuleText: 'Enter the value of ({total})',
36
+ formListActions: ['Add', 'Delete', 'Copy', 'Move up', 'Move down', 'Add a new line'],
37
+ formListConfirmMessage: 'Are you sure delete it?'
36
38
  },
37
39
  ProAction: {
38
40
  errorMessage: 'The configuration config for ProAction must be data',
@@ -27,12 +27,14 @@ declare const _default: {
27
27
  inputPlaceholder: string;
28
28
  selectPlaceHolder: string;
29
29
  switchText: string[];
30
+ ruleStartEndText: string[];
30
31
  search: string;
31
32
  reset: string;
32
33
  ruleText: string;
33
34
  completeText: string;
34
- formList_actions: string[];
35
- formList_confirmMessage: string;
35
+ halfRuleText: string;
36
+ formListActions: string[];
37
+ formListConfirmMessage: string;
36
38
  };
37
39
  ProAction: {
38
40
  errorMessage: string;
@@ -27,12 +27,14 @@ export default {
27
27
  inputPlaceholder: '请输入',
28
28
  selectPlaceHolder: '请选择',
29
29
  switchText: ['是', '否'],
30
+ ruleStartEndText: ['起始值', '截止值'],
30
31
  search: '查询',
31
32
  reset: '重置',
32
33
  ruleText: '正确的',
33
34
  completeText: '请完整输入',
34
- formList_actions: ['新增', '删除', '复制', '上移', '下移', '新增一行'],
35
- formList_confirmMessage: '确认删除吗?'
35
+ halfRuleText: '请输入第({total})个表单的值',
36
+ formListActions: ['新增', '删除', '复制', '上移', '下移', '新增一行'],
37
+ formListConfirmMessage: '确认删除吗?'
36
38
  },
37
39
  ProAction: {
38
40
  errorMessage: 'ProAction 配置 config 必须为数据',
@@ -19,13 +19,10 @@
19
19
  @import '../ProEditTable/style/index';
20
20
  @import '../ProEditLabel/style/index';
21
21
 
22
-
23
22
  // 通用
24
23
  @import '../ProIcon/style/index';
25
24
  @import '../ProThemeTools/style/index';
26
25
  @import '../ProDownload/style/index';
27
26
 
28
-
29
-
30
27
  // old 待废弃
31
28
  @import '../old/ProEditableTable/style/index';
@@ -24,48 +24,34 @@
24
24
  // label 超过130px换行
25
25
  .@{ant-prefix}-form-item-label {
26
26
  flex: 0 0 @zaui-form-label-width;
27
- padding-right: @zaui-space-size-md;
27
+ padding-right: 16px;
28
28
  overflow: initial;
29
29
  line-height: 1;
30
30
  white-space: pre-wrap;
31
- text-align: @zaui-form-align;
32
31
 
33
32
  .@{ant-prefix}-form-item-required {
34
- &::after {
35
- display: block;
33
+ position: relative;
34
+ &::before {
35
+ position: absolute;
36
+ top: calc(50% - 7px);
37
+ left: -8px;
38
+ margin: 0;
36
39
  }
37
40
  }
38
41
 
39
42
  & > label {
40
43
  word-break: break-word;
41
44
 
45
+ // 隐藏冒号
42
46
  &::after {
43
47
  display: none;
44
- margin: 0;
45
48
  }
46
49
  }
47
50
 
48
- & .@{ant-prefix}-form-item-required::before {
49
- display: inline-block;
50
- }
51
-
52
51
  &.@{ant-prefix}-form-item-label-left {
53
52
  & > .@{ant-prefix}-form-item-required::before {
54
- display: none;
55
- }
56
-
57
- & > .@{ant-prefix}-form-item-required::after {
58
- margin-top: 1px;
59
- color: #ff4d4f;
60
- font-size: var(--zaui-font-size, 14px);
61
- line-height: 1;
62
- content: '*';
63
- }
64
- }
65
-
66
- &:not(.@{ant-prefix}-form-item-label-left) {
67
- & > .@{ant-prefix}-form-item-required::after {
68
- display: none;
53
+ right: -10px;
54
+ left: unset;
69
55
  }
70
56
  }
71
57
  }
@@ -717,8 +703,8 @@
717
703
 
718
704
  // tooltip样式重载
719
705
  .@{ant-prefix}-tooltip {
720
- > .ant-tooltip-content {
721
- > .ant-tooltip-inner {
706
+ > .@{ant-prefix}-tooltip-content {
707
+ > .@{ant-prefix}-tooltip-inner {
722
708
  color: rgb(29, 33, 41);
723
709
  background-color: #fff;
724
710
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
@@ -734,8 +720,8 @@
734
720
  }
735
721
  }
736
722
  }
737
- > .ant-tooltip-arrow {
738
- > .ant-tooltip-arrow-content {
723
+ > .@{ant-prefix}-tooltip-arrow {
724
+ > .@{ant-prefix}-tooltip-arrow-content {
739
725
  --antd-arrow-background-color: linear-gradient(
740
726
  to right bottom,
741
727
  rgba(255, 255, 255, 0.95),
@@ -21,7 +21,7 @@ export declare const ProConfigContext: React.Context<ConfigContext>;
21
21
  export declare function useProConfig(): ConfigContext;
22
22
  export declare function useProConfig(name: keyof ConfigContext['state']): ConfigContext['state'][keyof ConfigContext['state']];
23
23
  export declare function useContextForms(): Record<string, FormInstance<any>>;
24
- type ActionsType = 'set' | 'setProEnum' | 'setProEnumDic';
24
+ type ActionsType = 'set' | 'setProEnum' | 'setProEnumDic' | 'setWithLocal';
25
25
  interface Actions {
26
26
  type: ActionsType;
27
27
  payload: any;