@zat-design/sisyphus-react 3.4.2-beta.29 → 3.4.2-beta.30
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/es/ProConfigProvider/index.js +2 -1
- package/es/ProEnum/components/Group.d.ts +1 -0
- package/es/ProEnum/components/Group.js +6 -1
- package/es/ProEnum/index.js +3 -4
- package/es/ProIcon/config/index.d.ts +2 -1
- package/es/ProIcon/config/index.js +191 -133
- package/es/ProIcon/index.js +10 -7
- package/es/ProIcon/propsTypes.d.ts +2 -1
- package/es/locale/en_US.d.ts +3 -0
- package/es/locale/en_US.js +3 -0
- package/es/locale/zh_CN.d.ts +3 -0
- package/es/locale/zh_CN.js +3 -0
- package/lib/ProConfigProvider/index.js +2 -1
- package/lib/ProEnum/components/Group.d.ts +1 -0
- package/lib/ProEnum/components/Group.js +6 -1
- package/lib/ProEnum/index.js +3 -4
- package/lib/ProIcon/config/index.d.ts +2 -1
- package/lib/ProIcon/config/index.js +191 -133
- package/lib/ProIcon/index.js +10 -7
- package/lib/ProIcon/propsTypes.d.ts +2 -1
- package/lib/locale/en_US.d.ts +3 -0
- package/lib/locale/en_US.js +3 -0
- package/lib/locale/zh_CN.d.ts +3 -0
- package/lib/locale/zh_CN.js +3 -0
- package/package.json +1 -1
|
@@ -9,7 +9,9 @@ var Group = function Group(props) {
|
|
|
9
9
|
dataSource = props.dataSource,
|
|
10
10
|
fieldValue = props.fieldValue,
|
|
11
11
|
fieldLabel = props.fieldLabel,
|
|
12
|
-
disabled = props.disabled
|
|
12
|
+
disabled = props.disabled,
|
|
13
|
+
_props$allowClear = props.allowClear,
|
|
14
|
+
allowClear = _props$allowClear === void 0 ? true : _props$allowClear;
|
|
13
15
|
var idx = useRef(-1);
|
|
14
16
|
var _useSetState = useSetState({
|
|
15
17
|
checked: ''
|
|
@@ -28,6 +30,9 @@ var Group = function Group(props) {
|
|
|
28
30
|
}, [value]);
|
|
29
31
|
var handleClick = function handleClick(val, index) {
|
|
30
32
|
if (state.checked === val) {
|
|
33
|
+
if (!allowClear) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
31
36
|
setState({
|
|
32
37
|
checked: ''
|
|
33
38
|
});
|
package/es/ProEnum/index.js
CHANGED
|
@@ -208,14 +208,13 @@ var ProEnum = function ProEnum(props) {
|
|
|
208
208
|
dataSource: list
|
|
209
209
|
});
|
|
210
210
|
case 'Group':
|
|
211
|
-
return _jsx(ProEnumGroup, {
|
|
211
|
+
return _jsx(ProEnumGroup, _objectSpread(_objectSpread({}, enumProps), {}, {
|
|
212
212
|
value: value,
|
|
213
213
|
onChange: onChange,
|
|
214
214
|
fieldLabel: label,
|
|
215
215
|
fieldValue: fieldValue,
|
|
216
|
-
dataSource: list
|
|
217
|
-
|
|
218
|
-
});
|
|
216
|
+
dataSource: list
|
|
217
|
+
}));
|
|
219
218
|
default:
|
|
220
219
|
return null;
|
|
221
220
|
}
|
|
@@ -1,199 +1,257 @@
|
|
|
1
1
|
export var iconMap = [{
|
|
2
2
|
type: 'view',
|
|
3
|
-
text: '查看'
|
|
3
|
+
'text-cn': '查看',
|
|
4
|
+
'text-en': 'view'
|
|
4
5
|
}, {
|
|
5
|
-
type: '',
|
|
6
|
-
text: '编辑'
|
|
6
|
+
type: 'edit',
|
|
7
|
+
'text-cn': '编辑',
|
|
8
|
+
'text-en': 'edit'
|
|
7
9
|
}, {
|
|
8
|
-
type: '',
|
|
9
|
-
text: '查看上传结果'
|
|
10
|
+
type: 'chakanshangchuanjieguo',
|
|
11
|
+
'text-cn': '查看上传结果',
|
|
12
|
+
'text-en': 'view upload results'
|
|
10
13
|
}, {
|
|
11
|
-
type: '',
|
|
12
|
-
text: '操作日志'
|
|
14
|
+
type: 'caozuorizhi',
|
|
15
|
+
'text-cn': '操作日志',
|
|
16
|
+
'text-en': 'operation log'
|
|
13
17
|
}, {
|
|
14
|
-
type: '',
|
|
15
|
-
text: '监管停售'
|
|
18
|
+
type: 'jianguantingshou',
|
|
19
|
+
'text-cn': '监管停售',
|
|
20
|
+
'text-en': 'regulatory suspension'
|
|
16
21
|
}, {
|
|
17
|
-
type: '',
|
|
18
|
-
text: '下架'
|
|
22
|
+
type: 'xiajia',
|
|
23
|
+
'text-cn': '下架',
|
|
24
|
+
'text-en': 'delist'
|
|
19
25
|
}, {
|
|
20
|
-
type: '',
|
|
21
|
-
text: '上架'
|
|
26
|
+
type: 'shangjia',
|
|
27
|
+
'text-cn': '上架',
|
|
28
|
+
'text-en': 'listing'
|
|
22
29
|
}, {
|
|
23
|
-
type: '',
|
|
24
|
-
text: '解锁'
|
|
30
|
+
type: 'jiesuo',
|
|
31
|
+
'text-cn': '解锁',
|
|
32
|
+
'text-en': 'unlock'
|
|
25
33
|
}, {
|
|
26
|
-
type: '',
|
|
27
|
-
text: '审核'
|
|
34
|
+
type: 'shenhe',
|
|
35
|
+
'text-cn': '审核',
|
|
36
|
+
'text-en': 'check'
|
|
28
37
|
}, {
|
|
29
|
-
type: '',
|
|
30
|
-
text: '下载导入文件'
|
|
38
|
+
type: 'xiazaidaoruwenjian',
|
|
39
|
+
'text-cn': '下载导入文件',
|
|
40
|
+
'text-en': 'download import file'
|
|
31
41
|
}, {
|
|
32
|
-
type: '',
|
|
33
|
-
text: '删除'
|
|
42
|
+
type: 'shanchu',
|
|
43
|
+
'text-cn': '删除',
|
|
44
|
+
'text-en': 'delete'
|
|
34
45
|
}, {
|
|
35
|
-
type: '',
|
|
36
|
-
text: '撤回'
|
|
46
|
+
type: 'chehui',
|
|
47
|
+
'text-cn': '撤回',
|
|
48
|
+
'text-en': 'revocation'
|
|
37
49
|
}, {
|
|
38
|
-
type: '',
|
|
39
|
-
text: '再次询价'
|
|
50
|
+
type: 'zaicixunjia',
|
|
51
|
+
'text-cn': '再次询价',
|
|
52
|
+
'text-en': 'reinquiry'
|
|
40
53
|
}, {
|
|
41
|
-
type: '',
|
|
42
|
-
text: '复制'
|
|
54
|
+
type: 'fuzhi',
|
|
55
|
+
'text-cn': '复制',
|
|
56
|
+
'text-en': 'copy'
|
|
43
57
|
}, {
|
|
44
|
-
type: '',
|
|
45
|
-
text: '撤回登记'
|
|
58
|
+
type: 'chehuidengji',
|
|
59
|
+
'text-cn': '撤回登记',
|
|
60
|
+
'text-en': 'withdrawal of registration'
|
|
46
61
|
}, {
|
|
47
|
-
type: '',
|
|
48
|
-
text: '占号补录'
|
|
62
|
+
type: 'zhanhaobulu',
|
|
63
|
+
'text-cn': '占号补录',
|
|
64
|
+
'text-en': 'fill in the number'
|
|
49
65
|
}, {
|
|
50
|
-
type: '',
|
|
51
|
-
text: '处理'
|
|
66
|
+
type: 'chuli',
|
|
67
|
+
'text-cn': '处理',
|
|
68
|
+
'text-en': 'handle'
|
|
52
69
|
}, {
|
|
53
|
-
type: '',
|
|
54
|
-
text: '释放'
|
|
70
|
+
type: 'shifang',
|
|
71
|
+
'text-cn': '释放',
|
|
72
|
+
'text-en': 'release'
|
|
55
73
|
}, {
|
|
56
|
-
type: '',
|
|
57
|
-
text: '关闭'
|
|
74
|
+
type: 'guanbi',
|
|
75
|
+
'text-cn': '关闭',
|
|
76
|
+
'text-en': 'close'
|
|
58
77
|
}, {
|
|
59
|
-
type: '',
|
|
60
|
-
text: '认领'
|
|
78
|
+
type: 'renling',
|
|
79
|
+
'text-cn': '认领',
|
|
80
|
+
'text-en': 'claim'
|
|
61
81
|
}, {
|
|
62
|
-
type: '',
|
|
63
|
-
text: '缴费登记'
|
|
82
|
+
type: 'jiaofeidengji',
|
|
83
|
+
'text-cn': '缴费登记',
|
|
84
|
+
'text-en': 'payment registration'
|
|
64
85
|
}, {
|
|
65
|
-
type: '',
|
|
66
|
-
text: '补传资料'
|
|
86
|
+
type: 'buchuanziliao',
|
|
87
|
+
'text-cn': '补传资料',
|
|
88
|
+
'text-en': 'supplementary data'
|
|
67
89
|
}, {
|
|
68
|
-
type: '',
|
|
69
|
-
text: '资料补传确认'
|
|
90
|
+
type: 'ziliaobuchuanqueren',
|
|
91
|
+
'text-cn': '资料补传确认',
|
|
92
|
+
'text-en': 'data retransmission confirmed'
|
|
70
93
|
}, {
|
|
71
|
-
type: '',
|
|
72
|
-
text: '启用'
|
|
94
|
+
type: 'qiyong',
|
|
95
|
+
'text-cn': '启用',
|
|
96
|
+
'text-en': 'enable'
|
|
73
97
|
}, {
|
|
74
|
-
type: '',
|
|
75
|
-
text: '查勘'
|
|
98
|
+
type: 'chakan',
|
|
99
|
+
'text-cn': '查勘',
|
|
100
|
+
'text-en': 'survey'
|
|
76
101
|
}, {
|
|
77
|
-
type: '',
|
|
78
|
-
text: '会签处理'
|
|
102
|
+
type: 'huiqianchuli',
|
|
103
|
+
'text-cn': '会签处理',
|
|
104
|
+
'text-en': 'countersign processing'
|
|
79
105
|
}, {
|
|
80
|
-
type: '',
|
|
81
|
-
text: '已阅'
|
|
106
|
+
type: 'yiyue',
|
|
107
|
+
'text-cn': '已阅',
|
|
108
|
+
'text-en': 'have read'
|
|
82
109
|
}, {
|
|
83
|
-
type: '',
|
|
84
|
-
text: '下载'
|
|
110
|
+
type: 'xiazai',
|
|
111
|
+
'text-cn': '下载',
|
|
112
|
+
'text-en': 'download'
|
|
85
113
|
}, {
|
|
86
|
-
type: '',
|
|
87
|
-
text: '发送'
|
|
114
|
+
type: 'fasong',
|
|
115
|
+
'text-cn': '发送',
|
|
116
|
+
'text-en': 'send'
|
|
88
117
|
}, {
|
|
89
|
-
type: '',
|
|
90
|
-
text: '导出'
|
|
118
|
+
type: 'daochu',
|
|
119
|
+
'text-cn': '导出',
|
|
120
|
+
'text-en': 'export'
|
|
91
121
|
}, {
|
|
92
|
-
type: '',
|
|
93
|
-
text: '设为失效'
|
|
122
|
+
type: 'sheweishixiao',
|
|
123
|
+
'text-cn': '设为失效',
|
|
124
|
+
'text-en': 'set invalidate'
|
|
94
125
|
}, {
|
|
95
|
-
type: '',
|
|
96
|
-
text: '
|
|
126
|
+
type: 'qingkong',
|
|
127
|
+
'text-cn': '清空',
|
|
128
|
+
'text-en': 'clear'
|
|
97
129
|
}, {
|
|
98
|
-
type: '',
|
|
99
|
-
text: '
|
|
130
|
+
type: 'shixiao',
|
|
131
|
+
'text-cn': '失效',
|
|
132
|
+
'text-en': 'lose effectiveness'
|
|
100
133
|
}, {
|
|
101
|
-
type: '',
|
|
102
|
-
text: '
|
|
134
|
+
type: 'zhongzhi',
|
|
135
|
+
'text-cn': '中止',
|
|
136
|
+
'text-en': 'stop'
|
|
103
137
|
}, {
|
|
104
|
-
type: '',
|
|
105
|
-
text: '
|
|
138
|
+
type: 'wangdian',
|
|
139
|
+
'text-cn': '网点',
|
|
140
|
+
'text-en': 'site'
|
|
106
141
|
}, {
|
|
107
|
-
type: '',
|
|
108
|
-
text: '
|
|
142
|
+
type: 'fuwuwangdian',
|
|
143
|
+
'text-cn': '服务网点',
|
|
144
|
+
'text-en': 'server site'
|
|
109
145
|
}, {
|
|
110
|
-
type: '',
|
|
111
|
-
text: '
|
|
146
|
+
type: 'rukoupeizhi',
|
|
147
|
+
'text-cn': '入口配置',
|
|
148
|
+
'text-en': 'entry config'
|
|
112
149
|
}, {
|
|
113
|
-
type: '',
|
|
114
|
-
text: '
|
|
150
|
+
type: 'yemianpeizhi',
|
|
151
|
+
'text-cn': '页面配置',
|
|
152
|
+
'text-en': 'page config'
|
|
115
153
|
}, {
|
|
116
|
-
type: '',
|
|
117
|
-
text: '
|
|
154
|
+
type: 'bianjifenpei',
|
|
155
|
+
'text-cn': '编辑分配',
|
|
156
|
+
'text-en': 'edit assignment'
|
|
118
157
|
}, {
|
|
119
|
-
type: '',
|
|
120
|
-
text: '
|
|
158
|
+
type: 'chakanxiangqing',
|
|
159
|
+
'text-cn': '查看详情',
|
|
160
|
+
'text-en': 'view detail'
|
|
121
161
|
}, {
|
|
122
|
-
type: '',
|
|
123
|
-
text: '
|
|
162
|
+
type: 'toubaopeizhi',
|
|
163
|
+
'text-cn': '投保配置',
|
|
164
|
+
'text-en': 'insurance config'
|
|
124
165
|
}, {
|
|
125
|
-
type: '',
|
|
126
|
-
text: '
|
|
166
|
+
type: 'tuiguangweipeizhi',
|
|
167
|
+
'text-cn': '推广位配置',
|
|
168
|
+
'text-en': 'promotion bit config'
|
|
127
169
|
}, {
|
|
128
|
-
type: '',
|
|
129
|
-
text: '
|
|
170
|
+
type: 'kaishihezuo',
|
|
171
|
+
'text-cn': '开始合作',
|
|
172
|
+
'text-en': 'start cooperation'
|
|
130
173
|
}, {
|
|
131
|
-
type: '',
|
|
132
|
-
text: '
|
|
174
|
+
type: 'tingzhihezuo',
|
|
175
|
+
'text-cn': '停止合作',
|
|
176
|
+
'text-en': 'stop cooperation'
|
|
133
177
|
}, {
|
|
134
|
-
type: '',
|
|
135
|
-
text: '
|
|
178
|
+
type: 'fuzhilianjie',
|
|
179
|
+
'text-cn': '复制链接',
|
|
180
|
+
'text-en': 'copy link'
|
|
136
181
|
}, {
|
|
137
|
-
type: '',
|
|
138
|
-
text: '
|
|
182
|
+
type: 'jinyong',
|
|
183
|
+
'text-cn': '禁用',
|
|
184
|
+
'text-en': 'disabled'
|
|
139
185
|
}, {
|
|
140
|
-
type: '',
|
|
141
|
-
text: '
|
|
186
|
+
type: 'bianjipeizhi',
|
|
187
|
+
'text-cn': '编辑配置',
|
|
188
|
+
'text-en': 'edit config'
|
|
142
189
|
}, {
|
|
143
|
-
type: '',
|
|
144
|
-
text: '
|
|
190
|
+
type: 'yulan',
|
|
191
|
+
'text-cn': '预览',
|
|
192
|
+
'text-en': 'preview'
|
|
145
193
|
}, {
|
|
146
|
-
type: '',
|
|
147
|
-
text: '
|
|
194
|
+
type: 'daochumoban',
|
|
195
|
+
'text-cn': '导出模板',
|
|
196
|
+
'text-en': 'export template'
|
|
148
197
|
}, {
|
|
149
|
-
type: '',
|
|
150
|
-
text: '
|
|
198
|
+
type: 'xiangqing',
|
|
199
|
+
'text-cn': '详情',
|
|
200
|
+
'text-en': 'detail'
|
|
151
201
|
}, {
|
|
152
|
-
type: '',
|
|
153
|
-
text: '
|
|
202
|
+
type: 'zhongzhiqudao',
|
|
203
|
+
'text-cn': '终止渠道',
|
|
204
|
+
'text-en': 'stop channel'
|
|
154
205
|
}, {
|
|
155
|
-
type: '',
|
|
156
|
-
text: '
|
|
206
|
+
type: 'chakanfapiao',
|
|
207
|
+
'text-cn': '查看发票',
|
|
208
|
+
'text-en': 'view invoice'
|
|
157
209
|
}, {
|
|
158
|
-
type: '',
|
|
159
|
-
text: '
|
|
210
|
+
type: 'qiyerenzheng',
|
|
211
|
+
'text-cn': '企业认证',
|
|
212
|
+
'text-en': 'enterprise certification'
|
|
160
213
|
}, {
|
|
161
|
-
type: '',
|
|
162
|
-
text: '
|
|
214
|
+
type: 'apishouquan',
|
|
215
|
+
'text-cn': 'API授权',
|
|
216
|
+
'text-en': 'api accredit'
|
|
163
217
|
}, {
|
|
164
|
-
type: '',
|
|
165
|
-
text: '
|
|
218
|
+
type: 'chanpinshouquan',
|
|
219
|
+
'text-cn': '产品授权',
|
|
220
|
+
'text-en': 'product accredit'
|
|
166
221
|
}, {
|
|
167
|
-
type: '',
|
|
168
|
-
text: '
|
|
222
|
+
type: 'chongzhimima',
|
|
223
|
+
'text-cn': '重置密码',
|
|
224
|
+
'text-en': 'reset password'
|
|
169
225
|
}, {
|
|
170
|
-
type: '',
|
|
171
|
-
text: '
|
|
226
|
+
type: 'tingyong',
|
|
227
|
+
'text-cn': '停用',
|
|
228
|
+
'text-en': 'disuse'
|
|
172
229
|
}, {
|
|
173
|
-
type: '',
|
|
174
|
-
text: '
|
|
230
|
+
type: 'apiquanxian',
|
|
231
|
+
'text-cn': 'API权限',
|
|
232
|
+
'text-en': 'api authorization'
|
|
175
233
|
}, {
|
|
176
|
-
type: '',
|
|
177
|
-
text: '
|
|
234
|
+
type: 'ipbaimingdan',
|
|
235
|
+
'text-cn': 'IP白名单',
|
|
236
|
+
'text-en': 'ip whitelist'
|
|
178
237
|
}, {
|
|
179
|
-
type: '',
|
|
180
|
-
text: '
|
|
238
|
+
type: 'yulanmoban',
|
|
239
|
+
'text-cn': '预览模板',
|
|
240
|
+
'text-en': 'preview template'
|
|
181
241
|
}, {
|
|
182
|
-
type: '',
|
|
183
|
-
text: '
|
|
242
|
+
type: 'queren',
|
|
243
|
+
'text-cn': '确认',
|
|
244
|
+
'text-en': 'confirm'
|
|
184
245
|
}, {
|
|
185
|
-
type: '',
|
|
186
|
-
text: '
|
|
246
|
+
type: 'xiugai',
|
|
247
|
+
'text-cn': '修改',
|
|
248
|
+
'text-en': 'edit'
|
|
187
249
|
}, {
|
|
188
|
-
type: '',
|
|
189
|
-
text: '
|
|
250
|
+
type: 'chakanlishipeizhi',
|
|
251
|
+
'text-cn': '查看历史配置',
|
|
252
|
+
'text-en': 'view history conifg'
|
|
190
253
|
}, {
|
|
191
|
-
type: '',
|
|
192
|
-
text: '
|
|
193
|
-
|
|
194
|
-
type: '',
|
|
195
|
-
text: '查看历史配置'
|
|
196
|
-
}, {
|
|
197
|
-
type: '',
|
|
198
|
-
text: '调整序号'
|
|
254
|
+
type: 'tiaozhengxuhao',
|
|
255
|
+
'text-cn': '调整序号',
|
|
256
|
+
'text-en': 'adjust order'
|
|
199
257
|
}];
|
package/es/ProIcon/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import classNames from 'classnames';
|
|
|
9
9
|
import { uniqBy } from 'lodash';
|
|
10
10
|
import { useProConfig } from '../ProConfigProvider';
|
|
11
11
|
import { iconMap } from './config';
|
|
12
|
+
import locale from '../locale';
|
|
12
13
|
var ProIcon = function ProIcon(props) {
|
|
13
14
|
var config = useProConfig('ProIcon') || {};
|
|
14
15
|
var _config = _objectSpread(_objectSpread({}, config), props !== null && props !== void 0 ? props : {});
|
|
@@ -35,6 +36,8 @@ var ProIcon = function ProIcon(props) {
|
|
|
35
36
|
_config$mapList = _config.mapList,
|
|
36
37
|
mapList = _config$mapList === void 0 ? [] : _config$mapList,
|
|
37
38
|
reset = _objectWithoutProperties(_config, _excluded);
|
|
39
|
+
// 语言
|
|
40
|
+
var language = locale.ProIcon.language;
|
|
38
41
|
// 加载内部icon
|
|
39
42
|
var status = useExternal('https://at.alicdn.com/t/c/font_4063056_jmnz9g5uycp.js');
|
|
40
43
|
if (status !== 'ready') {
|
|
@@ -55,32 +58,32 @@ var ProIcon = function ProIcon(props) {
|
|
|
55
58
|
if (type && !props.mode) {
|
|
56
59
|
_mode = 'icon';
|
|
57
60
|
}
|
|
61
|
+
var targetTextFill = "text-".concat(language); // text-cn text-en
|
|
58
62
|
var isIconMode = _mode === 'icon';
|
|
59
63
|
var isExtendButtonMode = !isIconMode || isIconMode && disabled;
|
|
60
|
-
var mergedMapList = uniqBy(mapList.concat(iconMap),
|
|
64
|
+
var mergedMapList = uniqBy(mapList.concat(iconMap), targetTextFill);
|
|
61
65
|
var _type = type;
|
|
62
66
|
var _text = children;
|
|
63
|
-
var textIsExistAndIncludeChinese = _text && /[\u4e00-\u9fa5]/.test(String(_text));
|
|
64
67
|
var typeIsExistAndIncludeEnglish = _type && /[a-zA-Z]/.test(_type);
|
|
65
|
-
// 模式为icon下,对传入的text
|
|
68
|
+
// 模式为icon下,对传入的text进行指定语言-icon 映射
|
|
66
69
|
if (isIconMode && !type) {
|
|
67
|
-
if (
|
|
70
|
+
if (_text) {
|
|
68
71
|
var target = mergedMapList.find(function (item) {
|
|
69
|
-
return item
|
|
72
|
+
return item['text-cn'] === _text || item['text-en'] === _text;
|
|
70
73
|
});
|
|
71
74
|
if (target) {
|
|
72
75
|
_type = target === null || target === void 0 ? void 0 : target.type;
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
|
-
// 模式为button下,对传入的type进行icon
|
|
79
|
+
// 模式为button下,对传入的type进行icon-指定语言 映射
|
|
77
80
|
if (!isIconMode) {
|
|
78
81
|
if (typeIsExistAndIncludeEnglish) {
|
|
79
82
|
var _target = mergedMapList.find(function (item) {
|
|
80
83
|
return item.type === _type;
|
|
81
84
|
});
|
|
82
85
|
if (_target) {
|
|
83
|
-
_text = _target
|
|
86
|
+
_text = _target[targetTextFill];
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
}
|
package/es/locale/en_US.d.ts
CHANGED
package/es/locale/en_US.js
CHANGED
package/es/locale/zh_CN.d.ts
CHANGED
package/es/locale/zh_CN.js
CHANGED
|
@@ -16,7 +16,9 @@ var Group = function Group(props) {
|
|
|
16
16
|
dataSource = props.dataSource,
|
|
17
17
|
fieldValue = props.fieldValue,
|
|
18
18
|
fieldLabel = props.fieldLabel,
|
|
19
|
-
disabled = props.disabled
|
|
19
|
+
disabled = props.disabled,
|
|
20
|
+
_props$allowClear = props.allowClear,
|
|
21
|
+
allowClear = _props$allowClear === void 0 ? true : _props$allowClear;
|
|
20
22
|
var idx = (0, _react.useRef)(-1);
|
|
21
23
|
var _useSetState = (0, _ahooks.useSetState)({
|
|
22
24
|
checked: ''
|
|
@@ -35,6 +37,9 @@ var Group = function Group(props) {
|
|
|
35
37
|
}, [value]);
|
|
36
38
|
var handleClick = function handleClick(val, index) {
|
|
37
39
|
if (state.checked === val) {
|
|
40
|
+
if (!allowClear) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
38
43
|
setState({
|
|
39
44
|
checked: ''
|
|
40
45
|
});
|
package/lib/ProEnum/index.js
CHANGED
|
@@ -209,14 +209,13 @@ var ProEnum = function ProEnum(props) {
|
|
|
209
209
|
dataSource: list
|
|
210
210
|
});
|
|
211
211
|
case 'Group':
|
|
212
|
-
return (0, _jsxRuntime.jsx)(_Group.default, {
|
|
212
|
+
return (0, _jsxRuntime.jsx)(_Group.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, enumProps), {}, {
|
|
213
213
|
value: value,
|
|
214
214
|
onChange: onChange,
|
|
215
215
|
fieldLabel: label,
|
|
216
216
|
fieldValue: fieldValue,
|
|
217
|
-
dataSource: list
|
|
218
|
-
|
|
219
|
-
});
|
|
217
|
+
dataSource: list
|
|
218
|
+
}));
|
|
220
219
|
default:
|
|
221
220
|
return null;
|
|
222
221
|
}
|
|
@@ -6,200 +6,258 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.iconMap = void 0;
|
|
7
7
|
var iconMap = exports.iconMap = [{
|
|
8
8
|
type: 'view',
|
|
9
|
-
text: '查看'
|
|
9
|
+
'text-cn': '查看',
|
|
10
|
+
'text-en': 'view'
|
|
10
11
|
}, {
|
|
11
|
-
type: '',
|
|
12
|
-
text: '编辑'
|
|
12
|
+
type: 'edit',
|
|
13
|
+
'text-cn': '编辑',
|
|
14
|
+
'text-en': 'edit'
|
|
13
15
|
}, {
|
|
14
|
-
type: '',
|
|
15
|
-
text: '查看上传结果'
|
|
16
|
+
type: 'chakanshangchuanjieguo',
|
|
17
|
+
'text-cn': '查看上传结果',
|
|
18
|
+
'text-en': 'view upload results'
|
|
16
19
|
}, {
|
|
17
|
-
type: '',
|
|
18
|
-
text: '操作日志'
|
|
20
|
+
type: 'caozuorizhi',
|
|
21
|
+
'text-cn': '操作日志',
|
|
22
|
+
'text-en': 'operation log'
|
|
19
23
|
}, {
|
|
20
|
-
type: '',
|
|
21
|
-
text: '监管停售'
|
|
24
|
+
type: 'jianguantingshou',
|
|
25
|
+
'text-cn': '监管停售',
|
|
26
|
+
'text-en': 'regulatory suspension'
|
|
22
27
|
}, {
|
|
23
|
-
type: '',
|
|
24
|
-
text: '下架'
|
|
28
|
+
type: 'xiajia',
|
|
29
|
+
'text-cn': '下架',
|
|
30
|
+
'text-en': 'delist'
|
|
25
31
|
}, {
|
|
26
|
-
type: '',
|
|
27
|
-
text: '上架'
|
|
32
|
+
type: 'shangjia',
|
|
33
|
+
'text-cn': '上架',
|
|
34
|
+
'text-en': 'listing'
|
|
28
35
|
}, {
|
|
29
|
-
type: '',
|
|
30
|
-
text: '解锁'
|
|
36
|
+
type: 'jiesuo',
|
|
37
|
+
'text-cn': '解锁',
|
|
38
|
+
'text-en': 'unlock'
|
|
31
39
|
}, {
|
|
32
|
-
type: '',
|
|
33
|
-
text: '审核'
|
|
40
|
+
type: 'shenhe',
|
|
41
|
+
'text-cn': '审核',
|
|
42
|
+
'text-en': 'check'
|
|
34
43
|
}, {
|
|
35
|
-
type: '',
|
|
36
|
-
text: '下载导入文件'
|
|
44
|
+
type: 'xiazaidaoruwenjian',
|
|
45
|
+
'text-cn': '下载导入文件',
|
|
46
|
+
'text-en': 'download import file'
|
|
37
47
|
}, {
|
|
38
|
-
type: '',
|
|
39
|
-
text: '删除'
|
|
48
|
+
type: 'shanchu',
|
|
49
|
+
'text-cn': '删除',
|
|
50
|
+
'text-en': 'delete'
|
|
40
51
|
}, {
|
|
41
|
-
type: '',
|
|
42
|
-
text: '撤回'
|
|
52
|
+
type: 'chehui',
|
|
53
|
+
'text-cn': '撤回',
|
|
54
|
+
'text-en': 'revocation'
|
|
43
55
|
}, {
|
|
44
|
-
type: '',
|
|
45
|
-
text: '再次询价'
|
|
56
|
+
type: 'zaicixunjia',
|
|
57
|
+
'text-cn': '再次询价',
|
|
58
|
+
'text-en': 'reinquiry'
|
|
46
59
|
}, {
|
|
47
|
-
type: '',
|
|
48
|
-
text: '复制'
|
|
60
|
+
type: 'fuzhi',
|
|
61
|
+
'text-cn': '复制',
|
|
62
|
+
'text-en': 'copy'
|
|
49
63
|
}, {
|
|
50
|
-
type: '',
|
|
51
|
-
text: '撤回登记'
|
|
64
|
+
type: 'chehuidengji',
|
|
65
|
+
'text-cn': '撤回登记',
|
|
66
|
+
'text-en': 'withdrawal of registration'
|
|
52
67
|
}, {
|
|
53
|
-
type: '',
|
|
54
|
-
text: '占号补录'
|
|
68
|
+
type: 'zhanhaobulu',
|
|
69
|
+
'text-cn': '占号补录',
|
|
70
|
+
'text-en': 'fill in the number'
|
|
55
71
|
}, {
|
|
56
|
-
type: '',
|
|
57
|
-
text: '处理'
|
|
72
|
+
type: 'chuli',
|
|
73
|
+
'text-cn': '处理',
|
|
74
|
+
'text-en': 'handle'
|
|
58
75
|
}, {
|
|
59
|
-
type: '',
|
|
60
|
-
text: '释放'
|
|
76
|
+
type: 'shifang',
|
|
77
|
+
'text-cn': '释放',
|
|
78
|
+
'text-en': 'release'
|
|
61
79
|
}, {
|
|
62
|
-
type: '',
|
|
63
|
-
text: '关闭'
|
|
80
|
+
type: 'guanbi',
|
|
81
|
+
'text-cn': '关闭',
|
|
82
|
+
'text-en': 'close'
|
|
64
83
|
}, {
|
|
65
|
-
type: '',
|
|
66
|
-
text: '认领'
|
|
84
|
+
type: 'renling',
|
|
85
|
+
'text-cn': '认领',
|
|
86
|
+
'text-en': 'claim'
|
|
67
87
|
}, {
|
|
68
|
-
type: '',
|
|
69
|
-
text: '缴费登记'
|
|
88
|
+
type: 'jiaofeidengji',
|
|
89
|
+
'text-cn': '缴费登记',
|
|
90
|
+
'text-en': 'payment registration'
|
|
70
91
|
}, {
|
|
71
|
-
type: '',
|
|
72
|
-
text: '补传资料'
|
|
92
|
+
type: 'buchuanziliao',
|
|
93
|
+
'text-cn': '补传资料',
|
|
94
|
+
'text-en': 'supplementary data'
|
|
73
95
|
}, {
|
|
74
|
-
type: '',
|
|
75
|
-
text: '资料补传确认'
|
|
96
|
+
type: 'ziliaobuchuanqueren',
|
|
97
|
+
'text-cn': '资料补传确认',
|
|
98
|
+
'text-en': 'data retransmission confirmed'
|
|
76
99
|
}, {
|
|
77
|
-
type: '',
|
|
78
|
-
text: '启用'
|
|
100
|
+
type: 'qiyong',
|
|
101
|
+
'text-cn': '启用',
|
|
102
|
+
'text-en': 'enable'
|
|
79
103
|
}, {
|
|
80
|
-
type: '',
|
|
81
|
-
text: '查勘'
|
|
104
|
+
type: 'chakan',
|
|
105
|
+
'text-cn': '查勘',
|
|
106
|
+
'text-en': 'survey'
|
|
82
107
|
}, {
|
|
83
|
-
type: '',
|
|
84
|
-
text: '会签处理'
|
|
108
|
+
type: 'huiqianchuli',
|
|
109
|
+
'text-cn': '会签处理',
|
|
110
|
+
'text-en': 'countersign processing'
|
|
85
111
|
}, {
|
|
86
|
-
type: '',
|
|
87
|
-
text: '已阅'
|
|
112
|
+
type: 'yiyue',
|
|
113
|
+
'text-cn': '已阅',
|
|
114
|
+
'text-en': 'have read'
|
|
88
115
|
}, {
|
|
89
|
-
type: '',
|
|
90
|
-
text: '下载'
|
|
116
|
+
type: 'xiazai',
|
|
117
|
+
'text-cn': '下载',
|
|
118
|
+
'text-en': 'download'
|
|
91
119
|
}, {
|
|
92
|
-
type: '',
|
|
93
|
-
text: '发送'
|
|
120
|
+
type: 'fasong',
|
|
121
|
+
'text-cn': '发送',
|
|
122
|
+
'text-en': 'send'
|
|
94
123
|
}, {
|
|
95
|
-
type: '',
|
|
96
|
-
text: '导出'
|
|
124
|
+
type: 'daochu',
|
|
125
|
+
'text-cn': '导出',
|
|
126
|
+
'text-en': 'export'
|
|
97
127
|
}, {
|
|
98
|
-
type: '',
|
|
99
|
-
text: '设为失效'
|
|
128
|
+
type: 'sheweishixiao',
|
|
129
|
+
'text-cn': '设为失效',
|
|
130
|
+
'text-en': 'set invalidate'
|
|
100
131
|
}, {
|
|
101
|
-
type: '',
|
|
102
|
-
text: '
|
|
132
|
+
type: 'qingkong',
|
|
133
|
+
'text-cn': '清空',
|
|
134
|
+
'text-en': 'clear'
|
|
103
135
|
}, {
|
|
104
|
-
type: '',
|
|
105
|
-
text: '
|
|
136
|
+
type: 'shixiao',
|
|
137
|
+
'text-cn': '失效',
|
|
138
|
+
'text-en': 'lose effectiveness'
|
|
106
139
|
}, {
|
|
107
|
-
type: '',
|
|
108
|
-
text: '
|
|
140
|
+
type: 'zhongzhi',
|
|
141
|
+
'text-cn': '中止',
|
|
142
|
+
'text-en': 'stop'
|
|
109
143
|
}, {
|
|
110
|
-
type: '',
|
|
111
|
-
text: '
|
|
144
|
+
type: 'wangdian',
|
|
145
|
+
'text-cn': '网点',
|
|
146
|
+
'text-en': 'site'
|
|
112
147
|
}, {
|
|
113
|
-
type: '',
|
|
114
|
-
text: '
|
|
148
|
+
type: 'fuwuwangdian',
|
|
149
|
+
'text-cn': '服务网点',
|
|
150
|
+
'text-en': 'server site'
|
|
115
151
|
}, {
|
|
116
|
-
type: '',
|
|
117
|
-
text: '
|
|
152
|
+
type: 'rukoupeizhi',
|
|
153
|
+
'text-cn': '入口配置',
|
|
154
|
+
'text-en': 'entry config'
|
|
118
155
|
}, {
|
|
119
|
-
type: '',
|
|
120
|
-
text: '
|
|
156
|
+
type: 'yemianpeizhi',
|
|
157
|
+
'text-cn': '页面配置',
|
|
158
|
+
'text-en': 'page config'
|
|
121
159
|
}, {
|
|
122
|
-
type: '',
|
|
123
|
-
text: '
|
|
160
|
+
type: 'bianjifenpei',
|
|
161
|
+
'text-cn': '编辑分配',
|
|
162
|
+
'text-en': 'edit assignment'
|
|
124
163
|
}, {
|
|
125
|
-
type: '',
|
|
126
|
-
text: '
|
|
164
|
+
type: 'chakanxiangqing',
|
|
165
|
+
'text-cn': '查看详情',
|
|
166
|
+
'text-en': 'view detail'
|
|
127
167
|
}, {
|
|
128
|
-
type: '',
|
|
129
|
-
text: '
|
|
168
|
+
type: 'toubaopeizhi',
|
|
169
|
+
'text-cn': '投保配置',
|
|
170
|
+
'text-en': 'insurance config'
|
|
130
171
|
}, {
|
|
131
|
-
type: '',
|
|
132
|
-
text: '
|
|
172
|
+
type: 'tuiguangweipeizhi',
|
|
173
|
+
'text-cn': '推广位配置',
|
|
174
|
+
'text-en': 'promotion bit config'
|
|
133
175
|
}, {
|
|
134
|
-
type: '',
|
|
135
|
-
text: '
|
|
176
|
+
type: 'kaishihezuo',
|
|
177
|
+
'text-cn': '开始合作',
|
|
178
|
+
'text-en': 'start cooperation'
|
|
136
179
|
}, {
|
|
137
|
-
type: '',
|
|
138
|
-
text: '
|
|
180
|
+
type: 'tingzhihezuo',
|
|
181
|
+
'text-cn': '停止合作',
|
|
182
|
+
'text-en': 'stop cooperation'
|
|
139
183
|
}, {
|
|
140
|
-
type: '',
|
|
141
|
-
text: '
|
|
184
|
+
type: 'fuzhilianjie',
|
|
185
|
+
'text-cn': '复制链接',
|
|
186
|
+
'text-en': 'copy link'
|
|
142
187
|
}, {
|
|
143
|
-
type: '',
|
|
144
|
-
text: '
|
|
188
|
+
type: 'jinyong',
|
|
189
|
+
'text-cn': '禁用',
|
|
190
|
+
'text-en': 'disabled'
|
|
145
191
|
}, {
|
|
146
|
-
type: '',
|
|
147
|
-
text: '
|
|
192
|
+
type: 'bianjipeizhi',
|
|
193
|
+
'text-cn': '编辑配置',
|
|
194
|
+
'text-en': 'edit config'
|
|
148
195
|
}, {
|
|
149
|
-
type: '',
|
|
150
|
-
text: '
|
|
196
|
+
type: 'yulan',
|
|
197
|
+
'text-cn': '预览',
|
|
198
|
+
'text-en': 'preview'
|
|
151
199
|
}, {
|
|
152
|
-
type: '',
|
|
153
|
-
text: '
|
|
200
|
+
type: 'daochumoban',
|
|
201
|
+
'text-cn': '导出模板',
|
|
202
|
+
'text-en': 'export template'
|
|
154
203
|
}, {
|
|
155
|
-
type: '',
|
|
156
|
-
text: '
|
|
204
|
+
type: 'xiangqing',
|
|
205
|
+
'text-cn': '详情',
|
|
206
|
+
'text-en': 'detail'
|
|
157
207
|
}, {
|
|
158
|
-
type: '',
|
|
159
|
-
text: '
|
|
208
|
+
type: 'zhongzhiqudao',
|
|
209
|
+
'text-cn': '终止渠道',
|
|
210
|
+
'text-en': 'stop channel'
|
|
160
211
|
}, {
|
|
161
|
-
type: '',
|
|
162
|
-
text: '
|
|
212
|
+
type: 'chakanfapiao',
|
|
213
|
+
'text-cn': '查看发票',
|
|
214
|
+
'text-en': 'view invoice'
|
|
163
215
|
}, {
|
|
164
|
-
type: '',
|
|
165
|
-
text: '
|
|
216
|
+
type: 'qiyerenzheng',
|
|
217
|
+
'text-cn': '企业认证',
|
|
218
|
+
'text-en': 'enterprise certification'
|
|
166
219
|
}, {
|
|
167
|
-
type: '',
|
|
168
|
-
text: '
|
|
220
|
+
type: 'apishouquan',
|
|
221
|
+
'text-cn': 'API授权',
|
|
222
|
+
'text-en': 'api accredit'
|
|
169
223
|
}, {
|
|
170
|
-
type: '',
|
|
171
|
-
text: '
|
|
224
|
+
type: 'chanpinshouquan',
|
|
225
|
+
'text-cn': '产品授权',
|
|
226
|
+
'text-en': 'product accredit'
|
|
172
227
|
}, {
|
|
173
|
-
type: '',
|
|
174
|
-
text: '
|
|
228
|
+
type: 'chongzhimima',
|
|
229
|
+
'text-cn': '重置密码',
|
|
230
|
+
'text-en': 'reset password'
|
|
175
231
|
}, {
|
|
176
|
-
type: '',
|
|
177
|
-
text: '
|
|
232
|
+
type: 'tingyong',
|
|
233
|
+
'text-cn': '停用',
|
|
234
|
+
'text-en': 'disuse'
|
|
178
235
|
}, {
|
|
179
|
-
type: '',
|
|
180
|
-
text: '
|
|
236
|
+
type: 'apiquanxian',
|
|
237
|
+
'text-cn': 'API权限',
|
|
238
|
+
'text-en': 'api authorization'
|
|
181
239
|
}, {
|
|
182
|
-
type: '',
|
|
183
|
-
text: '
|
|
240
|
+
type: 'ipbaimingdan',
|
|
241
|
+
'text-cn': 'IP白名单',
|
|
242
|
+
'text-en': 'ip whitelist'
|
|
184
243
|
}, {
|
|
185
|
-
type: '',
|
|
186
|
-
text: '
|
|
244
|
+
type: 'yulanmoban',
|
|
245
|
+
'text-cn': '预览模板',
|
|
246
|
+
'text-en': 'preview template'
|
|
187
247
|
}, {
|
|
188
|
-
type: '',
|
|
189
|
-
text: '
|
|
248
|
+
type: 'queren',
|
|
249
|
+
'text-cn': '确认',
|
|
250
|
+
'text-en': 'confirm'
|
|
190
251
|
}, {
|
|
191
|
-
type: '',
|
|
192
|
-
text: '
|
|
252
|
+
type: 'xiugai',
|
|
253
|
+
'text-cn': '修改',
|
|
254
|
+
'text-en': 'edit'
|
|
193
255
|
}, {
|
|
194
|
-
type: '',
|
|
195
|
-
text: '
|
|
256
|
+
type: 'chakanlishipeizhi',
|
|
257
|
+
'text-cn': '查看历史配置',
|
|
258
|
+
'text-en': 'view history conifg'
|
|
196
259
|
}, {
|
|
197
|
-
type: '',
|
|
198
|
-
text: '
|
|
199
|
-
|
|
200
|
-
type: '',
|
|
201
|
-
text: '查看历史配置'
|
|
202
|
-
}, {
|
|
203
|
-
type: '',
|
|
204
|
-
text: '调整序号'
|
|
260
|
+
type: 'tiaozhengxuhao',
|
|
261
|
+
'text-cn': '调整序号',
|
|
262
|
+
'text-en': 'adjust order'
|
|
205
263
|
}];
|
package/lib/ProIcon/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
14
14
|
var _lodash = require("lodash");
|
|
15
15
|
var _ProConfigProvider = require("../ProConfigProvider");
|
|
16
16
|
var _config2 = require("./config");
|
|
17
|
+
var _locale = _interopRequireDefault(require("../locale"));
|
|
17
18
|
var _excluded = ["type", "onClick", "size", "color", "className", "style", "spin", "rotate", "theme", "disabled", "mode", "buttonProps", "children", "mapList"];
|
|
18
19
|
var ProIcon = function ProIcon(props) {
|
|
19
20
|
var config = (0, _ProConfigProvider.useProConfig)('ProIcon') || {};
|
|
@@ -41,6 +42,8 @@ var ProIcon = function ProIcon(props) {
|
|
|
41
42
|
_config$mapList = _config.mapList,
|
|
42
43
|
mapList = _config$mapList === void 0 ? [] : _config$mapList,
|
|
43
44
|
reset = (0, _objectWithoutProperties2.default)(_config, _excluded);
|
|
45
|
+
// 语言
|
|
46
|
+
var language = _locale.default.ProIcon.language;
|
|
44
47
|
// 加载内部icon
|
|
45
48
|
var status = (0, _ahooks.useExternal)('https://at.alicdn.com/t/c/font_4063056_jmnz9g5uycp.js');
|
|
46
49
|
if (status !== 'ready') {
|
|
@@ -61,32 +64,32 @@ var ProIcon = function ProIcon(props) {
|
|
|
61
64
|
if (type && !props.mode) {
|
|
62
65
|
_mode = 'icon';
|
|
63
66
|
}
|
|
67
|
+
var targetTextFill = "text-".concat(language); // text-cn text-en
|
|
64
68
|
var isIconMode = _mode === 'icon';
|
|
65
69
|
var isExtendButtonMode = !isIconMode || isIconMode && disabled;
|
|
66
|
-
var mergedMapList = (0, _lodash.uniqBy)(mapList.concat(_config2.iconMap),
|
|
70
|
+
var mergedMapList = (0, _lodash.uniqBy)(mapList.concat(_config2.iconMap), targetTextFill);
|
|
67
71
|
var _type = type;
|
|
68
72
|
var _text = children;
|
|
69
|
-
var textIsExistAndIncludeChinese = _text && /[\u4e00-\u9fa5]/.test(String(_text));
|
|
70
73
|
var typeIsExistAndIncludeEnglish = _type && /[a-zA-Z]/.test(_type);
|
|
71
|
-
// 模式为icon下,对传入的text
|
|
74
|
+
// 模式为icon下,对传入的text进行指定语言-icon 映射
|
|
72
75
|
if (isIconMode && !type) {
|
|
73
|
-
if (
|
|
76
|
+
if (_text) {
|
|
74
77
|
var target = mergedMapList.find(function (item) {
|
|
75
|
-
return item
|
|
78
|
+
return item['text-cn'] === _text || item['text-en'] === _text;
|
|
76
79
|
});
|
|
77
80
|
if (target) {
|
|
78
81
|
_type = target === null || target === void 0 ? void 0 : target.type;
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
|
-
// 模式为button下,对传入的type进行icon
|
|
85
|
+
// 模式为button下,对传入的type进行icon-指定语言 映射
|
|
83
86
|
if (!isIconMode) {
|
|
84
87
|
if (typeIsExistAndIncludeEnglish) {
|
|
85
88
|
var _target = mergedMapList.find(function (item) {
|
|
86
89
|
return item.type === _type;
|
|
87
90
|
});
|
|
88
91
|
if (_target) {
|
|
89
|
-
_text = _target
|
|
92
|
+
_text = _target[targetTextFill];
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
}
|
package/lib/locale/en_US.d.ts
CHANGED
package/lib/locale/en_US.js
CHANGED
package/lib/locale/zh_CN.d.ts
CHANGED
package/lib/locale/zh_CN.js
CHANGED