@box/unified-share-modal 0.45.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.
- package/LICENSE +379 -0
- package/README.md +57 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/lib/components/index.js +8 -0
- package/dist/esm/lib/components/remove-shared-link-modal/index.js +4 -0
- package/dist/esm/lib/components/remove-shared-link-modal/messages.js +30 -0
- package/dist/esm/lib/components/remove-shared-link-modal/remove-shared-link-modal.js +59 -0
- package/dist/esm/lib/components/shared-link-settings-modal/index.js +4 -0
- package/dist/esm/lib/components/shared-link-settings-modal/messages.js +106 -0
- package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings-modal.js +181 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-role.js +89 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-section.js +108 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/index.js +4 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/messages.js +90 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/shared-with-avatars.js +58 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/text-area-container.js +58 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaborators-view/collaborator-avatar.js +65 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaborators-view/collaborator-list-item.js +64 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaborators-view/collaborators-view.js +85 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaborators-view/index.js +4 -0
- package/dist/esm/lib/components/unified-share-form-modal/collaborators-view/messages.js +38 -0
- package/dist/esm/lib/components/unified-share-form-modal/index.js +4 -0
- package/dist/esm/lib/components/unified-share-form-modal/messages.js +50 -0
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/index.js +4 -0
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/messages.js +98 -0
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-access.js +86 -0
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-permission.js +19 -0
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-section.js +144 -0
- package/dist/esm/lib/components/unified-share-form-modal/unified-share-form-modal.js +72 -0
- package/dist/esm/lib/components/unified-share-form-modal/unified-share-form.js +29 -0
- package/dist/esm/lib/constants.js +25 -0
- package/dist/esm/lib/contexts/index.js +9 -0
- package/dist/esm/lib/contexts/unified-share-form-context.js +40 -0
- package/dist/esm/lib/contexts/unified-share-modal-context.js +11 -0
- package/dist/esm/lib/hooks/index.js +12 -0
- package/dist/esm/lib/hooks/use-access-levels.js +51 -0
- package/dist/esm/lib/hooks/use-collaboration-form.js +70 -0
- package/dist/esm/lib/hooks/use-form-validation.js +31 -0
- package/dist/esm/lib/hooks/use-link-settings-form.js +60 -0
- package/dist/esm/lib/hooks/use-sharing-action.js +71 -0
- package/dist/esm/lib/messages.js +70 -0
- package/dist/esm/lib/store.js +30 -0
- package/dist/esm/lib/unified-share-modal.js +65 -0
- package/dist/esm/lib/utils/collaborator.js +26 -0
- package/dist/esm/lib/utils/date.js +14 -0
- package/dist/esm/lib/utils/event.js +14 -0
- package/dist/esm/lib/utils/index.js +19 -0
- package/dist/esm/lib/utils/permission.js +14 -0
- package/dist/esm/lib/utils/validation.js +5 -0
- package/dist/i18n/bn-IN.js +157 -0
- package/dist/i18n/bn-IN.properties +290 -0
- package/dist/i18n/da-DK.js +157 -0
- package/dist/i18n/da-DK.properties +290 -0
- package/dist/i18n/de-DE.js +157 -0
- package/dist/i18n/de-DE.properties +290 -0
- package/dist/i18n/en-AU.js +157 -0
- package/dist/i18n/en-AU.properties +290 -0
- package/dist/i18n/en-CA.js +157 -0
- package/dist/i18n/en-CA.properties +290 -0
- package/dist/i18n/en-GB.js +157 -0
- package/dist/i18n/en-GB.properties +290 -0
- package/dist/i18n/en-US.js +111 -0
- package/dist/i18n/en-US.properties +218 -0
- package/dist/i18n/en-x-pseudo.js +157 -0
- package/dist/i18n/en-x-pseudo.properties +290 -0
- package/dist/i18n/es-419.js +157 -0
- package/dist/i18n/es-419.properties +290 -0
- package/dist/i18n/es-ES.js +157 -0
- package/dist/i18n/es-ES.properties +290 -0
- package/dist/i18n/fi-FI.js +157 -0
- package/dist/i18n/fi-FI.properties +290 -0
- package/dist/i18n/fr-CA.js +157 -0
- package/dist/i18n/fr-CA.properties +290 -0
- package/dist/i18n/fr-FR.js +157 -0
- package/dist/i18n/fr-FR.properties +290 -0
- package/dist/i18n/hi-IN.js +157 -0
- package/dist/i18n/hi-IN.properties +290 -0
- package/dist/i18n/it-IT.js +157 -0
- package/dist/i18n/it-IT.properties +290 -0
- package/dist/i18n/ja-JP.js +157 -0
- package/dist/i18n/ja-JP.properties +290 -0
- package/dist/i18n/json/src/lib/components/remove-shared-link-modal/messages.json +1 -0
- package/dist/i18n/json/src/lib/components/shared-link-settings-modal/messages.json +1 -0
- package/dist/i18n/json/src/lib/components/unified-share-form-modal/collaboration-section/messages.json +1 -0
- package/dist/i18n/json/src/lib/components/unified-share-form-modal/collaborators-view/messages.json +1 -0
- package/dist/i18n/json/src/lib/components/unified-share-form-modal/messages.json +1 -0
- package/dist/i18n/json/src/lib/components/unified-share-form-modal/shared-link-section/messages.json +1 -0
- package/dist/i18n/json/src/lib/messages.json +1 -0
- package/dist/i18n/ko-KR.js +157 -0
- package/dist/i18n/ko-KR.properties +290 -0
- package/dist/i18n/nb-NO.js +157 -0
- package/dist/i18n/nb-NO.properties +290 -0
- package/dist/i18n/nl-NL.js +157 -0
- package/dist/i18n/nl-NL.properties +290 -0
- package/dist/i18n/pl-PL.js +157 -0
- package/dist/i18n/pl-PL.properties +290 -0
- package/dist/i18n/pt-BR.js +157 -0
- package/dist/i18n/pt-BR.properties +290 -0
- package/dist/i18n/ru-RU.js +157 -0
- package/dist/i18n/ru-RU.properties +290 -0
- package/dist/i18n/sv-SE.js +157 -0
- package/dist/i18n/sv-SE.properties +290 -0
- package/dist/i18n/tr-TR.js +157 -0
- package/dist/i18n/tr-TR.properties +290 -0
- package/dist/i18n/zh-CN.js +157 -0
- package/dist/i18n/zh-CN.properties +290 -0
- package/dist/i18n/zh-TW.js +157 -0
- package/dist/i18n/zh-TW.properties +290 -0
- package/dist/styles/collaboration-role.css +1 -0
- package/dist/styles/collaboration-section.css +1 -0
- package/dist/styles/collaborator-avatar.css +1 -0
- package/dist/styles/collaborator-list-item.css +1 -0
- package/dist/styles/collaborators-view.css +1 -0
- package/dist/styles/remove-shared-link-modal.css +1 -0
- package/dist/styles/shared-link-access.css +1 -0
- package/dist/styles/shared-link-permission.css +1 -0
- package/dist/styles/shared-link-section.css +1 -0
- package/dist/styles/shared-link-settings-modal.css +1 -0
- package/dist/styles/shared-with-avatars.css +1 -0
- package/dist/styles/text-area-container.css +1 -0
- package/dist/styles/unified-share-form-modal.css +1 -0
- package/dist/styles/unified-share-form.css +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/components/index.d.ts +3 -0
- package/dist/types/lib/components/remove-shared-link-modal/index.d.ts +1 -0
- package/dist/types/lib/components/remove-shared-link-modal/messages.d.ts +33 -0
- package/dist/types/lib/components/remove-shared-link-modal/remove-shared-link-modal.d.ts +5 -0
- package/dist/types/lib/components/remove-shared-link-modal/stories/shared.d.ts +3 -0
- package/dist/types/lib/components/shared-link-settings-modal/index.d.ts +1 -0
- package/dist/types/lib/components/shared-link-settings-modal/messages.d.ts +123 -0
- package/dist/types/lib/components/shared-link-settings-modal/shared-link-settings-modal.d.ts +5 -0
- package/dist/types/lib/components/shared-link-settings-modal/stories/shared.d.ts +36 -0
- package/dist/types/lib/components/unified-share-form-modal/collaboration-section/collaboration-role.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/collaboration-section/collaboration-section.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/collaboration-section/index.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/collaboration-section/messages.d.ts +108 -0
- package/dist/types/lib/components/unified-share-form-modal/collaboration-section/shared-with-avatars.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/collaboration-section/text-area-container.d.ts +3 -0
- package/dist/types/lib/components/unified-share-form-modal/collaborators-view/collaborator-avatar.d.ts +8 -0
- package/dist/types/lib/components/unified-share-form-modal/collaborators-view/collaborator-list-item.d.ts +5 -0
- package/dist/types/lib/components/unified-share-form-modal/collaborators-view/collaborators-view.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/collaborators-view/index.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/collaborators-view/messages.d.ts +43 -0
- package/dist/types/lib/components/unified-share-form-modal/index.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/messages.d.ts +58 -0
- package/dist/types/lib/components/unified-share-form-modal/shared-link-section/index.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/shared-link-section/messages.d.ts +118 -0
- package/dist/types/lib/components/unified-share-form-modal/shared-link-section/shared-link-access.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/shared-link-section/shared-link-permission.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/shared-link-section/shared-link-section.d.ts +1 -0
- package/dist/types/lib/components/unified-share-form-modal/stories/shared.d.ts +15 -0
- package/dist/types/lib/components/unified-share-form-modal/unified-share-form-modal.d.ts +9 -0
- package/dist/types/lib/components/unified-share-form-modal/unified-share-form.d.ts +1 -0
- package/dist/types/lib/constants.d.ts +7 -0
- package/dist/types/lib/contexts/index.d.ts +2 -0
- package/dist/types/lib/contexts/unified-share-form-context.d.ts +25 -0
- package/dist/types/lib/contexts/unified-share-modal-context.d.ts +16 -0
- package/dist/types/lib/hooks/index.d.ts +5 -0
- package/dist/types/lib/hooks/use-access-levels.d.ts +6 -0
- package/dist/types/lib/hooks/use-collaboration-form.d.ts +10 -0
- package/dist/types/lib/hooks/use-form-validation.d.ts +18 -0
- package/dist/types/lib/hooks/use-link-settings-form.d.ts +10 -0
- package/dist/types/lib/hooks/use-sharing-action.d.ts +7 -0
- package/dist/types/lib/messages.d.ts +83 -0
- package/dist/types/lib/store.d.ts +21 -0
- package/dist/types/lib/stories/shared.d.ts +22 -0
- package/dist/types/lib/types.d.ts +387 -0
- package/dist/types/lib/unified-share-modal.d.ts +20 -0
- package/dist/types/lib/utils/collaborator.d.ts +8 -0
- package/dist/types/lib/utils/date.d.ts +3 -0
- package/dist/types/lib/utils/event.d.ts +13 -0
- package/dist/types/lib/utils/index.d.ts +5 -0
- package/dist/types/lib/utils/permission.d.ts +3 -0
- package/dist/types/lib/utils/validation.d.ts +2 -0
- package/package.json +54 -0
package/dist/types/lib/components/unified-share-form-modal/collaboration-section/messages.d.ts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
cancelButton: {
|
|
3
|
+
defaultMessage: string;
|
|
4
|
+
description: string;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
closeButton: {
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
description: string;
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
clearButton: {
|
|
13
|
+
defaultMessage: string;
|
|
14
|
+
description: string;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
sendButton: {
|
|
18
|
+
defaultMessage: string;
|
|
19
|
+
description: string;
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
loadingLabel: {
|
|
23
|
+
defaultMessage: string;
|
|
24
|
+
description: string;
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
invitePeopleLabel: {
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
description: string;
|
|
30
|
+
id: string;
|
|
31
|
+
};
|
|
32
|
+
invitePeoplePlaceholder: {
|
|
33
|
+
defaultMessage: string;
|
|
34
|
+
description: string;
|
|
35
|
+
id: string;
|
|
36
|
+
};
|
|
37
|
+
emailSharedLinkLabel: {
|
|
38
|
+
defaultMessage: string;
|
|
39
|
+
description: string;
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
42
|
+
inviteAsRoleLabel: {
|
|
43
|
+
defaultMessage: string;
|
|
44
|
+
description: string;
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
sharedWithLabel: {
|
|
48
|
+
defaultMessage: string;
|
|
49
|
+
description: string;
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
shareMessageLabel: {
|
|
53
|
+
defaultMessage: string;
|
|
54
|
+
description: string;
|
|
55
|
+
id: string;
|
|
56
|
+
};
|
|
57
|
+
shareMessagePlaceholder: {
|
|
58
|
+
defaultMessage: string;
|
|
59
|
+
description: string;
|
|
60
|
+
id: string;
|
|
61
|
+
};
|
|
62
|
+
shareMessageCharacterCountAriaLabel: {
|
|
63
|
+
defaultMessage: string;
|
|
64
|
+
description: string;
|
|
65
|
+
id: string;
|
|
66
|
+
};
|
|
67
|
+
coOwnerDescription: {
|
|
68
|
+
defaultMessage: string;
|
|
69
|
+
description: string;
|
|
70
|
+
id: string;
|
|
71
|
+
};
|
|
72
|
+
editorDescription: {
|
|
73
|
+
defaultMessage: string;
|
|
74
|
+
description: string;
|
|
75
|
+
id: string;
|
|
76
|
+
};
|
|
77
|
+
editorFolderDescription: {
|
|
78
|
+
defaultMessage: string;
|
|
79
|
+
description: string;
|
|
80
|
+
id: string;
|
|
81
|
+
};
|
|
82
|
+
viewerUploaderDescription: {
|
|
83
|
+
defaultMessage: string;
|
|
84
|
+
description: string;
|
|
85
|
+
id: string;
|
|
86
|
+
};
|
|
87
|
+
previewerUploaderDescription: {
|
|
88
|
+
defaultMessage: string;
|
|
89
|
+
description: string;
|
|
90
|
+
id: string;
|
|
91
|
+
};
|
|
92
|
+
viewerDescription: {
|
|
93
|
+
defaultMessage: string;
|
|
94
|
+
description: string;
|
|
95
|
+
id: string;
|
|
96
|
+
};
|
|
97
|
+
previewerDescription: {
|
|
98
|
+
defaultMessage: string;
|
|
99
|
+
description: string;
|
|
100
|
+
id: string;
|
|
101
|
+
};
|
|
102
|
+
uploaderDescription: {
|
|
103
|
+
defaultMessage: string;
|
|
104
|
+
description: string;
|
|
105
|
+
id: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
export default messages;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SharedWithAvatars(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AvatarProps } from '@box/blueprint-web';
|
|
2
|
+
import { Collaborator } from '../../../types';
|
|
3
|
+
export interface CollaboratorAvatarProps {
|
|
4
|
+
collaborator: Collaborator;
|
|
5
|
+
isBadgeable?: boolean;
|
|
6
|
+
size?: AvatarProps['size'];
|
|
7
|
+
}
|
|
8
|
+
export declare function CollaboratorAvatar({ collaborator, isBadgeable, size }: CollaboratorAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CollaboratorsView(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './collaborators-view';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
closeButton: {
|
|
3
|
+
defaultMessage: string;
|
|
4
|
+
description: string;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
doneButton: {
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
description: string;
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
manageAllLink: {
|
|
13
|
+
defaultMessage: string;
|
|
14
|
+
description: string;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
listLabel: {
|
|
18
|
+
defaultMessage: string;
|
|
19
|
+
description: string;
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
nameColumn: {
|
|
23
|
+
defaultMessage: string;
|
|
24
|
+
description: string;
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
roleColumn: {
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
description: string;
|
|
30
|
+
id: string;
|
|
31
|
+
};
|
|
32
|
+
expiresBadge: {
|
|
33
|
+
defaultMessage: string;
|
|
34
|
+
description: string;
|
|
35
|
+
id: string;
|
|
36
|
+
};
|
|
37
|
+
pendingRole: {
|
|
38
|
+
defaultMessage: string;
|
|
39
|
+
description: string;
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export default messages;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './unified-share-form-modal';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
title: {
|
|
3
|
+
defaultMessage: string;
|
|
4
|
+
description: string;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
closeButton: {
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
description: string;
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
loadingLabel: {
|
|
13
|
+
defaultMessage: string;
|
|
14
|
+
description: string;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
ownerRole: {
|
|
18
|
+
defaultMessage: string;
|
|
19
|
+
description: string;
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
coOwnerRole: {
|
|
23
|
+
defaultMessage: string;
|
|
24
|
+
description: string;
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
editorRole: {
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
description: string;
|
|
30
|
+
id: string;
|
|
31
|
+
};
|
|
32
|
+
viewerUploaderRole: {
|
|
33
|
+
defaultMessage: string;
|
|
34
|
+
description: string;
|
|
35
|
+
id: string;
|
|
36
|
+
};
|
|
37
|
+
previewerUploaderRole: {
|
|
38
|
+
defaultMessage: string;
|
|
39
|
+
description: string;
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
42
|
+
viewerRole: {
|
|
43
|
+
defaultMessage: string;
|
|
44
|
+
description: string;
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
previewerRole: {
|
|
48
|
+
defaultMessage: string;
|
|
49
|
+
description: string;
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
uploaderRole: {
|
|
53
|
+
defaultMessage: string;
|
|
54
|
+
description: string;
|
|
55
|
+
id: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export default messages;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './shared-link-section';
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
shareLinkLabel: {
|
|
3
|
+
defaultMessage: string;
|
|
4
|
+
description: string;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
sharedLinkToggleLabel: {
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
description: string;
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
sharedLinkToggleTooltip: {
|
|
13
|
+
defaultMessage: string;
|
|
14
|
+
description: string;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
sharedLinkSettingsLabel: {
|
|
18
|
+
defaultMessage: string;
|
|
19
|
+
description: string;
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
sharedLinkUrlLabel: {
|
|
23
|
+
defaultMessage: string;
|
|
24
|
+
description: string;
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
sharedLinkEmailLabel: {
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
description: string;
|
|
30
|
+
id: string;
|
|
31
|
+
};
|
|
32
|
+
expirationIconLabel: {
|
|
33
|
+
defaultMessage: string;
|
|
34
|
+
description: string;
|
|
35
|
+
id: string;
|
|
36
|
+
};
|
|
37
|
+
expirationIconTooltip: {
|
|
38
|
+
defaultMessage: string;
|
|
39
|
+
description: string;
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
42
|
+
openAccessLevelLabel: {
|
|
43
|
+
defaultMessage: string;
|
|
44
|
+
description: string;
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
openAccessLevelDescription: {
|
|
48
|
+
defaultMessage: string;
|
|
49
|
+
description: string;
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
companyAccessLevelLabel: {
|
|
53
|
+
defaultMessage: string;
|
|
54
|
+
description: string;
|
|
55
|
+
id: string;
|
|
56
|
+
};
|
|
57
|
+
companyAccessLevelDescription: {
|
|
58
|
+
defaultMessage: string;
|
|
59
|
+
description: string;
|
|
60
|
+
id: string;
|
|
61
|
+
};
|
|
62
|
+
enterpriseAccessLevelLabel: {
|
|
63
|
+
defaultMessage: string;
|
|
64
|
+
description: string;
|
|
65
|
+
id: string;
|
|
66
|
+
};
|
|
67
|
+
enterpriseAccessLevelDescription: {
|
|
68
|
+
defaultMessage: string;
|
|
69
|
+
description: string;
|
|
70
|
+
id: string;
|
|
71
|
+
};
|
|
72
|
+
collaboratorsAccessLevelLabel: {
|
|
73
|
+
defaultMessage: string;
|
|
74
|
+
description: string;
|
|
75
|
+
id: string;
|
|
76
|
+
};
|
|
77
|
+
collaboratorsAccessLevelDescription: {
|
|
78
|
+
defaultMessage: string;
|
|
79
|
+
description: string;
|
|
80
|
+
id: string;
|
|
81
|
+
};
|
|
82
|
+
fileAccessLevelItem: {
|
|
83
|
+
defaultMessage: string;
|
|
84
|
+
description: string;
|
|
85
|
+
id: string;
|
|
86
|
+
};
|
|
87
|
+
folderAccessLevelItem: {
|
|
88
|
+
defaultMessage: string;
|
|
89
|
+
description: string;
|
|
90
|
+
id: string;
|
|
91
|
+
};
|
|
92
|
+
hubsAccessLevelItem: {
|
|
93
|
+
defaultMessage: string;
|
|
94
|
+
description: string;
|
|
95
|
+
id: string;
|
|
96
|
+
};
|
|
97
|
+
disabledAccessLevelTooltip: {
|
|
98
|
+
defaultMessage: string;
|
|
99
|
+
description: string;
|
|
100
|
+
id: string;
|
|
101
|
+
};
|
|
102
|
+
autoCreateCopyErrorNoticeText: {
|
|
103
|
+
defaultMessage: string;
|
|
104
|
+
description: string;
|
|
105
|
+
id: string;
|
|
106
|
+
};
|
|
107
|
+
autoCreateCopySuccessNoticeText: {
|
|
108
|
+
defaultMessage: string;
|
|
109
|
+
description: string;
|
|
110
|
+
id: string;
|
|
111
|
+
};
|
|
112
|
+
autoCopySuccessNoticeText: {
|
|
113
|
+
defaultMessage: string;
|
|
114
|
+
description: string;
|
|
115
|
+
id: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export default messages;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SharedLinkAccess(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SharedLinkPermission(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SharedLinkSection(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UnifiedShareModalContextValue } from '../../../contexts';
|
|
2
|
+
export declare const contacts: ({
|
|
3
|
+
email: string;
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
type: string;
|
|
8
|
+
} | {
|
|
9
|
+
email: string;
|
|
10
|
+
id: number;
|
|
11
|
+
isExternalUser: boolean;
|
|
12
|
+
name: string;
|
|
13
|
+
value: string;
|
|
14
|
+
})[];
|
|
15
|
+
export declare const UnifiedShareFormModalTemplate: ({ sharingService, ...props }: UnifiedShareModalContextValue) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ModalViewType } from '../../types';
|
|
3
|
+
export interface UnifiedShareFormModalProps {
|
|
4
|
+
children?: ReactElement;
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
onModalViewChange?: (view: ModalViewType) => void;
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function UnifiedShareFormModal({ children, isOpen, onOpenChange, onModalViewChange, }: UnifiedShareFormModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function UnifiedShareForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AccessLevelType, Configuration, NotificationType } from './types';
|
|
2
|
+
export declare const DEFAULT_NOTIFICATIONS: NotificationType[];
|
|
3
|
+
export declare const DEFAULT_CONFIGURATION: Configuration;
|
|
4
|
+
export declare const SUPPORTED_INVITATION_ROLES: string[];
|
|
5
|
+
export declare const SUPPORTED_COLLABORATOR_ROLES: string[];
|
|
6
|
+
export declare const SUPPORTED_ACCESS_LEVELS: AccessLevelType[];
|
|
7
|
+
export declare const COLLABORATION_MESSAGE_CHARACTER_LIMIT = 256;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UserContactType } from '@box/user-selector';
|
|
3
|
+
import { CollaborationRole, ModalViewType, ShareViewType } from '../types';
|
|
4
|
+
export interface UnifiedShareFormContextValue extends Omit<UnifiedShareFormProviderProps, 'children'> {
|
|
5
|
+
collaborationRole?: CollaborationRole;
|
|
6
|
+
contactValue?: string;
|
|
7
|
+
messageValue?: string;
|
|
8
|
+
setCollaborationRole?: (value: CollaborationRole) => void;
|
|
9
|
+
setContactValue?: (value: string) => void;
|
|
10
|
+
setMessageValue?: (value: string) => void;
|
|
11
|
+
setUserContacts?: (value: UserContactType[]) => void;
|
|
12
|
+
userContacts?: UserContactType[];
|
|
13
|
+
}
|
|
14
|
+
export declare const UnifiedShareFormContext: import('react').Context<UnifiedShareFormContextValue>;
|
|
15
|
+
export declare const useUnifiedShareFormContext: () => UnifiedShareFormContextValue;
|
|
16
|
+
interface UnifiedShareFormProviderProps {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
container?: HTMLDivElement | null;
|
|
19
|
+
onModalOpenChange?: (open: boolean) => void;
|
|
20
|
+
onModalViewChange?: (view: ModalViewType) => void;
|
|
21
|
+
onShareViewChange?: (view: ShareViewType) => void;
|
|
22
|
+
shareView?: ShareViewType;
|
|
23
|
+
}
|
|
24
|
+
export declare const UnifiedShareFormProvider: ({ children, container, onModalOpenChange, onModalViewChange, onShareViewChange, shareView, }: UnifiedShareFormProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CollaborationRole, Collaborator, Configuration, ContactService, EventService, Item, SharedLink, SharingService, User } from '../types';
|
|
2
|
+
export interface UnifiedShareModalContextValue {
|
|
3
|
+
collaborationRoles?: CollaborationRole[];
|
|
4
|
+
collaborators?: Collaborator[];
|
|
5
|
+
config?: Configuration;
|
|
6
|
+
contactService?: ContactService;
|
|
7
|
+
currentUser?: Partial<User>;
|
|
8
|
+
eventService?: EventService;
|
|
9
|
+
isFetching?: boolean;
|
|
10
|
+
isSubmitting?: boolean;
|
|
11
|
+
item?: Item;
|
|
12
|
+
sharedLink?: Partial<SharedLink>;
|
|
13
|
+
sharingService?: SharingService;
|
|
14
|
+
}
|
|
15
|
+
export declare const UnifiedShareModalContext: import('react').Context<UnifiedShareModalContextValue>;
|
|
16
|
+
export declare const useUnifiedShareModalContext: () => UnifiedShareModalContextValue;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UserContactType } from '@box/user-selector';
|
|
2
|
+
export declare const useCollaborationForm: (formAction: any, formNotification: any) => {
|
|
3
|
+
errors: import('./use-form-validation').FormErrors;
|
|
4
|
+
handleFormReset: () => void;
|
|
5
|
+
handleFormSubmit: () => Promise<boolean>;
|
|
6
|
+
handleSelectedUsersChange: (users: UserContactType[]) => Promise<void>;
|
|
7
|
+
handleUserSelectorBlur: (event: React.FocusEvent<HTMLTextAreaElement | HTMLInputElement>) => void;
|
|
8
|
+
isFormSubmitting: boolean;
|
|
9
|
+
updateContactValue: (input: string) => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UserContactType } from '@box/user-selector';
|
|
2
|
+
import { DateValue } from '../types';
|
|
3
|
+
export interface ValidationData {
|
|
4
|
+
expiration?: DateValue | string;
|
|
5
|
+
vanityName?: string;
|
|
6
|
+
}
|
|
7
|
+
export type Error = string | undefined;
|
|
8
|
+
export type FormErrors = {
|
|
9
|
+
[key: string | undefined]: Error;
|
|
10
|
+
};
|
|
11
|
+
export declare const useFormValidation: () => {
|
|
12
|
+
errors: FormErrors;
|
|
13
|
+
validateExpiration: (expiration: DateValue) => boolean;
|
|
14
|
+
validateVanityName: (vanityName: string) => boolean;
|
|
15
|
+
validateUserContact: (user: string) => boolean;
|
|
16
|
+
validateUserSelector: (users: UserContactType[]) => boolean;
|
|
17
|
+
setFieldError: (field: any, error: any) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LinkSettingsFormData } from '../types';
|
|
2
|
+
export declare const useLinkSettingsForm: (initialFormData: LinkSettingsFormData) => {
|
|
3
|
+
errors: import('./use-form-validation').FormErrors;
|
|
4
|
+
formData: LinkSettingsFormData;
|
|
5
|
+
handleFormReset: () => void;
|
|
6
|
+
handleFormSubmit: () => Promise<boolean>;
|
|
7
|
+
isUpdating: boolean;
|
|
8
|
+
setFieldError: (field: any, error: any) => void;
|
|
9
|
+
setFieldValue: (field: any, value: any) => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NotificationType, SharingService } from '../types';
|
|
2
|
+
type SharingAction = (...args: unknown[]) => ReturnType<SharingService[keyof SharingService]>;
|
|
3
|
+
export declare const useSharingAction: (action?: SharingAction, notification?: NotificationType) => {
|
|
4
|
+
onAction: (...args: Parameters<SharingAction>) => Promise<void>;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
};
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
noticeCloseLabel: {
|
|
3
|
+
defaultMessage: string;
|
|
4
|
+
description: string;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
successNoticeIcon: {
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
description: string;
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
errorNoticeIcon: {
|
|
13
|
+
defaultMessage: string;
|
|
14
|
+
description: string;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
defaultErrorNoticeText: {
|
|
18
|
+
defaultMessage: string;
|
|
19
|
+
description: string;
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
deleteSharedLinkSuccessNoticeText: {
|
|
23
|
+
defaultMessage: string;
|
|
24
|
+
description: string;
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
deleteSharedLinkErrorNoticeText: {
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
description: string;
|
|
30
|
+
id: string;
|
|
31
|
+
};
|
|
32
|
+
updateSharedLinkSuccessNoticeText: {
|
|
33
|
+
defaultMessage: string;
|
|
34
|
+
description: string;
|
|
35
|
+
id: string;
|
|
36
|
+
};
|
|
37
|
+
createSharedLinkSuccessNoticeText: {
|
|
38
|
+
defaultMessage: string;
|
|
39
|
+
description: string;
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
42
|
+
createSharedLinkErrorNoticeText: {
|
|
43
|
+
defaultMessage: string;
|
|
44
|
+
description: string;
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
autoCopySharedLinkErrorNoticeText: {
|
|
48
|
+
defaultMessage: string;
|
|
49
|
+
description: string;
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
52
|
+
vanityNameInvalidErrorMessage: {
|
|
53
|
+
defaultMessage: string;
|
|
54
|
+
description: string;
|
|
55
|
+
id: string;
|
|
56
|
+
};
|
|
57
|
+
vanityNameRequiredErrorMessage: {
|
|
58
|
+
defaultMessage: string;
|
|
59
|
+
description: string;
|
|
60
|
+
id: string;
|
|
61
|
+
};
|
|
62
|
+
expirationRequiredErrorMessage: {
|
|
63
|
+
defaultMessage: string;
|
|
64
|
+
description: string;
|
|
65
|
+
id: string;
|
|
66
|
+
};
|
|
67
|
+
expirationFutureDateRequiredErrorMessage: {
|
|
68
|
+
defaultMessage: string;
|
|
69
|
+
description: string;
|
|
70
|
+
id: string;
|
|
71
|
+
};
|
|
72
|
+
invalidEmailErrorMessage: {
|
|
73
|
+
defaultMessage: string;
|
|
74
|
+
description: string;
|
|
75
|
+
id: string;
|
|
76
|
+
};
|
|
77
|
+
emailRequiredErrorMessage: {
|
|
78
|
+
defaultMessage: string;
|
|
79
|
+
description: string;
|
|
80
|
+
id: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export default messages;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UserContactType } from '@box/user-selector';
|
|
2
|
+
type ModalView = 'default' | 'collaborators' | 'sharedLink';
|
|
3
|
+
export interface StoreContext {
|
|
4
|
+
currentView: ModalView;
|
|
5
|
+
collaborators: UserContactType[];
|
|
6
|
+
emailMessage: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const store: import('@xstate/store').Store<StoreContext, import('@xstate/store').ExtractEvents<{
|
|
9
|
+
changeView: {
|
|
10
|
+
view: ModalView;
|
|
11
|
+
};
|
|
12
|
+
changeCollaborators: {
|
|
13
|
+
collaborators: UserContactType[];
|
|
14
|
+
};
|
|
15
|
+
changeEmailMessage: {
|
|
16
|
+
emailMessage: string;
|
|
17
|
+
};
|
|
18
|
+
}>, {
|
|
19
|
+
type: string;
|
|
20
|
+
}>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UnifiedShareModalProps } from '../unified-share-modal';
|
|
2
|
+
import { CollaborationRole, Collaborator, Configuration, Item, NotificationType, Permissions, SharedLink } from '../types';
|
|
3
|
+
export declare const mockCollaborationRoles: CollaborationRole[];
|
|
4
|
+
export declare const mockCollaborators: Collaborator[];
|
|
5
|
+
export declare const mockConfiguration: Configuration;
|
|
6
|
+
export declare const mockCustomNotice: import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const mockBoxFile: Item;
|
|
8
|
+
export declare const mockBoxFolder: Item;
|
|
9
|
+
export declare const mockPermissions: Permissions;
|
|
10
|
+
export declare const mockSharedLink: SharedLink;
|
|
11
|
+
export declare const useMockSharedLink: (initialSharedLink: any) => {
|
|
12
|
+
sharedLink: SharedLink;
|
|
13
|
+
sharingService: {
|
|
14
|
+
createSharedLink: () => Promise<void>;
|
|
15
|
+
deleteSharedLink: () => Promise<void>;
|
|
16
|
+
updateSharedLink: () => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const mockDefaultNotification: NotificationType[];
|
|
20
|
+
export declare const mockDefaultConfiguration: Configuration;
|
|
21
|
+
export declare const defaultArgs: UnifiedShareModalProps;
|
|
22
|
+
export declare const UnifiedShareModalTemplate: (props: UnifiedShareModalProps) => import("react/jsx-runtime").JSX.Element;
|