@zat-design/sisyphus-react 3.4.2-beta.2 → 3.4.2-beta.21
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 +257 -127
- package/dist/less.esm.css +5028 -0
- package/dist/less.esm.js +3 -0
- package/es/ProEditTable/components/RenderField/index.js +13 -15
- package/es/ProEditTable/index.js +3 -3
- package/es/ProEditTable/propsType.d.ts +1 -1
- package/es/ProEditTable/utils/config.js +5 -5
- package/es/ProEditTable/utils/index.js +67 -30
- package/es/ProEditTable/utils/tools.js +3 -1
- package/es/ProEnum/components/Group.d.ts +1 -0
- package/es/ProEnum/components/Group.js +21 -8
- package/es/ProEnum/index.js +4 -2
- package/es/ProEnum/style/index.less +12 -3
- package/es/ProForm/components/combination/Group/index.js +8 -9
- package/es/ProForm/components/combination/Group/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/Group/style/index.less +4 -4
- package/es/ProForm/components/combination/Group/utils.d.ts +2 -0
- package/es/ProForm/components/combination/Group/utils.js +10 -0
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
- package/es/ProForm/components/render/Render.js +2 -2
- package/es/ProForm/components/render/RenderFields.d.ts +1 -1
- package/es/ProForm/components/render/RenderFields.js +2 -2
- package/es/ProForm/index.js +4 -4
- package/es/ProForm/propsType.d.ts +1 -1
- package/es/ProForm/style/index.less +16 -2
- package/es/ProForm/utils/{contrastOriginal.d.ts → diffOriginal.d.ts} +2 -1
- package/es/ProForm/utils/diffOriginal.js +61 -0
- package/es/ProForm/utils/index.d.ts +1 -1
- package/es/ProForm/utils/index.js +1 -1
- package/es/ProForm/utils/transformValue.js +2 -2
- package/es/ProForm/utils/useChanged.js +4 -3
- package/es/ProForm/utils/useListChanged.d.ts +1 -1
- package/es/ProForm/utils/useListChanged.js +5 -3
- package/es/ProIcon/index.d.ts +0 -1
- package/es/ProIcon/index.js +7 -29
- package/es/ProLayout/components/Layout/Header/style/index.less +1 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +58 -55
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +25 -20
- package/es/ProLayout/components/Layout/Menu/style/index.less +52 -56
- package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -5
- package/es/ProLayout/components/ProCollapse/index.js +22 -6
- package/es/ProLayout/components/ProCollapse/style/index.less +24 -21
- package/es/ProLayout/components/ProFooter/index.js +1 -1
- package/es/ProLayout/components/ProFooter/style/index.less +1 -1
- package/es/ProLayout/components/ProHeader/style/index.less +2 -1
- package/es/ProLayout/style/index.less +176 -88
- package/es/ProStep/components/Item/index.js +2 -1
- package/es/ProStep/style/index.less +71 -70
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +3 -3
- package/es/ProTable/propsType.d.ts +1 -1
- package/es/ProTable/utils.js +9 -9
- package/es/ProTabs/style/index.less +3 -1
- package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +2 -2
- package/es/ProThemeTools/index.js +21 -28
- package/es/ProThemeTools/propsType.d.ts +1 -1
- package/es/ProThemeTools/style/index.less +25 -8
- package/es/assets/catalog.svg +30 -1
- package/es/assets/fold.svg +27 -0
- package/es/assets/setting.svg +14 -0
- package/es/style/less.less +2 -0
- package/es/style/theme/antd.less +0 -1
- package/lib/ProEditTable/components/RenderField/index.js +12 -14
- package/lib/ProEditTable/index.js +3 -3
- package/lib/ProEditTable/propsType.d.ts +1 -1
- package/lib/ProEditTable/utils/config.js +5 -5
- package/lib/ProEditTable/utils/index.js +67 -30
- package/lib/ProEditTable/utils/tools.js +3 -1
- package/lib/ProEnum/components/Group.d.ts +1 -0
- package/lib/ProEnum/components/Group.js +21 -8
- package/lib/ProEnum/index.js +4 -2
- package/lib/ProEnum/style/index.less +12 -3
- package/lib/ProForm/components/combination/Group/index.js +6 -7
- package/lib/ProForm/components/combination/Group/propsType.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/style/index.less +4 -4
- package/lib/ProForm/components/combination/Group/utils.d.ts +2 -0
- package/lib/ProForm/components/combination/Group/utils.js +11 -1
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
- package/lib/ProForm/components/render/Render.js +2 -2
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -1
- package/lib/ProForm/components/render/RenderFields.js +2 -2
- package/lib/ProForm/index.js +4 -4
- package/lib/ProForm/propsType.d.ts +1 -1
- package/lib/ProForm/style/index.less +16 -2
- package/lib/ProForm/utils/{contrastOriginal.d.ts → diffOriginal.d.ts} +2 -1
- package/lib/ProForm/utils/diffOriginal.js +68 -0
- package/lib/ProForm/utils/index.d.ts +1 -1
- package/lib/ProForm/utils/index.js +2 -2
- package/lib/ProForm/utils/transformValue.js +1 -1
- package/lib/ProForm/utils/useChanged.js +4 -3
- package/lib/ProForm/utils/useListChanged.d.ts +1 -1
- package/lib/ProForm/utils/useListChanged.js +5 -3
- package/lib/ProIcon/index.d.ts +0 -1
- package/lib/ProIcon/index.js +7 -30
- package/lib/ProLayout/components/Layout/Header/style/index.less +1 -1
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +58 -55
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +25 -20
- package/lib/ProLayout/components/Layout/Menu/style/index.less +52 -56
- package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -5
- package/lib/ProLayout/components/ProCollapse/index.js +20 -6
- package/lib/ProLayout/components/ProCollapse/style/index.less +24 -21
- package/lib/ProLayout/components/ProFooter/index.js +1 -1
- package/lib/ProLayout/components/ProFooter/style/index.less +1 -1
- package/lib/ProLayout/components/ProHeader/style/index.less +2 -1
- package/lib/ProLayout/style/index.less +176 -88
- package/lib/ProStep/components/Item/index.js +2 -1
- package/lib/ProStep/style/index.less +71 -70
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +3 -3
- package/lib/ProTable/propsType.d.ts +1 -1
- package/lib/ProTable/utils.js +9 -9
- package/lib/ProTabs/style/index.less +3 -1
- package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +2 -2
- package/lib/ProThemeTools/index.js +19 -27
- package/lib/ProThemeTools/propsType.d.ts +1 -1
- package/lib/ProThemeTools/style/index.less +25 -8
- package/lib/assets/catalog.svg +30 -1
- package/lib/assets/fold.svg +27 -0
- package/lib/assets/setting.svg +14 -0
- package/lib/style/less.less +2 -0
- package/lib/style/theme/antd.less +0 -1
- package/package.json +1 -1
- package/es/ProForm/utils/contrastOriginal.js +0 -24
- package/es/ProIcon/symbolIcon.js +0 -43
- package/lib/ProForm/utils/contrastOriginal.js +0 -30
- package/lib/ProIcon/symbolIcon.js +0 -45
|
@@ -6,37 +6,38 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.pro-step {
|
|
9
|
-
position
|
|
10
|
-
right
|
|
11
|
-
z-index
|
|
12
|
-
min-width
|
|
13
|
-
min-height
|
|
14
|
-
text-align : center;
|
|
15
|
-
background-color: var(--zaui-global-bg, #fff);
|
|
16
|
-
cursor : pointer;
|
|
17
|
-
box-shadow : -1px 0px 5px 0px var(--zaui-shadow, rgba(56,56,56,0.15));
|
|
18
|
-
transition : width .2s;
|
|
9
|
+
position: fixed;
|
|
10
|
+
right: 0;
|
|
11
|
+
z-index: 101;
|
|
12
|
+
min-width: 48px;
|
|
13
|
+
min-height: 48px;
|
|
19
14
|
overflow-x: hidden;
|
|
20
15
|
overflow-y: auto;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
text-align: center;
|
|
17
|
+
background-color: var(--zaui-global-bg, #fff);
|
|
18
|
+
border-radius: 0 0 var(--zaui-border-radius) var(--zaui-border-radius);
|
|
19
|
+
box-shadow: -1px 0px 5px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition: width 0.2s;
|
|
22
|
+
|
|
23
|
+
> .step-menu {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 48px;
|
|
28
|
+
font-size: var(--zaui-font-size-lg, 16px);
|
|
28
29
|
border-bottom: 1px solid var(--zaui-line, #dddddd);
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
> .menu-icon {
|
|
31
32
|
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
32
|
-
fill
|
|
33
|
+
fill: var(--zaui-brand, #006aff);
|
|
33
34
|
|
|
34
|
-
>div {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
display : flex;
|
|
38
|
-
align-items : center;
|
|
35
|
+
> div {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
39
38
|
justify-content: center;
|
|
39
|
+
width: 48px;
|
|
40
|
+
height: 24px;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
}
|
|
@@ -50,12 +51,12 @@
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
.com-menu-item {
|
|
53
|
-
display
|
|
54
|
-
align-items
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
55
56
|
justify-content: space-between;
|
|
56
|
-
width
|
|
57
|
-
height
|
|
58
|
-
padding-right
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 48px;
|
|
59
|
+
padding-right: var(--zaui-space-size-md, 24px);
|
|
59
60
|
|
|
60
61
|
&:hover {
|
|
61
62
|
background-color: rgba(185, 185, 189, 0.1);
|
|
@@ -69,63 +70,63 @@
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
display
|
|
73
|
+
> .menu-item {
|
|
74
|
+
display: flex;
|
|
74
75
|
align-items: center;
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
display
|
|
78
|
-
align-items
|
|
77
|
+
> .menu-icon {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
79
80
|
justify-content: center;
|
|
80
|
-
width
|
|
81
|
-
height
|
|
81
|
+
width: 48px;
|
|
82
|
+
height: 100%;
|
|
82
83
|
|
|
83
|
-
>svg {
|
|
84
|
-
fill: var(--zaui-brand, #
|
|
84
|
+
> svg {
|
|
85
|
+
fill: var(--zaui-brand, #006aff);
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
|
|
88
|
-
width
|
|
89
|
-
height
|
|
90
|
-
background
|
|
88
|
+
> .dot {
|
|
89
|
+
width: 6px;
|
|
90
|
+
height: 6px;
|
|
91
|
+
background: var(--zaui-brand, #006aff);
|
|
91
92
|
border-radius: 3px;
|
|
92
93
|
|
|
93
94
|
&.errored {
|
|
94
95
|
background: #ff5050;
|
|
95
|
-
fill
|
|
96
|
+
fill: #ff5050;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
&.disabled {
|
|
99
100
|
background: #939599;
|
|
100
|
-
fill
|
|
101
|
+
fill: #939599;
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
.dot-icon {
|
|
105
|
-
display
|
|
106
|
-
align-items
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
107
108
|
justify-content: center;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
background
|
|
113
|
-
border-radius
|
|
109
|
+
width: 18px;
|
|
110
|
+
height: 18px;
|
|
111
|
+
color: #ffffff;
|
|
112
|
+
font-size: var(--zaui-font-size-sm, 12px);
|
|
113
|
+
background: var(--zaui-brand, #006aff);
|
|
114
|
+
border-radius: 9px;
|
|
114
115
|
|
|
115
116
|
&.errored {
|
|
116
117
|
background: #ff5050;
|
|
117
|
-
fill
|
|
118
|
+
fill: #ff5050;
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
&.disabled {
|
|
121
122
|
background: #939599;
|
|
122
|
-
fill
|
|
123
|
+
fill: #939599;
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
|
|
128
|
-
color: #
|
|
128
|
+
> .menu-name {
|
|
129
|
+
color: #0a0a0a;
|
|
129
130
|
|
|
130
131
|
&.disabled {
|
|
131
132
|
color: #626366;
|
|
@@ -133,26 +134,26 @@
|
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
|
|
136
|
-
|
|
137
|
+
> .checked-status {
|
|
137
138
|
height: 18px;
|
|
138
139
|
|
|
139
|
-
>svg {
|
|
140
|
-
fill: var(--zaui-brand, #
|
|
140
|
+
> svg {
|
|
141
|
+
fill: var(--zaui-brand, #006aff);
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
.errorDot {
|
|
144
|
-
display
|
|
145
|
-
align-items
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
146
147
|
justify-content: center;
|
|
147
|
-
width
|
|
148
|
-
height
|
|
149
|
-
background
|
|
150
|
-
border-radius
|
|
151
|
-
|
|
152
|
-
>span {
|
|
153
|
-
color
|
|
154
|
-
font-weight
|
|
155
|
-
font-size
|
|
148
|
+
width: 16px;
|
|
149
|
+
height: 16px;
|
|
150
|
+
background: rgba(255, 80, 80, 0.2);
|
|
151
|
+
border-radius: 8px;
|
|
152
|
+
|
|
153
|
+
> span {
|
|
154
|
+
color: #ff5050;
|
|
155
|
+
font-weight: 600;
|
|
156
|
+
font-size: var(--aui-font-size-sm, 12px);
|
|
156
157
|
border-radius: 8px;
|
|
157
158
|
}
|
|
158
159
|
}
|
|
@@ -22,10 +22,10 @@ var RenderColumn = function RenderColumn(props) {
|
|
|
22
22
|
ellipsis = props.ellipsis,
|
|
23
23
|
width = props.width,
|
|
24
24
|
originalValue = props.originalValue,
|
|
25
|
-
|
|
25
|
+
originalDiffTip = props.originalDiffTip;
|
|
26
26
|
if (originalValue !== undefined) {
|
|
27
27
|
var renderNode = value ? node : '-';
|
|
28
|
-
if (ellipsis ||
|
|
28
|
+
if (ellipsis || originalDiffTip) {
|
|
29
29
|
if (ellipsis) {
|
|
30
30
|
renderNode = (0, _jsxRuntime.jsx)(Text, {
|
|
31
31
|
style: {
|
|
@@ -42,7 +42,7 @@ var RenderColumn = function RenderColumn(props) {
|
|
|
42
42
|
style: {
|
|
43
43
|
width: width
|
|
44
44
|
},
|
|
45
|
-
title:
|
|
45
|
+
title: originalDiffTip ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
46
46
|
children: ["\u521D\u59CB\u503C\uFF1A", originalValue, (0, _jsxRuntime.jsx)("br", {}), ellipsis ? "\u5F53\u524D\u503C\uFF1A".concat(currentValue) : undefined]
|
|
47
47
|
}) : node,
|
|
48
48
|
children: renderNode
|
|
@@ -26,7 +26,7 @@ export interface ProTableColumn extends Omit<ColumnType<any>, 'dataIndex'> {
|
|
|
26
26
|
precision?: number;
|
|
27
27
|
code?: string | string[] | ((text: any, record: any) => string);
|
|
28
28
|
copyable?: boolean;
|
|
29
|
-
|
|
29
|
+
originalDiffTip?: boolean;
|
|
30
30
|
prefix?: string | ReactNode | ((value: any, record?: any, index?: number) => any);
|
|
31
31
|
suffix?: string | ReactNode | ((value: any, record?: any, index?: number) => any);
|
|
32
32
|
tooltip?: ReactNode | {
|
package/lib/ProTable/utils.js
CHANGED
|
@@ -64,8 +64,8 @@ var formatColumn = exports.formatColumn = function formatColumn(column, original
|
|
|
64
64
|
prefix = column.prefix,
|
|
65
65
|
suffix = column.suffix,
|
|
66
66
|
dataIndex = column.dataIndex,
|
|
67
|
-
_column$
|
|
68
|
-
|
|
67
|
+
_column$originalDiffT = column.originalDiffTip,
|
|
68
|
+
originalDiffTip = _column$originalDiffT === void 0 ? true : _column$originalDiffT;
|
|
69
69
|
// 前缀处理
|
|
70
70
|
var prefixNode = function prefixNode(value, record, index) {
|
|
71
71
|
if (!prefix) {
|
|
@@ -129,7 +129,7 @@ var formatColumn = exports.formatColumn = function formatColumn(column, original
|
|
|
129
129
|
node: renderValue,
|
|
130
130
|
value: value,
|
|
131
131
|
currentValue: renderValue,
|
|
132
|
-
|
|
132
|
+
originalDiffTip: originalDiffTip
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
135
|
// 千分位, 千分位带CNY前缀
|
|
@@ -158,7 +158,7 @@ var formatColumn = exports.formatColumn = function formatColumn(column, original
|
|
|
158
158
|
node: node,
|
|
159
159
|
value: value,
|
|
160
160
|
currentValue: renderValue,
|
|
161
|
-
|
|
161
|
+
originalDiffTip: originalDiffTip
|
|
162
162
|
});
|
|
163
163
|
};
|
|
164
164
|
} else if (['datePicker', 'date', 'dateTime', 'dateStartTime', 'dateEndTime', 'dateStartEndTime'].includes(valueType)) {
|
|
@@ -210,7 +210,7 @@ var formatColumn = exports.formatColumn = function formatColumn(column, original
|
|
|
210
210
|
node: node,
|
|
211
211
|
value: value,
|
|
212
212
|
currentValue: renderValue,
|
|
213
|
-
|
|
213
|
+
originalDiffTip: originalDiffTip
|
|
214
214
|
});
|
|
215
215
|
};
|
|
216
216
|
} else if (['enumName', 'enumCodeName'].includes(valueType)) {
|
|
@@ -231,7 +231,7 @@ var formatColumn = exports.formatColumn = function formatColumn(column, original
|
|
|
231
231
|
node: node,
|
|
232
232
|
value: value,
|
|
233
233
|
currentValue: renderValue,
|
|
234
|
-
|
|
234
|
+
originalDiffTip: originalDiffTip
|
|
235
235
|
});
|
|
236
236
|
};
|
|
237
237
|
} else if (precision || prefix || suffix) {
|
|
@@ -257,7 +257,7 @@ var formatColumn = exports.formatColumn = function formatColumn(column, original
|
|
|
257
257
|
node: node,
|
|
258
258
|
value: value,
|
|
259
259
|
currentValue: renderValue,
|
|
260
|
-
|
|
260
|
+
originalDiffTip: originalDiffTip
|
|
261
261
|
});
|
|
262
262
|
};
|
|
263
263
|
} else if (valueType === 'address') {
|
|
@@ -329,7 +329,7 @@ var formatColumn = exports.formatColumn = function formatColumn(column, original
|
|
|
329
329
|
node: value,
|
|
330
330
|
value: value,
|
|
331
331
|
currentValue: value || '-',
|
|
332
|
-
|
|
332
|
+
originalDiffTip: originalDiffTip
|
|
333
333
|
}), suffixNode(value, record, index)]
|
|
334
334
|
});
|
|
335
335
|
};
|
|
@@ -351,7 +351,7 @@ var formatColumn = exports.formatColumn = function formatColumn(column, original
|
|
|
351
351
|
node: node,
|
|
352
352
|
value: value,
|
|
353
353
|
currentValue: value || '-',
|
|
354
|
-
|
|
354
|
+
originalDiffTip: originalDiffTip
|
|
355
355
|
});
|
|
356
356
|
};
|
|
357
357
|
}
|
|
@@ -70,9 +70,11 @@
|
|
|
70
70
|
.pro-tabs-tab {
|
|
71
71
|
.pro-tabs-card {
|
|
72
72
|
.@{ant-prefix}-tag {
|
|
73
|
+
min-width: 22px;
|
|
73
74
|
margin-right: 0;
|
|
74
75
|
padding: 0 var(--zaui-space-size-xs, 4px);
|
|
75
|
-
|
|
76
|
+
text-align: center;
|
|
77
|
+
border-radius: 12px;
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
.@{ant-prefix}-space-item {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DevToolsPropsType } from '../../propsType';
|
|
2
|
-
declare const PrdTools: ({ onReset, onClose, setState,
|
|
2
|
+
declare const PrdTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, prefixCls, }: DevToolsPropsType) => JSX.Element;
|
|
3
3
|
export default PrdTools;
|
|
@@ -24,7 +24,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
24
24
|
var onReset = _ref.onReset,
|
|
25
25
|
onClose = _ref.onClose,
|
|
26
26
|
setState = _ref.setState,
|
|
27
|
-
|
|
27
|
+
open = _ref.open,
|
|
28
28
|
state = _ref.state,
|
|
29
29
|
tableBorder = _ref.tableBorder,
|
|
30
30
|
tableStripe = _ref.tableStripe,
|
|
@@ -68,7 +68,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
68
68
|
title: "".concat(_locale.default.ProThemeTools.title),
|
|
69
69
|
placement: "right",
|
|
70
70
|
onClose: onClose,
|
|
71
|
-
open:
|
|
71
|
+
open: open,
|
|
72
72
|
closable: false,
|
|
73
73
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
74
74
|
className: "pro-drawer-close",
|
|
@@ -10,13 +10,14 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
var _icons = require("@ant-design/icons");
|
|
14
13
|
var _antd = require("antd");
|
|
15
14
|
var _react = require("react");
|
|
16
15
|
var _ahooks = require("ahooks");
|
|
16
|
+
var _reactSvg = require("react-svg");
|
|
17
17
|
var _lodash = require("lodash");
|
|
18
18
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
19
19
|
var _index = require("./utils/index");
|
|
20
|
+
var _setting = _interopRequireDefault(require("../assets/setting.svg"));
|
|
20
21
|
var _component = require("./component");
|
|
21
22
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
22
23
|
var _excluded = ["size", "className", "cacheTime", "color", "mode", "iconFollowTheme", "prefixCls", "tableBorder", "tableStripe", "theme", "onChange"];
|
|
@@ -54,24 +55,18 @@ var ProThemeTools = function ProThemeTools(_ref) {
|
|
|
54
55
|
theme = _ref$theme === void 0 ? {} : _ref$theme,
|
|
55
56
|
onChange = _ref.onChange,
|
|
56
57
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
57
|
-
var
|
|
58
|
+
var _useToggle = (0, _ahooks.useToggle)(false),
|
|
59
|
+
_useToggle2 = (0, _slicedToArray2.default)(_useToggle, 2),
|
|
60
|
+
visible = _useToggle2[0],
|
|
61
|
+
toggle = _useToggle2[1].toggle;
|
|
62
|
+
var _useState = (0, _react.useState)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultThemeConfig), (0, _index.getMapHumpCase)(theme))),
|
|
58
63
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var _useState3 = (0, _react.useState)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultThemeConfig), (0, _index.getMapHumpCase)(theme))),
|
|
62
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
63
|
-
state = _useState4[0],
|
|
64
|
-
setState = _useState4[1];
|
|
64
|
+
state = _useState2[0],
|
|
65
|
+
setState = _useState2[1];
|
|
65
66
|
var previousState = (0, _ahooks.usePrevious)(state);
|
|
66
67
|
var zauiBrand = state.zauiBrand,
|
|
67
68
|
zauiStripe = state.zauiStripe,
|
|
68
69
|
zauiTableBorder = state.zauiTableBorder;
|
|
69
|
-
var showDrawer = function showDrawer() {
|
|
70
|
-
setVisible(true);
|
|
71
|
-
};
|
|
72
|
-
var onClose = function onClose() {
|
|
73
|
-
setVisible(false);
|
|
74
|
-
};
|
|
75
70
|
// 重置
|
|
76
71
|
var onReset = function onReset() {
|
|
77
72
|
setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), defaultThemeConfig));
|
|
@@ -184,24 +179,21 @@ var ProThemeTools = function ProThemeTools(_ref) {
|
|
|
184
179
|
'pro-theme-tools': true,
|
|
185
180
|
'pro-theme-tools-follow': iconFollowTheme
|
|
186
181
|
}, className, className));
|
|
187
|
-
return (0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
onClick: function onClick() {
|
|
196
|
-
showDrawer();
|
|
197
|
-
}
|
|
182
|
+
return (0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
183
|
+
children: [(0, _jsxRuntime.jsx)("div", {
|
|
184
|
+
className: cls,
|
|
185
|
+
onClick: toggle,
|
|
186
|
+
children: (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
|
|
187
|
+
className: "setting-icon",
|
|
188
|
+
src: _setting.default
|
|
189
|
+
})
|
|
198
190
|
}), (0, _jsxRuntime.jsx)(_component.PrdTools, {
|
|
199
191
|
prefixCls: prefixCls,
|
|
200
192
|
onReset: onReset,
|
|
201
|
-
onClose:
|
|
193
|
+
onClose: toggle,
|
|
202
194
|
onCopy: onCopy,
|
|
203
195
|
setState: setState,
|
|
204
|
-
|
|
196
|
+
open: visible,
|
|
205
197
|
state: state,
|
|
206
198
|
tableBorder: tableBorder,
|
|
207
199
|
tableStripe: tableStripe
|
|
@@ -5,18 +5,35 @@
|
|
|
5
5
|
|
|
6
6
|
.pro-theme-tools {
|
|
7
7
|
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
width: 34px;
|
|
11
|
+
height: 34px;
|
|
12
|
+
background: #d8e6ff;
|
|
13
|
+
border-radius: var(--zaui-border-radius, 8px);
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
|
|
16
|
+
.setting-icon {
|
|
17
|
+
margin-top: -1px;
|
|
18
|
+
div {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
8
24
|
|
|
9
25
|
&.pro-theme-tools-follow {
|
|
26
|
+
background: var(--ant-primary-1);
|
|
10
27
|
svg {
|
|
11
28
|
color: var(--zaui-brand, #006aff);
|
|
12
29
|
}
|
|
13
30
|
}
|
|
14
31
|
|
|
15
32
|
.anticon {
|
|
16
|
-
color: var(--zaui-
|
|
33
|
+
color: var(--zaui-text, #343434);
|
|
17
34
|
|
|
18
35
|
svg {
|
|
19
|
-
font-size:
|
|
36
|
+
font-size: 20px;
|
|
20
37
|
}
|
|
21
38
|
}
|
|
22
39
|
}
|
|
@@ -36,16 +53,16 @@
|
|
|
36
53
|
|
|
37
54
|
.copy-btn {
|
|
38
55
|
position: absolute;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
bottom: 20px;
|
|
57
|
+
left: 32px;
|
|
58
|
+
z-index: 10;
|
|
59
|
+
width: calc(100% - 64px);
|
|
43
60
|
}
|
|
44
61
|
|
|
45
62
|
.pro-theme-tools-box {
|
|
46
|
-
display
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-wrap: wrap;
|
|
47
65
|
justify-content: space-between;
|
|
48
|
-
flex-wrap : wrap;
|
|
49
66
|
}
|
|
50
67
|
|
|
51
68
|
.pro-theme-tools-space {
|
package/lib/assets/catalog.svg
CHANGED
|
@@ -1 +1,30 @@
|
|
|
1
|
-
<?xml version="1.0"
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>编组 52@1x</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<rect id="path-1" x="0" y="4" width="24" height="18" rx="2"></rect>
|
|
6
|
+
<filter x="-14.6%" y="-13.9%" width="129.2%" height="138.9%" filterUnits="objectBoundingBox" id="filter-2">
|
|
7
|
+
<feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
|
8
|
+
<feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
|
9
|
+
<feColorMatrix values="0 0 0 0 0.653997356 0 0 0 0 0.779247182 0 0 0 0 1 0 0 0 1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
|
10
|
+
</filter>
|
|
11
|
+
</defs>
|
|
12
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
13
|
+
<g id="画板备份-17" transform="translate(-1367, -56)">
|
|
14
|
+
<g id="编组-81" transform="translate(1359, 48)">
|
|
15
|
+
<g id="编组-52" transform="translate(8, 8)">
|
|
16
|
+
<rect id="矩形" x="0" y="0" width="32" height="32"></rect>
|
|
17
|
+
<g id="编组-13" transform="translate(4, 5)">
|
|
18
|
+
<path d="M5.33152162,0 L15,0 C16.1045695,7.78148667e-16 17,0.8954305 17,2 L17,19 C17,20.1045695 16.1045695,21 15,21 L2,21 C0.8954305,21 6.76353751e-17,20.1045695 0,19 L-4.4408921e-16,5.64678021 C-5.05225217e-16,5.14756683 0.186696218,4.666401 0.523402611,4.29783242 L3.85492423,0.651052206 C4.233839,0.236281109 4.76972854,9.91378134e-16 5.33152162,8.8817842e-16 Z" id="矩形" fill="#87F1FC" transform="translate(8.5, 10.5) scale(-1, 1) translate(-8.5, -10.5)"></path>
|
|
19
|
+
<g id="矩形">
|
|
20
|
+
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
|
|
21
|
+
<use fill="#4181FF" fill-rule="evenodd" xlink:href="#path-1"></use>
|
|
22
|
+
</g>
|
|
23
|
+
<circle id="椭圆形" fill="#FFFFFF" cx="7.16666667" cy="12.8333333" r="1.5"></circle>
|
|
24
|
+
<circle id="椭圆形" fill="#FFFFFF" cx="16.5" cy="12.8333333" r="1.5"></circle>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
</g>
|
|
29
|
+
</g>
|
|
30
|
+
</svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="15px" viewBox="0 0 16 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>编组 2</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient x1="100%" y1="50%" x2="0%" y2="50%" id="linearGradient-1">
|
|
6
|
+
<stop stop-color="#ADDDFF" stop-opacity="0" offset="0%"></stop>
|
|
7
|
+
<stop stop-color="#5FB3D8" stop-opacity="0" offset="13.9259178%"></stop>
|
|
8
|
+
<stop stop-color="#4181FF" offset="100%"></stop>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
</defs>
|
|
11
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
12
|
+
<g id="画板备份-17" transform="translate(-81, -162)" fill="url(#linearGradient-1)">
|
|
13
|
+
<g id="编组-27" transform="translate(64, 146)">
|
|
14
|
+
<g id="Card_Tittle/带icon备份-4" transform="translate(1, 0)">
|
|
15
|
+
<g id="编组-2" transform="translate(16, 16)">
|
|
16
|
+
<g id="编组">
|
|
17
|
+
<rect id="矩形" x="0" y="0" width="16" height="6" rx="3"></rect>
|
|
18
|
+
</g>
|
|
19
|
+
<g id="编组备份" transform="translate(8, 12) scale(-1, 1) translate(-8, -12)translate(0, 9)">
|
|
20
|
+
<rect id="矩形" x="0" y="0" width="16" height="6" rx="3"></rect>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="21px" height="21px" viewBox="0 0 22 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>icon-settings</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="画板备份-17" transform="translate(-1223, -14)" fill="#231F20" fill-rule="nonzero" stroke="#333333" stroke-width="0.3">
|
|
6
|
+
<g id="编组-2" transform="translate(1209.2372, 0)">
|
|
7
|
+
<g id="icon-settings" transform="translate(14.4202, 15)">
|
|
8
|
+
<path d="M20.3848055,7.53659573 C20.2624144,6.90517801 19.8656126,6.49687157 19.3574341,6.49687157 L19.2693187,6.49687157 C17.8961096,6.49687157 16.7791849,5.40670117 16.7791849,4.0659785 C16.7791849,3.64243545 16.9874064,3.15949962 16.9954426,3.14030349 C17.2488001,2.58384094 17.0543916,1.90192685 16.5418484,1.55193559 L13.9650884,0.151544503 L13.9272182,0.133451014 C13.4117224,-0.0847484644 12.7061572,0.0549122231 12.3217819,0.445776738 C12.0436226,0.725799811 11.0846741,1.52424401 10.3529464,1.52424401 C9.61169334,1.52424401 8.65061387,0.709786336 8.37104252,0.424450467 C7.98733476,0.0307290821 7.28906108,-0.117076194 6.76773716,0.100747395 L4.09924158,1.52780256 L4.05918911,1.55268737 C3.54659457,1.90127525 3.35146717,2.5831643 3.60341257,3.13749673 C3.61211629,3.15777047 3.82110799,3.63677181 3.82110799,4.06600356 C3.82110799,5.40672622 2.70418334,6.49689663 1.33099995,6.49689663 L1.2268892,6.49689663 C0.73468034,6.49689663 0.337852817,6.90517801 0.215538765,7.53662079 C0.206424254,7.58105259 0,8.64957096 0,9.50630527 C0,10.3619369 0.206424254,11.4300794 0.215538765,11.4741603 C0.337852842,12.105979 0.73468034,12.5146363 1.24288452,12.5146363 L1.33099995,12.5146363 C2.70418336,12.5146363 3.82110799,13.6048318 3.82110799,14.9451535 C3.82110799,15.3715534 3.61214195,15.8526849 3.60413145,15.8711543 C3.35149282,16.4286944 3.54518244,17.1095309 4.05628784,17.457768 L6.58426601,18.8421957 L6.62285501,18.8592617 C7.1456424,19.0838515 7.85261977,18.9374246 8.23488975,18.5295191 C8.58799332,18.1570989 9.54475946,17.3838403 10.2473465,17.3838403 C11.0089339,17.3838403 11.9897315,18.249471 12.2722554,18.5536271 C12.5328788,18.8322217 12.9333521,19 13.3432737,19 C13.5347553,19 13.7160441,18.962986 13.8820564,18.8933687 L16.5032593,17.4834046 L16.5418483,17.4591713 C17.0543915,17.109556 17.2495446,16.4287195 16.9969316,15.8740362 C16.9881766,15.8534116 16.7792105,15.3743852 16.7792105,14.9451785 C16.7792105,13.6048568 17.8961352,12.5146614 19.2693442,12.5146614 L19.3720429,12.5146614 C19.8649193,12.5146614 20.26244,12.1060041 20.3848054,11.4741854 C20.3935348,11.4301045 20.6002928,10.361962 20.6002928,9.50633035 C20.6002928,8.64954589 20.3935349,7.58102751 20.3848055,7.53659573 M19.1062589,9.50628019 C19.1062589,10.0598859 18.9933931,10.7712959 18.9416844,11.0683599 C16.8818579,11.2332312 15.2851253,12.9132945 15.2851253,14.9451284 C15.2851253,15.518657 15.471549,16.0680024 15.5705761,16.3206848 L13.3345445,17.5259819 C13.2245799,17.413712 12.8998469,17.0938682 12.457909,16.7726211 C11.6817384,16.2111966 10.9375841,15.9244072 10.2473209,15.9244072 C9.56291156,15.9244072 8.82463676,16.2040795 8.05211198,16.7584119 C7.61233077,17.0711135 7.29198807,17.3823867 7.17984115,17.4975135 L5.0290237,16.3220881 C5.13387902,16.056625 5.31519344,15.5143716 5.31519344,14.9451284 C5.31519344,12.9132945 3.71846079,11.2332312 1.65937889,11.0683599 C1.60695125,10.7712959 1.49408545,10.0599109 1.49408545,9.50628019 C1.49408545,8.95157185 1.60695125,8.23983608 1.65937889,7.94277203 C3.71846079,7.77825158 5.31519344,6.09783742 5.31519344,4.06600356 C5.31519344,3.4956827 5.12879543,2.94455798 5.02976827,2.69225151 L7.32112879,1.46312209 C7.42087485,1.56050617 7.74779025,1.8728319 8.1948374,2.18340342 C8.95645045,2.71392862 9.68168251,2.98257437 10.3529721,2.98257437 C11.0177147,2.98257437 11.7378118,2.71891561 12.4943156,2.19869017 C12.9450086,1.8895471 13.2712051,1.58148161 13.3658419,1.49442234 L15.5712693,2.69012142 C15.4715233,2.94099944 15.2850996,3.4903449 15.2850996,4.06600358 C15.2850996,6.09783744 16.8818322,7.7782516 18.9416587,7.94277205 C18.9933931,8.2405127 19.1062589,8.95513042 19.1062589,9.50628019" id="形状"></path>
|
|
9
|
+
<path d="M10.3001356,6.5 C8.59640655,6.5 7.21010249,7.84598945 7.21010249,9.50014713 C7.21010249,11.1545781 8.5964282,12.5 10.3001356,12.5 C12.0038646,12.5 13.3901903,11.1545781 13.3901903,9.50014713 C13.3901903,7.84598945 12.0038646,6.5 10.3001356,6.5 M12.1303626,9.50014713 C12.1303626,10.4798072 11.3095002,11.276765 10.3001356,11.276765 C9.29079259,11.276765 8.47053634,10.4798072 8.47053634,9.50014713 C8.47053634,8.52105462 9.29079259,7.72378156 10.3001356,7.72378156 C11.3095002,7.72378156 12.1303626,8.52105462 12.1303626,9.50014713" id="形状"></path>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { isEqual, isFunction } from 'lodash';
|
|
2
|
-
var nullValue = [null, undefined, '']; // 输入框空值时可能存在的三种值 视为相等
|
|
3
|
-
export var contrastOriginal = function contrastOriginal(params) {
|
|
4
|
-
var originalValue = params.originalValue,
|
|
5
|
-
value = params.value,
|
|
6
|
-
equalWith = params.equalWith;
|
|
7
|
-
// 支持传入自定义比较事件
|
|
8
|
-
if (isFunction(equalWith)) {
|
|
9
|
-
return !equalWith(originalValue, value);
|
|
10
|
-
}
|
|
11
|
-
if (Array.isArray(originalValue)) {
|
|
12
|
-
return originalValue.some(function (valueItem, index) {
|
|
13
|
-
// 如果两个值有一个不是空值, 则进行深比较
|
|
14
|
-
if (!nullValue.includes(value === null || value === void 0 ? void 0 : value[index]) || !nullValue.includes(valueItem)) {
|
|
15
|
-
return !isEqual(value === null || value === void 0 ? void 0 : value[index], valueItem);
|
|
16
|
-
}
|
|
17
|
-
return false;
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
if (!nullValue.includes(value) || !nullValue.includes(originalValue)) {
|
|
21
|
-
return !isEqual(value, originalValue);
|
|
22
|
-
}
|
|
23
|
-
return false;
|
|
24
|
-
};
|