@zat-design/sisyphus-react 3.9.1-beta.10 → 3.9.1-beta.12

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.
@@ -1246,6 +1246,9 @@
1246
1246
  border-radius: var(--zaui-border-radius, 8px) !important;
1247
1247
  background: #E4F2FE;
1248
1248
  }
1249
+ .pro-layout.pro-layout-light .pro-collapse .pro-collapse-panel .pro-collapse-level2-collapse .ant-collapse-header {
1250
+ border-radius: 0 !important;
1251
+ }
1249
1252
  .pro-layout.pro-layout-light .pro-header {
1250
1253
  border-radius: 0 0 var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px);
1251
1254
  }
@@ -2654,6 +2657,17 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2654
2657
  border-start-end-radius: 4px;
2655
2658
  border-end-end-radius: 4px;
2656
2659
  }
2660
+ .pro-group .ant-space-compact .pro-select .ant-select .ant-select-selector {
2661
+ border-radius: 0 !important;
2662
+ }
2663
+ .pro-group .ant-space-compact .pro-select:first-child .ant-select .ant-select-selector {
2664
+ border-start-start-radius: 4px !important;
2665
+ border-end-start-radius: 4px !important;
2666
+ }
2667
+ .pro-group .ant-space-compact .pro-select:last-child .ant-select .ant-select-selector {
2668
+ border-start-end-radius: 4px !important;
2669
+ border-end-end-radius: 4px!important;
2670
+ }
2657
2671
  .pro-group .ant-space-compact .ant-select .ant-select-selector {
2658
2672
  border-start-end-radius: 0;
2659
2673
  border-end-end-radius: 0;
package/dist/less.esm.css CHANGED
@@ -1246,6 +1246,9 @@
1246
1246
  border-radius: var(--zaui-border-radius, 8px) !important;
1247
1247
  background: #E4F2FE;
1248
1248
  }
1249
+ .pro-layout.pro-layout-light .pro-collapse .pro-collapse-panel .pro-collapse-level2-collapse .ant-collapse-header {
1250
+ border-radius: 0 !important;
1251
+ }
1249
1252
  .pro-layout.pro-layout-light .pro-header {
1250
1253
  border-radius: 0 0 var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px);
1251
1254
  }
@@ -2654,6 +2657,17 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2654
2657
  border-start-end-radius: 4px;
2655
2658
  border-end-end-radius: 4px;
2656
2659
  }
