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

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 (216) hide show
  1. package/dist/index.esm.css +303 -267
  2. package/dist/less.esm.css +5024 -0
  3. package/dist/less.esm.js +3 -0
  4. package/es/ProConfigProvider/index.d.ts +1 -1
  5. package/es/ProConfigProvider/index.js +24 -2
  6. package/es/ProEditLabel/style/index.less +1 -2
  7. package/es/ProEditTable/components/RenderField/index.js +32 -21
  8. package/es/ProEditTable/index.js +3 -3
  9. package/es/ProEditTable/propsType.d.ts +1 -1
  10. package/es/ProEditTable/style/index.less +1 -1
  11. package/es/ProEditTable/utils/config.js +5 -5
  12. package/es/ProEditTable/utils/index.js +67 -30
  13. package/es/ProEditTable/utils/tools.js +3 -1
  14. package/es/ProEnum/components/Group.d.ts +2 -0
  15. package/es/ProEnum/components/Group.js +20 -19
  16. package/es/ProEnum/index.js +4 -3
  17. package/es/ProEnum/style/index.less +12 -3
  18. package/es/ProForm/components/base/DatePicker/index.js +2 -2
  19. package/es/ProForm/components/combination/FormList/index.js +6 -3
  20. package/es/ProForm/components/combination/FormList/utils.d.ts +2 -1
  21. package/es/ProForm/components/combination/FormList/utils.js +5 -3
  22. package/es/ProForm/components/combination/Group/index.js +31 -17
  23. package/es/ProForm/components/combination/Group/propsType.d.ts +6 -0
  24. package/es/ProForm/components/combination/Group/style/index.less +4 -4
  25. package/es/ProForm/components/combination/Group/utils.d.ts +2 -0
  26. package/es/ProForm/components/combination/Group/utils.js +10 -0
  27. package/es/ProForm/components/combination/ProTimeLimit/index.js +8 -2
  28. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  29. package/es/ProForm/components/index.d.ts +0 -1
  30. package/es/ProForm/components/index.js +1 -1
  31. package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
  32. package/es/ProForm/components/render/Render.js +21 -13
  33. package/es/ProForm/components/render/RenderFields.d.ts +3 -2
  34. package/es/ProForm/components/render/RenderFields.js +7 -3
  35. package/es/ProForm/components/render/propsType.d.ts +2 -5
  36. package/es/ProForm/index.js +12 -11
  37. package/es/ProForm/propsType.d.ts +7 -3
  38. package/es/ProForm/style/index.less +17 -13
  39. package/es/ProForm/utils/{contrastOriginal.d.ts → diffOriginal.d.ts} +2 -1
  40. package/es/ProForm/utils/diffOriginal.js +61 -0
  41. package/es/ProForm/utils/index.d.ts +2 -2
  42. package/es/ProForm/utils/index.js +7 -2
  43. package/es/ProForm/utils/rulesCreator.d.ts +7 -1
  44. package/es/ProForm/utils/rulesCreator.js +33 -3
  45. package/es/ProForm/utils/transformNames.d.ts +1 -1
  46. package/es/ProForm/utils/transformNames.js +11 -4
  47. package/es/ProForm/utils/transformValue.js +2 -2
  48. package/es/ProForm/utils/useChanged.js +4 -3
  49. package/es/ProForm/utils/useListChanged.d.ts +1 -1
  50. package/es/ProForm/utils/useListChanged.js +5 -3
  51. package/es/ProForm/utils/useRules.js +36 -11
  52. package/es/ProForm/utils/useShouldUpdate.js +4 -4
  53. package/es/ProForm/utils/valueType.d.ts +10 -5
  54. package/es/ProForm/utils/valueType.js +20 -10
  55. package/es/ProIcon/config/index.d.ts +2 -1
  56. package/es/ProIcon/config/index.js +191 -133
  57. package/es/ProIcon/index.d.ts +0 -1
  58. package/es/ProIcon/index.js +21 -36
  59. package/es/ProIcon/propsTypes.d.ts +2 -1
  60. package/es/ProLayout/components/Layout/Header/style/index.less +1 -1
  61. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +58 -55
  62. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +25 -20
  63. package/es/ProLayout/components/Layout/Menu/style/index.less +52 -56
  64. package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
  65. package/es/ProLayout/components/ProCollapse/index.js +45 -4
  66. package/es/ProLayout/components/ProCollapse/style/index.less +29 -11
  67. package/es/ProLayout/components/ProFooter/index.js +1 -1
  68. package/es/ProLayout/components/ProFooter/style/index.less +1 -1
  69. package/es/ProLayout/components/ProHeader/style/index.less +6 -5
  70. package/es/ProLayout/style/index.less +176 -88
  71. package/es/ProStep/components/Item/index.js +2 -1
  72. package/es/ProStep/style/index.less +71 -70
  73. package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
  74. package/es/ProTable/components/RenderColumn/index.js +3 -3
  75. package/es/ProTable/propsType.d.ts +1 -1
  76. package/es/ProTable/style/index.less +2 -2
  77. package/es/ProTable/utils.js +9 -9
  78. package/es/ProTabs/style/index.less +3 -1
  79. package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  80. package/es/ProThemeTools/component/PrdTools/index.js +14 -28
  81. package/es/ProThemeTools/component/PrdTools/style/index.less +1 -1
  82. package/es/ProThemeTools/index.js +21 -29
  83. package/es/ProThemeTools/propsType.d.ts +1 -1
  84. package/es/ProThemeTools/style/index.less +25 -8
  85. package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.js +7 -11
  86. package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.d.ts +1 -1
  87. package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/style/index.less +1 -1
  88. package/es/ProTree/index.js +1 -1
  89. package/es/ProTree/style/index.less +5 -0
  90. package/es/ProTreeModal/style/index.less +2 -2
  91. package/es/ProUpload/style/fileItem.less +2 -2
  92. package/es/ProUpload/style/index.less +2 -2
  93. package/es/assets/catalog.svg +30 -1
  94. package/es/assets/fold.svg +27 -0
  95. package/es/assets/setting.svg +14 -0
  96. package/es/locale/en_US.d.ts +4 -0
  97. package/es/locale/en_US.js +4 -0
  98. package/es/locale/zh_CN.d.ts +4 -0
  99. package/es/locale/zh_CN.js +4 -0
  100. package/es/style/components.less +0 -1
  101. package/es/style/less.less +2 -0
  102. package/es/style/theme/antd.less +14 -29
  103. package/es/style/theme/index.less +2 -2
  104. package/es/style/theme/tokens.less +2 -2
  105. package/es/tokens.js +2 -2
  106. package/lib/ProConfigProvider/index.d.ts +1 -1
  107. package/lib/ProConfigProvider/index.js +23 -1
  108. package/lib/ProEditLabel/style/index.less +1 -2
  109. package/lib/ProEditTable/components/RenderField/index.js +31 -20
  110. package/lib/ProEditTable/index.js +3 -3
  111. package/lib/ProEditTable/propsType.d.ts +1 -1
  112. package/lib/ProEditTable/style/index.less +1 -1
  113. package/lib/ProEditTable/utils/config.js +5 -5
  114. package/lib/ProEditTable/utils/index.js +67 -30
  115. package/lib/ProEditTable/utils/tools.js +3 -1
  116. package/lib/ProEnum/components/Group.d.ts +2 -0
  117. package/lib/ProEnum/components/Group.js +20 -19
  118. package/lib/ProEnum/index.js +4 -3
  119. package/lib/ProEnum/style/index.less +12 -3
  120. package/lib/ProForm/components/base/DatePicker/index.js +1 -1
  121. package/lib/ProForm/components/combination/FormList/index.js +6 -3
  122. package/lib/ProForm/components/combination/FormList/utils.d.ts +2 -1
  123. package/lib/ProForm/components/combination/FormList/utils.js +5 -3
  124. package/lib/ProForm/components/combination/Group/index.js +28 -14
  125. package/lib/ProForm/components/combination/Group/propsType.d.ts +6 -0
  126. package/lib/ProForm/components/combination/Group/style/index.less +4 -4
  127. package/lib/ProForm/components/combination/Group/utils.d.ts +2 -0
  128. package/lib/ProForm/components/combination/Group/utils.js +11 -1
  129. package/lib/ProForm/components/combination/ProTimeLimit/index.js +7 -1
  130. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  131. package/lib/ProForm/components/index.d.ts +0 -1
  132. package/lib/ProForm/components/index.js +0 -7
  133. package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
  134. package/lib/ProForm/components/render/Render.js +21 -13
  135. package/lib/ProForm/components/render/RenderFields.d.ts +3 -2
  136. package/lib/ProForm/components/render/RenderFields.js +7 -3
  137. package/lib/ProForm/components/render/propsType.d.ts +2 -5
  138. package/lib/ProForm/index.js +11 -10
  139. package/lib/ProForm/propsType.d.ts +7 -3
  140. package/lib/ProForm/style/index.less +17 -13
  141. package/lib/ProForm/utils/{contrastOriginal.d.ts → diffOriginal.d.ts} +2 -1
  142. package/lib/ProForm/utils/diffOriginal.js +68 -0
  143. package/lib/ProForm/utils/index.d.ts +2 -2
  144. package/lib/ProForm/utils/index.js +8 -3
  145. package/lib/ProForm/utils/rulesCreator.d.ts +7 -1
  146. package/lib/ProForm/utils/rulesCreator.js +33 -2
  147. package/lib/ProForm/utils/transformNames.d.ts +1 -1
  148. package/lib/ProForm/utils/transformNames.js +10 -3
  149. package/lib/ProForm/utils/transformValue.js +1 -1
  150. package/lib/ProForm/utils/useChanged.js +4 -3
  151. package/lib/ProForm/utils/useListChanged.d.ts +1 -1
  152. package/lib/ProForm/utils/useListChanged.js +5 -3
  153. package/lib/ProForm/utils/useRules.js +36 -11
  154. package/lib/ProForm/utils/useShouldUpdate.js +4 -4
  155. package/lib/ProForm/utils/valueType.d.ts +10 -5
  156. package/lib/ProForm/utils/valueType.js +20 -10
  157. package/lib/ProIcon/config/index.d.ts +2 -1
  158. package/lib/ProIcon/config/index.js +191 -133
  159. package/lib/ProIcon/index.d.ts +0 -1
  160. package/lib/ProIcon/index.js +21 -37
  161. package/lib/ProIcon/propsTypes.d.ts +2 -1
  162. package/lib/ProLayout/components/Layout/Header/style/index.less +1 -1
  163. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +58 -55
  164. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +25 -20
  165. package/lib/ProLayout/components/Layout/Menu/style/index.less +52 -56
  166. package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
  167. package/lib/ProLayout/components/ProCollapse/index.js +43 -4
  168. package/lib/ProLayout/components/ProCollapse/style/index.less +29 -11
  169. package/lib/ProLayout/components/ProFooter/index.js +1 -1
  170. package/lib/ProLayout/components/ProFooter/style/index.less +1 -1
  171. package/lib/ProLayout/components/ProHeader/style/index.less +6 -5
  172. package/lib/ProLayout/style/index.less +176 -88
  173. package/lib/ProStep/components/Item/index.js +2 -1
  174. package/lib/ProStep/style/index.less +71 -70
  175. package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
  176. package/lib/ProTable/components/RenderColumn/index.js +3 -3
  177. package/lib/ProTable/propsType.d.ts +1 -1
  178. package/lib/ProTable/style/index.less +2 -2
  179. package/lib/ProTable/utils.js +9 -9
  180. package/lib/ProTabs/style/index.less +3 -1
  181. package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  182. package/lib/ProThemeTools/component/PrdTools/index.js +14 -28
  183. package/lib/ProThemeTools/component/PrdTools/style/index.less +1 -1
  184. package/lib/ProThemeTools/index.js +19 -28
  185. package/lib/ProThemeTools/propsType.d.ts +1 -1
  186. package/lib/ProThemeTools/style/index.less +25 -8
  187. package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.js +7 -11
  188. package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.d.ts +1 -1
  189. package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/style/index.less +1 -1
  190. package/lib/ProTree/index.js +1 -1
  191. package/lib/ProTree/style/index.less +5 -0
  192. package/lib/ProTreeModal/style/index.less +2 -2
  193. package/lib/ProUpload/style/fileItem.less +2 -2
  194. package/lib/ProUpload/style/index.less +2 -2
  195. package/lib/assets/catalog.svg +30 -1
  196. package/lib/assets/fold.svg +27 -0
  197. package/lib/assets/setting.svg +14 -0
  198. package/lib/locale/en_US.d.ts +4 -0
  199. package/lib/locale/en_US.js +4 -0
  200. package/lib/locale/zh_CN.d.ts +4 -0
  201. package/lib/locale/zh_CN.js +4 -0
  202. package/lib/style/components.less +0 -1
  203. package/lib/style/less.less +2 -0
  204. package/lib/style/theme/antd.less +14 -29
  205. package/lib/style/theme/index.less +2 -2
  206. package/lib/style/theme/tokens.less +2 -2
  207. package/lib/tokens.js +2 -2
  208. package/package.json +1 -1
  209. package/es/ProForm/utils/contrastOriginal.js +0 -24
  210. package/es/ProIcon/symbolIcon.js +0 -43
  211. package/lib/ProForm/utils/contrastOriginal.js +0 -30
  212. package/lib/ProIcon/symbolIcon.js +0 -45
  213. /package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.d.ts +0 -0
  214. /package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.js +0 -0
  215. /package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.d.ts +0 -0
  216. /package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.js +0 -0
