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

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 (108) hide show
  1. package/dist/index.esm.css +69 -63
  2. package/dist/less.esm.css +5021 -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 +0 -1
  7. package/es/ProEditTable/components/RenderField/index.js +24 -11
  8. package/es/ProEditTable/utils/config.js +5 -5
  9. package/es/ProEditTable/utils/index.js +32 -9
  10. package/es/ProEnum/components/Group.d.ts +2 -0
  11. package/es/ProEnum/components/Group.js +20 -19
  12. package/es/ProEnum/index.js +4 -3
  13. package/es/ProEnum/style/index.less +11 -2
  14. package/es/ProForm/components/combination/FormList/index.js +6 -3
  15. package/es/ProForm/components/combination/FormList/utils.d.ts +2 -1
  16. package/es/ProForm/components/combination/FormList/utils.js +5 -3
  17. package/es/ProForm/components/combination/Group/index.js +23 -7
  18. package/es/ProForm/components/combination/Group/propsType.d.ts +6 -0
  19. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  20. package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
  21. package/es/ProForm/components/render/Render.js +4 -1
  22. package/es/ProForm/components/render/RenderFields.js +3 -1
  23. package/es/ProForm/index.js +4 -5
  24. package/es/ProForm/propsType.d.ts +2 -0
  25. package/es/ProForm/style/index.less +17 -13
  26. package/es/ProForm/utils/transformNames.d.ts +1 -1
  27. package/es/ProForm/utils/transformNames.js +11 -4
  28. package/es/ProForm/utils/useListChanged.js +1 -0
  29. package/es/ProForm/utils/valueType.d.ts +10 -5
  30. package/es/ProForm/utils/valueType.js +20 -10
  31. package/es/ProIcon/config/index.d.ts +2 -1
  32. package/es/ProIcon/config/index.js +191 -133
  33. package/es/ProIcon/index.d.ts +0 -1
  34. package/es/ProIcon/index.js +17 -36
  35. package/es/ProIcon/propsTypes.d.ts +2 -1
  36. package/es/ProLayout/components/Layout/Header/style/index.less +1 -1
  37. package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
  38. package/es/ProLayout/components/ProCollapse/index.js +45 -4
  39. package/es/ProLayout/components/ProCollapse/style/index.less +19 -4
  40. package/es/ProLayout/components/ProHeader/style/index.less +2 -2
  41. package/es/ProLayout/style/index.less +5 -3
  42. package/es/ProStep/components/Item/index.js +2 -1
  43. package/es/ProStep/style/index.less +71 -70
  44. package/es/ProThemeTools/component/PrdTools/index.js +12 -26
  45. package/es/ProThemeTools/index.js +0 -1
  46. package/es/ProTree/components/ProTreeSelect/index.js +5 -9
  47. package/es/assets/catalog.svg +30 -1
  48. package/es/assets/fold.svg +27 -0
  49. package/es/locale/en_US.d.ts +3 -0
  50. package/es/locale/en_US.js +3 -0
  51. package/es/locale/zh_CN.d.ts +3 -0
  52. package/es/locale/zh_CN.js +3 -0
  53. package/es/style/less.less +2 -0
  54. package/es/style/theme/antd.less +10 -24
  55. package/lib/ProConfigProvider/index.d.ts +1 -1
  56. package/lib/ProConfigProvider/index.js +23 -1
  57. package/lib/ProEditLabel/style/index.less +0 -1
  58. package/lib/ProEditTable/components/RenderField/index.js +23 -10
  59. package/lib/ProEditTable/utils/config.js +5 -5
  60. package/lib/ProEditTable/utils/index.js +32 -9
  61. package/lib/ProEnum/components/Group.d.ts +2 -0
  62. package/lib/ProEnum/components/Group.js +20 -19
  63. package/lib/ProEnum/index.js +4 -3
  64. package/lib/ProEnum/style/index.less +11 -2
  65. package/lib/ProForm/components/combination/FormList/index.js +6 -3
  66. package/lib/ProForm/components/combination/FormList/utils.d.ts +2 -1
  67. package/lib/ProForm/components/combination/FormList/utils.js +5 -3
  68. package/lib/ProForm/components/combination/Group/index.js +22 -6
  69. package/lib/ProForm/components/combination/Group/propsType.d.ts +6 -0
  70. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  71. package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
  72. package/lib/ProForm/components/render/Render.js +4 -1
  73. package/lib/ProForm/components/render/RenderFields.js +3 -1
  74. package/lib/ProForm/index.js +4 -5
  75. package/lib/ProForm/propsType.d.ts +2 -0
  76. package/lib/ProForm/style/index.less +17 -13
  77. package/lib/ProForm/utils/transformNames.d.ts +1 -1
  78. package/lib/ProForm/utils/transformNames.js +10 -3
  79. package/lib/ProForm/utils/useListChanged.js +1 -0
  80. package/lib/ProForm/utils/valueType.d.ts +10 -5
  81. package/lib/ProForm/utils/valueType.js +20 -10
  82. package/lib/ProIcon/config/index.d.ts +2 -1
  83. package/lib/ProIcon/config/index.js +191 -133
  84. package/lib/ProIcon/index.d.ts +0 -1
  85. package/lib/ProIcon/index.js +17 -37
  86. package/lib/ProIcon/propsTypes.d.ts +2 -1
  87. package/lib/ProLayout/components/Layout/Header/style/index.less +1 -1
  88. package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
  89. package/lib/ProLayout/components/ProCollapse/index.js +43 -4
  90. package/lib/ProLayout/components/ProCollapse/style/index.less +19 -4
  91. package/lib/ProLayout/components/ProHeader/style/index.less +2 -2
  92. package/lib/ProLayout/style/index.less +5 -3
  93. package/lib/ProStep/components/Item/index.js +2 -1
  94. package/lib/ProStep/style/index.less +71 -70
  95. package/lib/ProThemeTools/component/PrdTools/index.js +12 -26
  96. package/lib/ProThemeTools/index.js +0 -1
  97. package/lib/ProTree/components/ProTreeSelect/index.js +5 -9
  98. package/lib/assets/catalog.svg +30 -1
  99. package/lib/assets/fold.svg +27 -0
  100. package/lib/locale/en_US.d.ts +3 -0
  101. package/lib/locale/en_US.js +3 -0
  102. package/lib/locale/zh_CN.d.ts +3 -0
  103. package/lib/locale/zh_CN.js +3 -0
  104. package/lib/style/less.less +2 -0
  105. package/lib/style/theme/antd.less +10 -24
  106. package/package.json +1 -1
  107. package/es/ProIcon/symbolIcon.js +0 -43
  108. package/lib/ProIcon/symbolIcon.js +0 -45