2660
+ .pro-group .ant-space-compact .pro-select .ant-select .ant-select-selector {
2661
+ border-radius: 0 !important;
2662
+ }
2663
+ .pro-group .ant-space-compact .pro-select:first-child .ant-select .ant-select-selector {
2664
+ border-start-start-radius: 4px !important;
2665
+ border-end-start-radius: 4px !important;
2666
+ }
2667
+ .pro-group .ant-space-compact .pro-select:last-child .ant-select .ant-select-selector {
2668
+ border-start-end-radius: 4px !important;
2669
+ border-end-end-radius: 4px!important;
2670
+ }
2657
2671
  .pro-group .ant-space-compact .ant-select .ant-select-selector {
2658
2672
  border-start-end-radius: 0;
2659
2673
  border-end-end-radius: 0;
@@ -231,7 +231,6 @@ var ProEnum = function ProEnum(props) {
231
231
  if (!code && !dataSource && !useRequest) {
232
232
  var _locale$ProEnum4;
233
233
  _message.error(locale === null || locale === void 0 ? void 0 : (_locale$ProEnum4 = locale.ProEnum) === null || _locale$ProEnum4 === void 0 ? void 0 : _locale$ProEnum4.errorNoEnumType);
234
- // return;
235
234
  }
236
235
  var transToLabel = function transToLabel(value) {
237
236
  var list = dataList && dataList.length ? dataList : enumLists;
@@ -70,23 +70,30 @@ var Group = function Group(props) {
70
70
  id: id,
71
71
  children: space.compact || (space === null || space === void 0 ? void 0 : space.separator) ? _jsx(_Space.Compact, {
72
72
  children: columns.map(function (column, index) {
73
- return _jsx(ComRender, _objectSpread(_objectSpread({
73
+ column.otherProps = otherProps;
74
+ // 自定义间隔移除对于参数
75
+ if (column === null || column === void 0 ? void 0 : column.separator) {
76
+ delete column.separator;
77
+ delete column.otherProps;
78
+ }
79
+ return _jsx(ComRender, _objectSpread({
74
80
  contextProps: contextProps,
75
81
  isView: isParentView || isView
76
- }, column), {}, {
77
- otherProps: otherProps
78
- }), column.name);
82
+ }, column), column.name || index);
79
83
  })
80
84
  }) : _jsx(_Space, _objectSpread(_objectSpread({
81
85
  align: "start"
82
86
  }, omit(space, ['separator', 'compact'])), {}, {
83
87
  children: columns.map(function (column, index) {
84
- return _jsx(ComRender, _objectSpread(_objectSpread({
88
+ column.otherProps = otherProps;
89
+ if (column === null || column === void 0 ? void 0 : column.separator) {
90
+ delete column.separator;
91
+ delete column.otherProps;
92
+ }
93
+ return _jsx(ComRender, _objectSpread({
85
94
  contextProps: contextProps,
86
95
  isView: isParentView || isView
87
- }, column), {}, {
88
- otherProps: otherProps
89
- }), column.name);
96
+ }, column), column.name || index);
90
97
  })
91
98
  }))
92
99
  });
@@ -12,6 +12,8 @@ export interface SpaceType extends SpaceProps {
12
12
  * 分隔符
13
13
  */
14
14
  separator?: string | React.ReactNode;
15
+ /** 分隔符插入位置 */
16
+ separatorIndex?: number | number[];
15
17
  /** 间隔距离 */
16
18
  size?: number;
17
19
  }
@@ -104,6 +104,21 @@
104
104
  }
105
105
  }
106
106
 
107
+ .pro-select {
108
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector{
109
+ border-radius: 0 !important;
110
+ }
111
+ &:first-child .@{ant-prefix}-select .@{ant-prefix}-select-selector {
112
+ border-start-start-radius: 4px !important;
113
+ border-end-start-radius: 4px !important;
114
+ }
115
+
116
+ &:last-child .@{ant-prefix}-select .@{ant-prefix}-select-selector {
117
+ border-start-end-radius: 4px !important;
118
+ border-end-end-radius: 4px!important;
119
+ }
120
+ }
121
+
107
122
  .@{ant-prefix}-select {
108
123
  .@{ant-prefix}-select-selector {
109
124
  .border-radius(0, 0, 0, 0);
@@ -4,8 +4,10 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";
4
4
  import "antd/es/button/style";
5
5
  import _Button from "antd/es/button";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
+ /* eslint-disable no-lonely-if */
7
8
  import { useRef } from 'react';
8
9
  import { cloneDeep, isEqual, isFunction } from 'lodash';
10
+ import { validate } from '@zat-design/utils';
9
11
  import valueTypeMap from '../../../utils/valueType';
10
12
  import { useDeepCompareMemo } from '../../../utils/useDeepCompareMemo';
11
13
  import { difference } from '../../../../ProEditTable/utils/tools';
@@ -18,20 +20,52 @@ export var insertSeparator = function insertSeparator(columns, space) {
18
20
  if (!(space === null || space === void 0 ? void 0 : space.separator)) {
19
21
  return columns;
20
22
  }
23
+ var separatorIndexs = function () {
24
+ var reuslt = [];
25
+ if (validate.isEmpty(space === null || space === void 0 ? void 0 : space.separatorIndex)) {
26
+ return reuslt;
27
+ }
28
+ // 如果 index 是数字,将其转换为数组
29
+ if (typeof (space === null || space === void 0 ? void 0 : space.separatorIndex) === 'number') {
30
+ reuslt.push(space.separatorIndex);
31
+ }
32
+ if (Array.isArray(space.separatorIndex)) {
33
+ reuslt = reuslt.concat(space.separatorIndex);
34
+ }
35
+ return reuslt;
36
+ }();
21
37
  return columns.reduce(function (result, current, index, array) {
22
38
  // 将当前元素添加到结果数组中
23
39
  result.push(current);
24
- // 如果当前元素不是最后一个元素,则添加间隔符
25
- if (index < array.length - 1) {
26
- result.push({
27
- component: _jsx(_Button, {
28
- className: "group-separator",
29
- children: space.separator
30
- }),
31
- fieldProps: {
32
- disabled: true
40
+ if (separatorIndexs === null || separatorIndexs === void 0 ? void 0 : separatorIndexs.length) {
41
+ separatorIndexs.forEach(function (separatorIndex) {
42
+ if (index === separatorIndex) {
43
+ result.push({
44
+ separator: true,
45
+ component: _jsx(_Button, {
46
+ className: "group-separator",
47
+ children: space.separator
48
+ }),
49
+ fieldProps: {
50
+ disabled: true
51
+ }
52
+ });
33
53
  }
34
54
  });
55
+ } else {
56
+ // 如果当前元素不是最后一个元素,则添加间隔符
57
+ if (index < array.length - 1) {
58
+ result.push({
59
+ separator: true,
60
+ component: _jsx(_Button, {
61
+ className: "group-separator",
62
+ children: space.separator
63
+ }),
64
+ fieldProps: {
65
+ disabled: true
66
+ }
67
+ });
68
+ }
35
69
  }
36
70
  return result;
37
71
  }, []);
@@ -745,7 +745,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
745
745
  }, 1000),
746
746
  style: {
747
747
  width: isView || disabled ? '100%' : 'calc(100% - 30px)'
748
- }
748
+ },
749
+ className: "pro-modal-select-item"
749
750
  }, omit(restProps, ['otherProps']))) : _jsx(_Input, _objectSpread({
750
751
  value: viewText,
751
752
  onChange: handleChangeValue,
@@ -67,6 +67,11 @@
67
67
  border-radius: var(--zaui-border-radius, 8px) !important;
68
68
  background: #E4F2FE;
69
69
  }
70
+ .pro-collapse-level2-collapse{
71
+ .@{ant-prefix}-collapse-header{
72
+ border-radius: 0 !important;
73
+ }
74
+ }
70
75
 
71
76
  }
72
77
  }
@@ -287,6 +287,10 @@ export var ProSelect = function ProSelect(props, ref) {
287
287
  mode: selectProps.mode
288
288
  });
