@zat-design/sisyphus-react 3.9.0-beta.2 → 3.9.0-beta.20
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 +32 -15
- package/dist/less.esm.css +28 -13
- package/es/ProDrawerForm/components/ProDrawer/index.js +3 -1
- package/es/ProDrawerForm/components/ProModal/index.js +5 -3
- package/es/ProDrawerForm/propsType.d.ts +1 -0
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +7 -3
- package/es/ProEditTable/components/RenderField/index.js +3 -2
- package/es/ProEditTable/style/index.less +5 -2
- package/es/ProEnum/index.js +6 -4
- package/es/ProEnum/propsType.d.ts +1 -0
- package/es/ProForm/components/base/SwitchCheckbox/index.js +9 -2
- package/es/ProForm/components/combination/Group/component/ComRender.d.ts +1 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +12 -1
- package/es/ProForm/components/combination/Group/index.js +4 -3
- package/es/ProForm/components/combination/ProModalSelect/index.js +2 -1
- package/es/ProForm/components/render/ChangedWrapper.js +1 -2
- package/es/ProForm/components/render/RenderFields.js +3 -2
- package/es/ProForm/components/render/propsType.d.ts +1 -0
- package/es/ProForm/style/index.less +8 -5
- package/es/ProForm/utils/diffOriginal.js +18 -12
- package/es/ProTable/components/FormatColumn/index.d.ts +5 -3
- package/es/ProTable/components/FormatColumn/index.js +92 -71
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +29 -11
- package/es/ProTable/components/TableResizable/index.js +1 -5
- package/es/ProTable/index.d.ts +6 -5
- package/es/ProTable/index.js +4 -6
- package/es/ProTable/propsType.d.ts +2 -1
- package/es/ProTable/style/index.less +10 -1
- package/es/ProTable/utils/index.d.ts +5 -2
- package/es/ProTable/utils/index.js +13 -4
- package/es/ProTree/components/ProTreeSelect/index.js +32 -13
- package/es/style/theme/antd.less +4 -2
- package/es/utils/index.d.ts +1 -1
- package/es/utils/index.js +4 -1
- package/lib/ProDrawerForm/components/ProDrawer/index.js +3 -1
- package/lib/ProDrawerForm/components/ProModal/index.js +5 -3
- package/lib/ProDrawerForm/propsType.d.ts +1 -0
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +5 -1
- package/lib/ProEditTable/components/RenderField/index.js +3 -2
- package/lib/ProEditTable/style/index.less +5 -2
- package/lib/ProEnum/index.js +6 -4
- package/lib/ProEnum/propsType.d.ts +1 -0
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +9 -2
- package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +12 -1
- package/lib/ProForm/components/combination/Group/index.js +4 -3
- package/lib/ProForm/components/combination/ProModalSelect/index.js +2 -1
- package/lib/ProForm/components/render/ChangedWrapper.js +1 -2
- package/lib/ProForm/components/render/RenderFields.js +3 -2
- package/lib/ProForm/components/render/propsType.d.ts +1 -0
- package/lib/ProForm/style/index.less +8 -5
- package/lib/ProForm/utils/diffOriginal.js +18 -12
- package/lib/ProTable/components/FormatColumn/index.d.ts +5 -3
- package/lib/ProTable/components/FormatColumn/index.js +91 -70
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +29 -11
- package/lib/ProTable/components/TableResizable/index.js +0 -4
- package/lib/ProTable/index.d.ts +6 -5
- package/lib/ProTable/index.js +4 -6
- package/lib/ProTable/propsType.d.ts +2 -1
- package/lib/ProTable/style/index.less +10 -1
- package/lib/ProTable/utils/index.d.ts +5 -2
- package/lib/ProTable/utils/index.js +13 -4
- package/lib/ProTree/components/ProTreeSelect/index.js +31 -12
- package/lib/style/theme/antd.less +4 -2
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +4 -1
- package/package.json +1 -1
- package/.vscode/extensions.json +0 -5
package/dist/index.esm.css
CHANGED
@@ -1908,6 +1908,16 @@
|
|
1908
1908
|
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
1909
1909
|
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
1910
1910
|
}
|
1911
|
+
.pro-table tbody.ant-table-tbody tr.ant-table-row.new-cell td.ant-table-cell.ant-table-cell-fix-right {
|
1912
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
1913
|
+
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
1914
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
1915
|
+
}
|
1916
|
+
.pro-table tbody.ant-table-tbody tr.ant-table-row.new-cell td.ant-table-cell.ant-table-cell-fix-left {
|
1917
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
1918
|
+
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
1919
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
1920
|
+
}
|
1911
1921
|
.pro-table tbody.ant-table-tbody .ant-table-cell .varied-cell {
|
1912
1922
|
margin-left: -8px;
|
1913
1923
|
padding: var(--zaui-space-size-xs, 4px) var(--zaui-space-size-sm, 8px);
|
@@ -3087,7 +3097,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
3087
3097
|
.pro-form .pro-form-item-changed .ant-form-item-control-input-content > .ant-input-group .forever-checkbox {
|
3088
3098
|
background: var(--zaui-contract-bg, #fffaa1);
|
3089
3099
|
}
|
3090
|
-
.pro-form .pro-form-item-changed .ant-checkbox-group
|
3100
|
+
.pro-form .pro-form-item-changed .ant-checkbox-group,
|
3101
|
+
.pro-form .pro-form-item-changed .pro-switch-checkbox {
|
3091
3102
|
padding: 5px 0;
|
3092
3103
|
}
|
3093
3104
|
.pro-form .pro-form-item-changed:has(.ant-switch) {
|
@@ -3106,7 +3117,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
3106
3117
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
3107
3118
|
}
|
3108
3119
|
.pro-form .pro-form-item-add .ant-input {
|
3109
|
-
background: var(--zaui-contract-bg, #
|
3120
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
3110
3121
|
}
|
3111
3122
|
.pro-form .pro-form-item-add .ant-select.ant-select-disabled .ant-select-selector {
|
3112
3123
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
@@ -3147,7 +3158,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
3147
3158
|
.pro-form .pro-form-item-add .ant-form-item-control-input-content > .ant-input-group .forever-checkbox {
|
3148
3159
|
background: var(--zaui-contract-bg-add, #d2fff4);
|
3149
3160
|
}
|
3150
|
-
.pro-form .pro-form-item-add .ant-checkbox-group
|
3161
|
+
.pro-form .pro-form-item-add .ant-checkbox-group,
|
3162
|
+
.pro-form .pro-form-item-add .pro-switch-checkbox {
|
3151
3163
|
padding: 5px 0;
|
3152
3164
|
}
|
3153
3165
|
.pro-form .pro-form-item-add:has(.ant-switch) {
|
@@ -3161,25 +3173,27 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
3161
3173
|
background: var(--zaui-contract-bg-add, #d2fff4);
|
3162
3174
|
border-radius: 4px;
|
3163
3175
|
}
|
3164
|
-
.original-value-
|
3176
|
+
.original-value-tooltip {
|
3165
3177
|
max-width: 100%;
|
3166
3178
|
width: -webkit-max-content;
|
3167
3179
|
width: -moz-max-content;
|
3168
3180
|
width: max-content;
|
3169
|
-
position: fixed;
|
3170
3181
|
}
|
3171
|
-
.original-value-
|
3182
|
+
.original-value-tooltip .changed-tooltip .original-value-container .ant-space-item:nth-child(1) {
|
3172
3183
|
white-space: nowrap;
|
3173
3184
|
}
|
3174
|
-
.original-value-
|
3185
|
+
.original-value-tooltip .changed-tooltip .original-value-container .pro-group .ant-space-compact {
|
3175
3186
|
display: block;
|
3176
3187
|
}
|
3177
|
-
.original-value-
|
3188
|
+
.original-value-tooltip .changed-tooltip .original-value-container .pro-group .pro-form-view-container {
|
3178
3189
|
word-break: keep-all;
|
3179
3190
|
}
|
3180
|
-
.original-value-
|
3191
|
+
.original-value-tooltip .changed-tooltip .current-value-container .ant-space-item:nth-child(1) {
|
3181
3192
|
white-space: nowrap;
|
3182
3193
|
}
|
3194
|
+
.original-value-tooltip-fixed {
|
3195
|
+
position: fixed;
|
3196
|
+
}
|
3183
3197
|
.pro-upload .pro-upload-dragger .pro-upload-handle-box {
|
3184
3198
|
padding: var(--zaui-space-size-sm, 8px);
|
3185
3199
|
background: #f8f9fa;
|
@@ -4600,10 +4614,11 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
4600
4614
|
.pro-edit-table .ant-table-pagination .ant-pagination-options .ant-select.ant-select-in-form-item {
|
4601
4615
|
width: auto;
|
4602
4616
|
}
|
4603
|
-
.pro-edit-table .is-new-row td
|
4604
|
-
|
4605
|
-
|
4606
|
-
.pro-edit-table .
|
4617
|
+
.pro-edit-table .ant-table .ant-table-body .ant-table-tbody .is-new-row.ant-table-row td {
|
4618
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
4619
|
+
}
|
4620
|
+
.pro-edit-table .ant-table .ant-table-body .ant-table-tbody .is-new-row.ant-table-row:hover td,
|
4621
|
+
.pro-edit-table .ant-table .ant-table-body .ant-table-tbody .is-new-row.ant-table-row:hover .ant-table-cell-row-hover {
|
4607
4622
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
4608
4623
|
}
|
4609
4624
|
.pro-edit-table-footer {
|
@@ -5617,8 +5632,10 @@ input[type='button'] {
|
|
5617
5632
|
.ant-table.ant-table-scroll-horizontal table .ant-table-tbody tr td {
|
5618
5633
|
border-bottom: none;
|
5619
5634
|
}
|
5620
|
-
.ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even):hover td
|
5621
|
-
|
5635
|
+
.ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even):hover td,
|
5636
|
+
.ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even):hover td.ant-table-cell-fix-right,
|
5637
|
+
.ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even):hover td.ant-table-cell-fix-left {
|
5638
|
+
background-color: var(--zaui-table-hover-bg, #fafafa) !important;
|
5622
5639
|
}
|
5623
5640
|
.ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even) td,
|
5624
5641
|
.ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even) td.ant-table-cell-fix-right,
|
package/dist/less.esm.css
CHANGED
@@ -1908,6 +1908,16 @@
|
|
1908
1908
|
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
1909
1909
|
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
1910
1910
|
}
|
1911
|
+
.pro-table tbody.ant-table-tbody tr.ant-table-row.new-cell td.ant-table-cell.ant-table-cell-fix-right {
|
1912
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
1913
|
+
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
1914
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
1915
|
+
}
|
1916
|
+
.pro-table tbody.ant-table-tbody tr.ant-table-row.new-cell td.ant-table-cell.ant-table-cell-fix-left {
|
1917
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
1918
|
+
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
1919
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
1920
|
+
}
|
1911
1921
|
.pro-table tbody.ant-table-tbody .ant-table-cell .varied-cell {
|
1912
1922
|
margin-left: -8px;
|
1913
1923
|
padding: var(--zaui-space-size-xs, 4px) var(--zaui-space-size-sm, 8px);
|
@@ -3087,7 +3097,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
3087
3097
|
.pro-form .pro-form-item-changed .ant-form-item-control-input-content > .ant-input-group .forever-checkbox {
|
3088
3098
|
background: var(--zaui-contract-bg, #fffaa1);
|
3089
3099
|
}
|
3090
|
-
.pro-form .pro-form-item-changed .ant-checkbox-group
|
3100
|
+
.pro-form .pro-form-item-changed .ant-checkbox-group,
|
3101
|
+
.pro-form .pro-form-item-changed .pro-switch-checkbox {
|
3091
3102
|
padding: 5px 0;
|
3092
3103
|
}
|
3093
3104
|
.pro-form .pro-form-item-changed:has(.ant-switch) {
|
@@ -3106,7 +3117,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
3106
3117
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
3107
3118
|
}
|
3108
3119
|
.pro-form .pro-form-item-add .ant-input {
|
3109
|
-
background: var(--zaui-contract-bg, #
|
3120
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
3110
3121
|
}
|
3111
3122
|
.pro-form .pro-form-item-add .ant-select.ant-select-disabled .ant-select-selector {
|
3112
3123
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
@@ -3147,7 +3158,8 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
3147
3158
|
.pro-form .pro-form-item-add .ant-form-item-control-input-content > .ant-input-group .forever-checkbox {
|
3148
3159
|
background: var(--zaui-contract-bg-add, #d2fff4);
|
3149
3160
|
}
|
3150
|
-
.pro-form .pro-form-item-add .ant-checkbox-group
|
3161
|
+
.pro-form .pro-form-item-add .ant-checkbox-group,
|
3162
|
+
.pro-form .pro-form-item-add .pro-switch-checkbox {
|
3151
3163
|
padding: 5px 0;
|
3152
3164
|
}
|
3153
3165
|
.pro-form .pro-form-item-add:has(.ant-switch) {
|
@@ -3161,25 +3173,27 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
3161
3173
|
background: var(--zaui-contract-bg-add, #d2fff4);
|
3162
3174
|
border-radius: 4px;
|
3163
3175
|
}
|
3164
|
-
.original-value-
|
3176
|
+
.original-value-tooltip {
|
3165
3177
|
max-width: 100%;
|
3166
3178
|
width: -webkit-max-content;
|
3167
3179
|
width: -moz-max-content;
|
3168
3180
|
width: max-content;
|
3169
|
-
position: fixed;
|
3170
3181
|
}
|
3171
|
-
.original-value-
|
3182
|
+
.original-value-tooltip .changed-tooltip .original-value-container .ant-space-item:nth-child(1) {
|
3172
3183
|
white-space: nowrap;
|
3173
3184
|
}
|
3174
|
-
.original-value-
|
3185
|
+
.original-value-tooltip .changed-tooltip .original-value-container .pro-group .ant-space-compact {
|
3175
3186
|
display: block;
|
3176
3187
|
}
|
3177
|
-
.original-value-
|
3188
|
+
.original-value-tooltip .changed-tooltip .original-value-container .pro-group .pro-form-view-container {
|
3178
3189
|
word-break: keep-all;
|
3179
3190
|
}
|
3180
|
-
.original-value-
|
3191
|
+
.original-value-tooltip .changed-tooltip .current-value-container .ant-space-item:nth-child(1) {
|
3181
3192
|
white-space: nowrap;
|
3182
3193
|
}
|
3194
|
+
.original-value-tooltip-fixed {
|
3195
|
+
position: fixed;
|
3196
|
+
}
|
3183
3197
|
.pro-upload .pro-upload-dragger .pro-upload-handle-box {
|
3184
3198
|
padding: var(--zaui-space-size-sm, 8px);
|
3185
3199
|
background: #f8f9fa;
|
@@ -4600,10 +4614,11 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
4600
4614
|
.pro-edit-table .ant-table-pagination .ant-pagination-options .ant-select.ant-select-in-form-item {
|
4601
4615
|
width: auto;
|
4602
4616
|
}
|
4603
|
-
.pro-edit-table .is-new-row td
|
4604
|
-
|
4605
|
-
|
4606
|
-
.pro-edit-table .
|
4617
|
+
.pro-edit-table .ant-table .ant-table-body .ant-table-tbody .is-new-row.ant-table-row td {
|
4618
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
4619
|
+
}
|
4620
|
+
.pro-edit-table .ant-table .ant-table-body .ant-table-tbody .is-new-row.ant-table-row:hover td,
|
4621
|
+
.pro-edit-table .ant-table .ant-table-body .ant-table-tbody .is-new-row.ant-table-row:hover .ant-table-cell-row-hover {
|
4607
4622
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
4608
4623
|
}
|
4609
4624
|
.pro-edit-table-footer {
|
@@ -36,6 +36,7 @@ var ProDrawer = function ProDrawer(_ref) {
|
|
36
36
|
onCancel = _ref.onCancel,
|
37
37
|
children = _ref.children,
|
38
38
|
className = _ref.className,
|
39
|
+
zIndex = _ref.zIndex,
|
39
40
|
drawerProps = _ref.drawerProps;
|
40
41
|
var ref = useRef(null);
|
41
42
|
var modalRef = useRef(null);
|
@@ -192,7 +193,8 @@ var ProDrawer = function ProDrawer(_ref) {
|
|
192
193
|
placement: "right",
|
193
194
|
className: "pro-drawer ".concat(className !== null && className !== void 0 ? className : ''),
|
194
195
|
closable: false,
|
195
|
-
onClose: onCancel
|
196
|
+
onClose: onCancel,
|
197
|
+
zIndex: zIndex
|
196
198
|
}, drawerProps), {}, {
|
197
199
|
children: [_jsx("div", {
|
198
200
|
className: "pro-drawer-close",
|
@@ -35,8 +35,9 @@ var ProModal = function ProModal(_ref) {
|
|
35
35
|
onCancel = _ref.onCancel,
|
36
36
|
children = _ref.children,
|
37
37
|
className = _ref.className,
|
38
|
-
|
39
|
-
|
38
|
+
extraLeft = _ref.extraLeft,
|
39
|
+
zIndex = _ref.zIndex,
|
40
|
+
modalProps = _ref.modalProps;
|
40
41
|
var ref = useRef(null);
|
41
42
|
var _ref2 = useScroll((_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.parentNode) || {},
|
42
43
|
top = _ref2.top;
|
@@ -178,7 +179,8 @@ var ProModal = function ProModal(_ref) {
|
|
178
179
|
closeIcon: _jsx(ReactSVG, {
|
179
180
|
className: "close-icon",
|
180
181
|
src: closeSvg
|
181
|
-
})
|
182
|
+
}),
|
183
|
+
zIndex: zIndex
|
182
184
|
}, modalProps), {}, {
|
183
185
|
children: _jsx("div", {
|
184
186
|
ref: ref,
|
@@ -8,7 +8,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
8
8
|
var _excluded = ["name", "names", "namesStr", "originalName", "originalNames", "originalValues", "form", "equalWith", "rowKeyPath", "children", "type", "normalize", "getValueProps", "valuePropName", "viewRender", "diffConfig", "index"];
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
10
10
|
import React, { useMemo, useRef } from 'react';
|
11
|
-
import
|
11
|
+
import classnames from 'classnames';
|
12
12
|
import { get } from 'lodash';
|
13
13
|
import { diffOriginal } from '../../../ProForm/utils/diffOriginal';
|
14
14
|
import { useProConfig } from '../../../ProConfigProvider';
|
@@ -162,7 +162,11 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
|
|
162
162
|
};
|
163
163
|
// @ts-ignore
|
164
164
|
var _showEllipse = ((_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.showEllipse) || ((_children$props2 = children.props) === null || _children$props2 === void 0 ? void 0 : _children$props2.tooltip);
|
165
|
-
var
|
165
|
+
var classNames = classnames({
|
166
|
+
'original-value-tooltip': true,
|
167
|
+
'original-value-tooltip-fixed': true
|
168
|
+
});
|
169
|
+
var diffClassName = classnames({
|
166
170
|
'pro-form-item-changed': isChanged,
|
167
171
|
'pro-form-item-add': isAdd
|
168
172
|
});
|
@@ -172,7 +176,7 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
|
|
172
176
|
getPopupContainer: function getPopupContainer(trigger) {
|
173
177
|
return scrollFollowParent ? trigger.parentElement : document.body;
|
174
178
|
},
|
175
|
-
overlayClassName:
|
179
|
+
overlayClassName: classNames,
|
176
180
|
placement: "topLeft",
|
177
181
|
autoAdjustOverflow: false,
|
178
182
|
title: _jsxs(_Space, {
|
@@ -6,7 +6,7 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
6
6
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
7
7
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
8
8
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
9
|
-
var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable", "required", "rules", "equalWith", "className", "trim", "confirm"];
|
9
|
+
var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable", "required", "rules", "equalWith", "onDiff", "className", "trim", "confirm"];
|
10
10
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
11
11
|
/* eslint-disable prefer-destructuring */
|
12
12
|
/* eslint-disable prefer-const */
|
@@ -53,6 +53,7 @@ var RenderField = function RenderField(_ref) {
|
|
53
53
|
_column$rules = column.rules,
|
54
54
|
rules = _column$rules === void 0 ? [] : _column$rules,
|
55
55
|
equalWith = column.equalWith,
|
56
|
+
onDiff = column.onDiff,
|
56
57
|
className = column.className,
|
57
58
|
trim = column.trim,
|
58
59
|
confirm = column.confirm,
|
@@ -555,7 +556,7 @@ var RenderField = function RenderField(_ref) {
|
|
555
556
|
originalNames: originalNames,
|
556
557
|
originalValues: originalValues,
|
557
558
|
form: form,
|
558
|
-
equalWith: equalWith,
|
559
|
+
equalWith: onDiff || equalWith,
|
559
560
|
type: type,
|
560
561
|
onChange: _onChange,
|
561
562
|
valuePropName: _formItemProps.valuePropName,
|
@@ -281,8 +281,11 @@
|
|
281
281
|
}
|
282
282
|
}
|
283
283
|
|
284
|
-
|
285
|
-
|
284
|
+
.@{ant-prefix}-table .@{ant-prefix}-table-body .@{ant-prefix}-table-tbody .is-new-row.@{ant-prefix}-table-row td{
|
285
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
286
|
+
}
|
287
|
+
.@{ant-prefix}-table .@{ant-prefix}-table-body .@{ant-prefix}-table-tbody .is-new-row.@{ant-prefix}-table-row:hover{
|
288
|
+
td, .@{ant-prefix}-table-cell-row-hover {
|
286
289
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
287
290
|
}
|
288
291
|
}
|
package/es/ProEnum/index.js
CHANGED
@@ -43,7 +43,8 @@ var ProEnum = function ProEnum(props) {
|
|
43
43
|
enumProps = _objectWithoutProperties(props, _excluded);
|
44
44
|
var _ref = otherProps || {},
|
45
45
|
viewEmpty = _ref.viewEmpty;
|
46
|
-
var _isView = isView
|
46
|
+
var _isView = isView !== undefined && isView !== null ? isView : otherProps === null || otherProps === void 0 ? void 0 : otherProps.isView;
|
47
|
+
var _defalutValue = props === null || props === void 0 ? void 0 : props.defaultValue;
|
47
48
|
var _ref2 = useProConfig('ProEnum') || {},
|
48
49
|
fieldNames = _ref2.fieldNames,
|
49
50
|
_ref2$clear = _ref2.clear,
|
@@ -273,16 +274,17 @@ var ProEnum = function ProEnum(props) {
|
|
273
274
|
return isFunction(props.optionRender) && record.length ? _optionRender() : labelList === null || labelList === void 0 ? void 0 : labelList.join(',');
|
274
275
|
};
|
275
276
|
if (_isView) {
|
276
|
-
|
277
|
+
var __value = value || _defalutValue;
|
278
|
+
if (Array.isArray(__value)) {
|
277
279
|
return _jsx(Container, {
|
278
280
|
tooltip: true,
|
279
281
|
viewEmpty: viewEmpty,
|
280
|
-
children: transToLabel(
|
282
|
+
children: transToLabel(__value)
|
281
283
|
});
|
282
284
|
}
|
283
285
|
return _jsx(Container, {
|
284
286
|
viewEmpty: viewEmpty,
|
285
|
-
children:
|
287
|
+
children: __value || isNumber(__value) ? transToLabel([__value]) : null
|
286
288
|
});
|
287
289
|
}
|
288
290
|
return _jsx(_Fragment, {
|
@@ -2,9 +2,10 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import "antd/es/checkbox/style";
|
3
3
|
import _Checkbox from "antd/es/checkbox";
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
|
-
var _excluded = ["onChange", "disabled", "value", "otherProps"];
|
5
|
+
var _excluded = ["onChange", "disabled", "value", "otherProps", "className"];
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
7
7
|
import { isNull, isUndefined } from 'lodash';
|
8
|
+
import classnames from 'classnames';
|
8
9
|
import { useProConfig } from '../../../../ProConfigProvider';
|
9
10
|
import locale from '../../../../locale';
|
10
11
|
import ProForm from '../../../../ProForm';
|
@@ -13,6 +14,7 @@ var SwitchCheckbox = function SwitchCheckbox(props) {
|
|
13
14
|
disabled = props.disabled,
|
14
15
|
value = props.value,
|
15
16
|
otherProps = props.otherProps,
|
17
|
+
className = props.className,
|
16
18
|
restProps = _objectWithoutProperties(props, _excluded);
|
17
19
|
var _ref = ProForm.useFieldProps() || {},
|
18
20
|
isViewCon = _ref.isView,
|
@@ -47,9 +49,14 @@ var SwitchCheckbox = function SwitchCheckbox(props) {
|
|
47
49
|
})]
|
48
50
|
});
|
49
51
|
}
|
52
|
+
var classNames = classnames({
|
53
|
+
'pro-switch-checkbox': true,
|
54
|
+
className: className
|
55
|
+
});
|
50
56
|
return _jsx(_Checkbox, _objectSpread(_objectSpread(_objectSpread({
|
51
57
|
disabled: disabled,
|
52
|
-
onChange: changeVal
|
58
|
+
onChange: changeVal,
|
59
|
+
className: classNames
|
53
60
|
}, initialConfig), restProps), {}, {
|
54
61
|
children: restProps.label
|
55
62
|
}));
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
4
|
-
var _excluded = ["type", "confirm", "component", "fieldProps", "contextProps", "before", "after", "getValueProps", "valuePropName", "valueType", "isView"];
|
4
|
+
var _excluded = ["type", "confirm", "component", "fieldProps", "contextProps", "before", "after", "getValueProps", "valuePropName", "valueType", "isView", "viewRender"];
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
import React from 'react';
|
7
7
|
import ConfirmWrapper from '../../../../components/render/ConfirmWrapper';
|
@@ -42,6 +42,7 @@ var ComRender = function ComRender(props) {
|
|
42
42
|
valuePropName = _props$valuePropName === void 0 ? 'value' : _props$valuePropName,
|
43
43
|
valueType = props.valueType,
|
44
44
|
isView = props.isView,
|
45
|
+
viewRender = props.viewRender,
|
45
46
|
rest = _objectWithoutProperties(props, _excluded);
|
46
47
|
var TypeComponent = componentMap[type];
|
47
48
|
var mergedGetValueProps = getValueProps || function (val) {
|
@@ -49,6 +50,16 @@ var ComRender = function ComRender(props) {
|
|
49
50
|
};
|
50
51
|
var _props = mergedGetValueProps(fieldProps.value);
|
51
52
|
var componentProps = _objectSpread(_objectSpread(_objectSpread({}, fieldProps), rest), _props);
|
53
|
+
if (viewRender && isView) {
|
54
|
+
return _jsx(FieldProvider, {
|
55
|
+
value: _objectSpread(_objectSpread({}, contextProps), {}, {
|
56
|
+
valueType: valueType,
|
57
|
+
type: type,
|
58
|
+
isView: isView
|
59
|
+
}),
|
60
|
+
children: viewRender(componentProps)
|
61
|
+
});
|
62
|
+
}
|
52
63
|
var Component = component ? (/*#__PURE__*/React.cloneElement(component, _objectSpread({}, componentProps))) : _jsx(TypeComponent, _objectSpread({}, componentProps));
|
53
64
|
var Com = getComRender(Component, props, componentProps);
|
54
65
|
return _jsx(FieldProvider, {
|
@@ -26,7 +26,8 @@ var Group = function Group(props) {
|
|
26
26
|
value = props.value,
|
27
27
|
onChange = props.onChange,
|
28
28
|
otherProps = props.otherProps,
|
29
|
-
id = props.id
|
29
|
+
id = props.id,
|
30
|
+
isParentView = props.isView;
|
30
31
|
var contextProps = ProForm.useFieldProps() || {};
|
31
32
|
var names = contextProps.names,
|
32
33
|
name = contextProps.name,
|
@@ -71,7 +72,7 @@ var Group = function Group(props) {
|
|
71
72
|
children: columns.map(function (column, index) {
|
72
73
|
return _jsx(ComRender, _objectSpread(_objectSpread({
|
73
74
|
contextProps: contextProps,
|
74
|
-
isView: isView
|
75
|
+
isView: isParentView || isView
|
75
76
|
}, column), {}, {
|
76
77
|
otherProps: otherProps
|
77
78
|
}), column.name);
|
@@ -82,7 +83,7 @@ var Group = function Group(props) {
|
|
82
83
|
children: columns.map(function (column, index) {
|
83
84
|
return _jsx(ComRender, _objectSpread(_objectSpread({
|
84
85
|
contextProps: contextProps,
|
85
|
-
isView: isView
|
86
|
+
isView: isParentView || isView
|
86
87
|
}, column), {}, {
|
87
88
|
otherProps: otherProps
|
88
89
|
}), column.name);
|
@@ -845,7 +845,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
845
845
|
onOk: handleFinish,
|
846
846
|
// @ts-ignore
|
847
847
|
onCancel: handleClose,
|
848
|
-
visible: visible
|
848
|
+
visible: visible,
|
849
|
+
zIndex: 1071
|
849
850
|
}, restModalProps), {}, {
|
850
851
|
children: [_jsx(ProForm, {
|
851
852
|
submitOnEnter: true,
|
@@ -29,7 +29,6 @@ var ChangedWrapper = function ChangedWrapper(props) {
|
|
29
29
|
getValueProps = props.getValueProps,
|
30
30
|
viewRender = props.viewRender,
|
31
31
|
rest = _objectWithoutProperties(props, _excluded);
|
32
|
-
// const contentRef = useRef(null);
|
33
32
|
var _useProConfig = useProConfig('ProForm'),
|
34
33
|
isDiffAll = _useProConfig.isDiffAll;
|
35
34
|
var originalValues = diffConfig.originalValues,
|
@@ -103,7 +102,7 @@ var ChangedWrapper = function ChangedWrapper(props) {
|
|
103
102
|
getPopupContainer: function getPopupContainer(trigger) {
|
104
103
|
return scrollFollowParent ? trigger.parentElement : document.body;
|
105
104
|
},
|
106
|
-
overlayClassName: "original-value-
|
105
|
+
overlayClassName: "original-value-tooltip",
|
107
106
|
placement: "topLeft",
|
108
107
|
autoAdjustOverflow: false,
|
109
108
|
title: _jsxs(_Space, {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["show", "type", "viewRender", "viewType", "valueType", "formItemProps", "colProps", "formItemChildProps", "fieldProps", "equalWith", "clearNotShow", "required", "confirm"];
|
3
|
+
var _excluded = ["show", "type", "viewRender", "viewType", "valueType", "formItemProps", "colProps", "formItemChildProps", "fieldProps", "equalWith", "onDiff", "clearNotShow", "required", "confirm"];
|
4
4
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
5
5
|
import React from 'react';
|
6
6
|
import { isBoolean, isFunction, union, isString } from 'lodash';
|
@@ -69,6 +69,7 @@ var RenderFields = function RenderFields(props) {
|
|
69
69
|
_column$fieldProps = column.fieldProps,
|
70
70
|
fieldProps = _column$fieldProps === void 0 ? {} : _column$fieldProps,
|
71
71
|
equalWith = column.equalWith,
|
72
|
+
onDiff = column.onDiff,
|
72
73
|
_column$clearNotShow = column.clearNotShow,
|
73
74
|
clearNotShow = _column$clearNotShow === void 0 ? outerClearNotShow : _column$clearNotShow,
|
74
75
|
columnRequired = column.required,
|
@@ -208,7 +209,7 @@ var RenderFields = function RenderFields(props) {
|
|
208
209
|
fieldProps: isFunction(fieldProps) ? fieldProps : null,
|
209
210
|
isSelect: _isSelect,
|
210
211
|
diffConfig: diffConfig,
|
211
|
-
equalWith: equalWith,
|
212
|
+
equalWith: onDiff || equalWith,
|
212
213
|
requiredOnView: requiredOnView,
|
213
214
|
globalControl: globalControl,
|
214
215
|
viewRender: viewRender
|
@@ -207,6 +207,7 @@ export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Val
|
|
207
207
|
hiddenNames?: string[] | any[];
|
208
208
|
rules?: ProRule[] | ReactiveFunction<Values, ProRule[]>;
|
209
209
|
equalWith?: DiffOriginalParams['equalWith'];
|
210
|
+
onDiff?: DiffOriginalParams['equalWith'];
|
210
211
|
required?: boolean | boolean[] | ReactiveFunction<Values, boolean | boolean[]>;
|
211
212
|
labelRequired?: boolean;
|
212
213
|
toISOString?: boolean;
|
@@ -385,7 +385,7 @@
|
|
385
385
|
}
|
386
386
|
|
387
387
|
// checkbox
|
388
|
-
.@{ant-prefix}-checkbox-group {
|
388
|
+
.@{ant-prefix}-checkbox-group,.pro-switch-checkbox {
|
389
389
|
padding: 5px 0
|
390
390
|
}
|
391
391
|
// switch
|
@@ -412,7 +412,7 @@
|
|
412
412
|
background: @zaui-contract-bg-add !important;
|
413
413
|
|
414
414
|
.@{ant-prefix}-input {
|
415
|
-
background: @zaui-contract-bg !important;
|
415
|
+
background: @zaui-contract-bg-add !important;
|
416
416
|
}
|
417
417
|
|
418
418
|
.@{ant-prefix}-select.@{ant-prefix}-select-disabled .@{ant-prefix}-select-selector{
|
@@ -463,7 +463,7 @@
|
|
463
463
|
}
|
464
464
|
|
465
465
|
// checkbox
|
466
|
-
.@{ant-prefix}-checkbox-group {
|
466
|
+
.@{ant-prefix}-checkbox-group,.pro-switch-checkbox {
|
467
467
|
padding: 5px 0
|
468
468
|
}
|
469
469
|
// switch
|
@@ -485,10 +485,9 @@
|
|
485
485
|
}
|
486
486
|
}
|
487
487
|
|
488
|
-
.original-value-
|
488
|
+
.original-value-tooltip{
|
489
489
|
max-width: 100%;
|
490
490
|
width: max-content;
|
491
|
-
position: fixed;
|
492
491
|
.changed-tooltip {
|
493
492
|
.original-value-container {
|
494
493
|
.ant-space-item:nth-child(1) {
|
@@ -511,3 +510,7 @@
|
|
511
510
|
}
|
512
511
|
}
|
513
512
|
|
513
|
+
.original-value-tooltip-fixed {
|
514
|
+
position: fixed;
|
515
|
+
}
|
516
|
+
|
@@ -1,15 +1,17 @@
|
|
1
1
|
import { isEqual, isFunction, isObject } from 'lodash';
|
2
2
|
import { isEmpty } from '../../utils';
|
3
3
|
// 过滤对象中undefined字段
|
4
|
-
// 防止{a: '1'} {a: '1', b: undefined}被认为不相等
|
5
|
-
var
|
4
|
+
// 防止{a: '1'} {a: '1', b: undefined | null}被认为不相等
|
5
|
+
var filterObject = function filterObject(data) {
|
6
6
|
if (!isObject(data) || Array.isArray(data) || data === null) return data;
|
7
7
|
var resData = {};
|
8
8
|
Object.keys(data).forEach(function (key) {
|
9
|
-
if (data[key]
|
9
|
+
if (!isEmpty(data[key])) {
|
10
10
|
resData[key] = data[key];
|
11
11
|
}
|
12
12
|
});
|
13
|
+
// 空对象视为null 比较时 null undefined {} [] '' 视为相等
|
14
|
+
if (!Object.keys(resData).length) return null;
|
13
15
|
return resData;
|
14
16
|
};
|
15
17
|
var nullValue = [null, undefined, '']; // 输入框空值时可能存在的三种值 视为相等
|
@@ -20,18 +22,22 @@ export var diffOriginal = function diffOriginal(params) {
|
|
20
22
|
// 支持传入自定义比较事件
|
21
23
|
if (isFunction(equalWith)) {
|
22
24
|
var diffRes = equalWith(originalValue, value);
|
23
|
-
|
24
|
-
if (
|
25
|
-
|
25
|
+
// 如果返回undefined走内置比较逻辑
|
26
|
+
if (diffRes !== undefined) {
|
27
|
+
if (typeof diffRes === 'boolean') {
|
28
|
+
return diffRes ? 'same' : 'changed';
|
29
|
+
}
|
30
|
+
return diffRes;
|
26
31
|
}
|
27
|
-
return diffRes;
|
28
32
|
}
|
33
|
+
var _value = filterObject(value);
|
34
|
+
var _originalValue = filterObject(originalValue);
|
29
35
|
// 如果原始值为空 且当前有值的话 认为变更类型是新增
|
30
|
-
if (isEmpty(
|
36
|
+
if (isEmpty(_originalValue) && !isEmpty(_value)) {
|
31
37
|
return 'add';
|
32
38
|
}
|
33
|
-
if (Array.isArray(
|
34
|
-
var isSame =
|
39
|
+
if (Array.isArray(_originalValue)) {
|
40
|
+
var isSame = _originalValue.every(function (valueItem, index) {
|
35
41
|
// 如果两个值有一个不是空值, 则进行深比较
|
36
42
|
if (!isEmpty(value === null || value === void 0 ? void 0 : value[index]) || !isEmpty(valueItem)) {
|
37
43
|
return isEqual(value === null || value === void 0 ? void 0 : value[index], valueItem);
|
@@ -40,8 +46,8 @@ export var diffOriginal = function diffOriginal(params) {
|
|
40
46
|
});
|
41
47
|
return isSame ? 'same' : 'changed';
|
42
48
|
}
|
43
|
-
if (!
|
44
|
-
return isEqual(
|
49
|
+
if (!isEmpty(_originalValue) || !isEmpty(_value)) {
|
50
|
+
return isEqual(_value, _originalValue) ? 'same' : 'changed';
|
45
51
|
}
|
46
52
|
return 'same';
|
47
53
|
};
|