@@ -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: 'API授权'
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: 'API权限'
238
+ type: 'yulanmoban',
239
+ 'text-cn': '预览模板',
240
+ 'text-en': 'preview template'
181
241
  }, {
182
- type: '',
183
- text: 'IP白名单'
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
  }];
@@ -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,38 +4,12 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
4
4
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
5
  var _excluded = ["type", "onClick", "size", "color", "className", "style", "spin", "rotate", "theme", "disabled", "mode", "buttonProps", "children", "mapList"];
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { useExternal } from 'ahooks';
7
8
  import classNames from 'classnames';
8
9
  import { uniqBy } from 'lodash';
9
- import { iconMap } from './config';
10
- import symbolIcon from './symbolIcon';
11
10
  import { useProConfig } from '../ProConfigProvider';
12
- var customCache = new Set();
13
- function isValidCustomScriptUrl(scriptUrl) {
14
- return Boolean(typeof scriptUrl === 'string' && scriptUrl.length && !customCache.has(scriptUrl));
15
- }
16
- export function createScriptUrlElements(scriptUrls) {
17
- var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
18
- var currentScriptUrl = scriptUrls[index];
19
- if (isValidCustomScriptUrl(currentScriptUrl)) {
20
- var script = document.createElement('script');
21
- script.setAttribute('src', currentScriptUrl);
22
- script.setAttribute('data-namespace', currentScriptUrl);
23
- if (scriptUrls.length > index + 1) {
24
- script.onload = function () {
25
- createScriptUrlElements(scriptUrls, index + 1);
26
- };
27
- script.onerror = function () {
28
- createScriptUrlElements(scriptUrls, index + 1);
29
- };
30
- }
31
- customCache.add(currentScriptUrl);
32
- document.body.appendChild(script);
33
- }
34
- }
35
- // 加载内部icon
36
- if (symbolIcon && typeof document !== 'undefined' && typeof window !== 'undefined' && typeof document.createElement === 'function') {
37
- createScriptUrlElements([symbolIcon]);
38
- }
11
+ import { iconMap } from './config';
12
+ import locale from '../locale';
39
13
  var ProIcon = function ProIcon(props) {
40
14
  var config = useProConfig('ProIcon') || {};
41
15
  var _config = _objectSpread(_objectSpread({}, config), props !== null && props !== void 0 ? props : {});
@@ -62,6 +36,13 @@ var ProIcon = function ProIcon(props) {
62
36
  _config$mapList = _config.mapList,
63
37
  mapList = _config$mapList === void 0 ? [] : _config$mapList,
64
38
  reset = _objectWithoutProperties(_config, _excluded);
39
+ // 语言
40
+ var language = locale.ProIcon.language;
41
+ // 加载内部icon
42
+ var status = useExternal('https://at.alicdn.com/t/c/font_4063056_jmnz9g5uycp.js');
43
+ if (status !== 'ready') {
44
+ return null;
45
+ }
65
46
  var rotateStyle = rotate ? {
66
47
  msTransform: "rotate(".concat(rotate, "deg)"),
67
48
  transform: "rotate(".concat(rotate, "deg)")
@@ -73,32 +54,36 @@ var ProIcon = function ProIcon(props) {
73
54
  'pro-icon-btn': disabled
74
55
  });
75
56
  var _mode = mode || 'icon';
57
+ // 特殊情况,如果指定了type,并且没有接收到组件内的mode,那模式就是icon
58
+ if (type && !props.mode) {
59
+ _mode = 'icon';
60
+ }
61
+ var targetTextFill = "text-".concat(language); // text-cn text-en
76
62
  var isIconMode = _mode === 'icon';
77
63
  var isExtendButtonMode = !isIconMode || isIconMode && disabled;
78
- var mergedMapList = uniqBy(mapList.concat(iconMap), 'text');
64
+ var mergedMapList = uniqBy(mapList.concat(iconMap), targetTextFill);
79
65
  var _type = type;
80
66
  var _text = children;
81
- var textIsExistAndIncludeChinese = _text && /[\u4e00-\u9fa5]/.test(String(_text));
82
67
  var typeIsExistAndIncludeEnglish = _type && /[a-zA-Z]/.test(_type);
83
- // 模式为icon下,对传入的text进行中文-icon 映射
68
+ // 模式为icon下,对传入的text进行指定语言-icon 映射
84
69
  if (isIconMode && !type) {
85
- if (textIsExistAndIncludeChinese) {
70
+ if (_text) {
86
71
  var target = mergedMapList.find(function (item) {
87
- return item.text === _text;
72
+ return item['text-cn'] === _text || item['text-en'] === _text;
88
73
  });
89
74
  if (target) {
90
75
  _type = target === null || target === void 0 ? void 0 : target.type;
91
76
  }
92
77
  }
93
78
  }
94
- // 模式为button下,对传入的type进行icon-中文 映射
79
+ // 模式为button下,对传入的type进行icon-指定语言 映射
95
80
  if (!isIconMode) {
96
81
  if (typeIsExistAndIncludeEnglish) {
97
82
  var _target = mergedMapList.find(function (item) {
98
83
  return item.type === _type;
99
84
  });
100
85
  if (_target) {
101
- _text = _target === null || _target === void 0 ? void 0 : _target.text;
86
+ _text = _target[targetTextFill];
102
87
  }
103
88
  }
104
89
  }
@@ -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;