289
289
  }
290
+ // modalselect样式特殊处理
291
+ if ((selectProps === null || selectProps === void 0 ? void 0 : selectProps.className) === 'pro-modal-select-item') {
292
+ selectProps === null || selectProps === void 0 ? true : delete selectProps.style;
293
+ }
290
294
  return _jsx("div", {
291
295
  style: props.style,
292
296
  className: "pro-select",
@@ -310,7 +314,7 @@ export var ProSelect = function ProSelect(props, ref) {
310
314
  getPopupContainer: function getPopupContainer(trigger) {
311
315
  return scrollFollowParent ? trigger.parentElement : document.body;
312
316
  }
313
- }, omit(_objectSpread({}, selectProps), ['isView', 'showCodeName', 'form', 'name', 'style', 'onFieldChange'])), {}, {
317
+ }, omit(_objectSpread({}, selectProps), ['isView', 'showCodeName', 'form', 'name', 'onFieldChange'])), {}, {
314
318
  value: transformValue(),
315
319
  children: Array.isArray(newSelectList) && newSelectList.map(function (item) {
316
320
  return _jsx(Option, {
@@ -232,7 +232,6 @@ var ProEnum = function ProEnum(props) {
232
232
  if (!code && !dataSource && !useRequest) {
233
233
  var _locale$ProEnum4;
234
234
  _antd.message.error(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProEnum4 = _locale.default.ProEnum) === null || _locale$ProEnum4 === void 0 ? void 0 : _locale$ProEnum4.errorNoEnumType);
235
- // return;
236
235
  }
237
236
  var transToLabel = function transToLabel(value) {
238
237
  var list = dataList && dataList.length ? dataList : enumLists;
@@ -76,23 +76,30 @@ var Group = function Group(props) {
76
76
  id: id,
77
77
  children: space.compact || (space === null || space === void 0 ? void 0 : space.separator) ? (0, _jsxRuntime.jsx)(_antd.Space.Compact, {
78
78
  children: columns.map(function (column, index) {
79
- return (0, _jsxRuntime.jsx)(_ComRender.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({
79
+ column.otherProps = otherProps;
80
+ // 自定义间隔移除对于参数
81
+ if (column === null || column === void 0 ? void 0 : column.separator) {
82
+ delete column.separator;
83
+ delete column.otherProps;
84
+ }
85
+ return (0, _jsxRuntime.jsx)(_ComRender.default, (0, _objectSpread2.default)({
80
86
  contextProps: contextProps,
81
87
  isView: isParentView || isView
82
- }, column), {}, {
83
- otherProps: otherProps
84
- }), column.name);
88
+ }, column), column.name || index);
85
89
  })
86
90
  }) : (0, _jsxRuntime.jsx)(_antd.Space, (0, _objectSpread2.default)((0, _objectSpread2.default)({
87
91
  align: "start"
88
92
  }, (0, _lodash.omit)(space, ['separator', 'compact'])), {}, {
89
93
  children: columns.map(function (column, index) {
90
- return (0, _jsxRuntime.jsx)(_ComRender.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({
94
+ column.otherProps = otherProps;
95
+ if (column === null || column === void 0 ? void 0 : column.separator) {
96
+ delete column.separator;
97
+ delete column.otherProps;
98
+ }
99
+ return (0, _jsxRuntime.jsx)(_ComRender.default, (0, _objectSpread2.default)({
91
100
  contextProps: contextProps,
92
101
  isView: isParentView || isView
93
- }, column), {}, {
94
- otherProps: otherProps
95
- }), column.name);
102
+ }, column), column.name || index);
96
103
  })
97
104
  }))
98
105
  });
@@ -12,6 +12,8 @@ export interface SpaceType extends SpaceProps {
12
12
  * 分隔符
13
13
  */
14
14
  separator?: string | React.ReactNode;
15
+ /** 分隔符插入位置 */
16
+ separatorIndex?: number | number[];
15
17
  /** 间隔距离 */
16
18
  size?: number;
17
19
  }
@@ -104,6 +104,21 @@
104
104
  }
105
105
  }
106
106
 
107
+ .pro-select {
108
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector{
109
+ border-radius: 0 !important;
110
+ }
111
+ &:first-child .@{ant-prefix}-select .@{ant-prefix}-select-selector {
112
+ border-start-start-radius: 4px !important;
113
+ border-end-start-radius: 4px !important;
114
+ }
115
+
116
+ &:last-child .@{ant-prefix}-select .@{ant-prefix}-select-selector {
117
+ border-start-end-radius: 4px !important;
118
+ border-end-end-radius: 4px!important;
119
+ }
120
+ }
121
+
107
122
  .@{ant-prefix}-select {
108
123
  .@{ant-prefix}-select-selector {
109
124
  .border-radius(0, 0, 0, 0);
@@ -12,10 +12,13 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  var _react = require("react");
14
14
  var _lodash = require("lodash");
15
+ var _utils = require("@zat-design/utils");
15
16
  var _antd = require("antd");
16
17
  var _valueType = _interopRequireDefault(require("../../../utils/valueType"));
17
18
  var _useDeepCompareMemo = require("../../../utils/useDeepCompareMemo");
18
19
  var _tools = require("../../../../ProEditTable/utils/tools");
20
+ /* eslint-disable no-lonely-if */
21
+
19
22
  /**
20
23
  * 插入间隔符
21
24
  * @param columns 表单配置数组
@@ -25,20 +28,52 @@ var insertSeparator = exports.insertSeparator = function insertSeparator(columns
25
28
  if (!(space === null || space === void 0 ? void 0 : space.separator)) {
26
29
  return columns;
27
30
  }
31
+ var separatorIndexs = function () {
32
+ var reuslt = [];
33
+ if (_utils.validate.isEmpty(space === null || space === void 0 ? void 0 : space.separatorIndex)) {
34
+ return reuslt;
35
+ }
36
+ // 如果 index 是数字,将其转换为数组
37
+ if (typeof (space === null || space === void 0 ? void 0 : space.separatorIndex) === 'number') {
38
+ reuslt.push(space.separatorIndex);
39
+ }
40
+ if (Array.isArray(space.separatorIndex)) {
41
+ reuslt = reuslt.concat(space.separatorIndex);
42
+ }
43
+ return reuslt;
44
+ }();
28
45
  return columns.reduce(function (result, current, index, array) {
29
46
  // 将当前元素添加到结果数组中
30
47
  result.push(current);
31
- // 如果当前元素不是最后一个元素,则添加间隔符
32
- if (index < array.length - 1) {
33
- result.push({
34
- component: (0, _jsxRuntime.jsx)(_antd.Button, {
35
- className: "group-separator",
36
- children: space.separator
37
- }),
38
- fieldProps: {
39
- disabled: true
48
+ if (separatorIndexs === null || separatorIndexs === void 0 ? void 0 : separatorIndexs.length) {
49
+ separatorIndexs.forEach(function (separatorIndex) {
50
+ if (index === separatorIndex) {
51
+ result.push({
52
+ separator: true,
53
+ component: (0, _jsxRuntime.jsx)(_antd.Button, {
54
+ className: "group-separator",
55
+ children: space.separator
56
+ }),
57
+ fieldProps: {
58
+ disabled: true
59
+ }
60
+ });
40
61
  }
41
62
  });
63
+ } else {
64
+ // 如果当前元素不是最后一个元素,则添加间隔符
65
+ if (index < array.length - 1) {
66
+ result.push({
67
+ separator: true,
68
+ component: (0, _jsxRuntime.jsx)(_antd.Button, {
69
+ className: "group-separator",
70
+ children: space.separator
71
+ }),
72
+ fieldProps: {
73
+ disabled: true
74
+ }
75
+ });
76
+ }
42
77
  }
43
78
  return result;
44
79
  }, []);
@@ -740,7 +740,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
740
740
  }, 1000),
741
741
  style: {
742
742
  width: isView || disabled ? '100%' : 'calc(100% - 30px)'
743
- }
743
+ },
744
+ className: "pro-modal-select-item"
744
745
  }, (0, _lodash.omit)(restProps, ['otherProps']))) : (0, _jsxRuntime.jsx)(_antd.Input, (0, _objectSpread3.default)({
745
746
  value: viewText,
746
747
  onChange: handleChangeValue,
@@ -67,6 +67,11 @@
67
67
  border-radius: var(--zaui-border-radius, 8px) !important;
68
68
  background: #E4F2FE;
69
69
  }
70
+ .pro-collapse-level2-collapse{
71
+ .@{ant-prefix}-collapse-header{
72
+ border-radius: 0 !important;
73
+ }
74
+ }
70
75
 
71
76
  }
72
77
  }
@@ -288,6 +288,10 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
288
288
  mode: selectProps.mode
289
289
  });
290
290
  }
291
+ // modalselect样式特殊处理
292
+ if ((selectProps === null || selectProps === void 0 ? void 0 : selectProps.className) === 'pro-modal-select-item') {
293
+ selectProps === null || selectProps === void 0 ? true : delete selectProps.style;
294
+ }
291
295
  return (0, _jsxRuntime.jsx)("div", {
292
296
  style: props.style,
293
297
  className: "pro-select",
@@ -311,7 +315,7 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
311
315
  getPopupContainer: function getPopupContainer(trigger) {
312
316
  return scrollFollowParent ? trigger.parentElement : document.body;
313
317
  }
314
- }, (0, _lodash.omit)((0, _objectSpread2.default)({}, selectProps), ['isView', 'showCodeName', 'form', 'name', 'style', 'onFieldChange'])), {}, {
318
+ }, (0, _lodash.omit)((0, _objectSpread2.default)({}, selectProps), ['isView', 'showCodeName', 'form', 'name', 'onFieldChange'])), {}, {
315
319
  value: transformValue(),
316
320
  children: Array.isArray(newSelectList) && newSelectList.map(function (item) {
317
321
  return (0, _jsxRuntime.jsx)(Option, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.9.1-beta.10",
3
+ "version": "3.9.1-beta.12",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",