@zat-design/sisyphus-react 3.4.6-beta.1 → 3.4.6-beta.3
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/dist/index.esm.css +8 -0
- package/dist/less.esm.css +8 -0
- package/es/ProForm/components/render/Render.js +1 -1
- package/es/ProForm/utils/index.d.ts +6 -1
- package/es/ProForm/utils/index.js +5 -5
- package/es/ProForm/utils/useForm.js +2 -1
- package/es/ProTree/components/ProTreeSelect/index.js +3 -3
- package/es/ProTree/components/ProTreeSelect/style/index.less +6 -8
- package/es/ProTree/style/index.less +15 -0
- package/lib/ProForm/components/render/Render.js +1 -1
- package/lib/ProForm/utils/index.d.ts +6 -1
- package/lib/ProForm/utils/index.js +5 -5
- package/lib/ProForm/utils/useForm.js +2 -1
- package/lib/ProTree/components/ProTreeSelect/index.js +3 -3
- package/lib/ProTree/components/ProTreeSelect/style/index.less +6 -8
- package/lib/ProTree/style/index.less +15 -0
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -3983,6 +3983,14 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3983
3983
|
.pro-form.pro-form-view .ant-form-item .pro-tree .ant-tree-checkbox * {
|
|
3984
3984
|
height: 16px !important;
|
|
3985
3985
|
}
|
|
3986
|
+
.pro-tree-select .ant-select-selector .check-mark-icon,
|
|
3987
|
+
.pro-tree-select-drop-down-container .ant-select-selector .check-mark-icon {
|
|
3988
|
+
display: none;
|
|
3989
|
+
}
|
|
3990
|
+
.pro-tree-select.ant-select-dropdown .ant-select-tree-node-content-wrapper .check-mark-icon,
|
|
3991
|
+
.pro-tree-select-drop-down-container.ant-select-dropdown .ant-select-tree-node-content-wrapper .check-mark-icon {
|
|
3992
|
+
display: none;
|
|
3993
|
+
}
|
|
3986
3994
|
.pro-drawer .pro-drawer-close {
|
|
3987
3995
|
position: absolute;
|
|
3988
3996
|
top: 6px;
|
package/dist/less.esm.css
CHANGED
|
@@ -3983,6 +3983,14 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3983
3983
|
.pro-form.pro-form-view .ant-form-item .pro-tree .ant-tree-checkbox * {
|
|
3984
3984
|
height: 16px !important;
|
|
3985
3985
|
}
|
|
3986
|
+
.pro-tree-select .ant-select-selector .check-mark-icon,
|
|
3987
|
+
.pro-tree-select-drop-down-container .ant-select-selector .check-mark-icon {
|
|
3988
|
+
display: none;
|
|
3989
|
+
}
|
|
3990
|
+
.pro-tree-select.ant-select-dropdown .ant-select-tree-node-content-wrapper .check-mark-icon,
|
|
3991
|
+
.pro-tree-select-drop-down-container.ant-select-dropdown .ant-select-tree-node-content-wrapper .check-mark-icon {
|
|
3992
|
+
display: none;
|
|
3993
|
+
}
|
|
3986
3994
|
.pro-drawer .pro-drawer-close {
|
|
3987
3995
|
position: absolute;
|
|
3988
3996
|
top: 6px;
|
|
@@ -276,7 +276,7 @@ var Render = function Render(props) {
|
|
|
276
276
|
// ProTreeSelect返回option
|
|
277
277
|
if (['ProTree'].includes(type)) {
|
|
278
278
|
var _args2, _args2$;
|
|
279
|
-
_args[2].option = findOptionByValue(lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.dataSource, (_args2 = _args) === null || _args2 === void 0 ? void 0 : (_args2$ = _args2[0]) === null || _args2$ === void 0 ? void 0 : _args2$[0]);
|
|
279
|
+
_args[2].option = findOptionByValue(lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.dataSource, (_args2 = _args) === null || _args2 === void 0 ? void 0 : (_args2$ = _args2[0]) === null || _args2$ === void 0 ? void 0 : _args2$[0], (lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.fieldNames) || {});
|
|
280
280
|
}
|
|
281
281
|
(_lastComponentProps$c2 = lastComponentProps[changeKey]) === null || _lastComponentProps$c2 === void 0 ? void 0 : _lastComponentProps$c2.call.apply(_lastComponentProps$c2, [lastComponentProps].concat(_toConsumableArray(_args)));
|
|
282
282
|
};
|
|
@@ -83,7 +83,12 @@ export declare const deleteForPath: (values: any, namePath: string | number | (s
|
|
|
83
83
|
* @param value 选中值
|
|
84
84
|
* @returns {}
|
|
85
85
|
*/
|
|
86
|
-
export declare const findOptionByValue: (treeData: any[], value: string | number
|
|
86
|
+
export declare const findOptionByValue: (treeData: any[], value: string | number, fieldNames: {
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
label?: string;
|
|
89
|
+
value?: string;
|
|
90
|
+
children?: string;
|
|
91
|
+
}) => any;
|
|
87
92
|
/**
|
|
88
93
|
* 对比依赖列表中的 值是否变更
|
|
89
94
|
*/
|
|
@@ -392,19 +392,19 @@ export var deleteForPath = function deleteForPath(values, namePath) {
|
|
|
392
392
|
* @param value 选中值
|
|
393
393
|
* @returns {}
|
|
394
394
|
*/
|
|
395
|
-
export var findOptionByValue = function findOptionByValue(treeData, value) {
|
|
395
|
+
export var findOptionByValue = function findOptionByValue(treeData, value, fieldNames) {
|
|
396
396
|
if (isObject(value)) {
|
|
397
397
|
return value;
|
|
398
398
|
}
|
|
399
399
|
for (var i = 0; i < (treeData === null || treeData === void 0 ? void 0 : treeData.length); i++) {
|
|
400
400
|
var node = treeData[i];
|
|
401
|
-
if (node.value === value) {
|
|
402
|
-
return omit(node, ['children']);
|
|
401
|
+
if (node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || 'value'] === value) {
|
|
402
|
+
return omit(node, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
|
|
403
403
|
}
|
|
404
404
|
if (node.children) {
|
|
405
|
-
var foundNode = findOptionByValue(node.children, value);
|
|
405
|
+
var foundNode = findOptionByValue(node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'], value, fieldNames);
|
|
406
406
|
if (foundNode) {
|
|
407
|
-
return omit(foundNode, ['children']);
|
|
407
|
+
return omit(foundNode, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
}
|
|
@@ -407,13 +407,13 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
407
407
|
}
|
|
408
408
|
return result;
|
|
409
409
|
}
|
|
410
|
-
var handleChange = function handleChange(newVal) {
|
|
410
|
+
var handleChange = function handleChange(newVal, label, extra) {
|
|
411
411
|
// newVal回来得一定是label、value
|
|
412
412
|
var result = newVal;
|
|
413
413
|
if (props === null || props === void 0 ? void 0 : props.labelInValue) {
|
|
414
414
|
result = getLabelByValue(selectList, newVal);
|
|
415
415
|
}
|
|
416
|
-
onChange && onChange(result,
|
|
416
|
+
onChange && onChange(result, label, extra);
|
|
417
417
|
// 重置搜索
|
|
418
418
|
showSearch && searchTreeEvent('');
|
|
419
419
|
};
|
|
@@ -486,7 +486,7 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
486
486
|
allowClear: allowClear || true,
|
|
487
487
|
showArrow: true,
|
|
488
488
|
treeNodeFilterProp: treeNodeFilterProp,
|
|
489
|
-
virtual:
|
|
489
|
+
virtual: true
|
|
490
490
|
}, selectProps);
|
|
491
491
|
if (value === null) {
|
|
492
492
|
delete treeProps.value;
|
|
@@ -40,6 +40,12 @@
|
|
|
40
40
|
color: red;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
// 隐藏单选下拉树后面勾号
|
|
44
|
+
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
45
|
+
.check-mark-icon{
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
43
49
|
// 单选
|
|
44
50
|
&.signal-tree{
|
|
45
51
|
.@{ant-prefix}-select-tree{
|
|
@@ -63,14 +69,6 @@
|
|
|
63
69
|
display: block;
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
|
-
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
67
|
-
background-color: transparent;
|
|
68
|
-
&.@{ant-prefix}-select-tree-node-selected{
|
|
69
|
-
.check-mark-icon{
|
|
70
|
-
display: block;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
72
|
.@{ant-prefix}-select-tree-treenode:hover{
|
|
75
73
|
background-color: #f5f5f5;
|
|
76
74
|
}
|
|
@@ -348,3 +348,18 @@
|
|
|
348
348
|
height: 16px !important;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
.pro-tree-select, .pro-tree-select-drop-down-container{
|
|
352
|
+
.@{ant-prefix}-select-selector{
|
|
353
|
+
.check-mark-icon{
|
|
354
|
+
display: none;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
&.@{ant-prefix}-select-dropdown{
|
|
358
|
+
// 隐藏单选下拉树后面勾号
|
|
359
|
+
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
360
|
+
.check-mark-icon{
|
|
361
|
+
display: none;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
@@ -274,7 +274,7 @@ var Render = function Render(props) {
|
|
|
274
274
|
// ProTreeSelect返回option
|
|
275
275
|
if (['ProTree'].includes(type)) {
|
|
276
276
|
var _args2, _args2$;
|
|
277
|
-
_args[2].option = (0, _index.findOptionByValue)(lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.dataSource, (_args2 = _args) === null || _args2 === void 0 ? void 0 : (_args2$ = _args2[0]) === null || _args2$ === void 0 ? void 0 : _args2$[0]);
|
|
277
|
+
_args[2].option = (0, _index.findOptionByValue)(lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.dataSource, (_args2 = _args) === null || _args2 === void 0 ? void 0 : (_args2$ = _args2[0]) === null || _args2$ === void 0 ? void 0 : _args2$[0], (lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.fieldNames) || {});
|
|
278
278
|
}
|
|
279
279
|
(_lastComponentProps$c2 = lastComponentProps[changeKey]) === null || _lastComponentProps$c2 === void 0 ? void 0 : _lastComponentProps$c2.call.apply(_lastComponentProps$c2, [lastComponentProps].concat((0, _toConsumableArray2.default)(_args)));
|
|
280
280
|
};
|
|
@@ -83,7 +83,12 @@ export declare const deleteForPath: (values: any, namePath: string | number | (s
|
|
|
83
83
|
* @param value 选中值
|
|
84
84
|
* @returns {}
|
|
85
85
|
*/
|
|
86
|
-
export declare const findOptionByValue: (treeData: any[], value: string | number
|
|
86
|
+
export declare const findOptionByValue: (treeData: any[], value: string | number, fieldNames: {
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
label?: string;
|
|
89
|
+
value?: string;
|
|
90
|
+
children?: string;
|
|
91
|
+
}) => any;
|
|
87
92
|
/**
|
|
88
93
|
* 对比依赖列表中的 值是否变更
|
|
89
94
|
*/
|
|
@@ -408,19 +408,19 @@ var deleteForPath = exports.deleteForPath = function deleteForPath(values, nameP
|
|
|
408
408
|
* @param value 选中值
|
|
409
409
|
* @returns {}
|
|
410
410
|
*/
|
|
411
|
-
var findOptionByValue = exports.findOptionByValue = function findOptionByValue(treeData, value) {
|
|
411
|
+
var findOptionByValue = exports.findOptionByValue = function findOptionByValue(treeData, value, fieldNames) {
|
|
412
412
|
if ((0, _lodash.isObject)(value)) {
|
|
413
413
|
return value;
|
|
414
414
|
}
|
|
415
415
|
for (var i = 0; i < (treeData === null || treeData === void 0 ? void 0 : treeData.length); i++) {
|
|
416
416
|
var node = treeData[i];
|
|
417
|
-
if (node.value === value) {
|
|
418
|
-
return (0, _lodash.omit)(node, ['children']);
|
|
417
|
+
if (node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || 'value'] === value) {
|
|
418
|
+
return (0, _lodash.omit)(node, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
|
|
419
419
|
}
|
|
420
420
|
if (node.children) {
|
|
421
|
-
var foundNode = findOptionByValue(node.children, value);
|
|
421
|
+
var foundNode = findOptionByValue(node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'], value, fieldNames);
|
|
422
422
|
if (foundNode) {
|
|
423
|
-
return (0, _lodash.omit)(foundNode, ['children']);
|
|
423
|
+
return (0, _lodash.omit)(foundNode, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
}
|
|
@@ -409,13 +409,13 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
409
409
|
}
|
|
410
410
|
return result;
|
|
411
411
|
}
|
|
412
|
-
var handleChange = function handleChange(newVal) {
|
|
412
|
+
var handleChange = function handleChange(newVal, label, extra) {
|
|
413
413
|
// newVal回来得一定是label、value
|
|
414
414
|
var result = newVal;
|
|
415
415
|
if (props === null || props === void 0 ? void 0 : props.labelInValue) {
|
|
416
416
|
result = getLabelByValue(selectList, newVal);
|
|
417
417
|
}
|
|
418
|
-
onChange && onChange(result,
|
|
418
|
+
onChange && onChange(result, label, extra);
|
|
419
419
|
// 重置搜索
|
|
420
420
|
showSearch && searchTreeEvent('');
|
|
421
421
|
};
|
|
@@ -488,7 +488,7 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
488
488
|
allowClear: allowClear || true,
|
|
489
489
|
showArrow: true,
|
|
490
490
|
treeNodeFilterProp: treeNodeFilterProp,
|
|
491
|
-
virtual:
|
|
491
|
+
virtual: true
|
|
492
492
|
}, selectProps);
|
|
493
493
|
if (value === null) {
|
|
494
494
|
delete treeProps.value;
|
|
@@ -40,6 +40,12 @@
|
|
|
40
40
|
color: red;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
// 隐藏单选下拉树后面勾号
|
|
44
|
+
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
45
|
+
.check-mark-icon{
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
43
49
|
// 单选
|
|
44
50
|
&.signal-tree{
|
|
45
51
|
.@{ant-prefix}-select-tree{
|
|
@@ -63,14 +69,6 @@
|
|
|
63
69
|
display: block;
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
|
-
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
67
|
-
background-color: transparent;
|
|
68
|
-
&.@{ant-prefix}-select-tree-node-selected{
|
|
69
|
-
.check-mark-icon{
|
|
70
|
-
display: block;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
72
|
.@{ant-prefix}-select-tree-treenode:hover{
|
|
75
73
|
background-color: #f5f5f5;
|
|
76
74
|
}
|
|
@@ -348,3 +348,18 @@
|
|
|
348
348
|
height: 16px !important;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
.pro-tree-select, .pro-tree-select-drop-down-container{
|
|
352
|
+
.@{ant-prefix}-select-selector{
|
|
353
|
+
.check-mark-icon{
|
|
354
|
+
display: none;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
&.@{ant-prefix}-select-dropdown{
|
|
358
|
+
// 隐藏单选下拉树后面勾号
|
|
359
|
+
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
360
|
+
.check-mark-icon{
|
|
361
|
+
display: none;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|