@tddc/assign-modal 3.0.2 → 3.0.4
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.
|
@@ -965,6 +965,50 @@ var AssignModal = function AssignModal(props) {
|
|
|
965
965
|
},
|
|
966
966
|
[userList, userKeys, filterUser],
|
|
967
967
|
);
|
|
968
|
+
var renderOrgItem = function renderOrgItem(item, lang) {
|
|
969
|
+
var mapResult = {
|
|
970
|
+
1: {
|
|
971
|
+
cn: '职能部门',
|
|
972
|
+
en: 'Func. Dept.',
|
|
973
|
+
icon: 'crowd',
|
|
974
|
+
},
|
|
975
|
+
2: {
|
|
976
|
+
icon: 'corporation',
|
|
977
|
+
},
|
|
978
|
+
};
|
|
979
|
+
var result = mapResult[item === null || item === void 0 ? void 0 : item.orgAttribute] || {};
|
|
980
|
+
return /*#__PURE__*/ React.createElement(
|
|
981
|
+
'div',
|
|
982
|
+
{
|
|
983
|
+
className: 'org-item-wrapper',
|
|
984
|
+
style: {
|
|
985
|
+
width: 'calc(100% - 32px)',
|
|
986
|
+
},
|
|
987
|
+
},
|
|
988
|
+
/*#__PURE__*/ React.createElement(_Ellipsis, {
|
|
989
|
+
title: item.title,
|
|
990
|
+
widthLimit: String(item.orgAttribute) === '1' ? 'calc(100% - 90px}' : '100%',
|
|
991
|
+
}),
|
|
992
|
+
String(item.orgAttribute) === '1' &&
|
|
993
|
+
/*#__PURE__*/ React.createElement(
|
|
994
|
+
'span',
|
|
995
|
+
{
|
|
996
|
+
className: 'org-functional-departemt-marker',
|
|
997
|
+
},
|
|
998
|
+
result[lang] || '职能部门',
|
|
999
|
+
),
|
|
1000
|
+
);
|
|
1001
|
+
};
|
|
1002
|
+
var defaultRenderItem = function defaultRenderItem(item) {
|
|
1003
|
+
var isOrg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
1004
|
+
if (isOrg) {
|
|
1005
|
+
return renderOrgItem(item, props === null || props === void 0 ? void 0 : props.lang);
|
|
1006
|
+
}
|
|
1007
|
+
return /*#__PURE__*/ React.createElement(_Ellipsis, {
|
|
1008
|
+
title: item.title,
|
|
1009
|
+
widthLimit: '100%',
|
|
1010
|
+
});
|
|
1011
|
+
};
|
|
968
1012
|
return /*#__PURE__*/ React.createElement(
|
|
969
1013
|
React.Fragment,
|
|
970
1014
|
null,
|
|
@@ -1044,6 +1088,9 @@ var AssignModal = function AssignModal(props) {
|
|
|
1044
1088
|
'div',
|
|
1045
1089
|
{
|
|
1046
1090
|
className: 'panel-left',
|
|
1091
|
+
style: {
|
|
1092
|
+
width: '60%',
|
|
1093
|
+
},
|
|
1047
1094
|
},
|
|
1048
1095
|
/*#__PURE__*/ React.createElement(_Input, {
|
|
1049
1096
|
size: 'small',
|
|
@@ -1063,6 +1110,9 @@ var AssignModal = function AssignModal(props) {
|
|
|
1063
1110
|
},
|
|
1064
1111
|
}),
|
|
1065
1112
|
/*#__PURE__*/ React.createElement(_TntdVirtualTree, {
|
|
1113
|
+
style: {
|
|
1114
|
+
overflowX: 'auto',
|
|
1115
|
+
},
|
|
1066
1116
|
isOrg: true,
|
|
1067
1117
|
treeData: treeData,
|
|
1068
1118
|
filterKey: filterOrg,
|
|
@@ -1073,12 +1123,16 @@ var AssignModal = function AssignModal(props) {
|
|
|
1073
1123
|
defaultExpandAll: true,
|
|
1074
1124
|
onCheck: onCheck,
|
|
1075
1125
|
height: windowHeight,
|
|
1126
|
+
titleRender: defaultRenderItem,
|
|
1076
1127
|
}),
|
|
1077
1128
|
),
|
|
1078
1129
|
/*#__PURE__*/ React.createElement(
|
|
1079
1130
|
'div',
|
|
1080
1131
|
{
|
|
1081
1132
|
className: 'panel-right',
|
|
1133
|
+
style: {
|
|
1134
|
+
width: '40%',
|
|
1135
|
+
},
|
|
1082
1136
|
},
|
|
1083
1137
|
/*#__PURE__*/ React.createElement(
|
|
1084
1138
|
'div',
|
|
@@ -1088,9 +1142,17 @@ var AssignModal = function AssignModal(props) {
|
|
|
1088
1142
|
/*#__PURE__*/ React.createElement(
|
|
1089
1143
|
'span',
|
|
1090
1144
|
null,
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1145
|
+
getText(
|
|
1146
|
+
'hasBeenSelected',
|
|
1147
|
+
props === null || props === void 0 ? void 0 : props.lang,
|
|
1148
|
+
),
|
|
1149
|
+
':',
|
|
1150
|
+
' ',
|
|
1151
|
+
getText(
|
|
1152
|
+
'numOfOrg',
|
|
1153
|
+
props === null || props === void 0 ? void 0 : props.lang,
|
|
1154
|
+
areadySelectOrg.length || 0,
|
|
1155
|
+
),
|
|
1094
1156
|
),
|
|
1095
1157
|
/*#__PURE__*/ React.createElement(
|
|
1096
1158
|
'a',
|
|
@@ -1099,7 +1161,7 @@ var AssignModal = function AssignModal(props) {
|
|
|
1099
1161
|
return onRemoveAllOrg();
|
|
1100
1162
|
},
|
|
1101
1163
|
},
|
|
1102
|
-
'
|
|
1164
|
+
getText('clear', props === null || props === void 0 ? void 0 : props.lang),
|
|
1103
1165
|
),
|
|
1104
1166
|
),
|
|
1105
1167
|
/*#__PURE__*/ React.createElement(
|
|
@@ -1206,7 +1268,10 @@ var AssignModal = function AssignModal(props) {
|
|
|
1206
1268
|
onChange: function onChange(e) {
|
|
1207
1269
|
debouncedAppSearch(e.target.value);
|
|
1208
1270
|
},
|
|
1209
|
-
|
|
1271
|
+
placeholder: getText(
|
|
1272
|
+
'enterAppName',
|
|
1273
|
+
props === null || props === void 0 ? void 0 : props.lang,
|
|
1274
|
+
),
|
|
1210
1275
|
size: 'small',
|
|
1211
1276
|
suffix: /*#__PURE__*/ React.createElement(_Icon, {
|
|
1212
1277
|
type: 'zoom',
|
|
@@ -1231,9 +1296,17 @@ var AssignModal = function AssignModal(props) {
|
|
|
1231
1296
|
/*#__PURE__*/ React.createElement(
|
|
1232
1297
|
'span',
|
|
1233
1298
|
null,
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1299
|
+
getText(
|
|
1300
|
+
'hasBeenSelected',
|
|
1301
|
+
props === null || props === void 0 ? void 0 : props.lang,
|
|
1302
|
+
),
|
|
1303
|
+
':',
|
|
1304
|
+
' ',
|
|
1305
|
+
getText(
|
|
1306
|
+
'numOfApp',
|
|
1307
|
+
props === null || props === void 0 ? void 0 : props.lang,
|
|
1308
|
+
areadySelectApp.length || 0,
|
|
1309
|
+
),
|
|
1237
1310
|
),
|
|
1238
1311
|
/*#__PURE__*/ React.createElement(
|
|
1239
1312
|
'a',
|
|
@@ -1242,7 +1315,7 @@ var AssignModal = function AssignModal(props) {
|
|
|
1242
1315
|
return onRemoveAllApp();
|
|
1243
1316
|
},
|
|
1244
1317
|
},
|
|
1245
|
-
'
|
|
1318
|
+
getText('clear', props === null || props === void 0 ? void 0 : props.lang),
|
|
1246
1319
|
),
|
|
1247
1320
|
),
|
|
1248
1321
|
/*#__PURE__*/ React.createElement(
|
|
@@ -1340,7 +1413,7 @@ var AssignModal = function AssignModal(props) {
|
|
|
1340
1413
|
/*#__PURE__*/ React.createElement(_Input, {
|
|
1341
1414
|
size: 'small',
|
|
1342
1415
|
placeholder: getText(
|
|
1343
|
-
'
|
|
1416
|
+
'enterUserName',
|
|
1344
1417
|
props === null || props === void 0 ? void 0 : props.lang,
|
|
1345
1418
|
),
|
|
1346
1419
|
onChange: function onChange(e) {
|
|
@@ -1369,18 +1442,26 @@ var AssignModal = function AssignModal(props) {
|
|
|
1369
1442
|
/*#__PURE__*/ React.createElement(
|
|
1370
1443
|
'span',
|
|
1371
1444
|
null,
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1445
|
+
getText(
|
|
1446
|
+
'hasBeenSelected',
|
|
1447
|
+
props === null || props === void 0 ? void 0 : props.lang,
|
|
1448
|
+
),
|
|
1449
|
+
':',
|
|
1450
|
+
' ',
|
|
1451
|
+
getText(
|
|
1452
|
+
'numOfUser',
|
|
1453
|
+
props === null || props === void 0 ? void 0 : props.lang,
|
|
1454
|
+
areadySelectUser.length || 0,
|
|
1455
|
+
),
|
|
1375
1456
|
),
|
|
1376
1457
|
/*#__PURE__*/ React.createElement(
|
|
1377
1458
|
'a',
|
|
1378
1459
|
{
|
|
1379
1460
|
onClick: function onClick() {
|
|
1380
|
-
return
|
|
1461
|
+
return onRemoveAllOrg();
|
|
1381
1462
|
},
|
|
1382
1463
|
},
|
|
1383
|
-
'
|
|
1464
|
+
getText('clear', props === null || props === void 0 ? void 0 : props.lang),
|
|
1384
1465
|
),
|
|
1385
1466
|
),
|
|
1386
1467
|
/*#__PURE__*/ React.createElement(
|
|
@@ -528,6 +528,10 @@ var AssignModal = function AssignModal(props) {
|
|
|
528
528
|
onChange: function onChange(e) {
|
|
529
529
|
debouncedAppSearch(e.target.value);
|
|
530
530
|
},
|
|
531
|
+
placeholder: getText(
|
|
532
|
+
'enterAppName',
|
|
533
|
+
props === null || props === void 0 ? void 0 : props.lang,
|
|
534
|
+
),
|
|
531
535
|
size: 'small',
|
|
532
536
|
suffix: /*#__PURE__*/ React.createElement(_Icon, {
|
|
533
537
|
type: 'zoom',
|
|
@@ -576,7 +580,7 @@ var AssignModal = function AssignModal(props) {
|
|
|
576
580
|
/*#__PURE__*/ React.createElement(_Input, {
|
|
577
581
|
size: 'small',
|
|
578
582
|
placeholder: getText(
|
|
579
|
-
'
|
|
583
|
+
'enterUserName',
|
|
580
584
|
props === null || props === void 0 ? void 0 : props.lang,
|
|
581
585
|
),
|
|
582
586
|
onChange: function onChange(e) {
|
|
@@ -34,23 +34,27 @@
|
|
|
34
34
|
> div {
|
|
35
35
|
width: 50%;
|
|
36
36
|
}
|
|
37
|
+
|
|
37
38
|
.panel-left {
|
|
38
39
|
height: 100%;
|
|
39
|
-
|
|
40
|
+
overflow: auto;
|
|
40
41
|
|
|
41
42
|
> .ant-input-affix-wrapper {
|
|
42
43
|
position: sticky;
|
|
43
44
|
top: 0px;
|
|
44
45
|
z-index: 1;
|
|
45
|
-
background: #f8f9fb;
|
|
46
|
+
// background: #f8f9fb;
|
|
46
47
|
}
|
|
47
48
|
}
|
|
49
|
+
|
|
48
50
|
.panel-right {
|
|
49
51
|
overflow: hidden;
|
|
52
|
+
|
|
50
53
|
& {
|
|
51
54
|
padding: 0 0px 16px 16px;
|
|
52
55
|
border-left: 1px solid @border-color-secondary;
|
|
53
56
|
}
|
|
57
|
+
|
|
54
58
|
.select-menu-header {
|
|
55
59
|
display: flex;
|
|
56
60
|
align-items: flex-start;
|
|
@@ -89,6 +93,7 @@
|
|
|
89
93
|
font-family: 'PingFang SC';
|
|
90
94
|
line-height: 22px;
|
|
91
95
|
}
|
|
96
|
+
|
|
92
97
|
.path-name {
|
|
93
98
|
display: inline-block;
|
|
94
99
|
color: tint(@bg-color-spotilight, 50%);
|
|
@@ -97,6 +102,7 @@
|
|
|
97
102
|
font-family: 'PingFang SC';
|
|
98
103
|
line-height: 20px;
|
|
99
104
|
}
|
|
105
|
+
|
|
100
106
|
.close-icon {
|
|
101
107
|
position: absolute;
|
|
102
108
|
top: calc(50% - 6px);
|
|
@@ -105,6 +111,7 @@
|
|
|
105
111
|
cursor: pointer;
|
|
106
112
|
}
|
|
107
113
|
}
|
|
114
|
+
|
|
108
115
|
.select-menu-list-item:hover {
|
|
109
116
|
background-color: #fff;
|
|
110
117
|
}
|
|
@@ -130,6 +137,7 @@
|
|
|
130
137
|
> label {
|
|
131
138
|
margin-bottom: 8px;
|
|
132
139
|
}
|
|
140
|
+
|
|
133
141
|
> label:last-child {
|
|
134
142
|
margin-bottom: 0px;
|
|
135
143
|
}
|
|
@@ -150,11 +158,13 @@
|
|
|
150
158
|
.slider.panel-0 {
|
|
151
159
|
transform: translateX(0);
|
|
152
160
|
}
|
|
161
|
+
|
|
153
162
|
.slider.panel-1 {
|
|
154
|
-
transform: translateX(-
|
|
163
|
+
transform: translateX(-852px);
|
|
155
164
|
}
|
|
165
|
+
|
|
156
166
|
.slider.panel-2 {
|
|
157
|
-
transform: translateX(-
|
|
167
|
+
transform: translateX(-1504px);
|
|
158
168
|
}
|
|
159
169
|
|
|
160
170
|
.menu-header {
|
|
@@ -164,26 +174,30 @@
|
|
|
164
174
|
width: 100%;
|
|
165
175
|
margin-bottom: 16px;
|
|
166
176
|
}
|
|
177
|
+
|
|
167
178
|
.title {
|
|
168
179
|
position: relative;
|
|
169
|
-
margin-left:
|
|
180
|
+
margin-left: 12px;
|
|
170
181
|
color: @text-color;
|
|
171
182
|
font-weight: 600;
|
|
172
183
|
font-style: normal;
|
|
173
184
|
line-height: 22px;
|
|
185
|
+
|
|
174
186
|
.sum {
|
|
175
187
|
display: inline-block;
|
|
176
188
|
margin: 0 4px;
|
|
177
189
|
color: @blue-6;
|
|
178
190
|
}
|
|
191
|
+
|
|
179
192
|
.text-grey {
|
|
180
193
|
color: tint(@text-color, 50%);
|
|
181
194
|
}
|
|
182
195
|
}
|
|
196
|
+
|
|
183
197
|
.title::after {
|
|
184
198
|
position: absolute;
|
|
185
199
|
top: 5px;
|
|
186
|
-
left: -
|
|
200
|
+
left: -12px;
|
|
187
201
|
display: inline-block;
|
|
188
202
|
width: 4px;
|
|
189
203
|
height: 12px;
|
|
@@ -200,6 +214,7 @@
|
|
|
200
214
|
gap: 16px;
|
|
201
215
|
height: 100%;
|
|
202
216
|
}
|
|
217
|
+
|
|
203
218
|
.panel.org-panel,
|
|
204
219
|
.panel.app-panel,
|
|
205
220
|
.panel.user-panel {
|
|
@@ -239,10 +254,12 @@
|
|
|
239
254
|
z-index: 1;
|
|
240
255
|
background: #f8f9fb;
|
|
241
256
|
}
|
|
257
|
+
|
|
242
258
|
.select-menu-list-item {
|
|
243
259
|
&:last-child {
|
|
244
260
|
margin-bottom: 0px;
|
|
245
261
|
}
|
|
262
|
+
|
|
246
263
|
margin-bottom: 8px;
|
|
247
264
|
}
|
|
248
265
|
}
|
|
@@ -282,6 +299,7 @@
|
|
|
282
299
|
padding: 0px;
|
|
283
300
|
border-radius: @border-radius-base;
|
|
284
301
|
}
|
|
302
|
+
|
|
285
303
|
&:last-child {
|
|
286
304
|
margin-bottom: 0px;
|
|
287
305
|
}
|
|
@@ -295,6 +313,7 @@
|
|
|
295
313
|
font-family: 'PingFang SC';
|
|
296
314
|
line-height: 22px;
|
|
297
315
|
}
|
|
316
|
+
|
|
298
317
|
.path-name {
|
|
299
318
|
display: inline-block;
|
|
300
319
|
height: 22px;
|
package/es/AssignModal/index.js
CHANGED
package/es/locale.js
CHANGED
|
@@ -7,15 +7,17 @@ export var zh_CN = {
|
|
|
7
7
|
allAppAvailable: '全部渠道',
|
|
8
8
|
authorizesUserList: '用户列表',
|
|
9
9
|
allUserAvailable: '全部用户',
|
|
10
|
-
search: '
|
|
10
|
+
search: '请输入机构名称',
|
|
11
11
|
availableOrgs: '可用机构',
|
|
12
12
|
availableApps: '可用渠道',
|
|
13
13
|
availableUsers: '可用用户',
|
|
14
14
|
clear: '清空',
|
|
15
15
|
hasBeenSelected: '已选',
|
|
16
|
-
numOfOrg: '%s
|
|
17
|
-
numOfApp: '%s
|
|
18
|
-
numOfUser: '%s
|
|
16
|
+
numOfOrg: '%s 个机构',
|
|
17
|
+
numOfApp: '%s 个渠道',
|
|
18
|
+
numOfUser: '%s 个用户',
|
|
19
|
+
enterAppName: '请输入渠道名称',
|
|
20
|
+
enterUserName: '请输入用户名称',
|
|
19
21
|
};
|
|
20
22
|
export var en_US = {
|
|
21
23
|
authorizesOrgList: 'Organization List',
|
|
@@ -24,7 +26,7 @@ export var en_US = {
|
|
|
24
26
|
allAppAvailable: 'All Channels',
|
|
25
27
|
authorizesUserList: 'Account List',
|
|
26
28
|
allUserAvailable: 'All Accounts',
|
|
27
|
-
search: '
|
|
29
|
+
search: 'Organization name',
|
|
28
30
|
availableOrgs: 'Available Organizations',
|
|
29
31
|
availableApps: 'Available Channels',
|
|
30
32
|
availableUsers: 'Available Users',
|
|
@@ -33,6 +35,8 @@ export var en_US = {
|
|
|
33
35
|
numOfOrg: '%s Organizations',
|
|
34
36
|
numOfApp: '%s Channels',
|
|
35
37
|
numOfUser: '%s Accounts',
|
|
38
|
+
enterAppName: 'Enter Channel name',
|
|
39
|
+
enterUserName: 'Enter Account name',
|
|
36
40
|
};
|
|
37
41
|
export var getText = function getText(key, language) {
|
|
38
42
|
var _ref;
|