@zat-design/sisyphus-react 3.7.2 → 3.7.3-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/dist/index.esm.css +79 -0
- package/dist/less.esm.css +76 -0
- package/es/ProAction/index.js +4 -4
- package/es/ProDownload/index.d.ts +1 -1
- package/es/ProEditTable/components/ActionButton/index.d.ts +1 -1
- package/es/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
- package/es/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/{ListChanged.d.ts → ListChangedWrapper.d.ts} +4 -3
- package/es/ProEditTable/components/RenderField/{ListChanged.js → ListChangedWrapper.js} +22 -10
- package/es/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/index.js +29 -24
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +1 -1
- package/es/ProEditTable/components/Summary/index.d.ts +1 -1
- package/es/ProEditTable/propsType.d.ts +1 -1
- package/es/ProEditTable/utils/config.d.ts +1 -1
- package/es/ProEditTable/utils/getDefaultProps.js +2 -1
- package/es/ProEditTable/utils/tools.js +3 -3
- package/es/ProEnum/components/Group.d.ts +1 -1
- package/es/ProEnum/components/Tag.d.ts +1 -1
- package/es/ProEnum/index.d.ts +2 -2
- package/es/ProEnum/index.js +5 -4
- package/es/ProEnum/style/index.less +8 -4
- package/es/ProEnum/utils/eventCenter.js +2 -1
- package/es/ProEnum/utils/getEnumLabel.d.ts +1 -1
- package/es/ProEnum/utils/index.d.ts +1 -1
- package/es/ProEnum/utils/index.js +4 -0
- package/es/ProForm/components/base/Input/index.d.ts +1 -1
- package/es/ProForm/components/combination/Container/index.js +5 -3
- package/es/ProForm/components/combination/Container/propsType.d.ts +2 -1
- package/es/ProForm/components/combination/FormList/utils.js +5 -4
- package/es/ProForm/components/combination/Group/component/ComRender.js +3 -1
- package/es/ProForm/components/combination/Group/utils.js +22 -5
- package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/index.js +7 -7
- package/es/ProForm/components/combination/ProNumberRange/index.js +3 -1
- package/es/ProForm/components/old/InputRange/index.d.ts +1 -1
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +2 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +2 -1
- package/es/ProForm/components/render/ChangedWrapper.d.ts +16 -0
- package/es/ProForm/components/render/{Changed.js → ChangedWrapper.js} +43 -15
- package/es/ProForm/components/render/Render.js +7 -8
- package/es/ProForm/components/render/RenderFields.d.ts +2 -3
- package/es/ProForm/components/render/RenderFields.js +3 -4
- package/es/ProForm/components/render/propsType.d.ts +4 -3
- package/es/ProForm/index.js +3 -6
- package/es/ProForm/propsType.d.ts +12 -2
- package/es/ProForm/style/index.less +102 -4
- package/es/ProForm/utils/diffOriginal.d.ts +4 -4
- package/es/ProForm/utils/diffOriginal.js +18 -7
- package/es/ProForm/utils/index.js +10 -14
- package/es/ProForm/utils/rulesCreator.d.ts +1 -1
- package/es/ProForm/utils/rulesCreator.js +25 -22
- package/es/ProForm/utils/valueType.js +2 -2
- package/es/ProIcon/utils/index.js +3 -4
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
- package/es/ProLayout/components/ProCollapse/index.d.ts +1 -1
- package/es/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/es/ProLayout/index.d.ts +4 -4
- package/es/ProLayout/utils/index.js +9 -9
- package/es/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
- package/es/ProSelect/index.d.ts +1 -1
- package/es/ProSelect/index.js +11 -8
- package/es/ProSelect/propsType.d.ts +4 -0
- package/es/ProSelect/utils/index.d.ts +1 -7
- package/es/ProSelect/utils/index.js +13 -5
- package/es/ProStep/components/Anchor/index.d.ts +1 -1
- package/es/ProStep/components/Item/index.d.ts +1 -1
- package/es/ProStep/components/Listener/index.d.ts +1 -1
- package/es/ProStep/components/Listener/index.js +5 -2
- package/es/ProStep/components/Step/index.d.ts +1 -1
- package/es/ProStep/index.d.ts +3 -3
- package/es/ProStep/index.js +24 -17
- package/es/ProTable/components/FormatColumn/index.js +3 -3
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -9
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -1
- package/es/ProTable/components/RenderFooter/index.d.ts +1 -1
- package/es/ProTable/components/RenderTableHeader/index.d.ts +1 -1
- package/es/ProTable/components/TableResizable/index.d.ts +1 -1
- package/es/ProTable/index.d.ts +1 -1
- package/es/ProTabs/components/Card/index.d.ts +1 -1
- package/es/ProThemeTools/component/ProTools/index.d.ts +1 -1
- package/es/ProThemeTools/index.d.ts +1 -1
- package/es/ProTooltip/index.d.ts +1 -1
- package/es/ProTree/components/CloseIcon.d.ts +2 -1
- package/es/ProTree/components/List.d.ts +1 -1
- package/es/ProTree/components/ProTree.d.ts +1 -1
- package/es/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/es/ProTree/components/ProTreeSelect/index.js +18 -18
- package/es/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/es/ProTree/components/SearchTitle.d.ts +1 -1
- package/es/ProTree/components/Tree.d.ts +1 -1
- package/es/ProTree/components/Tree.js +3 -3
- package/es/ProTree/index.d.ts +1 -1
- package/es/ProTree/utils.js +11 -12
- package/es/ProTreeModal/components/Cascader.d.ts +1 -1
- package/es/ProTreeModal/components/CloseIcon.d.ts +2 -1
- package/es/ProTreeModal/components/SearchTitle.d.ts +1 -1
- package/es/ProTreeModal/components/Tree.js +6 -6
- package/es/ProTreeModal/components/Trigger.d.ts +1 -1
- package/es/ProTreeModal/index.d.ts +1 -1
- package/es/ProTreeModal/utils.js +11 -12
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/es/ProUpload/index.js +1 -1
- package/es/ProUpload/propsType.d.ts +5 -0
- package/es/style/theme/antd.less +5 -0
- package/es/style/theme/index.less +1 -0
- package/es/style/theme/tokens.less +1 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +13 -0
- package/lib/ProAction/index.js +4 -4
- package/lib/ProDownload/index.d.ts +1 -1
- package/lib/ProEditTable/components/ActionButton/index.d.ts +1 -1
- package/lib/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
- package/lib/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/{ListChanged.d.ts → ListChangedWrapper.d.ts} +4 -3
- package/lib/ProEditTable/components/RenderField/{ListChanged.js → ListChangedWrapper.js} +25 -11
- package/lib/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/index.js +30 -25
- package/lib/ProEditTable/components/RenderToolbar/index.d.ts +1 -1
- package/lib/ProEditTable/components/Summary/index.d.ts +1 -1
- package/lib/ProEditTable/propsType.d.ts +1 -1
- package/lib/ProEditTable/utils/config.d.ts +1 -1
- package/lib/ProEditTable/utils/getDefaultProps.js +3 -1
- package/lib/ProEditTable/utils/tools.js +3 -3
- package/lib/ProEnum/components/Group.d.ts +1 -1
- package/lib/ProEnum/components/Tag.d.ts +1 -1
- package/lib/ProEnum/index.d.ts +2 -2
- package/lib/ProEnum/index.js +5 -4
- package/lib/ProEnum/style/index.less +8 -4
- package/lib/ProEnum/utils/eventCenter.js +2 -1
- package/lib/ProEnum/utils/getEnumLabel.d.ts +1 -1
- package/lib/ProEnum/utils/index.d.ts +1 -1
- package/lib/ProEnum/utils/index.js +4 -0
- package/lib/ProForm/components/base/Input/index.d.ts +1 -1
- package/lib/ProForm/components/combination/Container/index.js +5 -3
- package/lib/ProForm/components/combination/Container/propsType.d.ts +2 -1
- package/lib/ProForm/components/combination/FormList/utils.js +4 -3
- package/lib/ProForm/components/combination/Group/component/ComRender.js +3 -1
- package/lib/ProForm/components/combination/Group/utils.js +22 -5
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/index.js +7 -7
- package/lib/ProForm/components/combination/ProNumberRange/index.js +3 -1
- package/lib/ProForm/components/old/InputRange/index.d.ts +1 -1
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +2 -1
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +2 -1
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +16 -0
- package/lib/ProForm/components/render/{Changed.js → ChangedWrapper.js} +43 -15
- package/lib/ProForm/components/render/Render.js +7 -8
- package/lib/ProForm/components/render/RenderFields.d.ts +2 -3
- package/lib/ProForm/components/render/RenderFields.js +3 -4
- package/lib/ProForm/components/render/propsType.d.ts +4 -3
- package/lib/ProForm/index.js +3 -6
- package/lib/ProForm/propsType.d.ts +12 -2
- package/lib/ProForm/style/index.less +102 -4
- package/lib/ProForm/utils/diffOriginal.d.ts +4 -4
- package/lib/ProForm/utils/diffOriginal.js +18 -7
- package/lib/ProForm/utils/index.js +10 -10
- package/lib/ProForm/utils/rulesCreator.d.ts +1 -1
- package/lib/ProForm/utils/rulesCreator.js +25 -22
- package/lib/ProForm/utils/valueType.js +2 -2
- package/lib/ProIcon/utils/index.js +3 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
- package/lib/ProLayout/components/ProCollapse/index.d.ts +1 -1
- package/lib/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/lib/ProLayout/index.d.ts +4 -4
- package/lib/ProLayout/utils/index.js +9 -9
- package/lib/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
- package/lib/ProSelect/index.d.ts +1 -1
- package/lib/ProSelect/index.js +11 -8
- package/lib/ProSelect/propsType.d.ts +4 -0
- package/lib/ProSelect/utils/index.d.ts +1 -7
- package/lib/ProSelect/utils/index.js +13 -5
- package/lib/ProStep/components/Anchor/index.d.ts +1 -1
- package/lib/ProStep/components/Item/index.d.ts +1 -1
- package/lib/ProStep/components/Listener/index.d.ts +1 -1
- package/lib/ProStep/components/Listener/index.js +5 -2
- package/lib/ProStep/components/Step/index.d.ts +1 -1
- package/lib/ProStep/index.d.ts +3 -3
- package/lib/ProStep/index.js +24 -17
- package/lib/ProTable/components/FormatColumn/index.js +3 -3
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -8
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -1
- package/lib/ProTable/components/RenderFooter/index.d.ts +1 -1
- package/lib/ProTable/components/RenderTableHeader/index.d.ts +1 -1
- package/lib/ProTable/components/TableResizable/index.d.ts +1 -1
- package/lib/ProTable/index.d.ts +1 -1
- package/lib/ProTabs/components/Card/index.d.ts +1 -1
- package/lib/ProThemeTools/component/ProTools/index.d.ts +1 -1
- package/lib/ProThemeTools/index.d.ts +1 -1
- package/lib/ProTooltip/index.d.ts +1 -1
- package/lib/ProTree/components/CloseIcon.d.ts +2 -1
- package/lib/ProTree/components/List.d.ts +1 -1
- package/lib/ProTree/components/ProTree.d.ts +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.js +18 -18
- package/lib/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/lib/ProTree/components/SearchTitle.d.ts +1 -1
- package/lib/ProTree/components/Tree.d.ts +1 -1
- package/lib/ProTree/components/Tree.js +3 -3
- package/lib/ProTree/index.d.ts +1 -1
- package/lib/ProTree/utils.js +11 -11
- package/lib/ProTreeModal/components/Cascader.d.ts +1 -1
- package/lib/ProTreeModal/components/CloseIcon.d.ts +2 -1
- package/lib/ProTreeModal/components/SearchTitle.d.ts +1 -1
- package/lib/ProTreeModal/components/Tree.js +6 -6
- package/lib/ProTreeModal/components/Trigger.d.ts +1 -1
- package/lib/ProTreeModal/index.d.ts +1 -1
- package/lib/ProTreeModal/utils.js +11 -11
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/lib/ProUpload/index.js +1 -1
- package/lib/ProUpload/propsType.d.ts +5 -0
- package/lib/style/theme/antd.less +5 -0
- package/lib/style/theme/index.less +1 -0
- package/lib/style/theme/tokens.less +1 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +19 -0
- package/package.json +2 -1
- package/es/ProForm/components/render/Changed.d.ts +0 -14
- package/lib/ProForm/components/render/Changed.d.ts +0 -14
- /package/es/ProForm/utils/{useChanged.d.ts → _useChanged.d.ts} +0 -0
- /package/es/ProForm/utils/{useChanged.js → _useChanged.js} +0 -0
- /package/es/ProForm/utils/{useListChanged.d.ts → _useListChanged.d.ts} +0 -0
- /package/es/ProForm/utils/{useListChanged.js → _useListChanged.js} +0 -0
- /package/lib/ProForm/utils/{useChanged.d.ts → _useChanged.d.ts} +0 -0
- /package/lib/ProForm/utils/{useChanged.js → _useChanged.js} +0 -0
- /package/lib/ProForm/utils/{useListChanged.d.ts → _useListChanged.d.ts} +0 -0
- /package/lib/ProForm/utils/{useListChanged.js → _useListChanged.js} +0 -0
package/dist/index.esm.css
CHANGED
|
@@ -2890,12 +2890,14 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2890
2890
|
margin-bottom: calc(var(--zaui-space-size-md, 16px) * var(--zaui-size, 1)) !important;
|
|
2891
2891
|
}
|
|
2892
2892
|
.pro-form .ant-form-item.pro-form-item-width-auto .ant-form-item-control-input {
|
|
2893
|
+
width: 100%;
|
|
2893
2894
|
-webkit-box-flex: inherit;
|
|
2894
2895
|
-webkit-flex-grow: inherit;
|
|
2895
2896
|
-ms-flex-positive: inherit;
|
|
2896
2897
|
flex-grow: inherit;
|
|
2897
2898
|
}
|
|
2898
2899
|
.pro-form .ant-form-item.pro-form-item-width-auto .ant-form-item-control-input-content {
|
|
2900
|
+
width: 100%;
|
|
2899
2901
|
-webkit-box-flex: initial;
|
|
2900
2902
|
-webkit-flex: initial;
|
|
2901
2903
|
-ms-flex: initial;
|
|
@@ -3059,6 +3061,13 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3059
3061
|
.pro-form .pro-form-list-mode-block .pro-collapse-content .ant-row {
|
|
3060
3062
|
width: auto;
|
|
3061
3063
|
}
|
|
3064
|
+
.pro-form .pro-form-item-changed {
|
|
3065
|
+
border-radius: 4px;
|
|
3066
|
+
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3067
|
+
}
|
|
3068
|
+
.pro-form .pro-form-item-changed .ant-select.ant-select-disabled .ant-select-selector {
|
|
3069
|
+
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3070
|
+
}
|
|
3062
3071
|
.pro-form .pro-form-item-changed span.ant-input-affix-wrapper,
|
|
3063
3072
|
.pro-form .pro-form-item-changed .ant-select .ant-select-selector,
|
|
3064
3073
|
.pro-form .pro-form-item-changed .ant-picker,
|
|
@@ -3095,11 +3104,77 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3095
3104
|
.pro-form .pro-form-item-changed .ant-form-item-control-input-content > .ant-input-group .forever-checkbox {
|
|
3096
3105
|
background: var(--zaui-contract-bg, #fffaa1);
|
|
3097
3106
|
}
|
|
3107
|
+
.pro-form .pro-form-item-changed .ant-checkbox-group {
|
|
3108
|
+
padding: 5px 0;
|
|
3109
|
+
}
|
|
3110
|
+
.pro-form .pro-form-item-changed:has(.ant-switch) {
|
|
3111
|
+
padding: 5px 0;
|
|
3112
|
+
}
|
|
3113
|
+
.pro-form .pro-form-item-changed .ant-input-textarea > textarea {
|
|
3114
|
+
background: var(--zaui-contract-bg, #fffaa1);
|
|
3115
|
+
}
|
|
3098
3116
|
.pro-form .pro-form-item-changed .pro-form-view-container {
|
|
3099
3117
|
padding: 4px 8px;
|
|
3100
3118
|
background: var(--zaui-contract-bg, #fffaa1);
|
|
3101
3119
|
border-radius: 4px;
|
|
3102
3120
|
}
|
|
3121
|
+
.pro-form .pro-form-item-add {
|
|
3122
|
+
border-radius: 4px;
|
|
3123
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
3124
|
+
}
|
|
3125
|
+
.pro-form .pro-form-item-add .ant-select.ant-select-disabled .ant-select-selector {
|
|
3126
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
3127
|
+
}
|
|
3128
|
+
.pro-form .pro-form-item-add span.ant-input-affix-wrapper,
|
|
3129
|
+
.pro-form .pro-form-item-add .ant-select .ant-select-selector,
|
|
3130
|
+
.pro-form .pro-form-item-add .ant-picker,
|
|
3131
|
+
.pro-form .pro-form-item-add .ant-input-number {
|
|
3132
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
3133
|
+
}
|
|
3134
|
+
.pro-form .pro-form-item-add span.ant-input-affix-wrapper input,
|
|
3135
|
+
.pro-form .pro-form-item-add .ant-select .ant-select-selector input,
|
|
3136
|
+
.pro-form .pro-form-item-add .ant-picker input,
|
|
3137
|
+
.pro-form .pro-form-item-add .ant-input-number input {
|
|
3138
|
+
background: transparent !important;
|
|
3139
|
+
}
|
|
3140
|
+
.pro-form .pro-form-item-add span.ant-input-affix-wrapper .ant-select-selection-placeholder,
|
|
3141
|
+
.pro-form .pro-form-item-add .ant-select .ant-select-selector .ant-select-selection-placeholder,
|
|
3142
|
+
.pro-form .pro-form-item-add .ant-picker .ant-select-selection-placeholder,
|
|
3143
|
+
.pro-form .pro-form-item-add .ant-input-number .ant-select-selection-placeholder {
|
|
3144
|
+
z-index: 9;
|
|
3145
|
+
}
|
|
3146
|
+
.pro-form .pro-form-item-add .ant-form-item-control:has(.ant-switch-handle),
|
|
3147
|
+
.pro-form .pro-form-item-add .ant-form-item-control:has(.ant-checkbox-wrapper-in-form-item) {
|
|
3148
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3149
|
+
border-radius: 4px;
|
|
3150
|
+
}
|
|
3151
|
+
.pro-form .pro-form-item-add .ant-form-item-control-input-content > span {
|
|
3152
|
+
border-radius: 4px;
|
|
3153
|
+
padding: 5px 8px;
|
|
3154
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3155
|
+
}
|
|
3156
|
+
.pro-form .pro-form-item-add .ant-form-item-control-input-content > .pro-address .ant-select-selector,
|
|
3157
|
+
.pro-form .pro-form-item-add .ant-form-item-control-input-content > .pro-address .ant-input-affix-wrapper,
|
|
3158
|
+
.pro-form .pro-form-item-add .ant-form-item-control-input-content > .pro-address .ant-input-disabled {
|
|
3159
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3160
|
+
}
|
|
3161
|
+
.pro-form .pro-form-item-add .ant-form-item-control-input-content > .ant-input-group .forever-checkbox {
|
|
3162
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3163
|
+
}
|
|
3164
|
+
.pro-form .pro-form-item-add .ant-checkbox-group {
|
|
3165
|
+
padding: 5px 0;
|
|
3166
|
+
}
|
|
3167
|
+
.pro-form .pro-form-item-add:has(.ant-switch) {
|
|
3168
|
+
padding: 5px 0;
|
|
3169
|
+
}
|
|
3170
|
+
.pro-form .pro-form-item-add .ant-input-textarea > textarea {
|
|
3171
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3172
|
+
}
|
|
3173
|
+
.pro-form .pro-form-item-add .pro-form-view-container {
|
|
3174
|
+
padding: 4px 8px;
|
|
3175
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3176
|
+
border-radius: 4px;
|
|
3177
|
+
}
|
|
3103
3178
|
.pro-upload .pro-upload-dragger .pro-upload-handle-box {
|
|
3104
3179
|
padding: var(--zaui-space-size-sm, 8px);
|
|
3105
3180
|
background: #f8f9fa;
|
|
@@ -5287,6 +5362,7 @@ input[type='button'] {
|
|
|
5287
5362
|
--zaui-table-selected-hover-bg: var(--zaui-table-hover-bg);
|
|
5288
5363
|
--zaui-table-nested-bg: #fafcfe;
|
|
5289
5364
|
--zaui-contract-bg: #fffaa1;
|
|
5365
|
+
--zaui-contract-bg-add: #d2fff4;
|
|
5290
5366
|
--zaui-form-label-width: 130px;
|
|
5291
5367
|
--zaui-border-radius: 8px;
|
|
5292
5368
|
--zaui-border-radius-card: 4px;
|
|
@@ -5882,3 +5958,6 @@ input[type='button'] {
|
|
|
5882
5958
|
.ant-tooltip > .ant-tooltip-content > .ant-tooltip-arrow > .ant-tooltip-arrow-content {
|
|
5883
5959
|
--antd-arrow-background-color: linear-gradient(to right bottom, rgba(255, 255, 255, 0.95), #ffffff);
|
|
5884
5960
|
}
|
|
5961
|
+
.ant-picker.ant-picker-disabled {
|
|
5962
|
+
background: var(--zaui-disabled-bg);
|
|
5963
|
+
}
|
package/dist/less.esm.css
CHANGED
|
@@ -2890,12 +2890,14 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2890
2890
|
margin-bottom: calc(var(--zaui-space-size-md, 16px) * var(--zaui-size, 1)) !important;
|
|
2891
2891
|
}
|
|
2892
2892
|
.pro-form .ant-form-item.pro-form-item-width-auto .ant-form-item-control-input {
|
|
2893
|
+
width: 100%;
|
|
2893
2894
|
-webkit-box-flex: inherit;
|
|
2894
2895
|
-webkit-flex-grow: inherit;
|
|
2895
2896
|
-ms-flex-positive: inherit;
|
|
2896
2897
|
flex-grow: inherit;
|
|
2897
2898
|
}
|
|
2898
2899
|
.pro-form .ant-form-item.pro-form-item-width-auto .ant-form-item-control-input-content {
|
|
2900
|
+
width: 100%;
|
|
2899
2901
|
-webkit-box-flex: initial;
|
|
2900
2902
|
-webkit-flex: initial;
|
|
2901
2903
|
-ms-flex: initial;
|
|
@@ -3059,6 +3061,13 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3059
3061
|
.pro-form .pro-form-list-mode-block .pro-collapse-content .ant-row {
|
|
3060
3062
|
width: auto;
|
|
3061
3063
|
}
|
|
3064
|
+
.pro-form .pro-form-item-changed {
|
|
3065
|
+
border-radius: 4px;
|
|
3066
|
+
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3067
|
+
}
|
|
3068
|
+
.pro-form .pro-form-item-changed .ant-select.ant-select-disabled .ant-select-selector {
|
|
3069
|
+
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3070
|
+
}
|
|
3062
3071
|
.pro-form .pro-form-item-changed span.ant-input-affix-wrapper,
|
|
3063
3072
|
.pro-form .pro-form-item-changed .ant-select .ant-select-selector,
|
|
3064
3073
|
.pro-form .pro-form-item-changed .ant-picker,
|
|
@@ -3095,11 +3104,77 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3095
3104
|
.pro-form .pro-form-item-changed .ant-form-item-control-input-content > .ant-input-group .forever-checkbox {
|
|
3096
3105
|
background: var(--zaui-contract-bg, #fffaa1);
|
|
3097
3106
|
}
|
|
3107
|
+
.pro-form .pro-form-item-changed .ant-checkbox-group {
|
|
3108
|
+
padding: 5px 0;
|
|
3109
|
+
}
|
|
3110
|
+
.pro-form .pro-form-item-changed:has(.ant-switch) {
|
|
3111
|
+
padding: 5px 0;
|
|
3112
|
+
}
|
|
3113
|
+
.pro-form .pro-form-item-changed .ant-input-textarea > textarea {
|
|
3114
|
+
background: var(--zaui-contract-bg, #fffaa1);
|
|
3115
|
+
}
|
|
3098
3116
|
.pro-form .pro-form-item-changed .pro-form-view-container {
|
|
3099
3117
|
padding: 4px 8px;
|
|
3100
3118
|
background: var(--zaui-contract-bg, #fffaa1);
|
|
3101
3119
|
border-radius: 4px;
|
|
3102
3120
|
}
|
|
3121
|
+
.pro-form .pro-form-item-add {
|
|
3122
|
+
border-radius: 4px;
|
|
3123
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
3124
|
+
}
|
|
3125
|
+
.pro-form .pro-form-item-add .ant-select.ant-select-disabled .ant-select-selector {
|
|
3126
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
3127
|
+
}
|
|
3128
|
+
.pro-form .pro-form-item-add span.ant-input-affix-wrapper,
|
|
3129
|
+
.pro-form .pro-form-item-add .ant-select .ant-select-selector,
|
|
3130
|
+
.pro-form .pro-form-item-add .ant-picker,
|
|
3131
|
+
.pro-form .pro-form-item-add .ant-input-number {
|
|
3132
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
3133
|
+
}
|
|
3134
|
+
.pro-form .pro-form-item-add span.ant-input-affix-wrapper input,
|
|
3135
|
+
.pro-form .pro-form-item-add .ant-select .ant-select-selector input,
|
|
3136
|
+
.pro-form .pro-form-item-add .ant-picker input,
|
|
3137
|
+
.pro-form .pro-form-item-add .ant-input-number input {
|
|
3138
|
+
background: transparent !important;
|
|
3139
|
+
}
|
|
3140
|
+
.pro-form .pro-form-item-add span.ant-input-affix-wrapper .ant-select-selection-placeholder,
|
|
3141
|
+
.pro-form .pro-form-item-add .ant-select .ant-select-selector .ant-select-selection-placeholder,
|
|
3142
|
+
.pro-form .pro-form-item-add .ant-picker .ant-select-selection-placeholder,
|
|
3143
|
+
.pro-form .pro-form-item-add .ant-input-number .ant-select-selection-placeholder {
|
|
3144
|
+
z-index: 9;
|
|
3145
|
+
}
|
|
3146
|
+
.pro-form .pro-form-item-add .ant-form-item-control:has(.ant-switch-handle),
|
|
3147
|
+
.pro-form .pro-form-item-add .ant-form-item-control:has(.ant-checkbox-wrapper-in-form-item) {
|
|
3148
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3149
|
+
border-radius: 4px;
|
|
3150
|
+
}
|
|
3151
|
+
.pro-form .pro-form-item-add .ant-form-item-control-input-content > span {
|
|
3152
|
+
border-radius: 4px;
|
|
3153
|
+
padding: 5px 8px;
|
|
3154
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3155
|
+
}
|
|
3156
|
+
.pro-form .pro-form-item-add .ant-form-item-control-input-content > .pro-address .ant-select-selector,
|
|
3157
|
+
.pro-form .pro-form-item-add .ant-form-item-control-input-content > .pro-address .ant-input-affix-wrapper,
|
|
3158
|
+
.pro-form .pro-form-item-add .ant-form-item-control-input-content > .pro-address .ant-input-disabled {
|
|
3159
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3160
|
+
}
|
|
3161
|
+
.pro-form .pro-form-item-add .ant-form-item-control-input-content > .ant-input-group .forever-checkbox {
|
|
3162
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3163
|
+
}
|
|
3164
|
+
.pro-form .pro-form-item-add .ant-checkbox-group {
|
|
3165
|
+
padding: 5px 0;
|
|
3166
|
+
}
|
|
3167
|
+
.pro-form .pro-form-item-add:has(.ant-switch) {
|
|
3168
|
+
padding: 5px 0;
|
|
3169
|
+
}
|
|
3170
|
+
.pro-form .pro-form-item-add .ant-input-textarea > textarea {
|
|
3171
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3172
|
+
}
|
|
3173
|
+
.pro-form .pro-form-item-add .pro-form-view-container {
|
|
3174
|
+
padding: 4px 8px;
|
|
3175
|
+
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3176
|
+
border-radius: 4px;
|
|
3177
|
+
}
|
|
3103
3178
|
.pro-upload .pro-upload-dragger .pro-upload-handle-box {
|
|
3104
3179
|
padding: var(--zaui-space-size-sm, 8px);
|
|
3105
3180
|
background: #f8f9fa;
|
|
@@ -5287,6 +5362,7 @@ input[type='button'] {
|
|
|
5287
5362
|
--zaui-table-selected-hover-bg: var(--zaui-table-hover-bg);
|
|
5288
5363
|
--zaui-table-nested-bg: #fafcfe;
|
|
5289
5364
|
--zaui-contract-bg: #fffaa1;
|
|
5365
|
+
--zaui-contract-bg-add: #d2fff4;
|
|
5290
5366
|
--zaui-form-label-width: 130px;
|
|
5291
5367
|
--zaui-border-radius: 8px;
|
|
5292
5368
|
--zaui-border-radius-card: 4px;
|
package/es/ProAction/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var ProAction = function ProAction(props) {
|
|
|
39
39
|
var index = state.index,
|
|
40
40
|
servicesArray = state.servicesArray;
|
|
41
41
|
var length = config.length;
|
|
42
|
-
var
|
|
42
|
+
var onActionRun = /*#__PURE__*/function () {
|
|
43
43
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(currentIndex, array) {
|
|
44
44
|
var _actionProps$useReque, _options$onSuccess, _newServicesArray$cur, _newServicesArray$cur2, _newServicesArray$cur3, _actionProps$onAction, _actionProps$continue;
|
|
45
45
|
var actionProps, newServicesArray, _ref2, service, options, transformResponse, res, data, open, _newServicesArray$cur4, _newServicesArray$cur5, _newServicesArray$cur6, list, errorTitle, isContinue;
|
|
@@ -136,7 +136,7 @@ var ProAction = function ProAction(props) {
|
|
|
136
136
|
return _context.abrupt("return", false);
|
|
137
137
|
case 44:
|
|
138
138
|
if (currentIndex + 1 < length) {
|
|
139
|
-
|
|
139
|
+
onActionRun(currentIndex + 1, newServicesArray);
|
|
140
140
|
} else {
|
|
141
141
|
setState({
|
|
142
142
|
loading: false
|
|
@@ -154,7 +154,7 @@ var ProAction = function ProAction(props) {
|
|
|
154
154
|
}();
|
|
155
155
|
var ChildContent = /*#__PURE__*/React.cloneElement(children, {
|
|
156
156
|
onClick: function onClick() {
|
|
157
|
-
|
|
157
|
+
onActionRun(0, []);
|
|
158
158
|
},
|
|
159
159
|
loading: state.loading
|
|
160
160
|
});
|
|
@@ -166,7 +166,7 @@ var ProAction = function ProAction(props) {
|
|
|
166
166
|
return _jsxs(_Fragment, {
|
|
167
167
|
children: [((_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.mode) === 'confirm' ? _jsx(_Popconfirm, {
|
|
168
168
|
onConfirm: function onConfirm() {
|
|
169
|
-
return
|
|
169
|
+
return onActionRun(0, []);
|
|
170
170
|
},
|
|
171
171
|
title: ((_config$2 = config[0]) === null || _config$2 === void 0 ? void 0 : _config$2.title) || (locale === null || locale === void 0 ? void 0 : (_locale$ProAction2 = locale.ProAction) === null || _locale$ProAction2 === void 0 ? void 0 : _locale$ProAction2.defaultTitle),
|
|
172
172
|
children: children
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IProDownloadProps } from './propsType';
|
|
2
2
|
declare const ProDownload: {
|
|
3
|
-
(props: IProDownloadProps):
|
|
3
|
+
(props: IProDownloadProps): JSX.Element;
|
|
4
4
|
downLoadRequest: import("./utils").DownloadRequestProps;
|
|
5
5
|
};
|
|
6
6
|
export default ProDownload;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const ActionButton: ({ record, index, config, btnConfig }: any) =>
|
|
1
|
+
declare const ActionButton: ({ record, index, config, btnConfig }: any) => JSX.Element;
|
|
2
2
|
export default ActionButton;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormInstance } from 'antd';
|
|
3
3
|
import { NamePath } from 'antd/lib/form/interface';
|
|
4
|
+
import { DiffOriginalParams } from '../../../ProForm/utils/diffOriginal';
|
|
4
5
|
interface Props {
|
|
5
6
|
name?: NamePath;
|
|
6
7
|
names?: NamePath[];
|
|
@@ -9,8 +10,8 @@ interface Props {
|
|
|
9
10
|
namesStr?: NamePath;
|
|
10
11
|
originalValues?: any;
|
|
11
12
|
form: FormInstance;
|
|
12
|
-
equalWith?:
|
|
13
|
+
equalWith?: DiffOriginalParams['equalWith'];
|
|
13
14
|
[name: string]: any;
|
|
14
15
|
}
|
|
15
|
-
declare const
|
|
16
|
-
export default
|
|
16
|
+
declare const ListChangedWrapper: React.FC<Props>;
|
|
17
|
+
export default ListChangedWrapper;
|
|
@@ -7,8 +7,11 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
7
7
|
var _excluded = ["name", "names", "namesStr", "originalName", "originalNames", "originalValues", "form", "equalWith", "rowKeyPath", "children", "type"];
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
|
+
import classNames from 'classnames';
|
|
10
11
|
import { get } from 'lodash';
|
|
11
12
|
import { diffOriginal } from '../../../ProForm/utils/diffOriginal';
|
|
13
|
+
import { useProConfig } from '../../../ProConfigProvider';
|
|
14
|
+
import { isEmpty } from '../../../utils';
|
|
12
15
|
var toNamePath = function toNamePath(name) {
|
|
13
16
|
if (Array.isArray(name)) {
|
|
14
17
|
return name;
|
|
@@ -61,7 +64,7 @@ var getOriginalValue = function getOriginalValue(_ref) {
|
|
|
61
64
|
return get(originalValues, originalName);
|
|
62
65
|
}) : get(originalValues, originalName);
|
|
63
66
|
};
|
|
64
|
-
var
|
|
67
|
+
var ListChangedWrapper = function ListChangedWrapper(props) {
|
|
65
68
|
var name = props.name,
|
|
66
69
|
names = props.names,
|
|
67
70
|
namesStr = props.namesStr,
|
|
@@ -76,11 +79,13 @@ var ListChanged = function ListChanged(props) {
|
|
|
76
79
|
children = props.children,
|
|
77
80
|
type = props.type,
|
|
78
81
|
rest = _objectWithoutProperties(props, _excluded);
|
|
82
|
+
var _ref2 = useProConfig('ProEditTable') || {},
|
|
83
|
+
isDiffAll = _ref2.isDiffAll;
|
|
79
84
|
var namePath = toNamePath(namesStr || name);
|
|
80
85
|
var originalNamePath = toNamePath(originalName);
|
|
81
86
|
var originalNamePaths = originalNames && toNamePaths(originalNames);
|
|
82
|
-
var
|
|
83
|
-
var originalValue =
|
|
87
|
+
var isWatch = originalValues && !['FormList', 'ProEditTable'].includes(type);
|
|
88
|
+
var originalValue = isWatch ? getOriginalValue({
|
|
84
89
|
namePath: namePath,
|
|
85
90
|
originalName: originalNamePath,
|
|
86
91
|
originalNames: originalNamePaths,
|
|
@@ -88,9 +93,9 @@ var ListChanged = function ListChanged(props) {
|
|
|
88
93
|
rowKeyPath: rowKeyPath,
|
|
89
94
|
form: form
|
|
90
95
|
}) : undefined;
|
|
91
|
-
var noChange = !equalWith && (!originalValues ||
|
|
92
|
-
var
|
|
93
|
-
if (
|
|
96
|
+
var noChange = !equalWith && (!originalValues || isDiffAll ? false : isEmpty(originalValue));
|
|
97
|
+
var diffType = useMemo(function () {
|
|
98
|
+
if (!isWatch || noChange) return 'same';
|
|
94
99
|
return diffOriginal({
|
|
95
100
|
value: props.value,
|
|
96
101
|
originalValue: originalValue,
|
|
@@ -99,11 +104,18 @@ var ListChanged = function ListChanged(props) {
|
|
|
99
104
|
// name: isString(namesStr) ? namesStr : originalName || name,
|
|
100
105
|
});
|
|
101
106
|
}, [props.value, originalValue]);
|
|
102
|
-
|
|
107
|
+
var isAdd = diffType === 'add';
|
|
108
|
+
var isChanged = diffType === 'changed';
|
|
109
|
+
if (!isWatch || noChange) {
|
|
103
110
|
return /*#__PURE__*/React.isValidElement(children) && /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), rest));
|
|
104
111
|
}
|
|
112
|
+
var diffClassName = classNames({
|
|
113
|
+
'pro-form-item-changed': isChanged,
|
|
114
|
+
'pro-form-item-add': isAdd
|
|
115
|
+
});
|
|
105
116
|
return _jsx(_Tooltip, {
|
|
106
|
-
|
|
117
|
+
// 传入undefined 鼠标移入显示移出隐藏
|
|
118
|
+
open: isChanged ? undefined : false,
|
|
107
119
|
getPopupContainer: function getPopupContainer(target) {
|
|
108
120
|
return target.parentElement;
|
|
109
121
|
},
|
|
@@ -116,9 +128,9 @@ var ListChanged = function ListChanged(props) {
|
|
|
116
128
|
})) : undefined]
|
|
117
129
|
}),
|
|
118
130
|
children: _jsx("div", {
|
|
119
|
-
className:
|
|
131
|
+
className: diffClassName,
|
|
120
132
|
children: /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), rest)) : undefined
|
|
121
133
|
})
|
|
122
134
|
});
|
|
123
135
|
};
|
|
124
|
-
export default
|
|
136
|
+
export default ListChangedWrapper;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const RenderField: ({ text: value, record, index, column, config }: any) =>
|
|
1
|
+
declare const RenderField: ({ text: value, record, index, column, config }: any) => JSX.Element;
|
|
2
2
|
export default RenderField;
|
|
@@ -25,7 +25,7 @@ import useRules from '../../../ProForm/utils/useRules';
|
|
|
25
25
|
import { isSelect, isTrim } from '../../../ProForm/utils';
|
|
26
26
|
import ConfirmWrapper from '../../../ProForm/components/render/ConfirmWrapper';
|
|
27
27
|
import { getDefaultProps } from '../../utils/getDefaultProps';
|
|
28
|
-
import
|
|
28
|
+
import ListChangedWrapper from './ListChangedWrapper';
|
|
29
29
|
var RenderField = function RenderField(_ref) {
|
|
30
30
|
var _type, _type$replace, _fieldProps2, _names, _TargetComponent4, _componentProps2;
|
|
31
31
|
var value = _ref.text,
|
|
@@ -79,6 +79,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
79
79
|
var _fieldProps = fieldProps || formItemProps || {};
|
|
80
80
|
var _rules = rules || [];
|
|
81
81
|
var _required = required;
|
|
82
|
+
var _valueType = valueType;
|
|
82
83
|
var _disabled = false;
|
|
83
84
|
var isCell = mode === 'cell';
|
|
84
85
|
if (isCell) {
|
|
@@ -103,11 +104,18 @@ var RenderField = function RenderField(_ref) {
|
|
|
103
104
|
};
|
|
104
105
|
// 行参数
|
|
105
106
|
var rowParams = [currentValue, rowData, options];
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
// required & rules & fieldProps & disabled & valueType 函数化处理
|
|
108
|
+
if (isFunction(required)) {
|
|
109
|
+
_required = required.apply(void 0, rowParams);
|
|
110
|
+
}
|
|
111
|
+
if (isFunction(fieldProps)) {
|
|
112
|
+
_fieldProps = fieldProps.apply(void 0, rowParams);
|
|
113
|
+
}
|
|
114
|
+
if (isFunction(rules)) {
|
|
115
|
+
_rules = rules.apply(void 0, rowParams);
|
|
116
|
+
}
|
|
117
|
+
if (isFunction(valueType)) {
|
|
118
|
+
_valueType = valueType.apply(void 0, rowParams);
|
|
111
119
|
}
|
|
112
120
|
// 获取最终的disabled
|
|
113
121
|
_disabled = getDisabled({
|
|
@@ -118,6 +126,12 @@ var RenderField = function RenderField(_ref) {
|
|
|
118
126
|
columnFieldProps: _fieldProps,
|
|
119
127
|
params: rowParams
|
|
120
128
|
});
|
|
129
|
+
if (typeof isEditable === 'function') {
|
|
130
|
+
isEditable = isEditable.apply(void 0, rowParams);
|
|
131
|
+
setTimeout(function () {
|
|
132
|
+
!isEditable && form.validateFields([cellName]);
|
|
133
|
+
}, 100);
|
|
134
|
+
}
|
|
121
135
|
// 是否只读文本
|
|
122
136
|
var isView = !isEditable || (record === null || record === void 0 ? void 0 : record['is-view']) || config.isView || virtualKey && !isEditing || getDisabled({
|
|
123
137
|
globalControl: otherProps === null || otherProps === void 0 ? void 0 : otherProps.globalControl,
|
|
@@ -131,15 +145,6 @@ var RenderField = function RenderField(_ref) {
|
|
|
131
145
|
// 只读文本时,采用当前formItem的name,单行编辑时,使用生成的虚拟的name
|
|
132
146
|
var baseName = isView ? name : namePath;
|
|
133
147
|
var TargetComponent;
|
|
134
|
-
if (isFunction(required)) {
|
|
135
|
-
_required = required.apply(void 0, rowParams);
|
|
136
|
-
}
|
|
137
|
-
if (isFunction(fieldProps)) {
|
|
138
|
-
_fieldProps = fieldProps.apply(void 0, rowParams);
|
|
139
|
-
}
|
|
140
|
-
if (isFunction(rules)) {
|
|
141
|
-
_rules = rules.apply(void 0, rowParams);
|
|
142
|
-
}
|
|
143
148
|
// 设置校验规则
|
|
144
149
|
var internalRule = useRules({
|
|
145
150
|
names: names,
|
|
@@ -165,7 +170,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
165
170
|
var _formItemProps = _objectSpread(_objectSpread(_objectSpread({}, defaultProps), resetProps), internalRule);
|
|
166
171
|
if (['Switch', 'SwitchCheckbox'].includes(type)) {
|
|
167
172
|
_formItemProps.valuePropName = 'checked';
|
|
168
|
-
|
|
173
|
+
_valueType = 'switch';
|
|
169
174
|
}
|
|
170
175
|
/**
|
|
171
176
|
* 针对一些特殊类型,基于formItem的normalize与getValueProps进行默认值类型转换
|
|
@@ -173,7 +178,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
173
178
|
*/
|
|
174
179
|
var defaultTransform = function defaultTransform() {
|
|
175
180
|
var types = ['DatePicker', 'RangePicker'];
|
|
176
|
-
if (!
|
|
181
|
+
if (!_valueType && types.includes(type)) {
|
|
177
182
|
var _transformMap$type;
|
|
178
183
|
return transformMap === null || transformMap === void 0 ? void 0 : (_transformMap$type = transformMap[type]) === null || _transformMap$type === void 0 ? void 0 : _transformMap$type.call(transformMap, _fieldProps || {});
|
|
179
184
|
}
|
|
@@ -186,18 +191,18 @@ var RenderField = function RenderField(_ref) {
|
|
|
186
191
|
var valueTypeTransform = useCallback(function () {
|
|
187
192
|
var _fieldProps3;
|
|
188
193
|
// 不存在valueType返回空
|
|
189
|
-
if (!
|
|
194
|
+
if (!_valueType) {
|
|
190
195
|
return {};
|
|
191
196
|
}
|
|
192
197
|
// SwitchCheckbox默认YN, 兼容已有组件
|
|
193
198
|
if (type === 'SwitchCheckbox') {
|
|
194
|
-
|
|
199
|
+
_valueType = 'switch';
|
|
195
200
|
}
|
|
196
201
|
var params = _objectSpread(_objectSpread({}, column), {}, {
|
|
197
202
|
mode: (_fieldProps3 = _fieldProps) === null || _fieldProps3 === void 0 ? void 0 : _fieldProps3.mode
|
|
198
203
|
});
|
|
199
|
-
return isFunction(valueTypeMap[
|
|
200
|
-
}, [
|
|
204
|
+
return isFunction(valueTypeMap[_valueType]) ? valueTypeMap[_valueType](params) : {};
|
|
205
|
+
}, [_valueType]);
|
|
201
206
|
if ((_names = names) === null || _names === void 0 ? void 0 : _names.length) {
|
|
202
207
|
// 支持names配置,临时生成对应的formItem,用来存储单个对应的值
|
|
203
208
|
names = names.map(function (key) {
|
|
@@ -228,7 +233,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
228
233
|
}
|
|
229
234
|
var namesStr = [].concat(_toConsumableArray(baseName), [index, dataIndex]);
|
|
230
235
|
var transform = {};
|
|
231
|
-
if (
|
|
236
|
+
if (_valueType) {
|
|
232
237
|
transform = valueTypeTransform();
|
|
233
238
|
}
|
|
234
239
|
return transformNames(_objectSpread(_objectSpread({}, _formItemProps), transform), form, names, namesStr, type);
|
|
@@ -508,7 +513,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
508
513
|
name: cellName,
|
|
509
514
|
listName: cellName,
|
|
510
515
|
viewEmpty: viewEmpty,
|
|
511
|
-
valueType:
|
|
516
|
+
valueType: _valueType,
|
|
512
517
|
isView: isView
|
|
513
518
|
}
|
|
514
519
|
});
|
|
@@ -542,7 +547,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
542
547
|
var FormItem = null;
|
|
543
548
|
var FieldComponent = /*#__PURE__*/React.isValidElement(TargetComponent) ? ( /*#__PURE__*/React.cloneElement(TargetComponent, componentProps)) : _jsx(TargetComponent, _objectSpread({}, componentProps));
|
|
544
549
|
if (originalValues) {
|
|
545
|
-
FieldComponent = _jsx(
|
|
550
|
+
FieldComponent = _jsx(ListChangedWrapper, {
|
|
546
551
|
name: cellName,
|
|
547
552
|
names: names,
|
|
548
553
|
namesStr: [].concat(_toConsumableArray(baseName), [index, dataIndex]),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const RenderToolbar: (config: any) =>
|
|
1
|
+
declare const RenderToolbar: (config: any) => JSX.Element;
|
|
2
2
|
export default RenderToolbar;
|
|
@@ -8,5 +8,5 @@ interface SummaryProps<T = any> {
|
|
|
8
8
|
};
|
|
9
9
|
rowSelection: any;
|
|
10
10
|
}
|
|
11
|
-
declare const Summary: ({ data, summary, rowSelection, }: SummaryProps) =>
|
|
11
|
+
declare const Summary: ({ data, summary, rowSelection, }: SummaryProps) => JSX.Element;
|
|
12
12
|
export default Summary;
|
|
@@ -96,7 +96,7 @@ export interface ProColumnsProps<Values = any, T = any> extends Omit<FormItemPro
|
|
|
96
96
|
names?: NamePath[];
|
|
97
97
|
cache?: boolean;
|
|
98
98
|
isEditable?: boolean | RequiredFn<T>;
|
|
99
|
-
valueType?: ProFormValueType;
|
|
99
|
+
valueType?: ProFormValueType | ((text?: any, record?: any, options?: OptionsProps) => ProFormValueType);
|
|
100
100
|
tooltip?: string | ({
|
|
101
101
|
icon?: string | ReactNode;
|
|
102
102
|
} & TooltipProps);
|
|
@@ -9,7 +9,7 @@ export declare const defaultBtnNameMap: {
|
|
|
9
9
|
custom: any;
|
|
10
10
|
};
|
|
11
11
|
export declare const iconMap: {
|
|
12
|
-
add:
|
|
12
|
+
add: JSX.Element;
|
|
13
13
|
};
|
|
14
14
|
export declare const defaultSingleActionKeys: string[];
|
|
15
15
|
export declare const defaultMultipleActionKeys: string[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
1
2
|
import { get, isEqual } from 'lodash';
|
|
2
3
|
var defaultPropsMap = {
|
|
3
4
|
ProSelect: function ProSelect(props) {
|
|
@@ -9,7 +10,7 @@ var defaultPropsMap = {
|
|
|
9
10
|
var defaultProps = {};
|
|
10
11
|
// formList场景传入列表过滤时
|
|
11
12
|
if (filterInList && namePath && name) {
|
|
12
|
-
var _namePath = namePath.
|
|
13
|
+
var _namePath = _toConsumableArray(namePath).splice(2, namePath.length - 1);
|
|
13
14
|
defaultProps.shouldUpdate = function (preValues, curValues) {
|
|
14
15
|
var _get, _get$map, _get2, _get2$map;
|
|
15
16
|
var preListValue = (_get = get(preValues, name)) === null || _get === void 0 ? void 0 : (_get$map = _get.map) === null || _get$map === void 0 ? void 0 : _get$map.call(_get, function (item) {
|
|
@@ -6,14 +6,14 @@ export var getRandom = function getRandom() {
|
|
|
6
6
|
};
|
|
7
7
|
// 深层次对比两个对象且取出来差异值
|
|
8
8
|
export var difference = function difference(object, base) {
|
|
9
|
-
var
|
|
9
|
+
var changes = function changes(object, base) {
|
|
10
10
|
return transform(object, function (result, value, key) {
|
|
11
11
|
if (!isEqual(value, base[key])) {
|
|
12
|
-
result[key] = isObject(value) && isObject(base[key]) ?
|
|
12
|
+
result[key] = isObject(value) && isObject(base[key]) ? changes(value, base[key]) : value;
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
-
return
|
|
16
|
+
return changes(object, base);
|
|
17
17
|
};
|
|
18
18
|
// 数组字段循环校验,解决validateFields无法批量校验的问题
|
|
19
19
|
export var customValidate = function customValidate(validateKeys, form, rowName) {
|
|
@@ -6,5 +6,5 @@ interface Props extends Pick<ProEnum, 'id' | 'value' | 'onChange' | 'dataSource'
|
|
|
6
6
|
allowClear?: boolean;
|
|
7
7
|
button?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare const Group: (props: Props) =>
|
|
9
|
+
declare const Group: (props: Props) => JSX.Element;
|
|
10
10
|
export default Group;
|
|
@@ -3,5 +3,5 @@ interface Props extends Pick<ProEnum, 'id' | 'value' | 'onChange' | 'dataSource'
|
|
|
3
3
|
fieldValue: string;
|
|
4
4
|
fieldLabel: string;
|
|
5
5
|
}
|
|
6
|
-
declare const ProEnumTag: (props: Props) =>
|
|
6
|
+
declare const ProEnumTag: (props: Props) => JSX.Element;
|
|
7
7
|
export default ProEnumTag;
|
package/es/ProEnum/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import useEnum from './hooks/useEnum';
|
|
|
2
2
|
import { ProEnumProps } from './propsType';
|
|
3
3
|
import './style/index.less';
|
|
4
4
|
declare const ProEnum: {
|
|
5
|
-
(props: ProEnumProps):
|
|
6
|
-
getEnumLabel: (code: string | string[], value: any, compose?: boolean, fieldNameLabel?: string, fieldNameValue?: string) =>
|
|
5
|
+
(props: ProEnumProps): JSX.Element;
|
|
6
|
+
getEnumLabel: (code: string | string[], value: any, compose?: boolean, fieldNameLabel?: string, fieldNameValue?: string) => JSX.Element;
|
|
7
7
|
useEnum: typeof useEnum;
|
|
8
8
|
};
|
|
9
9
|
export default ProEnum;
|