@zat-design/sisyphus-react 3.4.2-beta.9 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/index.esm.css +55 -36
  2. package/dist/less.esm.css +5022 -0
  3. package/dist/less.esm.js +3 -0
  4. package/es/ProConfigProvider/index.js +2 -1
  5. package/es/ProEditTable/components/RenderField/index.js +20 -10
  6. package/es/ProEditTable/utils/config.js +5 -5
  7. package/es/ProEditTable/utils/index.js +32 -9
  8. package/es/ProEnum/components/Group.d.ts +2 -0
  9. package/es/ProEnum/components/Group.js +26 -8
  10. package/es/ProEnum/index.js +4 -3
  11. package/es/ProEnum/style/index.less +11 -2
  12. package/es/ProForm/components/combination/FormList/index.js +6 -3
  13. package/es/ProForm/components/combination/FormList/utils.d.ts +2 -1
  14. package/es/ProForm/components/combination/FormList/utils.js +5 -3
  15. package/es/ProForm/components/combination/Group/index.js +23 -7
  16. package/es/ProForm/components/combination/Group/propsType.d.ts +6 -0
  17. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  18. package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
  19. package/es/ProForm/components/render/Render.js +4 -1
  20. package/es/ProForm/components/render/RenderFields.js +3 -1
  21. package/es/ProForm/propsType.d.ts +2 -0
  22. package/es/ProForm/style/index.less +17 -13
  23. package/es/ProForm/utils/transformNames.d.ts +1 -1
  24. package/es/ProForm/utils/transformNames.js +11 -4
  25. package/es/ProForm/utils/useListChanged.js +1 -0
  26. package/es/ProForm/utils/valueType.d.ts +10 -5
  27. package/es/ProForm/utils/valueType.js +20 -10
  28. package/es/ProIcon/config/index.d.ts +2 -1
  29. package/es/ProIcon/config/index.js +191 -133
  30. package/es/ProIcon/index.d.ts +0 -1
  31. package/es/ProIcon/index.js +17 -36
  32. package/es/ProIcon/propsTypes.d.ts +2 -1
  33. package/es/ProLayout/components/Layout/Header/style/index.less +1 -1
  34. package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
  35. package/es/ProLayout/components/ProCollapse/index.js +22 -3
  36. package/es/ProLayout/components/ProCollapse/style/index.less +19 -4
  37. package/es/ProLayout/components/ProHeader/style/index.less +2 -2
  38. package/es/ProLayout/style/index.less +5 -3
  39. package/es/ProStep/components/Item/index.js +2 -1
  40. package/es/ProStep/style/index.less +71 -70
  41. package/es/ProTree/components/ProTreeSelect/index.js +5 -9
  42. package/es/assets/catalog.svg +30 -1
  43. package/es/assets/fold.svg +27 -0
  44. package/es/locale/en_US.d.ts +3 -0
  45. package/es/locale/en_US.js +3 -0
  46. package/es/locale/zh_CN.d.ts +3 -0
  47. package/es/locale/zh_CN.js +3 -0
  48. package/es/style/less.less +2 -0
  49. package/es/style/theme/antd.less +1 -1
  50. package/lib/ProConfigProvider/index.js +2 -1
  51. package/lib/ProEditTable/components/RenderField/index.js +19 -9
  52. package/lib/ProEditTable/utils/config.js +5 -5
  53. package/lib/ProEditTable/utils/index.js +32 -9
  54. package/lib/ProEnum/components/Group.d.ts +2 -0
  55. package/lib/ProEnum/components/Group.js +26 -8
  56. package/lib/ProEnum/index.js +4 -3
  57. package/lib/ProEnum/style/index.less +11 -2
  58. package/lib/ProForm/components/combination/FormList/index.js +6 -3
  59. package/lib/ProForm/components/combination/FormList/utils.d.ts +2 -1
  60. package/lib/ProForm/components/combination/FormList/utils.js +5 -3
  61. package/lib/ProForm/components/combination/Group/index.js +22 -6
  62. package/lib/ProForm/components/combination/Group/propsType.d.ts +6 -0
  63. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  64. package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
  65. package/lib/ProForm/components/render/Render.js +4 -1
  66. package/lib/ProForm/components/render/RenderFields.js +3 -1
  67. package/lib/ProForm/propsType.d.ts +2 -0
  68. package/lib/ProForm/style/index.less +17 -13
  69. package/lib/ProForm/utils/transformNames.d.ts +1 -1
  70. package/lib/ProForm/utils/transformNames.js +10 -3
  71. package/lib/ProForm/utils/useListChanged.js +1 -0
  72. package/lib/ProForm/utils/valueType.d.ts +10 -5
  73. package/lib/ProForm/utils/valueType.js +20 -10
  74. package/lib/ProIcon/config/index.d.ts +2 -1
  75. package/lib/ProIcon/config/index.js +191 -133
  76. package/lib/ProIcon/index.d.ts +0 -1
  77. package/lib/ProIcon/index.js +17 -37
  78. package/lib/ProIcon/propsTypes.d.ts +2 -1
  79. package/lib/ProLayout/components/Layout/Header/style/index.less +1 -1
  80. package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
  81. package/lib/ProLayout/components/ProCollapse/index.js +20 -3
  82. package/lib/ProLayout/components/ProCollapse/style/index.less +19 -4
  83. package/lib/ProLayout/components/ProHeader/style/index.less +2 -2
  84. package/lib/ProLayout/style/index.less +5 -3
  85. package/lib/ProStep/components/Item/index.js +2 -1
  86. package/lib/ProStep/style/index.less +71 -70
  87. package/lib/ProTree/components/ProTreeSelect/index.js +5 -9
  88. package/lib/assets/catalog.svg +30 -1
  89. package/lib/assets/fold.svg +27 -0
  90. package/lib/locale/en_US.d.ts +3 -0
  91. package/lib/locale/en_US.js +3 -0
  92. package/lib/locale/zh_CN.d.ts +3 -0
  93. package/lib/locale/zh_CN.js +3 -0
  94. package/lib/style/less.less +2 -0
  95. package/lib/style/theme/antd.less +1 -1
  96. package/package.json +1 -1
  97. package/es/ProIcon/symbolIcon.js +0 -43
  98. package/lib/ProIcon/symbolIcon.js +0 -45
