@zat-design/sisyphus-react 3.14.10-beta.5 → 3.14.10-beta.6
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/.gitnexus/lbug +0 -0
- package/.gitnexus/meta.json +14 -0
- package/es/ProConfigProvider/index.d.ts +1 -0
- package/es/ProForm/components/combination/ProCascader/index.js +22 -19
- package/lib/ProConfigProvider/index.d.ts +1 -0
- package/lib/ProForm/components/combination/ProCascader/index.js +22 -19
- package/package.json +1 -1
package/.gitnexus/lbug
ADDED
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repoPath": "/Users/zakj/site/work/xk-基线/xk-sisyphus-web",
|
|
3
|
+
"lastCommit": "5ab31e4d45abcc5c0646c554d6e8e44e53df7c9d",
|
|
4
|
+
"indexedAt": "2026-05-11T09:33:46.340Z",
|
|
5
|
+
"remoteUrl": "https://xk-wanchongyang:aaabbb111@git.zhonganinfo.com/zaxk/xk-sisyphus-web",
|
|
6
|
+
"stats": {
|
|
7
|
+
"files": 870,
|
|
8
|
+
"nodes": 9247,
|
|
9
|
+
"edges": 13683,
|
|
10
|
+
"communities": 235,
|
|
11
|
+
"processes": 266,
|
|
12
|
+
"embeddings": 0
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -11,6 +11,7 @@ export interface ProConfigState {
|
|
|
11
11
|
ProSelect?: Partial<PropSelectType> & Record<string, any>;
|
|
12
12
|
ProModalSelect?: Partial<ProModalSelectType> & Record<string, any>;
|
|
13
13
|
ProAddressBar?: Partial<ProCascaderType> & Record<string, any>;
|
|
14
|
+
ProCascader?: Partial<ProCascaderType> & Record<string, any>;
|
|
14
15
|
forms: Record<string, FormInstance | undefined>;
|
|
15
16
|
[key: string]: any;
|
|
16
17
|
}
|
|
@@ -53,8 +53,10 @@ var getViewLabel = _ref => {
|
|
|
53
53
|
return viewLabel;
|
|
54
54
|
};
|
|
55
55
|
var ProCascader = props => {
|
|
56
|
-
var _props$otherProps, _useRequest$options3, _value$slice,
|
|
57
|
-
var
|
|
56
|
+
var _ref3, _props$otherProps, _useRequest$options3, _value$slice, _ref8, _defaultLabel$filter, _locale$ProAddressBar, _locale$ProAddressBar2;
|
|
57
|
+
var proCascaderConfig = useProConfig('ProCascader');
|
|
58
|
+
var proAddressBarConfig = useProConfig('ProAddressBar');
|
|
59
|
+
var _ref2 = (_ref3 = proCascaderConfig !== null && proCascaderConfig !== void 0 ? proCascaderConfig : proAddressBarConfig) !== null && _ref3 !== void 0 ? _ref3 : {},
|
|
58
60
|
configDetailMaxLength = _ref2.detailMaxLength,
|
|
59
61
|
configEnumCode = _ref2.enumCode,
|
|
60
62
|
configCode = _ref2.code;
|
|
@@ -88,9 +90,9 @@ var ProCascader = props => {
|
|
|
88
90
|
desensitization = props.desensitization,
|
|
89
91
|
otherProps = props.otherProps,
|
|
90
92
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
91
|
-
var
|
|
92
|
-
isViewCon =
|
|
93
|
-
viewEmpty =
|
|
93
|
+
var _ref4 = ProForm.useFieldProps() || {},
|
|
94
|
+
isViewCon = _ref4.isView,
|
|
95
|
+
viewEmpty = _ref4.viewEmpty;
|
|
94
96
|
var addressCode = code || enumCode;
|
|
95
97
|
var realIsView = typeof isView === 'boolean' ? isView : isViewCon;
|
|
96
98
|
var realLevel = level || 2;
|
|
@@ -103,7 +105,8 @@ var ProCascader = props => {
|
|
|
103
105
|
if (!(props !== null && props !== void 0 && props.mode)) {
|
|
104
106
|
return (dics === null || dics === void 0 ? void 0 : dics[addressCode]) || [];
|
|
105
107
|
}
|
|
106
|
-
|
|
108
|
+
var fromEnum = Array.isArray(enumData) ? enumData[0] : [];
|
|
109
|
+
return fromEnum !== null && fromEnum !== void 0 && fromEnum.length ? fromEnum : (dics === null || dics === void 0 ? void 0 : dics[addressCode]) || [];
|
|
107
110
|
}, [dics === null || dics === void 0 ? void 0 : dics[addressCode], enumData]);
|
|
108
111
|
var realDataSource = useMemo(() => {
|
|
109
112
|
var innerDataSource = dataSource || (addressCode ? enumDataSource : []);
|
|
@@ -127,11 +130,11 @@ var ProCascader = props => {
|
|
|
127
130
|
|
|
128
131
|
// 默认成功处理函数
|
|
129
132
|
var defaultOnSuccessFun = res => {
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
status =
|
|
133
|
-
msg =
|
|
134
|
-
data =
|
|
133
|
+
var _ref5 = res || {},
|
|
134
|
+
_ref5$status = _ref5.status,
|
|
135
|
+
status = _ref5$status === void 0 ? 200 : _ref5$status,
|
|
136
|
+
msg = _ref5.message,
|
|
137
|
+
data = _ref5.data;
|
|
135
138
|
if (status !== 200) {
|
|
136
139
|
_message.error(msg);
|
|
137
140
|
return;
|
|
@@ -154,11 +157,11 @@ var ProCascader = props => {
|
|
|
154
157
|
if (transformResponse && typeof transformResponse === 'function') {
|
|
155
158
|
return transformResponse(res);
|
|
156
159
|
}
|
|
157
|
-
var
|
|
158
|
-
|
|
159
|
-
status =
|
|
160
|
-
msg =
|
|
161
|
-
data =
|
|
160
|
+
var _ref6 = res || {},
|
|
161
|
+
_ref6$status = _ref6.status,
|
|
162
|
+
status = _ref6$status === void 0 ? 200 : _ref6$status,
|
|
163
|
+
msg = _ref6.message,
|
|
164
|
+
data = _ref6.data;
|
|
162
165
|
if (status !== 200) {
|
|
163
166
|
_message.error(msg);
|
|
164
167
|
return;
|
|
@@ -214,8 +217,8 @@ var ProCascader = props => {
|
|
|
214
217
|
if (!(useRequest !== null && useRequest !== void 0 && useRequest.service)) {
|
|
215
218
|
return;
|
|
216
219
|
}
|
|
217
|
-
var
|
|
218
|
-
manual =
|
|
220
|
+
var _ref7 = (useRequest === null || useRequest === void 0 ? void 0 : useRequest.options) || {},
|
|
221
|
+
manual = _ref7.manual;
|
|
219
222
|
if (manual || cacheList !== null && cacheList !== void 0 && cacheList.length) {
|
|
220
223
|
return;
|
|
221
224
|
}
|
|
@@ -265,7 +268,7 @@ var ProCascader = props => {
|
|
|
265
268
|
return label === null || label === void 0 ? void 0 : label.filter(item => !!item).join('/');
|
|
266
269
|
};
|
|
267
270
|
var addressValue = isAddressMode ? value && (_value$slice = value.slice(0, realLevel)) !== null && _value$slice !== void 0 && _value$slice.some(item => !!item) ? value.slice(0, realLevel) : undefined : value;
|
|
268
|
-
var viewValue = isAddressMode ? ((
|
|
271
|
+
var viewValue = isAddressMode ? ((_ref8 = [...defaultLabel, value === null || value === void 0 ? void 0 : value[realLevel]]) === null || _ref8 === void 0 || (_ref8 = _ref8.filter(item => !!item)) === null || _ref8 === void 0 ? void 0 : _ref8.join(separator)) || '-' : (defaultLabel === null || defaultLabel === void 0 || (_defaultLabel$filter = defaultLabel.filter(item => !!item)) === null || _defaultLabel$filter === void 0 ? void 0 : _defaultLabel$filter.join(separator)) || '-';
|
|
269
272
|
var findSelectedOptions = function findSelectedOptions(options, value) {
|
|
270
273
|
var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
271
274
|
var _value = value !== null && value !== void 0 ? value : [];
|
|
@@ -11,6 +11,7 @@ export interface ProConfigState {
|
|
|
11
11
|
ProSelect?: Partial<PropSelectType> & Record<string, any>;
|
|
12
12
|
ProModalSelect?: Partial<ProModalSelectType> & Record<string, any>;
|
|
13
13
|
ProAddressBar?: Partial<ProCascaderType> & Record<string, any>;
|
|
14
|
+
ProCascader?: Partial<ProCascaderType> & Record<string, any>;
|
|
14
15
|
forms: Record<string, FormInstance | undefined>;
|
|
15
16
|
[key: string]: any;
|
|
16
17
|
}
|
|
@@ -59,8 +59,10 @@ var getViewLabel = _ref => {
|
|
|
59
59
|
return viewLabel;
|
|
60
60
|
};
|
|
61
61
|
var ProCascader = props => {
|
|
62
|
-
var _props$otherProps, _useRequest$options3, _value$slice,
|
|
63
|
-
var
|
|
62
|
+
var _ref3, _props$otherProps, _useRequest$options3, _value$slice, _ref8, _defaultLabel$filter, _locale$ProAddressBar, _locale$ProAddressBar2;
|
|
63
|
+
var proCascaderConfig = (0, _ProConfigProvider.useProConfig)('ProCascader');
|
|
64
|
+
var proAddressBarConfig = (0, _ProConfigProvider.useProConfig)('ProAddressBar');
|
|
65
|
+
var _ref2 = (_ref3 = proCascaderConfig !== null && proCascaderConfig !== void 0 ? proCascaderConfig : proAddressBarConfig) !== null && _ref3 !== void 0 ? _ref3 : {},
|
|
64
66
|
configDetailMaxLength = _ref2.detailMaxLength,
|
|
65
67
|
configEnumCode = _ref2.enumCode,
|
|
66
68
|
configCode = _ref2.code;
|
|
@@ -94,9 +96,9 @@ var ProCascader = props => {
|
|
|
94
96
|
desensitization = props.desensitization,
|
|
95
97
|
otherProps = props.otherProps,
|
|
96
98
|
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
97
|
-
var
|
|
98
|
-
isViewCon =
|
|
99
|
-
viewEmpty =
|
|
99
|
+
var _ref4 = _.default.useFieldProps() || {},
|
|
100
|
+
isViewCon = _ref4.isView,
|
|
101
|
+
viewEmpty = _ref4.viewEmpty;
|
|
100
102
|
var addressCode = code || enumCode;
|
|
101
103
|
var realIsView = typeof isView === 'boolean' ? isView : isViewCon;
|
|
102
104
|
var realLevel = level || 2;
|
|
@@ -109,7 +111,8 @@ var ProCascader = props => {
|
|
|
109
111
|
if (!(props !== null && props !== void 0 && props.mode)) {
|
|
110
112
|
return (dics === null || dics === void 0 ? void 0 : dics[addressCode]) || [];
|
|
111
113
|
}
|
|
112
|
-
|
|
114
|
+
var fromEnum = Array.isArray(enumData) ? enumData[0] : [];
|
|
115
|
+
return fromEnum !== null && fromEnum !== void 0 && fromEnum.length ? fromEnum : (dics === null || dics === void 0 ? void 0 : dics[addressCode]) || [];
|
|
113
116
|
}, [dics === null || dics === void 0 ? void 0 : dics[addressCode], enumData]);
|
|
114
117
|
var realDataSource = (0, _react.useMemo)(() => {
|
|
115
118
|
var innerDataSource = dataSource || (addressCode ? enumDataSource : []);
|
|
@@ -133,11 +136,11 @@ var ProCascader = props => {
|
|
|
133
136
|
|
|
134
137
|
// 默认成功处理函数
|
|
135
138
|
var defaultOnSuccessFun = res => {
|
|
136
|
-
var
|
|
137
|
-
|
|
138
|
-
status =
|
|
139
|
-
msg =
|
|
140
|
-
data =
|
|
139
|
+
var _ref5 = res || {},
|
|
140
|
+
_ref5$status = _ref5.status,
|
|
141
|
+
status = _ref5$status === void 0 ? 200 : _ref5$status,
|
|
142
|
+
msg = _ref5.message,
|
|
143
|
+
data = _ref5.data;
|
|
141
144
|
if (status !== 200) {
|
|
142
145
|
_message2.default.error(msg);
|
|
143
146
|
return;
|
|
@@ -160,11 +163,11 @@ var ProCascader = props => {
|
|
|
160
163
|
if (transformResponse && typeof transformResponse === 'function') {
|
|
161
164
|
return transformResponse(res);
|
|
162
165
|
}
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
status =
|
|
166
|
-
msg =
|
|
167
|
-
data =
|
|
166
|
+
var _ref6 = res || {},
|
|
167
|
+
_ref6$status = _ref6.status,
|
|
168
|
+
status = _ref6$status === void 0 ? 200 : _ref6$status,
|
|
169
|
+
msg = _ref6.message,
|
|
170
|
+
data = _ref6.data;
|
|
168
171
|
if (status !== 200) {
|
|
169
172
|
_message2.default.error(msg);
|
|
170
173
|
return;
|
|
@@ -220,8 +223,8 @@ var ProCascader = props => {
|
|
|
220
223
|
if (!(useRequest !== null && useRequest !== void 0 && useRequest.service)) {
|
|
221
224
|
return;
|
|
222
225
|
}
|
|
223
|
-
var
|
|
224
|
-
manual =
|
|
226
|
+
var _ref7 = (useRequest === null || useRequest === void 0 ? void 0 : useRequest.options) || {},
|
|
227
|
+
manual = _ref7.manual;
|
|
225
228
|
if (manual || cacheList !== null && cacheList !== void 0 && cacheList.length) {
|
|
226
229
|
return;
|
|
227
230
|
}
|
|
@@ -271,7 +274,7 @@ var ProCascader = props => {
|
|
|
271
274
|
return label === null || label === void 0 ? void 0 : label.filter(item => !!item).join('/');
|
|
272
275
|
};
|
|
273
276
|
var addressValue = isAddressMode ? value && (_value$slice = value.slice(0, realLevel)) !== null && _value$slice !== void 0 && _value$slice.some(item => !!item) ? value.slice(0, realLevel) : undefined : value;
|
|
274
|
-
var viewValue = isAddressMode ? ((
|
|
277
|
+
var viewValue = isAddressMode ? ((_ref8 = [...defaultLabel, value === null || value === void 0 ? void 0 : value[realLevel]]) === null || _ref8 === void 0 || (_ref8 = _ref8.filter(item => !!item)) === null || _ref8 === void 0 ? void 0 : _ref8.join(separator)) || '-' : (defaultLabel === null || defaultLabel === void 0 || (_defaultLabel$filter = defaultLabel.filter(item => !!item)) === null || _defaultLabel$filter === void 0 ? void 0 : _defaultLabel$filter.join(separator)) || '-';
|
|
275
278
|
var findSelectedOptions = function findSelectedOptions(options, value) {
|
|
276
279
|
var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
277
280
|
var _value = value !== null && value !== void 0 ? value : [];
|