@@ -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
  */
@@ -8,9 +8,13 @@ exports.default = void 0;
8
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
+ var _react = require("react");
11
12
  var _antd = require("antd");
12
13
  var _icons = require("@ant-design/icons");
13
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
+ var _reactSvg = require("react-svg");
16
+ var _lodash = require("lodash");
17
+ var _fold = _interopRequireDefault(require("../../../assets/fold.svg"));
14
18
  var Panel = _antd.Collapse.Panel;
15
19
  var ProCollapse = function ProCollapse(props) {
16
20
  var title = props.title,
@@ -31,12 +35,14 @@ var ProCollapse = function ProCollapse(props) {
31
35
  folding = _props$folding === void 0 ? false : _props$folding,
32
36
  collapseProps = props.collapseProps,
33
37
  collapsePanelProps = props.collapsePanelProps,
34
- className = props.className;
38
+ className = props.className,
39
+ icon = props.icon;
35
40
  var cls = (0, _classnames.default)((0, _defineProperty2.default)({
36
41
  'pro-collapse': true,
37
42
  'pro-collapse-level2': level === '2',
38
43
  'pro-collapse-list': titleList === null || titleList === void 0 ? void 0 : titleList.length,
39
- 'pro-collapse-no-title': !title
44
+ 'pro-collapse-no-title': !title,
45
+ 'pro-collapse-no-level1-title': !title && level !== '2'
40
46
  }, "".concat(className), className));
41
47
  var content = (0, _jsxRuntime.jsx)("div", {
42
48
  className: "pro-collapse-content",
@@ -44,6 +50,7 @@ var ProCollapse = function ProCollapse(props) {
44
50
  children: children
45
51
  });
46
52
  var renderPanel = function renderPanel() {
53
+ var _title = title;
47
54
  if (level === '2') {
48
55
  var level2Panel = (0, _classnames.default)({
49
56
  'pro-collapse-level2-collapse': towCollapse,
@@ -55,7 +62,7 @@ var ProCollapse = function ProCollapse(props) {
55
62
  hasCollapse.collapsible = 'disabled';
56
63
  }
57
64
  return (0, _jsxRuntime.jsx)(Panel, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
58
- header: title,
65
+ header: _title,
59
66
  className: level2Panel,
60
67
  extra: (0, _jsxRuntime.jsx)("div", {
61
68
  className: "extra-info",
@@ -66,8 +73,20 @@ var ProCollapse = function ProCollapse(props) {
66
73
  children: content
67
74
  }), "1");
68
75
  }
76
+ if (icon) {
77
+ _title = (0, _jsxRuntime.jsxs)(_antd.Space, {
78
+ size: 8,
79
+ align: "center",
80
+ children: [(0, _jsxRuntime.jsx)("div", {
81
+ className: "pro-collapse-icon",
82
+ children: (0, _lodash.isBoolean)(icon) ? (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
83
+ src: _fold.default
84
+ }) : icon
85
+ }), title]
86
+ });
87
+ }
69
88
  return (0, _jsxRuntime.jsx)(Panel, (0, _objectSpread2.default)((0, _objectSpread2.default)({
70
- header: title,
89
+ header: _title,
71
90
  className: "pro-collapse-panel",
72
91
  extra: (0, _jsxRuntime.jsx)("div", {
73
92
  className: "extra-info",
@@ -92,6 +111,26 @@ var ProCollapse = function ProCollapse(props) {
92
111
  }), content]
93
112
  });
94
113
  };
114
+ // 当pro-layout-content只存在一个card时,高度动态计算
115
+ (0, _react.useLayoutEffect)(function () {
116
+ var proCollapseContent = document.querySelector('.pro-layout-content');
117
+ if (!proCollapseContent) {
118
+ return;
119
+ }
120
+ var proCollapseNoTitles = proCollapseContent.querySelectorAll('.pro-collapse-no-level1-title');
121
+ var proCollapses = proCollapseContent.querySelectorAll('.pro-collapse');
122
+ if (proCollapseNoTitles.length === 1 && proCollapses.length === 1) {
123
+ var rect = proCollapseNoTitles[0].getBoundingClientRect();
124
+ if ((rect === null || rect === void 0 ? void 0 : rect.height) < window.innerHeight - rect.top) {
125
+ proCollapseNoTitles[0].style.minHeight = "calc(100vh - ".concat(rect.top + 16, "px)");
126
+ }
127
+ }
128
+ return function () {
129
+ if (proCollapseNoTitles.length === 1 && proCollapses.length === 1) {
130
+ proCollapseNoTitles[0].style.minHeight = 'auto'; // 移除 minHeight 的设置
131
+ }
132
+ };
133
+ });
95
134
  return (0, _jsxRuntime.jsx)("div", {
96
135
  id: id,
97
136
  style: style,