box-ui-elements 23.1.0 → 23.2.0
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/dist/explorer.css +1 -1
- package/dist/explorer.js +1 -1
- package/dist/openwith.js +1 -1
- package/dist/picker.js +1 -1
- package/dist/preview.css +1 -1
- package/dist/preview.js +1 -1
- package/dist/sharing.css +1 -1
- package/dist/sharing.js +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/uploader.js +1 -1
- package/es/elements/common/content-answers/ContentAnswersOpenButton.scss +1 -1
- package/es/features/collaborator-avatars/CollaboratorList.js +5 -1
- package/es/features/collaborator-avatars/CollaboratorList.js.flow +12 -1
- package/es/features/collaborator-avatars/CollaboratorList.js.map +1 -1
- package/es/features/collaborator-avatars/CollaboratorList.scss +3 -0
- package/es/features/collaborator-avatars/CollaboratorListItem.js +26 -5
- package/es/features/collaborator-avatars/CollaboratorListItem.js.flow +33 -9
- package/es/features/collaborator-avatars/CollaboratorListItem.js.map +1 -1
- package/es/features/collaborator-avatars/CollaboratorListItem.scss +23 -0
- package/es/features/message-center/components/MessageCenter.js +1 -0
- package/es/features/message-center/components/MessageCenter.js.flow +2 -1
- package/es/features/message-center/components/MessageCenter.js.map +1 -1
- package/es/features/unified-share-modal/RemoveCollaboratorConfirmModal.js +44 -0
- package/es/features/unified-share-modal/RemoveCollaboratorConfirmModal.js.flow +67 -0
- package/es/features/unified-share-modal/RemoveCollaboratorConfirmModal.js.map +1 -0
- package/es/features/unified-share-modal/UnifiedShareForm.js +8 -3
- package/es/features/unified-share-modal/UnifiedShareForm.js.flow +5 -1
- package/es/features/unified-share-modal/UnifiedShareForm.js.map +1 -1
- package/es/features/unified-share-modal/UnifiedShareModal.js +54 -10
- package/es/features/unified-share-modal/UnifiedShareModal.js.flow +59 -11
- package/es/features/unified-share-modal/UnifiedShareModal.js.map +1 -1
- package/es/features/unified-share-modal/UnifiedShareModal.scss +9 -2
- package/es/features/unified-share-modal/flowTypes.js.flow +13 -0
- package/es/features/unified-share-modal/flowTypes.js.map +1 -1
- package/es/features/unified-share-modal/messages.js +8 -0
- package/es/features/unified-share-modal/messages.js.flow +10 -0
- package/es/features/unified-share-modal/messages.js.map +1 -1
- package/es/features/unified-share-modal/stories/UnifiedShareModal.stories.js +221 -4
- package/es/features/unified-share-modal/stories/UnifiedShareModal.stories.js.flow +208 -3
- package/es/features/unified-share-modal/stories/UnifiedShareModal.stories.js.map +1 -1
- package/es/src/elements/content-sidebar/stories/tests/MetadataSidebarRedesign-visual.stories.d.ts +4 -4
- package/i18n/bn-IN.js +2 -0
- package/i18n/bn-IN.properties +4 -0
- package/i18n/da-DK.js +2 -0
- package/i18n/da-DK.properties +4 -0
- package/i18n/de-DE.js +2 -0
- package/i18n/de-DE.properties +4 -0
- package/i18n/en-AU.js +2 -0
- package/i18n/en-AU.properties +4 -0
- package/i18n/en-CA.js +2 -0
- package/i18n/en-CA.properties +4 -0
- package/i18n/en-GB.js +2 -0
- package/i18n/en-GB.properties +4 -0
- package/i18n/en-US.js +2 -0
- package/i18n/en-US.properties +4 -0
- package/i18n/en-x-pseudo.js +1010 -1008
- package/i18n/en-x-pseudo.properties +1012 -1008
- package/i18n/es-419.js +2 -0
- package/i18n/es-419.properties +4 -0
- package/i18n/es-ES.js +2 -0
- package/i18n/es-ES.properties +4 -0
- package/i18n/fi-FI.js +2 -0
- package/i18n/fi-FI.properties +4 -0
- package/i18n/fr-CA.js +2 -0
- package/i18n/fr-CA.properties +4 -0
- package/i18n/fr-FR.js +2 -0
- package/i18n/fr-FR.properties +4 -0
- package/i18n/hi-IN.js +2 -0
- package/i18n/hi-IN.properties +4 -0
- package/i18n/it-IT.js +2 -0
- package/i18n/it-IT.properties +4 -0
- package/i18n/ja-JP.js +2 -0
- package/i18n/ja-JP.properties +4 -0
- package/i18n/ko-KR.js +2 -0
- package/i18n/ko-KR.properties +4 -0
- package/i18n/nb-NO.js +2 -0
- package/i18n/nb-NO.properties +4 -0
- package/i18n/nl-NL.js +2 -0
- package/i18n/nl-NL.properties +4 -0
- package/i18n/pl-PL.js +2 -0
- package/i18n/pl-PL.properties +4 -0
- package/i18n/pt-BR.js +2 -0
- package/i18n/pt-BR.properties +4 -0
- package/i18n/ru-RU.js +2 -0
- package/i18n/ru-RU.properties +4 -0
- package/i18n/sv-SE.js +2 -0
- package/i18n/sv-SE.properties +4 -0
- package/i18n/tr-TR.js +2 -0
- package/i18n/tr-TR.properties +4 -0
- package/i18n/zh-CN.js +2 -0
- package/i18n/zh-CN.properties +4 -0
- package/i18n/zh-TW.js +2 -0
- package/i18n/zh-TW.properties +4 -0
- package/package.json +18 -18
- package/src/elements/common/content-answers/ContentAnswersOpenButton.scss +1 -1
- package/src/features/collaborator-avatars/CollaboratorList.js +12 -1
- package/src/features/collaborator-avatars/CollaboratorList.scss +3 -0
- package/src/features/collaborator-avatars/CollaboratorListItem.js +33 -9
- package/src/features/collaborator-avatars/CollaboratorListItem.scss +23 -0
- package/src/features/collaborator-avatars/__tests__/CollaboratorList.test.js +11 -0
- package/src/features/collaborator-avatars/__tests__/CollaboratorListItem.test.js +51 -0
- package/src/features/collaborator-avatars/__tests__/__snapshots__/CollaboratorList.test.js.snap +110 -0
- package/src/features/collaborator-avatars/__tests__/__snapshots__/CollaboratorListItem.test.js.snap +310 -0
- package/src/features/message-center/__tests__/MessageCenter.integration.test.js +10 -0
- package/src/features/message-center/components/MessageCenter.js +2 -1
- package/src/features/unified-share-modal/README.md +12 -1
- package/src/features/unified-share-modal/RemoveCollaboratorConfirmModal.js +67 -0
- package/src/features/unified-share-modal/UnifiedShareForm.js +5 -1
- package/src/features/unified-share-modal/UnifiedShareModal.js +59 -11
- package/src/features/unified-share-modal/UnifiedShareModal.scss +9 -2
- package/src/features/unified-share-modal/__tests__/RemoveCollaboratorConfirmModal.test.js +64 -0
- package/src/features/unified-share-modal/__tests__/UnifiedShareForm.test.js +34 -1
- package/src/features/unified-share-modal/__tests__/UnifiedShareModal.test.js +74 -4
- package/src/features/unified-share-modal/__tests__/__snapshots__/UnifiedShareModal.test.js.snap +258 -0
- package/src/features/unified-share-modal/flowTypes.js +13 -0
- package/src/features/unified-share-modal/messages.js +10 -0
- package/src/features/unified-share-modal/stories/UnifiedShareModal.stories.js +208 -3
package/src/features/unified-share-modal/__tests__/__snapshots__/UnifiedShareModal.test.js.snap
CHANGED
|
@@ -30,6 +30,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should not rend
|
|
|
30
30
|
}
|
|
31
31
|
>
|
|
32
32
|
<UnifiedShareForm
|
|
33
|
+
canRemoveCollaborators={false}
|
|
33
34
|
classification={
|
|
34
35
|
{
|
|
35
36
|
"definition": undefined,
|
|
@@ -74,6 +75,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should not rend
|
|
|
74
75
|
"type": "file",
|
|
75
76
|
}
|
|
76
77
|
}
|
|
78
|
+
onRemoveCollaboratorClick={[Function]}
|
|
77
79
|
openConfirmModal={[Function]}
|
|
78
80
|
restrictedCollabEmails={[]}
|
|
79
81
|
restrictedGroups={[]}
|
|
@@ -126,6 +128,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should not rend
|
|
|
126
128
|
}
|
|
127
129
|
>
|
|
128
130
|
<UnifiedShareForm
|
|
131
|
+
canRemoveCollaborators={false}
|
|
129
132
|
classification={
|
|
130
133
|
{
|
|
131
134
|
"definition": undefined,
|
|
@@ -170,6 +173,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should not rend
|
|
|
170
173
|
"type": "file",
|
|
171
174
|
}
|
|
172
175
|
}
|
|
176
|
+
onRemoveCollaboratorClick={[Function]}
|
|
173
177
|
openConfirmModal={[Function]}
|
|
174
178
|
restrictedCollabEmails={[]}
|
|
175
179
|
restrictedGroups={[]}
|
|
@@ -222,6 +226,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
222
226
|
}
|
|
223
227
|
>
|
|
224
228
|
<UnifiedShareForm
|
|
229
|
+
canRemoveCollaborators={false}
|
|
225
230
|
classification={
|
|
226
231
|
{
|
|
227
232
|
"definition": undefined,
|
|
@@ -266,6 +271,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
266
271
|
"type": "file",
|
|
267
272
|
}
|
|
268
273
|
}
|
|
274
|
+
onRemoveCollaboratorClick={[Function]}
|
|
269
275
|
openConfirmModal={[Function]}
|
|
270
276
|
restrictedCollabEmails={[]}
|
|
271
277
|
restrictedGroups={[]}
|
|
@@ -321,6 +327,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
321
327
|
}
|
|
322
328
|
>
|
|
323
329
|
<UnifiedShareForm
|
|
330
|
+
canRemoveCollaborators={false}
|
|
324
331
|
classification={
|
|
325
332
|
{
|
|
326
333
|
"definition": undefined,
|
|
@@ -365,6 +372,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
365
372
|
"type": "file",
|
|
366
373
|
}
|
|
367
374
|
}
|
|
375
|
+
onRemoveCollaboratorClick={[Function]}
|
|
368
376
|
openConfirmModal={[Function]}
|
|
369
377
|
restrictedCollabEmails={[]}
|
|
370
378
|
restrictedGroups={[]}
|
|
@@ -417,6 +425,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
417
425
|
}
|
|
418
426
|
>
|
|
419
427
|
<UnifiedShareForm
|
|
428
|
+
canRemoveCollaborators={false}
|
|
420
429
|
classification={
|
|
421
430
|
{
|
|
422
431
|
"definition": undefined,
|
|
@@ -461,6 +470,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
461
470
|
"type": "file",
|
|
462
471
|
}
|
|
463
472
|
}
|
|
473
|
+
onRemoveCollaboratorClick={[Function]}
|
|
464
474
|
openConfirmModal={[Function]}
|
|
465
475
|
restrictedCollabEmails={[]}
|
|
466
476
|
restrictedGroups={[]}
|
|
@@ -512,6 +522,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
512
522
|
}
|
|
513
523
|
>
|
|
514
524
|
<UnifiedShareForm
|
|
525
|
+
canRemoveCollaborators={false}
|
|
515
526
|
classification={
|
|
516
527
|
{
|
|
517
528
|
"definition": undefined,
|
|
@@ -556,6 +567,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
556
567
|
"type": "file",
|
|
557
568
|
}
|
|
558
569
|
}
|
|
570
|
+
onRemoveCollaboratorClick={[Function]}
|
|
559
571
|
openConfirmModal={[Function]}
|
|
560
572
|
restrictedCollabEmails={[]}
|
|
561
573
|
restrictedGroups={[]}
|
|
@@ -608,6 +620,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
608
620
|
>
|
|
609
621
|
<UnifiedShareForm
|
|
610
622
|
canInvite={false}
|
|
623
|
+
canRemoveCollaborators={false}
|
|
611
624
|
classification={
|
|
612
625
|
{
|
|
613
626
|
"definition": undefined,
|
|
@@ -652,6 +665,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
652
665
|
"type": "web_link",
|
|
653
666
|
}
|
|
654
667
|
}
|
|
668
|
+
onRemoveCollaboratorClick={[Function]}
|
|
655
669
|
openConfirmModal={[Function]}
|
|
656
670
|
restrictedCollabEmails={[]}
|
|
657
671
|
restrictedGroups={[]}
|
|
@@ -704,6 +718,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
704
718
|
>
|
|
705
719
|
<UnifiedShareForm
|
|
706
720
|
canInvite={false}
|
|
721
|
+
canRemoveCollaborators={false}
|
|
707
722
|
classification={
|
|
708
723
|
{
|
|
709
724
|
"definition": undefined,
|
|
@@ -748,6 +763,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
748
763
|
"type": "folder",
|
|
749
764
|
}
|
|
750
765
|
}
|
|
766
|
+
onRemoveCollaboratorClick={[Function]}
|
|
751
767
|
openConfirmModal={[Function]}
|
|
752
768
|
restrictedCollabEmails={[]}
|
|
753
769
|
restrictedGroups={[]}
|
|
@@ -800,6 +816,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
800
816
|
>
|
|
801
817
|
<UnifiedShareForm
|
|
802
818
|
canInvite={true}
|
|
819
|
+
canRemoveCollaborators={false}
|
|
803
820
|
classification={
|
|
804
821
|
{
|
|
805
822
|
"definition": undefined,
|
|
@@ -844,6 +861,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
844
861
|
"type": "file",
|
|
845
862
|
}
|
|
846
863
|
}
|
|
864
|
+
onRemoveCollaboratorClick={[Function]}
|
|
847
865
|
openConfirmModal={[Function]}
|
|
848
866
|
restrictedCollabEmails={[]}
|
|
849
867
|
restrictedGroups={[]}
|
|
@@ -896,6 +914,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
896
914
|
>
|
|
897
915
|
<UnifiedShareForm
|
|
898
916
|
canInvite={true}
|
|
917
|
+
canRemoveCollaborators={false}
|
|
899
918
|
classification={
|
|
900
919
|
{
|
|
901
920
|
"definition": undefined,
|
|
@@ -940,6 +959,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
940
959
|
"type": "file",
|
|
941
960
|
}
|
|
942
961
|
}
|
|
962
|
+
onRemoveCollaboratorClick={[Function]}
|
|
943
963
|
openConfirmModal={[Function]}
|
|
944
964
|
restrictedCollabEmails={[]}
|
|
945
965
|
restrictedGroups={[]}
|
|
@@ -991,6 +1011,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
991
1011
|
}
|
|
992
1012
|
>
|
|
993
1013
|
<UnifiedShareForm
|
|
1014
|
+
canRemoveCollaborators={false}
|
|
994
1015
|
classification={
|
|
995
1016
|
{
|
|
996
1017
|
"definition": undefined,
|
|
@@ -1044,6 +1065,116 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1044
1065
|
"type": "file",
|
|
1045
1066
|
}
|
|
1046
1067
|
}
|
|
1068
|
+
onRemoveCollaboratorClick={[Function]}
|
|
1069
|
+
openConfirmModal={[Function]}
|
|
1070
|
+
restrictedCollabEmails={[]}
|
|
1071
|
+
restrictedGroups={[]}
|
|
1072
|
+
sharedLink={{}}
|
|
1073
|
+
sharedLinkLoaded={false}
|
|
1074
|
+
shouldRenderFTUXTooltip={false}
|
|
1075
|
+
trackingProps={
|
|
1076
|
+
{
|
|
1077
|
+
"inviteCollabTracking": {},
|
|
1078
|
+
"inviteCollabsEmailTracking": {},
|
|
1079
|
+
"modalTracking": {},
|
|
1080
|
+
"removeLinkConfirmModalTracking": {},
|
|
1081
|
+
"sharedLinkEmailTracking": {},
|
|
1082
|
+
"sharedLinkTracking": {},
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
/>
|
|
1086
|
+
</Modal>
|
|
1087
|
+
</Fragment>
|
|
1088
|
+
`;
|
|
1089
|
+
|
|
1090
|
+
exports[`features/unified-share-modal/UnifiedShareModal render() should render a default component with collaborator list when showCollaboratorList state is true 1`] = `
|
|
1091
|
+
<Fragment>
|
|
1092
|
+
<Modal
|
|
1093
|
+
className="be-modal unified-share-modal"
|
|
1094
|
+
focusElementSelector=".toggle-simple"
|
|
1095
|
+
style={
|
|
1096
|
+
{
|
|
1097
|
+
"backdrop": {},
|
|
1098
|
+
"dialog": {},
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
title={
|
|
1102
|
+
<UnifiedShareModalTitle
|
|
1103
|
+
isEmailLinkSectionExpanded={false}
|
|
1104
|
+
item={
|
|
1105
|
+
{
|
|
1106
|
+
"grantedPermissions": {
|
|
1107
|
+
"itemShare": true,
|
|
1108
|
+
},
|
|
1109
|
+
"hideCollaborators": false,
|
|
1110
|
+
"id": "111",
|
|
1111
|
+
"name": "test file",
|
|
1112
|
+
"type": "file",
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
showCollaboratorList={true}
|
|
1116
|
+
/>
|
|
1117
|
+
}
|
|
1118
|
+
>
|
|
1119
|
+
<UnifiedShareForm
|
|
1120
|
+
canRemoveCollaborators={true}
|
|
1121
|
+
classification={
|
|
1122
|
+
{
|
|
1123
|
+
"definition": undefined,
|
|
1124
|
+
"name": undefined,
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
collaborationRestrictionWarning=""
|
|
1128
|
+
collaboratorsList={
|
|
1129
|
+
{
|
|
1130
|
+
"collaborators": [
|
|
1131
|
+
{
|
|
1132
|
+
"hasCustomAvatar": false,
|
|
1133
|
+
"isRemovable": false,
|
|
1134
|
+
"name": "test a",
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
"hasCustomAvatar": false,
|
|
1138
|
+
"isRemovable": true,
|
|
1139
|
+
"name": "test b",
|
|
1140
|
+
},
|
|
1141
|
+
],
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
createSharedLinkOnLoad={false}
|
|
1145
|
+
displayInModal={true}
|
|
1146
|
+
focusSharedLinkOnLoad={false}
|
|
1147
|
+
getInitialData={[MockFunction]}
|
|
1148
|
+
handleFtuxCloseClick={[Function]}
|
|
1149
|
+
initiallySelectedContacts={[]}
|
|
1150
|
+
intl={
|
|
1151
|
+
{
|
|
1152
|
+
"formatMessage": [MockFunction],
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
inviteePermissions={
|
|
1156
|
+
[
|
|
1157
|
+
{
|
|
1158
|
+
"text": "Editor",
|
|
1159
|
+
"value": "Editor",
|
|
1160
|
+
},
|
|
1161
|
+
]
|
|
1162
|
+
}
|
|
1163
|
+
isAllowEditSharedLinkForFileEnabled={false}
|
|
1164
|
+
isFetching={true}
|
|
1165
|
+
item={
|
|
1166
|
+
{
|
|
1167
|
+
"grantedPermissions": {
|
|
1168
|
+
"itemShare": true,
|
|
1169
|
+
},
|
|
1170
|
+
"hideCollaborators": false,
|
|
1171
|
+
"id": "111",
|
|
1172
|
+
"name": "test file",
|
|
1173
|
+
"type": "file",
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
onRemoveCollaborator={[MockFunction]}
|
|
1177
|
+
onRemoveCollaboratorClick={[Function]}
|
|
1047
1178
|
openConfirmModal={[Function]}
|
|
1048
1179
|
restrictedCollabEmails={[]}
|
|
1049
1180
|
restrictedGroups={[]}
|
|
@@ -1096,6 +1227,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1096
1227
|
}
|
|
1097
1228
|
>
|
|
1098
1229
|
<UnifiedShareForm
|
|
1230
|
+
canRemoveCollaborators={false}
|
|
1099
1231
|
classification={
|
|
1100
1232
|
{
|
|
1101
1233
|
"definition": undefined,
|
|
@@ -1140,6 +1272,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1140
1272
|
"type": "file",
|
|
1141
1273
|
}
|
|
1142
1274
|
}
|
|
1275
|
+
onRemoveCollaboratorClick={[Function]}
|
|
1143
1276
|
openConfirmModal={[Function]}
|
|
1144
1277
|
restrictedCollabEmails={[]}
|
|
1145
1278
|
restrictedGroups={[]}
|
|
@@ -1166,6 +1299,121 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1166
1299
|
</Fragment>
|
|
1167
1300
|
`;
|
|
1168
1301
|
|
|
1302
|
+
exports[`features/unified-share-modal/UnifiedShareModal render() should render a default component with confirm remove collaborator modal open 1`] = `
|
|
1303
|
+
<Fragment>
|
|
1304
|
+
<Modal
|
|
1305
|
+
className="be-modal unified-share-modal"
|
|
1306
|
+
focusElementSelector=".toggle-simple"
|
|
1307
|
+
isOpen={false}
|
|
1308
|
+
style={
|
|
1309
|
+
{
|
|
1310
|
+
"backdrop": {},
|
|
1311
|
+
"dialog": {},
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
title={
|
|
1315
|
+
<UnifiedShareModalTitle
|
|
1316
|
+
isEmailLinkSectionExpanded={false}
|
|
1317
|
+
item={
|
|
1318
|
+
{
|
|
1319
|
+
"grantedPermissions": {
|
|
1320
|
+
"itemShare": true,
|
|
1321
|
+
},
|
|
1322
|
+
"hideCollaborators": false,
|
|
1323
|
+
"id": "111",
|
|
1324
|
+
"name": "test file",
|
|
1325
|
+
"type": "file",
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
showCollaboratorList={false}
|
|
1329
|
+
/>
|
|
1330
|
+
}
|
|
1331
|
+
>
|
|
1332
|
+
<UnifiedShareForm
|
|
1333
|
+
canRemoveCollaborators={true}
|
|
1334
|
+
classification={
|
|
1335
|
+
{
|
|
1336
|
+
"definition": undefined,
|
|
1337
|
+
"name": undefined,
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
collaborationRestrictionWarning=""
|
|
1341
|
+
collaboratorsList={
|
|
1342
|
+
{
|
|
1343
|
+
"collaborators": [],
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
createSharedLinkOnLoad={false}
|
|
1347
|
+
displayInModal={true}
|
|
1348
|
+
focusSharedLinkOnLoad={false}
|
|
1349
|
+
getInitialData={[MockFunction]}
|
|
1350
|
+
handleFtuxCloseClick={[Function]}
|
|
1351
|
+
initiallySelectedContacts={[]}
|
|
1352
|
+
intl={
|
|
1353
|
+
{
|
|
1354
|
+
"formatMessage": [MockFunction],
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
inviteePermissions={
|
|
1358
|
+
[
|
|
1359
|
+
{
|
|
1360
|
+
"text": "Editor",
|
|
1361
|
+
"value": "Editor",
|
|
1362
|
+
},
|
|
1363
|
+
]
|
|
1364
|
+
}
|
|
1365
|
+
isAllowEditSharedLinkForFileEnabled={false}
|
|
1366
|
+
isFetching={false}
|
|
1367
|
+
item={
|
|
1368
|
+
{
|
|
1369
|
+
"grantedPermissions": {
|
|
1370
|
+
"itemShare": true,
|
|
1371
|
+
},
|
|
1372
|
+
"hideCollaborators": false,
|
|
1373
|
+
"id": "111",
|
|
1374
|
+
"name": "test file",
|
|
1375
|
+
"type": "file",
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
onRemoveCollaborator={[MockFunction]}
|
|
1379
|
+
onRemoveCollaboratorClick={[Function]}
|
|
1380
|
+
openConfirmModal={[Function]}
|
|
1381
|
+
restrictedCollabEmails={[]}
|
|
1382
|
+
restrictedGroups={[]}
|
|
1383
|
+
sharedLink={{}}
|
|
1384
|
+
sharedLinkLoaded={false}
|
|
1385
|
+
shouldRenderFTUXTooltip={false}
|
|
1386
|
+
trackingProps={
|
|
1387
|
+
{
|
|
1388
|
+
"inviteCollabTracking": {},
|
|
1389
|
+
"inviteCollabsEmailTracking": {},
|
|
1390
|
+
"modalTracking": {},
|
|
1391
|
+
"removeLinkConfirmModalTracking": {},
|
|
1392
|
+
"sharedLinkEmailTracking": {},
|
|
1393
|
+
"sharedLinkTracking": {},
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
/>
|
|
1397
|
+
</Modal>
|
|
1398
|
+
<RemoveCollaboratorConfirmModal
|
|
1399
|
+
collaborator={
|
|
1400
|
+
{
|
|
1401
|
+
"hasCustomAvatar": false,
|
|
1402
|
+
"name": "Collaborator a",
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
isOpen={true}
|
|
1406
|
+
modalProps={
|
|
1407
|
+
{
|
|
1408
|
+
"className": "remove-collaborator-confirm-modal",
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
onRequestClose={[Function]}
|
|
1412
|
+
onSubmit={[Function]}
|
|
1413
|
+
/>
|
|
1414
|
+
</Fragment>
|
|
1415
|
+
`;
|
|
1416
|
+
|
|
1169
1417
|
exports[`features/unified-share-modal/UnifiedShareModal render() should render a default component with correct Focus element and props when focusSharedLinkOnLoad is enabled 1`] = `
|
|
1170
1418
|
<Fragment>
|
|
1171
1419
|
<Modal
|
|
@@ -1196,6 +1444,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1196
1444
|
}
|
|
1197
1445
|
>
|
|
1198
1446
|
<UnifiedShareForm
|
|
1447
|
+
canRemoveCollaborators={false}
|
|
1199
1448
|
classification={
|
|
1200
1449
|
{
|
|
1201
1450
|
"definition": undefined,
|
|
@@ -1240,6 +1489,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1240
1489
|
"type": "file",
|
|
1241
1490
|
}
|
|
1242
1491
|
}
|
|
1492
|
+
onRemoveCollaboratorClick={[Function]}
|
|
1243
1493
|
openConfirmModal={[Function]}
|
|
1244
1494
|
restrictedCollabEmails={[]}
|
|
1245
1495
|
restrictedGroups={[]}
|
|
@@ -1295,6 +1545,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1295
1545
|
}
|
|
1296
1546
|
>
|
|
1297
1547
|
<UnifiedShareForm
|
|
1548
|
+
canRemoveCollaborators={false}
|
|
1298
1549
|
classification={
|
|
1299
1550
|
{
|
|
1300
1551
|
"definition": undefined,
|
|
@@ -1339,6 +1590,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1339
1590
|
"type": "file",
|
|
1340
1591
|
}
|
|
1341
1592
|
}
|
|
1593
|
+
onRemoveCollaboratorClick={[Function]}
|
|
1342
1594
|
openConfirmModal={[Function]}
|
|
1343
1595
|
restrictedCollabEmails={[]}
|
|
1344
1596
|
restrictedGroups={[]}
|
|
@@ -1391,6 +1643,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1391
1643
|
>
|
|
1392
1644
|
<UnifiedShareForm
|
|
1393
1645
|
canInvite={true}
|
|
1646
|
+
canRemoveCollaborators={false}
|
|
1394
1647
|
classification={
|
|
1395
1648
|
{
|
|
1396
1649
|
"definition": undefined,
|
|
@@ -1432,6 +1685,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1432
1685
|
"type": "file",
|
|
1433
1686
|
}
|
|
1434
1687
|
}
|
|
1688
|
+
onRemoveCollaboratorClick={[Function]}
|
|
1435
1689
|
openConfirmModal={[Function]}
|
|
1436
1690
|
restrictedCollabEmails={[]}
|
|
1437
1691
|
restrictedGroups={[]}
|
|
@@ -1485,6 +1739,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1485
1739
|
>
|
|
1486
1740
|
<UnifiedShareForm
|
|
1487
1741
|
canInvite={true}
|
|
1742
|
+
canRemoveCollaborators={false}
|
|
1488
1743
|
classification={
|
|
1489
1744
|
{
|
|
1490
1745
|
"definition": undefined,
|
|
@@ -1529,6 +1784,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1529
1784
|
"type": "file",
|
|
1530
1785
|
}
|
|
1531
1786
|
}
|
|
1787
|
+
onRemoveCollaboratorClick={[Function]}
|
|
1532
1788
|
openConfirmModal={[Function]}
|
|
1533
1789
|
restrictedCollabEmails={[]}
|
|
1534
1790
|
restrictedGroups={[]}
|
|
@@ -1586,6 +1842,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1586
1842
|
>
|
|
1587
1843
|
<UnifiedShareForm
|
|
1588
1844
|
canInvite={true}
|
|
1845
|
+
canRemoveCollaborators={false}
|
|
1589
1846
|
classification={
|
|
1590
1847
|
{
|
|
1591
1848
|
"definition": undefined,
|
|
@@ -1630,6 +1887,7 @@ exports[`features/unified-share-modal/UnifiedShareModal render() should render a
|
|
|
1630
1887
|
"type": "file",
|
|
1631
1888
|
}
|
|
1632
1889
|
}
|
|
1890
|
+
onRemoveCollaboratorClick={[Function]}
|
|
1633
1891
|
openConfirmModal={[Function]}
|
|
1634
1892
|
restrictedCollabEmails={[]}
|
|
1635
1893
|
restrictedGroups={[]}
|
|
@@ -149,6 +149,12 @@ export type trackingPropsType = {
|
|
|
149
149
|
okayButtonProps?: Object,
|
|
150
150
|
onLoad?: Function,
|
|
151
151
|
},
|
|
152
|
+
removeCollaboratorConfirmModalTracking: {
|
|
153
|
+
cancelButtonProps?: Object,
|
|
154
|
+
modalProps?: Object,
|
|
155
|
+
okayButtonProps?: Object,
|
|
156
|
+
onLoad?: Function,
|
|
157
|
+
},
|
|
152
158
|
sharedLinkEmailTracking: emailFormTrackingType,
|
|
153
159
|
sharedLinkTracking: sharedLinkTrackingType,
|
|
154
160
|
};
|
|
@@ -180,6 +186,7 @@ export type collaboratorType = {
|
|
|
180
186
|
hasCustomAvatar: boolean,
|
|
181
187
|
imageURL: ?string,
|
|
182
188
|
isExternalCollab?: boolean,
|
|
189
|
+
isRemovable?: boolean,
|
|
183
190
|
name: string,
|
|
184
191
|
type: collaboratorGroupType,
|
|
185
192
|
userID: ?number,
|
|
@@ -300,10 +307,14 @@ type SharedLinkSectionTypes = {
|
|
|
300
307
|
|
|
301
308
|
// Prop types used in the collaborator avatars section of the Unified Share Form
|
|
302
309
|
type CollaboratorAvatarsTypes = {
|
|
310
|
+
/** Flag to control the ability to remove collaborators directly within the modal */
|
|
311
|
+
canRemoveCollaborators?: boolean,
|
|
303
312
|
/** List of existing collaborators */
|
|
304
313
|
collaboratorsList?: collaboratorsListType,
|
|
305
314
|
/** User ID of currently logged in user */
|
|
306
315
|
currentUserID: string,
|
|
316
|
+
/** An action triggered when a user confirms the removal of a collaborator */
|
|
317
|
+
onRemoveCollaborator?: (collaborator: collaboratorType) => Promise<void>,
|
|
307
318
|
};
|
|
308
319
|
|
|
309
320
|
type EmailFormTypes = {
|
|
@@ -406,6 +417,8 @@ export type USFProps = BaseUnifiedShareProps & {
|
|
|
406
417
|
openConfirmModal: () => void,
|
|
407
418
|
/** Function for opening the Upgrade Plan Modal */
|
|
408
419
|
openUpgradePlanModal: () => void,
|
|
420
|
+
/** An action triggered when the remove collaborator button is clicked */
|
|
421
|
+
onRemoveCollaboratorClick?: (collaborator: collaboratorType) => void,
|
|
409
422
|
/** Whether the FTUX tag should be rendered for the Can Edit option */
|
|
410
423
|
sharedLinkEditTagTargetingApi?: TargetingApi,
|
|
411
424
|
/** Whether the FTUX tooltip should be rendered for Editable Shared Links */
|
|
@@ -171,12 +171,22 @@ const messages = defineMessages({
|
|
|
171
171
|
description: 'Label for confirmation modal to remove a shared link (title-case)',
|
|
172
172
|
id: 'boxui.unifiedShare.removeLinkConfirmationTitle',
|
|
173
173
|
},
|
|
174
|
+
removeCollaboratorConfirmationTitle: {
|
|
175
|
+
defaultMessage: 'Remove Collaborator',
|
|
176
|
+
description: 'Label for confirmation modal to remove a collaborator (title-case)',
|
|
177
|
+
id: 'boxui.unifiedShare.removeCollaboratorConfirmationTitle',
|
|
178
|
+
},
|
|
174
179
|
removeLinkConfirmationDescription: {
|
|
175
180
|
defaultMessage:
|
|
176
181
|
'This will permanently remove the shared link. If this item is embedded on other sites it will also become inaccessible. Any custom properties, settings and expirations will be removed as well. Do you want to continue?',
|
|
177
182
|
description: 'Description for confirmation modal to remove a shared link',
|
|
178
183
|
id: 'boxui.unifiedShare.removeLinkConfirmationDescription',
|
|
179
184
|
},
|
|
185
|
+
removeCollaboratorConfirmationDescription: {
|
|
186
|
+
defaultMessage: 'Are you sure you want to remove {name} as a collaborator?',
|
|
187
|
+
description: 'Description for confirmation modal to remove a collaborator',
|
|
188
|
+
id: 'boxui.unifiedShare.removeCollaboratorConfirmationDescription',
|
|
189
|
+
},
|
|
180
190
|
removeLinkTooltip: {
|
|
181
191
|
defaultMessage: 'You do not have permission to remove the link.',
|
|
182
192
|
description: 'Tooltip description for not having access to remove link',
|