@@ -1,28 +1,33 @@
1
1
  declare const _default: {
2
2
  /** 年月日 */
3
- date: ({ type, toISOString }: {
3
+ date: ({ type, toISOString, mode }: {
4
4
  type: any;
5
5
  toISOString: any;
6
+ mode: any;
6
7
  }) => {};
7
8
  /** 年月日 时分秒 */
8
- dateTime: ({ type, toISOString }: {
9
+ dateTime: ({ type, toISOString, mode }: {
9
10
  type: any;
10
11
  toISOString: any;
12
+ mode: any;
11
13
  }) => {};
12
14
  /** 年月日 00:00:00 */
13
- dateStartTime: ({ type, toISOString }: {
15
+ dateStartTime: ({ type, toISOString, mode }: {
14
16
  type: any;
15
17
  toISOString: any;
18
+ mode: any;
16
19
  }) => {};
17
20
  /** 年月日 23:59:59 */
18
- dateEndTime: ({ type, toISOString }: {
21
+ dateEndTime: ({ type, toISOString, mode }: {
19
22
  type: any;
20
23
  toISOString: any;
24
+ mode: any;
21
25
  }) => {};
22
26
  /** 年月日 00:00:00 ~ 年月日 23:59:59 */
23
- dateStartEndTime: ({ type, toISOString }: {
27
+ dateStartEndTime: ({ type, toISOString, mode }: {
24
28
  type: any;
25
29
  toISOString: any;
30
+ mode: any;
26
31
  }) => {};
27
32
  /** 百分比 */
28
33
  percentage: ({ type, valueType }: {
@@ -160,51 +160,61 @@ var _default = exports.default = {
160
160
  /** 年月日 */
161
161
  date: function date(_ref3) {
162
162
  var type = _ref3.type,
163
- toISOString = _ref3.toISOString;
163
+ toISOString = _ref3.toISOString,
164
+ mode = _ref3.mode;
164
165
  return dateTransform({
165
166
  type: type,
166
167
  _valueType: 'date',
167
- toISOString: toISOString
168
+ toISOString: toISOString,
169
+ mode: mode
168
170
  });
169
171
  },
170
172
  /** 年月日 时分秒 */
171
173
  dateTime: function dateTime(_ref4) {
172
174
  var type = _ref4.type,
173
- toISOString = _ref4.toISOString;
175
+ toISOString = _ref4.toISOString,
176
+ mode = _ref4.mode;
174
177
  return dateTransform({
175
178
  type: type,
176
179
  _valueType: 'dateTime',
177
- toISOString: toISOString
180
+ toISOString: toISOString,
181
+ mode: mode
178
182
  });
179
183
  },
180
184
  /** 年月日 00:00:00 */
181
185
  dateStartTime: function dateStartTime(_ref5) {
182
186
  var type = _ref5.type,
183
- toISOString = _ref5.toISOString;
187
+ toISOString = _ref5.toISOString,
188
+ mode = _ref5.mode;
184
189
  return dateTransform({
185
190
  type: type,
186
191
  _valueType: 'dateStartTime',
187
- toISOString: toISOString
192
+ toISOString: toISOString,
193
+ mode: mode
188
194
  });
189
195
  },
190
196
  /** 年月日 23:59:59 */
191
197
  dateEndTime: function dateEndTime(_ref6) {
192
198
  var type = _ref6.type,
193
- toISOString = _ref6.toISOString;
199
+ toISOString = _ref6.toISOString,
200
+ mode = _ref6.mode;
194
201
  return dateTransform({
195
202
  type: type,
196
203
  _valueType: 'dateEndTime',
197
- toISOString: toISOString
204
+ toISOString: toISOString,
205
+ mode: mode
198
206
  });
199
207
  },
200
208
  /** 年月日 00:00:00 ~ 年月日 23:59:59 */
201
209
  dateStartEndTime: function dateStartEndTime(_ref7) {
202
210
  var type = _ref7.type,
203
- toISOString = _ref7.toISOString;
211
+ toISOString = _ref7.toISOString,
212
+ mode = _ref7.mode;
204
213
  return dateTransform({
205
214
  type: type,
206
215
  _valueType: 'dateStartEndTime',
207
- toISOString: toISOString
216
+ toISOString: toISOString,
217
+ mode: mode
208
218
  });
209
219
  },
210
220
  /** 百分比 */
@@ -1,4 +1,5 @@
1
1
  export declare const iconMap: {
2
2
  type: string;
3
- text: string;
3
+ 'text-cn': string;
4
+ 'text-en': string;
4
5
  }[];
@@ -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: 'API授权'
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: 'API权限'
244
+ type: 'yulanmoban',
245
+ 'text-cn': '预览模板',
246
+ 'text-en': 'preview template'
187
247
  }, {
188
- type: '',
189
- text: 'IP白名单'
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
  }];
@@ -1,5 +1,4 @@
1
1
  import { FC } from 'react';
2
2
  import { ProIconProps } from './propsTypes';
3
- export declare function createScriptUrlElements(scriptUrls: string[], index?: number): void;
4
3
  declare const ProIcon: FC<ProIconProps>;
5
4
  export default ProIcon;
@@ -4,45 +4,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.createScriptUrlElements = createScriptUrlElements;
8
7
  exports.default = void 0;
9
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
10
  var _jsxRuntime = require("react/jsx-runtime");
11
+ var _ahooks = require("ahooks");
12
12
  var _antd = require("antd");
13
13
  var _classnames = _interopRequireDefault(require("classnames"));
14
14
  var _lodash = require("lodash");
15
- var _config2 = require("./config");
16
- var _symbolIcon = _interopRequireDefault(require("./symbolIcon"));
17
15
  var _ProConfigProvider = require("../ProConfigProvider");
16
+ var _config2 = require("./config");
17
+ var _locale = _interopRequireDefault(require("../locale"));
18
18
  var _excluded = ["type", "onClick", "size", "color", "className", "style", "spin", "rotate", "theme", "disabled", "mode", "buttonProps", "children", "mapList"];
19
- var customCache = new Set();
20
- function isValidCustomScriptUrl(scriptUrl) {
21
- return Boolean(typeof scriptUrl === 'string' && scriptUrl.length && !customCache.has(scriptUrl));
22
- }
23
- function createScriptUrlElements(scriptUrls) {
24
- var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
25
- var currentScriptUrl = scriptUrls[index];
26
- if (isValidCustomScriptUrl(currentScriptUrl)) {
27
- var script = document.createElement('script');
28
- script.setAttribute('src', currentScriptUrl);
29
- script.setAttribute('data-namespace', currentScriptUrl);
30
- if (scriptUrls.length > index + 1) {
31
- script.onload = function () {
32
- createScriptUrlElements(scriptUrls, index + 1);
33
- };
34
- script.onerror = function () {
35
- createScriptUrlElements(scriptUrls, index + 1);
36
- };
37
- }
38
- customCache.add(currentScriptUrl);
39
- document.body.appendChild(script);
40
- }
41
- }
42
- // 加载内部icon
43
- if (_symbolIcon.default && typeof document !== 'undefined' && typeof window !== 'undefined' && typeof document.createElement === 'function') {
44
- createScriptUrlElements([_symbolIcon.default]);
45
- }
46
19
  var ProIcon = function ProIcon(props) {
47
20
  var config = (0, _ProConfigProvider.useProConfig)('ProIcon') || {};
48
21
  var _config = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), props !== null && props !== void 0 ? props : {});
@@ -69,6 +42,13 @@ var ProIcon = function ProIcon(props) {
69
42
  _config$mapList = _config.mapList,
70
43
  mapList = _config$mapList === void 0 ? [] : _config$mapList,
71
44
  reset = (0, _objectWithoutProperties2.default)(_config, _excluded);
45
+ // 语言
46
+ var language = _locale.default.ProIcon.language;
47
+ // 加载内部icon
48
+ var status = (0, _ahooks.useExternal)('https://at.alicdn.com/t/c/font_4063056_jmnz9g5uycp.js');
49
+ if (status !== 'ready') {
50
+ return null;
51
+ }
72
52
  var rotateStyle = rotate ? {
73
53
  msTransform: "rotate(".concat(rotate, "deg)"),
74
54
  transform: "rotate(".concat(rotate, "deg)")
@@ -84,32 +64,32 @@ var ProIcon = function ProIcon(props) {
84
64
  if (type && !props.mode) {
85
65
  _mode = 'icon';
86
66
  }
67
+ var targetTextFill = "text-".concat(language); // text-cn text-en
87
68
  var isIconMode = _mode === 'icon';
88
69
  var isExtendButtonMode = !isIconMode || isIconMode && disabled;
89
- var mergedMapList = (0, _lodash.uniqBy)(mapList.concat(_config2.iconMap), 'text');
70
+ var mergedMapList = (0, _lodash.uniqBy)(mapList.concat(_config2.iconMap), targetTextFill);
90
71
  var _type = type;
91
72
  var _text = children;
92
- var textIsExistAndIncludeChinese = _text && /[\u4e00-\u9fa5]/.test(String(_text));
93
73
  var typeIsExistAndIncludeEnglish = _type && /[a-zA-Z]/.test(_type);
94
- // 模式为icon下,对传入的text进行中文-icon 映射
74
+ // 模式为icon下,对传入的text进行指定语言-icon 映射
95
75
  if (isIconMode && !type) {
96
- if (textIsExistAndIncludeChinese) {
76
+ if (_text) {
97
77
  var target = mergedMapList.find(function (item) {
98
- return item.text === _text;
78
+ return item['text-cn'] === _text || item['text-en'] === _text;
99
79
  });
100
80
  if (target) {
101
81
  _type = target === null || target === void 0 ? void 0 : target.type;
102
82
  }
103
83
  }
104
84
  }
105
- // 模式为button下,对传入的type进行icon-中文 映射
85
+ // 模式为button下,对传入的type进行icon-指定语言 映射
106
86
  if (!isIconMode) {
107
87
  if (typeIsExistAndIncludeEnglish) {
108
88
  var _target = mergedMapList.find(function (item) {
109
89
  return item.type === _type;
110
90
  });
111
91
  if (_target) {
112
- _text = _target === null || _target === void 0 ? void 0 : _target.text;
92
+ _text = _target[targetTextFill];
113
93
  }
114
94
  }
115
95
  }
@@ -3,7 +3,8 @@ import { ButtonProps } from 'antd/lib/button';
3
3
  export type ModeType = 'icon' | 'button';
4
4
  interface iconMap {
5
5
  type: string;
6
- text: string;
6
+ 'text-cn'?: string;
7
+ 'text-en'?: string;
7
8
  }
8
9
  export interface ProIconProps {
9
10
  /**
@@ -2,7 +2,7 @@
2
2
  .pro-layout-header {
3
3
  position : fixed;
4
4
  top : 0;
5
- z-index : 101;
5
+ z-index : 103;
6
6
  display : flex;
7
7
  flex-direction : row;
8
8
  align-items : center;
@@ -20,6 +20,11 @@ export interface ProCollapseProps {
20
20
  */
21
21
  title?: string | React.ReactNode;
22
22
  /**
23
+ * @description 标题前图标
24
+ * @default -
25
+ */
26
+ icon?: React.ReactNode | Boolean;
27
+ /**
23
28
  * @description 折叠头部多个标题
24
29
  * @default []
25
30
  */