@zat-design/sisyphus-react 3.4.4 → 3.4.5-beta.10
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.
- package/babel.config.js +3 -0
- package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
- package/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
- package/coverage/lcov-report/src/.umi/core/index.html +206 -0
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
- package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
- package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
- package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
- package/coverage/lcov-report/src/.umi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +172 -0
- package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +94 -0
- package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +106 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
- package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +142 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
- package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
- package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
- package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
- package/dist/index.esm.css +70 -19
- package/dist/less.esm.css +70 -19
- package/es/ProConfigProvider/index.d.ts +2 -2
- package/es/ProConfigProvider/index.js +0 -3
- package/es/ProEditTable/components/RenderField/index.js +10 -9
- package/es/ProEditTable/index.js +14 -3
- package/es/ProEditTable/propsType.d.ts +1 -0
- package/es/ProEditTable/utils/index.js +7 -1
- package/es/ProEnum/components/Group.js +7 -1
- package/es/ProEnum/style/index.less +3 -2
- package/es/ProForm/components/combination/Container/index.js +3 -2
- package/es/ProForm/components/combination/Container/style/index.less +5 -1
- package/es/ProForm/components/combination/FormList/index.js +5 -5
- package/es/ProForm/components/combination/GroupCopy/component/ComRender.d.ts +14 -0
- package/es/ProForm/components/combination/GroupCopy/component/ComRender.js +36 -0
- package/es/ProForm/components/combination/GroupCopy/index.d.ts +10 -0
- package/es/ProForm/components/combination/GroupCopy/index.js +84 -0
- package/es/ProForm/components/combination/GroupCopy/propsType.d.ts +47 -0
- package/es/ProForm/components/combination/GroupCopy/style/index.less +131 -0
- package/es/ProForm/components/combination/GroupCopy/utils.d.ts +53 -0
- package/es/ProForm/components/combination/GroupCopy/utils.js +180 -0
- package/es/ProForm/components/combination/{ProAddressBar → ProCascader}/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProCascader/index.js +255 -0
- package/es/ProForm/components/combination/{ProAddressBar → ProCascader}/propsType.d.ts +8 -6
- package/es/ProForm/components/combination/ProCascader/propsType.js +1 -0
- package/es/ProForm/components/combination/ProModalSelect/index.js +25 -22
- package/es/ProForm/components/index.d.ts +1 -2
- package/es/ProForm/components/index.js +1 -3
- package/es/ProForm/components/render/Render.js +3 -3
- package/es/ProForm/components/render/propsType.d.ts +4 -8
- package/es/ProForm/index.js +2 -2
- package/es/ProForm/style/index.less +1 -1
- package/es/ProForm/utils/index.js +1 -1
- package/es/ProIcon/config/index.d.ts +14 -0
- package/es/ProIcon/config/index.js +17 -1
- package/es/ProIcon/index.js +134 -26
- package/es/ProIcon/propsTypes.d.ts +24 -0
- package/es/ProIcon/utils/index.d.ts +6 -0
- package/es/ProIcon/utils/index.js +83 -0
- package/es/ProLayout/components/ProCollapse/index.js +6 -3
- package/es/ProLayout/components/ProCollapse/style/index.less +1 -1
- package/es/ProSelect/index.js +1 -1
- package/es/ProStep/components/Step/index.js +5 -4
- package/es/ProStep/style/index.less +20 -0
- package/es/ProTable/utils.js +6 -3
- package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +30 -4
- package/es/ProThemeTools/component/PrdTools/style/index.less +56 -48
- package/es/ProTreeModal/index.js +11 -15
- package/es/ProWaterMark/__snapshots__/index.test.tsx.snap +7 -0
- package/es/global.less +38 -2
- package/jest.config.js +8 -0
- package/lib/ProConfigProvider/index.d.ts +2 -2
- package/lib/ProConfigProvider/index.js +0 -3
- package/lib/ProEditTable/components/RenderField/index.js +9 -8
- package/lib/ProEditTable/index.js +14 -3
- package/lib/ProEditTable/propsType.d.ts +1 -0
- package/lib/ProEditTable/utils/index.js +7 -1
- package/lib/ProEnum/components/Group.js +6 -0
- package/lib/ProEnum/style/index.less +3 -2
- package/lib/ProForm/components/combination/Container/index.js +3 -2
- package/lib/ProForm/components/combination/Container/style/index.less +5 -1
- package/lib/ProForm/components/combination/FormList/index.js +5 -5
- package/lib/ProForm/components/combination/GroupCopy/component/ComRender.d.ts +14 -0
- package/lib/ProForm/components/combination/GroupCopy/component/ComRender.js +44 -0
- package/lib/ProForm/components/combination/GroupCopy/index.d.ts +10 -0
- package/lib/ProForm/components/combination/GroupCopy/index.js +91 -0
- package/lib/ProForm/components/combination/GroupCopy/propsType.d.ts +47 -0
- package/lib/ProForm/components/combination/GroupCopy/style/index.less +131 -0
- package/lib/ProForm/components/combination/GroupCopy/utils.d.ts +53 -0
- package/lib/ProForm/components/combination/GroupCopy/utils.js +187 -0
- package/lib/ProForm/components/combination/{ProAddressBar → ProCascader}/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProCascader/index.js +255 -0
- package/lib/ProForm/components/combination/{ProAddressBar → ProCascader}/propsType.d.ts +8 -6
- package/lib/ProForm/components/combination/ProCascader/propsType.js +5 -0
- package/lib/ProForm/components/combination/ProModalSelect/index.js +26 -23
- package/lib/ProForm/components/index.d.ts +1 -2
- package/lib/ProForm/components/index.js +1 -8
- package/lib/ProForm/components/render/Render.js +3 -3
- package/lib/ProForm/components/render/propsType.d.ts +4 -8
- package/lib/ProForm/index.js +1 -1
- package/lib/ProForm/style/index.less +1 -1
- package/lib/ProForm/utils/index.js +1 -1
- package/lib/ProIcon/config/index.d.ts +14 -0
- package/lib/ProIcon/config/index.js +18 -2
- package/lib/ProIcon/index.js +132 -26
- package/lib/ProIcon/propsTypes.d.ts +24 -0
- package/lib/ProIcon/utils/index.d.ts +6 -0
- package/lib/ProIcon/utils/index.js +90 -0
- package/lib/ProLayout/components/ProCollapse/index.js +6 -3
- package/lib/ProLayout/components/ProCollapse/style/index.less +1 -1
- package/lib/ProSelect/index.js +1 -1
- package/lib/ProStep/components/Step/index.js +5 -4
- package/lib/ProStep/style/index.less +20 -0
- package/lib/ProTable/utils.js +6 -3
- package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +30 -4
- package/lib/ProThemeTools/component/PrdTools/style/index.less +56 -48
- package/lib/ProTreeModal/index.js +11 -15
- package/lib/ProWaterMark/__snapshots__/index.test.tsx.snap +7 -0
- package/lib/global.less +38 -2
- package/package.json +6 -2
- package/test/__mocks__/fileMock.js +0 -0
- package/test/__mocks__/styleMock.js +0 -0
- package/es/ProForm/components/base/ProCascader/index.d.ts +0 -14
- package/es/ProForm/components/base/ProCascader/index.js +0 -72
- package/es/ProForm/components/combination/ProAddressBar/index.js +0 -437
- package/lib/ProForm/components/base/ProCascader/index.d.ts +0 -14
- package/lib/ProForm/components/base/ProCascader/index.js +0 -78
- package/lib/ProForm/components/combination/ProAddressBar/index.js +0 -437
- /package/es/ProForm/components/combination/{ProAddressBar → GroupCopy}/propsType.js +0 -0
- /package/es/ProForm/components/combination/{ProAddressBar → ProCascader}/style/index.less +0 -0
- /package/lib/ProForm/components/combination/{ProAddressBar → GroupCopy}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProAddressBar → ProCascader}/style/index.less +0 -0
|
@@ -28,12 +28,10 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
28
28
|
open = _ref.open,
|
|
29
29
|
state = _ref.state,
|
|
30
30
|
tableBorder = _ref.tableBorder,
|
|
31
|
-
tableStripe = _ref.tableStripe
|
|
32
|
-
prefixCls = _ref.prefixCls;
|
|
31
|
+
tableStripe = _ref.tableStripe;
|
|
33
32
|
var _useProConfig = useProConfig(),
|
|
34
33
|
config = _useProConfig.state,
|
|
35
34
|
dispatch = _useProConfig.dispatch;
|
|
36
|
-
var ProForm = config.ProForm;
|
|
37
35
|
var _useState = useState([{
|
|
38
36
|
color: '#006AFF',
|
|
39
37
|
active: true
|
|
@@ -46,6 +44,9 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
46
44
|
}, {
|
|
47
45
|
color: '#A00F20',
|
|
48
46
|
active: false
|
|
47
|
+
}, {
|
|
48
|
+
color: '#31AF96',
|
|
49
|
+
active: false
|
|
49
50
|
}]),
|
|
50
51
|
_useState2 = _slicedToArray(_useState, 2),
|
|
51
52
|
active = _useState2[0],
|
|
@@ -57,6 +58,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
57
58
|
_ref2$zauiBrand = _ref2.zauiBrand,
|
|
58
59
|
zauiBrand = _ref2$zauiBrand === void 0 ? '#006AFF' : _ref2$zauiBrand;
|
|
59
60
|
if (zauiBrand) {
|
|
61
|
+
var _config$theme;
|
|
60
62
|
var newArray = active.map(function (activeItem) {
|
|
61
63
|
activeItem.active = false;
|
|
62
64
|
return {
|
|
@@ -65,6 +67,15 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
65
67
|
};
|
|
66
68
|
});
|
|
67
69
|
setActive(newArray);
|
|
70
|
+
dispatch({
|
|
71
|
+
type: 'set',
|
|
72
|
+
payload: {
|
|
73
|
+
theme: {
|
|
74
|
+
primaryColor: zauiBrand,
|
|
75
|
+
qiankunPrimaryColor: config === null || config === void 0 ? void 0 : (_config$theme = config.theme) === null || _config$theme === void 0 ? void 0 : _config$theme.qiankunPrimaryColor
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
68
79
|
}
|
|
69
80
|
}, []);
|
|
70
81
|
return _jsxs(NewDrawer, {
|
|
@@ -105,6 +116,15 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
105
116
|
setThemes({
|
|
106
117
|
'zaui-brand': item.color
|
|
107
118
|
});
|
|
119
|
+
dispatch({
|
|
120
|
+
type: 'set',
|
|
121
|
+
payload: {
|
|
122
|
+
theme: {
|
|
123
|
+
primaryColor: item.color,
|
|
124
|
+
qiankunPrimaryColor: item.color
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
108
128
|
},
|
|
109
129
|
children: item.active ? _jsx(CheckOutlined, {}) : null
|
|
110
130
|
}, item.color);
|
|
@@ -151,8 +171,14 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
151
171
|
}), _jsx("div", {
|
|
152
172
|
className: "pro-theme-tools-item",
|
|
153
173
|
children: _jsxs(_Radio.Group, {
|
|
154
|
-
value:
|
|
174
|
+
value: state.zauiFormAlign,
|
|
155
175
|
onChange: function onChange(e) {
|
|
176
|
+
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
177
|
+
zauiFormAlign: e.target.value
|
|
178
|
+
}));
|
|
179
|
+
setThemes({
|
|
180
|
+
'zaui-form-align': e.target.value
|
|
181
|
+
});
|
|
156
182
|
dispatch({
|
|
157
183
|
type: 'setWithLocal',
|
|
158
184
|
payload: {
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
p {
|
|
19
|
-
|
|
20
|
-
position : relative;
|
|
19
|
+
position: relative;
|
|
21
20
|
margin-bottom: var(--zaui-space-size-md, 16px);
|
|
22
|
-
|
|
21
|
+
padding-left: 12px;
|
|
22
|
+
font-size: var(--zaui-font-size, 14px);
|
|
23
23
|
|
|
24
24
|
&:before {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
left
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
background : var(--zaui-brand, #006aff);
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 4px;
|
|
27
|
+
left: 0;
|
|
28
|
+
width: 4px;
|
|
29
|
+
height: 14px;
|
|
30
|
+
background: var(--zaui-brand, #006aff);
|
|
32
31
|
border-radius: var(zaui-border-radius-card, 4px);
|
|
32
|
+
content: '';
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
display: flex;
|
|
38
38
|
|
|
39
39
|
li {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
border-radius : 50%;
|
|
43
|
-
background : #fff;
|
|
44
|
-
display : flex;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
45
42
|
justify-content: center;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
width: 38px;
|
|
44
|
+
height: 38px;
|
|
45
|
+
margin-right: 34px;
|
|
46
|
+
color: #fff;
|
|
47
|
+
background: #fff;
|
|
48
|
+
border: 6px solid #fff;
|
|
49
|
+
border-radius: 50%;
|
|
50
50
|
|
|
51
51
|
span {
|
|
52
|
-
font-size
|
|
52
|
+
font-size: var(--zaui-font-size, 14px);
|
|
53
53
|
vertical-align: -7px;
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -81,8 +81,16 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&:nth-child(4) {
|
|
84
|
+
background: #a00f20;
|
|
85
|
+
|
|
86
|
+
&.active,
|
|
87
|
+
&:hover {
|
|
88
|
+
border-color: #f2dbdb;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
&:nth-child(5) {
|
|
84
92
|
margin-right: 0;
|
|
85
|
-
background
|
|
93
|
+
background: #31af96;
|
|
86
94
|
|
|
87
95
|
&.active,
|
|
88
96
|
&:hover {
|
|
@@ -98,16 +106,16 @@
|
|
|
98
106
|
|
|
99
107
|
.copy-btn {
|
|
100
108
|
position: absolute;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
bottom: 20px;
|
|
110
|
+
left: 32px;
|
|
111
|
+
z-index: 10;
|
|
112
|
+
width: calc(100% - 64px);
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
.pro-theme-tools-box {
|
|
108
|
-
display
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-wrap: wrap;
|
|
109
118
|
justify-content: space-between;
|
|
110
|
-
flex-wrap : wrap;
|
|
111
119
|
}
|
|
112
120
|
|
|
113
121
|
.pro-theme-tools-space {
|
|
@@ -129,22 +137,22 @@
|
|
|
129
137
|
}
|
|
130
138
|
|
|
131
139
|
.pro-drawer-close {
|
|
132
|
-
position
|
|
133
|
-
top
|
|
134
|
-
left
|
|
135
|
-
display
|
|
136
|
-
align-items
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: 6px;
|
|
142
|
+
left: -37px;
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
137
145
|
justify-content: center;
|
|
138
|
-
width
|
|
139
|
-
height
|
|
140
|
-
color
|
|
141
|
-
cursor
|
|
146
|
+
width: 32px;
|
|
147
|
+
height: 38px;
|
|
148
|
+
color: #fff;
|
|
149
|
+
cursor: pointer;
|
|
142
150
|
|
|
143
151
|
.close-icon {
|
|
144
|
-
position
|
|
145
|
-
left
|
|
146
|
-
z-index
|
|
147
|
-
color
|
|
152
|
+
position: relative;
|
|
153
|
+
left: 4px;
|
|
154
|
+
z-index: 1;
|
|
155
|
+
color: var(--zaui-text, #343434);
|
|
148
156
|
font-size: var(--zaui-font-size-lg, 16px);
|
|
149
157
|
transform: translateZ(100px);
|
|
150
158
|
|
|
@@ -155,14 +163,14 @@
|
|
|
155
163
|
}
|
|
156
164
|
|
|
157
165
|
.pro-drawer-close::after {
|
|
158
|
-
position
|
|
159
|
-
top
|
|
160
|
-
right
|
|
161
|
-
bottom
|
|
162
|
-
left
|
|
166
|
+
position: absolute;
|
|
167
|
+
top: 0;
|
|
168
|
+
right: 0;
|
|
169
|
+
bottom: 0;
|
|
170
|
+
left: 0;
|
|
163
171
|
background-color: #fff;
|
|
164
|
-
border-radius
|
|
165
|
-
transform
|
|
166
|
-
content
|
|
172
|
+
border-radius: 4px 0px 0px 4px;
|
|
173
|
+
transform: perspective(0.15em) rotateY(-2deg);
|
|
174
|
+
content: '';
|
|
167
175
|
}
|
|
168
176
|
}
|
package/es/ProTreeModal/index.js
CHANGED
|
@@ -206,10 +206,11 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
206
206
|
setState({
|
|
207
207
|
checkedValues: checkedValues,
|
|
208
208
|
checkAll: checkedValues.length === allKeys.length,
|
|
209
|
-
treeViewData: treeViewData
|
|
209
|
+
treeViewData: treeViewData,
|
|
210
|
+
beforeClearAllValues: checkedValues
|
|
210
211
|
});
|
|
211
212
|
}
|
|
212
|
-
}, [value, state.allKeys]);
|
|
213
|
+
}, [value, state.allKeys, state.open]);
|
|
213
214
|
var handleClick = function handleClick() {
|
|
214
215
|
setState({
|
|
215
216
|
open: true
|
|
@@ -276,24 +277,19 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
276
277
|
treeViewData: [],
|
|
277
278
|
checkAll: false
|
|
278
279
|
});
|
|
279
|
-
|
|
280
|
+
/* ******** fix:3.4.4-beta.4 点击清空全部不应该回调、所有的都是应该走统一的确定 ********* */
|
|
281
|
+
// onChange?.(_checkedValues);
|
|
280
282
|
};
|
|
281
283
|
/**
|
|
282
284
|
* Drawer close
|
|
283
285
|
*/
|
|
284
286
|
var handleClose = function handleClose() {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
});
|
|
292
|
-
} else {
|
|
293
|
-
setState({
|
|
294
|
-
open: false
|
|
295
|
-
});
|
|
296
|
-
}
|
|
287
|
+
setState({
|
|
288
|
+
open: false,
|
|
289
|
+
checkedValues: state.beforeClearAllValues,
|
|
290
|
+
beforeClearAllValues: []
|
|
291
|
+
});
|
|
292
|
+
// onChange?.(state.beforeClearAllValues);
|
|
297
293
|
openChange === null || openChange === void 0 ? void 0 : openChange(false);
|
|
298
294
|
};
|
|
299
295
|
/**
|
package/es/global.less
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import './style/index.less';
|
|
2
2
|
|
|
3
|
-
pre
|
|
3
|
+
pre {
|
|
4
4
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
* {
|
|
8
|
+
// 火狐浏览器
|
|
9
|
+
scrollbar-width: thin;
|
|
10
|
+
scrollbar-color: #d2d3d7 transparent;
|
|
11
|
+
// ie浏览器
|
|
12
|
+
scrollbar-face-color: #d2d3d7;
|
|
13
|
+
scrollbar-highlight-color: #979797;
|
|
14
|
+
scrollbar-3dlight-color: #979797;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
::-webkit-scrollbar {
|
|
18
|
+
width: 16px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// // 滑块
|
|
22
|
+
::-webkit-scrollbar-thumb {
|
|
23
|
+
background-color: #d2d3d7;
|
|
24
|
+
background-clip: padding-box;
|
|
25
|
+
border-color: transparent;
|
|
26
|
+
border-style: dashed;
|
|
27
|
+
border-width: 4px;
|
|
28
|
+
border-radius: 10px;
|
|
29
|
+
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// 轨道
|
|
33
|
+
::-webkit-scrollbar-track {
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
border-radius: 10px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 悬浮轨道
|
|
39
|
+
::-webkit-scrollbar-thumb:hover {
|
|
40
|
+
background-color: #979797;
|
|
41
|
+
}
|
package/jest.config.js
ADDED
|
@@ -2,14 +2,14 @@ import React, { FC } from 'react';
|
|
|
2
2
|
import { FormInstance } from 'antd';
|
|
3
3
|
import { PropSelectProps } from '../ProSelect/propsType';
|
|
4
4
|
import { ProModalSelectPropsType } from '../ProForm/components/combination/ProModalSelect/propsType';
|
|
5
|
-
import {
|
|
5
|
+
import { ProCascaderProps } from '../ProForm/components/combination/ProCascader/propsType';
|
|
6
6
|
import { ProEnumConfig } from '../ProEnum/propsType';
|
|
7
7
|
export interface ProConfigState {
|
|
8
8
|
locale?: string;
|
|
9
9
|
ProEnum?: Partial<ProEnumConfig>;
|
|
10
10
|
ProSelect?: Partial<PropSelectProps> & Record<string, any>;
|
|
11
11
|
ProModalSelect?: Partial<ProModalSelectPropsType> & Record<string, any>;
|
|
12
|
-
ProAddressBar?: Partial<
|
|
12
|
+
ProAddressBar?: Partial<ProCascaderProps> & Record<string, any>;
|
|
13
13
|
forms: Record<string, FormInstance | undefined>;
|
|
14
14
|
[key: string]: any;
|
|
15
15
|
}
|
|
@@ -62,9 +62,6 @@ var reducer = function reducer(state, action) {
|
|
|
62
62
|
case 'setWithLocal':
|
|
63
63
|
{
|
|
64
64
|
var _state = (0, _merge.default)({}, state, action.payload);
|
|
65
|
-
var localConfigStr = localStorage.getItem('localConfig');
|
|
66
|
-
var localConfig = JSON.parse(localConfigStr || '{}');
|
|
67
|
-
localStorage.setItem('localConfig', JSON.stringify((0, _merge.default)(localConfig, action.payload)));
|
|
68
65
|
return _state;
|
|
69
66
|
}
|
|
70
67
|
case 'setProEnum':
|
|
@@ -77,7 +77,8 @@ var RenderField = function RenderField(_ref) {
|
|
|
77
77
|
originalValues = config.originalValues,
|
|
78
78
|
formNamePath = config.namePath,
|
|
79
79
|
_config$originalDiffT = config.originalDiffTip,
|
|
80
|
-
originalDiffTip = _config$originalDiffT === void 0 ? true : _config$originalDiffT
|
|
80
|
+
originalDiffTip = _config$originalDiffT === void 0 ? true : _config$originalDiffT,
|
|
81
|
+
rowDisabled = config.rowDisabled;
|
|
81
82
|
var _fieldProps = fieldProps || formItemProps || {};
|
|
82
83
|
var _rules = rules || [];
|
|
83
84
|
var _required = required;
|
|
@@ -102,7 +103,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
102
103
|
isEditable = isEditable(currentValue, rowData, options);
|
|
103
104
|
}
|
|
104
105
|
// 是否只读文本
|
|
105
|
-
var isView = !isEditable || (record === null || record === void 0 ? void 0 : record['is-view']) || config.isView || virtualKey && !isEditing;
|
|
106
|
+
var isView = !isEditable || (record === null || record === void 0 ? void 0 : record['is-view']) || config.isView || virtualKey && !isEditing || (rowDisabled === null || rowDisabled === void 0 ? void 0 : rowDisabled(record));
|
|
106
107
|
// 只读文本时,采用当前formItem的name,单行编辑时,使用生成的虚拟的name
|
|
107
108
|
var baseName = isView ? name : namePath;
|
|
108
109
|
var TargetComponent;
|
|
@@ -114,17 +115,17 @@ var RenderField = function RenderField(_ref) {
|
|
|
114
115
|
}
|
|
115
116
|
if (typeof ((_fieldProps2 = _fieldProps) === null || _fieldProps2 === void 0 ? void 0 : _fieldProps2.disabled) === 'function') {
|
|
116
117
|
_disabled = _fieldProps.disabled(currentValue, rowData, options);
|
|
117
|
-
} else if (((_fieldProps3 = _fieldProps) === null || _fieldProps3 === void 0 ? void 0 : _fieldProps3.disabled)
|
|
118
|
+
} else if ((0, _lodash.isBoolean)((_fieldProps3 = _fieldProps) === null || _fieldProps3 === void 0 ? void 0 : _fieldProps3.disabled)) {
|
|
118
119
|
_disabled = _fieldProps.disabled;
|
|
119
120
|
}
|
|
121
|
+
if ((config === null || config === void 0 ? void 0 : config.disabled) === true) {
|
|
122
|
+
_disabled = column.disabled || (config === null || config === void 0 ? void 0 : config.disabled);
|
|
123
|
+
}
|
|
120
124
|
if (typeof column.disabled === 'function') {
|
|
121
125
|
_disabled = column.disabled(currentValue, rowData, options);
|
|
122
|
-
} else if (column.disabled
|
|
126
|
+
} else if ((0, _lodash.isBoolean)(column.disabled)) {
|
|
123
127
|
_disabled = column.disabled;
|
|
124
128
|
}
|
|
125
|
-
if ((config === null || config === void 0 ? void 0 : config.disabled) === true) {
|
|
126
|
-
_disabled = config === null || config === void 0 ? void 0 : config.disabled;
|
|
127
|
-
}
|
|
128
129
|
if (typeof rules === 'function') {
|
|
129
130
|
_rules = rules(currentValue, rowData, options);
|
|
130
131
|
}
|
|
@@ -268,7 +269,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
268
269
|
case 'ProEnum':
|
|
269
270
|
nextArgs[2].option = _args[1];
|
|
270
271
|
break;
|
|
271
|
-
case '
|
|
272
|
+
case 'ProCascader':
|
|
272
273
|
nextArgs[2].selectedOptions = _args[1];
|
|
273
274
|
break;
|
|
274
275
|
case 'DatePicker':
|
|
@@ -25,7 +25,7 @@ var _components = require("./components");
|
|
|
25
25
|
var _ProForm = _interopRequireDefault(require("../ProForm"));
|
|
26
26
|
var _empty = _interopRequireDefault(require("../assets/empty.png"));
|
|
27
27
|
var _locale = _interopRequireWildcard(require("../locale"));
|
|
28
|
-
var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalDiffTip", "rowKey"];
|
|
28
|
+
var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalDiffTip", "rowKey", "rowDisabled"];
|
|
29
29
|
var ProEditTable = function ProEditTable(_ref, ref) {
|
|
30
30
|
var _resetProps$id, _resetProps$id$split, _themeConfig$data2, _value$2;
|
|
31
31
|
var value = _ref.value,
|
|
@@ -54,6 +54,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
54
54
|
originalValues = _ref.originalValues,
|
|
55
55
|
originalDiffTip = _ref.originalDiffTip,
|
|
56
56
|
rowKey = _ref.rowKey,
|
|
57
|
+
rowDisabled = _ref.rowDisabled,
|
|
57
58
|
resetProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
58
59
|
// 上下文form
|
|
59
60
|
var contentForm = _antd.Form.useFormInstance();
|
|
@@ -68,12 +69,12 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
68
69
|
// 判断是否在formList内
|
|
69
70
|
if (namePath === null || namePath === void 0 ? void 0 : namePath.length) {
|
|
70
71
|
name = [].concat((0, _toConsumableArray2.default)(namePath), (0, _toConsumableArray2.default)(name.slice(1)));
|
|
72
|
+
disabled = (formFieldProps === null || formFieldProps === void 0 ? void 0 : formFieldProps.disabled) || disabled; // formFieldProps?.disabled可能是函数??
|
|
71
73
|
}
|
|
72
74
|
var tableRef = (0, _react.useRef)(null);
|
|
73
75
|
var _React$useContext = _react.default.useContext(_antd.ConfigProvider.ConfigContext),
|
|
74
76
|
getPrefixCls = _React$useContext.getPrefixCls;
|
|
75
77
|
var prefixCls = getPrefixCls();
|
|
76
|
-
disabled = (formFieldProps === null || formFieldProps === void 0 ? void 0 : formFieldProps.disabled) || disabled;
|
|
77
78
|
var _useLocalStorageState = (0, _ahooks.useLocalStorageState)('themeConfig'),
|
|
78
79
|
_useLocalStorageState2 = (0, _slicedToArray2.default)(_useLocalStorageState, 1),
|
|
79
80
|
themeConfig = _useLocalStorageState2[0];
|
|
@@ -162,7 +163,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
162
163
|
page: page,
|
|
163
164
|
originalValues: originalValues,
|
|
164
165
|
originalDiffTip: originalDiffTip,
|
|
165
|
-
prefixCls: prefixCls
|
|
166
|
+
prefixCls: prefixCls,
|
|
167
|
+
rowDisabled: rowDisabled
|
|
166
168
|
};
|
|
167
169
|
// 编辑行设置下样式
|
|
168
170
|
var _rowClassName = function _rowClassName(record) {
|
|
@@ -183,6 +185,15 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
183
185
|
selectedRowKeys: selectedRowKeys,
|
|
184
186
|
selectedRows: selectedRows
|
|
185
187
|
});
|
|
188
|
+
},
|
|
189
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
190
|
+
if (rowDisabled) {
|
|
191
|
+
var _disabled = rowDisabled(record);
|
|
192
|
+
return {
|
|
193
|
+
disabled: _disabled
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
return {};
|
|
186
197
|
}
|
|
187
198
|
}, rowSelection);
|
|
188
199
|
// 判断是否禁止添加、批量删除
|
|
@@ -36,7 +36,8 @@ var getActionColumn = function getActionColumn(config) {
|
|
|
36
36
|
validateKeys = config.validateKeys,
|
|
37
37
|
actionWidth = config.actionWidth,
|
|
38
38
|
actionProps = config.actionProps,
|
|
39
|
-
page = config.page
|
|
39
|
+
page = config.page,
|
|
40
|
+
rowDisabled = config.rowDisabled;
|
|
40
41
|
var pageNum = _utils.tools.calc(page.pageNum, '-', 1);
|
|
41
42
|
var firstIndex = _utils.tools.calc(pageNum, '*', page.pageSize);
|
|
42
43
|
// actionProps配置为false 默认不插入
|
|
@@ -188,6 +189,11 @@ var getActionColumn = function getActionColumn(config) {
|
|
|
188
189
|
fixed: 'right',
|
|
189
190
|
width: actionWidth || (virtualKey ? '120px' : '60px'),
|
|
190
191
|
render: function render(text, record, index) {
|
|
192
|
+
var _rowDisabled;
|
|
193
|
+
var _disabled = (_rowDisabled = rowDisabled === null || rowDisabled === void 0 ? void 0 : rowDisabled(record)) !== null && _rowDisabled !== void 0 ? _rowDisabled : false;
|
|
194
|
+
if (_disabled) {
|
|
195
|
+
return '';
|
|
196
|
+
}
|
|
191
197
|
return (0, _jsxRuntime.jsx)(_antd.Space, {
|
|
192
198
|
size: "middle",
|
|
193
199
|
children: actionBtns.map(function (btnConfig) {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
var _react = require("react");
|
|
@@ -17,12 +18,17 @@ var Group = function Group(props) {
|
|
|
17
18
|
disabled = props.disabled,
|
|
18
19
|
_props$allowClear = props.allowClear,
|
|
19
20
|
allowClear = _props$allowClear === void 0 ? true : _props$allowClear;
|
|
21
|
+
var _useState = (0, _react.useState)(false),
|
|
22
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
23
|
+
refresh = _useState2[0],
|
|
24
|
+
setRefresh = _useState2[1];
|
|
20
25
|
var idx = (0, _react.useRef)(-1);
|
|
21
26
|
(0, _react.useEffect)(function () {
|
|
22
27
|
var index = dataSource.findIndex(function (item) {
|
|
23
28
|
return item[fieldValue] === value;
|
|
24
29
|
});
|
|
25
30
|
idx.current = index;
|
|
31
|
+
setRefresh(!refresh);
|
|
26
32
|
}, [value]);
|
|
27
33
|
var handleClick = function handleClick(val, index) {
|
|
28
34
|
if (value === val) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
&-group-root-disabled {
|
|
11
11
|
color: rgba(0, 0, 0, 0.25);
|
|
12
|
-
.pro-enum-group-item{
|
|
12
|
+
.pro-enum-group-item {
|
|
13
13
|
cursor: not-allowed !important;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -52,8 +52,9 @@
|
|
|
52
52
|
&::after {
|
|
53
53
|
position: absolute;
|
|
54
54
|
top: var(--zaui-space-size-sm);
|
|
55
|
-
right:
|
|
55
|
+
right: -2px;
|
|
56
56
|
bottom: var(--zaui-space-size-sm);
|
|
57
|
+
z-index: 1;
|
|
57
58
|
width: 1px;
|
|
58
59
|
background: var(--zaui-brand);
|
|
59
60
|
opacity: 0.7;
|
|
@@ -28,10 +28,11 @@ var Container = function Container(props) {
|
|
|
28
28
|
disabled = _ref.disabled;
|
|
29
29
|
var _className = (0, _classnames2.default)((0, _defineProperty2.default)({
|
|
30
30
|
'pro-container': true,
|
|
31
|
-
'pro-container-diy': type === 'Container'
|
|
31
|
+
'pro-container-diy': type === 'Container',
|
|
32
|
+
'pro-container-empty': !(children === null || children === void 0 ? void 0 : children.length)
|
|
32
33
|
}, "".concat(className), className));
|
|
33
34
|
var _children = (0, _react.useMemo)(function () {
|
|
34
|
-
var result = children.map(function (item) {
|
|
35
|
+
var result = children === null || children === void 0 ? void 0 : children.map(function (item) {
|
|
35
36
|
return (0, _objectSpread2.default)({
|
|
36
37
|
clearNotShow: clearNotShow,
|
|
37
38
|
show: show,
|
|
@@ -29,7 +29,8 @@ var FormList = function FormList(props, ref) {
|
|
|
29
29
|
mode = _props$mode === void 0 ? 'line' : _props$mode,
|
|
30
30
|
meta = props.meta,
|
|
31
31
|
_props$span = props.span,
|
|
32
|
-
span = _props$span === void 0 ? 8 : _props$span
|
|
32
|
+
span = _props$span === void 0 ? 8 : _props$span,
|
|
33
|
+
disabled = props.disabled;
|
|
33
34
|
var _fields = fields.map(function (item) {
|
|
34
35
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
35
36
|
key: String(item.key)
|
|
@@ -38,8 +39,7 @@ var FormList = function FormList(props, ref) {
|
|
|
38
39
|
var _ref = _ProForm.default.useFieldProps() || {},
|
|
39
40
|
form = _ref.form,
|
|
40
41
|
name = _ref.name,
|
|
41
|
-
isView = _ref.isView
|
|
42
|
-
disabled = _ref.disabled;
|
|
42
|
+
isView = _ref.isView;
|
|
43
43
|
var errors = meta.errors;
|
|
44
44
|
var _namePath = (0, _utils.toArray)(name);
|
|
45
45
|
var processColumns = (0, _react.useCallback)(function (fieldName, namePath) {
|
|
@@ -95,7 +95,7 @@ var FormList = function FormList(props, ref) {
|
|
|
95
95
|
var _columns = processColumns(index, namePath);
|
|
96
96
|
return mode === 'block' ? (0, _jsxRuntime.jsx)(_BlockFields.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
97
97
|
columns: _columns,
|
|
98
|
-
disabled: disabled
|
|
98
|
+
disabled: disabled,
|
|
99
99
|
isView: isView,
|
|
100
100
|
namePath: namePath,
|
|
101
101
|
index: index,
|
|
@@ -109,7 +109,7 @@ var FormList = function FormList(props, ref) {
|
|
|
109
109
|
}, props), {}, {
|
|
110
110
|
mode: mode,
|
|
111
111
|
columns: _columns,
|
|
112
|
-
disabled: disabled
|
|
112
|
+
disabled: disabled,
|
|
113
113
|
isView: isView,
|
|
114
114
|
namePath: namePath,
|
|
115
115
|
index: index,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
type: string;
|
|
4
|
+
component: React.ReactElement;
|
|
5
|
+
value: any;
|
|
6
|
+
onChange: any;
|
|
7
|
+
disabled: any;
|
|
8
|
+
confirm: any;
|
|
9
|
+
fieldProps: any;
|
|
10
|
+
contextProps: any;
|
|
11
|
+
}
|
|
12
|
+
/** 渲染组件 */
|
|
13
|
+
declare const ComRender: React.FC<Props>;
|
|
14
|
+
export default ComRender;
|