@box/unified-share-modal 2.12.15 → 2.12.16

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 (95) hide show
  1. package/dist/chunks/classification-status.js +62 -0
  2. package/dist/chunks/collaboration-role.js +89 -0
  3. package/dist/chunks/collaboration-section.js +156 -0
  4. package/dist/chunks/collaborator-list-item.js +61 -0
  5. package/dist/chunks/collaborator-list.js +74 -0
  6. package/dist/chunks/remove-collaborator-modal.js +61 -0
  7. package/dist/chunks/remove-shared-link-modal.js +56 -0
  8. package/dist/chunks/shared-link-access.js +65 -0
  9. package/dist/chunks/shared-link-permission.js +67 -0
  10. package/dist/chunks/shared-link-section.js +176 -0
  11. package/dist/chunks/shared-link-settings-modal.js +86 -0
  12. package/dist/chunks/shared-with-avatars.js +48 -0
  13. package/dist/chunks/shield-restriction-notice.js +97 -0
  14. package/dist/chunks/text-area-container.js +36 -0
  15. package/dist/chunks/unified-share-form-modal.js +66 -0
  16. package/dist/chunks/unified-share-form.js +23 -0
  17. package/dist/esm/index.js +2 -4
  18. package/dist/esm/lib/components/classification-status/classification-status.js +2 -80
  19. package/dist/esm/lib/components/classification-status/index.js +2 -4
  20. package/dist/esm/lib/components/classification-status/messages.js +10 -12
  21. package/dist/esm/lib/components/index.js +5 -10
  22. package/dist/esm/lib/components/remove-collaborator-modal/index.js +2 -4
  23. package/dist/esm/lib/components/remove-collaborator-modal/messages.js +26 -28
  24. package/dist/esm/lib/components/remove-collaborator-modal/remove-collaborator-modal.js +2 -84
  25. package/dist/esm/lib/components/remove-shared-link-modal/index.js +2 -4
  26. package/dist/esm/lib/components/remove-shared-link-modal/messages.js +26 -28
  27. package/dist/esm/lib/components/remove-shared-link-modal/remove-shared-link-modal.js +2 -72
  28. package/dist/esm/lib/components/shared-link-settings-modal/download-section.js +35 -61
  29. package/dist/esm/lib/components/shared-link-settings-modal/expiration-section.js +33 -50
  30. package/dist/esm/lib/components/shared-link-settings-modal/index.js +2 -4
  31. package/dist/esm/lib/components/shared-link-settings-modal/messages.js +138 -144
  32. package/dist/esm/lib/components/shared-link-settings-modal/password-section.js +32 -52
  33. package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings-modal.js +2 -98
  34. package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings.js +97 -126
  35. package/dist/esm/lib/components/shared-link-settings-modal/vanity-section.js +33 -47
  36. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-role.js +2 -128
  37. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-section.js +2 -202
  38. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/index.js +2 -4
  39. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/messages.js +134 -136
  40. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/shared-with-avatars.js +2 -67
  41. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/shield-restriction-notice.js +2 -134
  42. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/text-area-container.js +2 -53
  43. package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-avatar.js +48 -60
  44. package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-list-item.js +2 -86
  45. package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-list.js +2 -101
  46. package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/index.js +2 -4
  47. package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/messages.js +38 -40
  48. package/dist/esm/lib/components/unified-share-form-modal/index.js +2 -4
  49. package/dist/esm/lib/components/unified-share-form-modal/messages.js +46 -48
  50. package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/index.js +2 -4
  51. package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/messages.js +142 -144
  52. package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-access.js +2 -102
  53. package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-permission.js +2 -105
  54. package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-section.js +2 -191
  55. package/dist/esm/lib/components/unified-share-form-modal/unified-share-form-modal.js +2 -85
  56. package/dist/esm/lib/components/unified-share-form-modal/unified-share-form.js +2 -29
  57. package/dist/esm/lib/constants.js +44 -28
  58. package/dist/esm/lib/contexts/index.js +4 -14
  59. package/dist/esm/lib/contexts/shared-link-settings-context.js +50 -59
  60. package/dist/esm/lib/contexts/unified-share-form-context.js +60 -57
  61. package/dist/esm/lib/contexts/unified-share-modal-context.js +65 -68
  62. package/dist/esm/lib/hooks/index.js +7 -14
  63. package/dist/esm/lib/hooks/use-access-levels.js +69 -93
  64. package/dist/esm/lib/hooks/use-collaboration-form.js +75 -95
  65. package/dist/esm/lib/hooks/use-form-validation.js +32 -43
  66. package/dist/esm/lib/hooks/use-link-settings-form.js +49 -64
  67. package/dist/esm/lib/hooks/use-permission-levels.js +33 -50
  68. package/dist/esm/lib/hooks/use-sharing-action.js +44 -59
  69. package/dist/esm/lib/messages.js +106 -108
  70. package/dist/esm/lib/unified-share-base.js +30 -40
  71. package/dist/esm/lib/unified-share-modal.js +41 -59
  72. package/dist/esm/lib/utils/collaborator.js +12 -27
  73. package/dist/esm/lib/utils/date.js +10 -14
  74. package/dist/esm/lib/utils/email.js +5 -7
  75. package/dist/esm/lib/utils/event.js +6 -13
  76. package/dist/esm/lib/utils/form.js +4 -14
  77. package/dist/esm/lib/utils/index.js +9 -34
  78. package/dist/esm/lib/utils/notification.js +19 -28
  79. package/dist/esm/lib/utils/permission.js +15 -22
  80. package/dist/esm/lib/utils/validation.js +2 -11
  81. package/dist/styles/classification-status.css +1 -1
  82. package/dist/styles/collaboration-role.css +1 -1
  83. package/dist/styles/collaboration-section.css +1 -1
  84. package/dist/styles/collaborator-list-item.css +1 -1
  85. package/dist/styles/collaborator-list.css +1 -1
  86. package/dist/styles/remove-collaborator-modal.css +1 -1
  87. package/dist/styles/shared-link-access.css +1 -1
  88. package/dist/styles/shared-link-section.css +1 -1
  89. package/dist/styles/shared-link-settings-modal.css +1 -1
  90. package/dist/styles/shared-with-avatars.css +1 -1
  91. package/dist/styles/shield-restriction-notice.css +1 -1
  92. package/dist/styles/text-area-container.css +1 -1
  93. package/dist/styles/unified-share-form-modal.css +1 -1
  94. package/dist/styles/unified-share-form.css +1 -1
  95. package/package.json +9 -9
@@ -1,146 +1,144 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const i = e({
3
- closeButton: {
4
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.closeButton",
5
- defaultMessage: "Close"
6
- },
7
- shareLinkLabel: {
8
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.shareLinkLabel",
9
- defaultMessage: "Share Link"
10
- },
11
- sharedLinkToggleLabel: {
12
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkToggleLabel",
13
- defaultMessage: "Shared link"
14
- },
15
- sharedLinkToggleTooltip: {
16
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkToggleTooltip",
17
- defaultMessage: "Create and copy link"
18
- },
19
- createLinkDisabledTooltip: {
20
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.createLinkDisabledTooltip",
21
- defaultMessage: "You do not have permission to create the link"
22
- },
23
- removeLinkDisabledTooltip: {
24
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.removeLinkDisabledTooltip",
25
- defaultMessage: "You do not have permission to remove the link"
26
- },
27
- sharedLinkSettingsLabel: {
28
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkSettingsLabel",
29
- defaultMessage: "Link Settings"
30
- },
31
- sharedLinkUrlLabel: {
32
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkUrlLabel",
33
- defaultMessage: "Shared link URL"
34
- },
35
- sharedLinkEmailLabel: {
36
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkEmailLabel",
37
- defaultMessage: "Send Shared Link"
38
- },
39
- sharedLinkPubliclyAvailable: {
40
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkPubliclyAvailable",
41
- defaultMessage: "This content is publicly available to anyone with the link."
42
- },
43
- sharedLinkEditablePubliclyAvailable: {
44
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkEditablePubliclyAvailable",
45
- defaultMessage: "Publicly available for anyone to view and download. Any logged in users with the link can edit."
46
- },
47
- sharedLinkElevatedEditableCompanyAvailable: {
48
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkElevatedEditableCompanyAvailable",
49
- defaultMessage: "People who have access to this link can edit."
50
- },
51
- expirationIconLabel: {
52
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.expirationIconLabel",
53
- defaultMessage: "Expires"
54
- },
55
- expirationIconTooltip: {
56
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.expirationIconTooltip",
57
- defaultMessage: "This link will expire and be inaccessible on {expirationDate}"
58
- },
59
- openAccessLevelLabel: {
60
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.openAccessLevelLabel",
61
- defaultMessage: "People with the link"
62
- },
63
- openAccessLevelDescription: {
64
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.openAccessLevelDescription",
65
- defaultMessage: "Publicly accessible and no sign-in required"
66
- },
67
- companyAccessLevelLabel: {
68
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.companyAccessLevelLabel",
69
- defaultMessage: "People in your company"
70
- },
71
- companyAccessLevelDescription: {
72
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.companyAccessLevelDescription",
73
- defaultMessage: "Anyone in your company with the link or people invited to this {item} can access"
74
- },
75
- enterpriseAccessLevelLabel: {
76
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.enterpriseAccessLevelLabel",
77
- defaultMessage: "People in {enterprise}"
78
- },
79
- enterpriseAccessLevelDescription: {
80
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.enterpriseAccessLevelDescription",
81
- defaultMessage: "Anyone at {enterprise} with the link or people invited to this {item} can access"
82
- },
83
- collaboratorsAccessLevelLabel: {
84
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.collaboratorsAccessLevelLabel",
85
- defaultMessage: "Invited people only"
86
- },
87
- collaboratorsAccessLevelDescription: {
88
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.collaboratorsAccessLevelDescription",
89
- defaultMessage: "Only invited people can access this {item}"
90
- },
91
- fileAccessLevelItem: {
92
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.fileAccessLevelItem",
93
- defaultMessage: "file"
94
- },
95
- folderAccessLevelItem: {
96
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.folderAccessLevelItem",
97
- defaultMessage: "folder"
98
- },
99
- hubsAccessLevelItem: {
100
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.hubsAccessLevelItem",
101
- defaultMessage: "hub"
102
- },
103
- webLinkAccessLevelItem: {
104
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.webLinkAccessLevelItem",
105
- defaultMessage: "bookmark"
106
- },
107
- workflowAccessLevelItem: {
108
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.workflowAccessLevelItem",
109
- defaultMessage: "workflow"
110
- },
111
- disabledAccessLevelTooltip: {
112
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.disabledAccessLevelTooltip",
113
- defaultMessage: "This option is not available due to a security policy"
114
- },
115
- canEditPermissionLevelLabel: {
116
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.canEditPermissionLevelLabel",
117
- defaultMessage: "Can edit"
118
- },
119
- canDownloadPermissionLevelLabel: {
120
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.canDownloadPermissionLevelLabel",
121
- defaultMessage: "Can view and download"
122
- },
123
- canPreviewPermissionLevelLabel: {
124
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.canPreviewPermissionLevelLabel",
125
- defaultMessage: "Can view only"
126
- },
127
- canEditBoxNoteDisabledTooltip: {
128
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.canEditBoxNoteDisabledTooltip",
129
- defaultMessage: "This permission can only be changed in Box Notes"
130
- },
131
- autoCreateCopyErrorNoticeText: {
132
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.autoCreateCopyErrorNoticeText",
133
- defaultMessage: "Shared link created. Click Copy to share."
134
- },
135
- autoCreateCopySuccessNoticeText: {
136
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.autoCreateCopySuccessNoticeText",
137
- defaultMessage: "Shared link created and copied to clipboard."
138
- },
139
- autoCopySuccessNoticeText: {
140
- id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.autoCopySuccessNoticeText",
141
- defaultMessage: "Shared link copied to clipboard."
142
- }
2
+ var t = e({
3
+ closeButton: {
4
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.closeButton",
5
+ defaultMessage: "Close"
6
+ },
7
+ shareLinkLabel: {
8
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.shareLinkLabel",
9
+ defaultMessage: "Share Link"
10
+ },
11
+ sharedLinkToggleLabel: {
12
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkToggleLabel",
13
+ defaultMessage: "Shared link"
14
+ },
15
+ sharedLinkToggleTooltip: {
16
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkToggleTooltip",
17
+ defaultMessage: "Create and copy link"
18
+ },
19
+ createLinkDisabledTooltip: {
20
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.createLinkDisabledTooltip",
21
+ defaultMessage: "You do not have permission to create the link"
22
+ },
23
+ removeLinkDisabledTooltip: {
24
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.removeLinkDisabledTooltip",
25
+ defaultMessage: "You do not have permission to remove the link"
26
+ },
27
+ sharedLinkSettingsLabel: {
28
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkSettingsLabel",
29
+ defaultMessage: "Link Settings"
30
+ },
31
+ sharedLinkUrlLabel: {
32
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkUrlLabel",
33
+ defaultMessage: "Shared link URL"
34
+ },
35
+ sharedLinkEmailLabel: {
36
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkEmailLabel",
37
+ defaultMessage: "Send Shared Link"
38
+ },
39
+ sharedLinkPubliclyAvailable: {
40
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkPubliclyAvailable",
41
+ defaultMessage: "This content is publicly available to anyone with the link."
42
+ },
43
+ sharedLinkEditablePubliclyAvailable: {
44
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkEditablePubliclyAvailable",
45
+ defaultMessage: "Publicly available for anyone to view and download. Any logged in users with the link can edit."
46
+ },
47
+ sharedLinkElevatedEditableCompanyAvailable: {
48
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkElevatedEditableCompanyAvailable",
49
+ defaultMessage: "People who have access to this link can edit."
50
+ },
51
+ expirationIconLabel: {
52
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.expirationIconLabel",
53
+ defaultMessage: "Expires"
54
+ },
55
+ expirationIconTooltip: {
56
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.expirationIconTooltip",
57
+ defaultMessage: "This link will expire and be inaccessible on {expirationDate}"
58
+ },
59
+ openAccessLevelLabel: {
60
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.openAccessLevelLabel",
61
+ defaultMessage: "People with the link"
62
+ },
63
+ openAccessLevelDescription: {
64
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.openAccessLevelDescription",
65
+ defaultMessage: "Publicly accessible and no sign-in required"
66
+ },
67
+ companyAccessLevelLabel: {
68
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.companyAccessLevelLabel",
69
+ defaultMessage: "People in your company"
70
+ },
71
+ companyAccessLevelDescription: {
72
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.companyAccessLevelDescription",
73
+ defaultMessage: "Anyone in your company with the link or people invited to this {item} can access"
74
+ },
75
+ enterpriseAccessLevelLabel: {
76
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.enterpriseAccessLevelLabel",
77
+ defaultMessage: "People in {enterprise}"
78
+ },
79
+ enterpriseAccessLevelDescription: {
80
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.enterpriseAccessLevelDescription",
81
+ defaultMessage: "Anyone at {enterprise} with the link or people invited to this {item} can access"
82
+ },
83
+ collaboratorsAccessLevelLabel: {
84
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.collaboratorsAccessLevelLabel",
85
+ defaultMessage: "Invited people only"
86
+ },
87
+ collaboratorsAccessLevelDescription: {
88
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.collaboratorsAccessLevelDescription",
89
+ defaultMessage: "Only invited people can access this {item}"
90
+ },
91
+ fileAccessLevelItem: {
92
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.fileAccessLevelItem",
93
+ defaultMessage: "file"
94
+ },
95
+ folderAccessLevelItem: {
96
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.folderAccessLevelItem",
97
+ defaultMessage: "folder"
98
+ },
99
+ hubsAccessLevelItem: {
100
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.hubsAccessLevelItem",
101
+ defaultMessage: "hub"
102
+ },
103
+ webLinkAccessLevelItem: {
104
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.webLinkAccessLevelItem",
105
+ defaultMessage: "bookmark"
106
+ },
107
+ workflowAccessLevelItem: {
108
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.workflowAccessLevelItem",
109
+ defaultMessage: "workflow"
110
+ },
111
+ disabledAccessLevelTooltip: {
112
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.disabledAccessLevelTooltip",
113
+ defaultMessage: "This option is not available due to a security policy"
114
+ },
115
+ canEditPermissionLevelLabel: {
116
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.canEditPermissionLevelLabel",
117
+ defaultMessage: "Can edit"
118
+ },
119
+ canDownloadPermissionLevelLabel: {
120
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.canDownloadPermissionLevelLabel",
121
+ defaultMessage: "Can view and download"
122
+ },
123
+ canPreviewPermissionLevelLabel: {
124
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.canPreviewPermissionLevelLabel",
125
+ defaultMessage: "Can view only"
126
+ },
127
+ canEditBoxNoteDisabledTooltip: {
128
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.canEditBoxNoteDisabledTooltip",
129
+ defaultMessage: "This permission can only be changed in Box Notes"
130
+ },
131
+ autoCreateCopyErrorNoticeText: {
132
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.autoCreateCopyErrorNoticeText",
133
+ defaultMessage: "Shared link created. Click Copy to share."
134
+ },
135
+ autoCreateCopySuccessNoticeText: {
136
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.autoCreateCopySuccessNoticeText",
137
+ defaultMessage: "Shared link created and copied to clipboard."
138
+ },
139
+ autoCopySuccessNoticeText: {
140
+ id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.autoCopySuccessNoticeText",
141
+ defaultMessage: "Shared link copied to clipboard."
142
+ }
143
143
  });
144
- export {
145
- i as default
146
- };
144
+ export { t as default };
@@ -1,102 +1,2 @@
1
- import { useState as y } from "react";
2
- import { useIntl as T } from "react-intl";
3
- import { DropdownMenu as e, TriggerButton as B, Tooltip as N, Focusable as w } from "@box/blueprint-web";
4
- import i from "./messages.js";
5
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
6
- import { useUnifiedShareModalContext as D } from "../../../contexts/unified-share-modal-context.js";
7
- import { useSharingAction as H } from "../../../hooks/use-sharing-action.js";
8
- import { useAccessLevels as O } from "../../../hooks/use-access-levels.js";
9
- import '../../../../../styles/shared-link-access.css';const j = "_button_166my_1", z = "_content_166my_9", F = "_option_166my_12", o = {
10
- button: j,
11
- content: z,
12
- option: F
13
- };
14
- function P() {
15
- const {
16
- formatMessage: s
17
- } = T(), [r, h] = y(!1), {
18
- isSubmitting: b,
19
- item: S,
20
- sharedLink: f,
21
- sharingService: g,
22
- variant: k
23
- } = D(), {
24
- permissions: L = {}
25
- } = S, {
26
- access: C
27
- } = f, {
28
- changeSharedLinkAccess: A
29
- } = g, l = k === "desktop", {
30
- onAction: M
31
- } = H(A), {
32
- allowedLevels: d,
33
- selectedAccess: m
34
- } = O();
35
- if (!d.length || !m)
36
- return null;
37
- const {
38
- label: _
39
- } = m;
40
- return /* @__PURE__ */ a(e.Root, {
41
- isFullScreenEnabled: l,
42
- menuItemsSize: "medium",
43
- onOpenChange: h,
44
- open: r,
45
- children: [/* @__PURE__ */ t(e.Trigger, {
46
- children: /* @__PURE__ */ t(B, {
47
- caretDirection: r ? "up" : "down",
48
- className: o.button,
49
- "data-target-id": "Button-SharedLinkAccessMenuLabel",
50
- disabled: !L.canSetShareAccess || b,
51
- label: _,
52
- size: "extraSmall",
53
- variant: "tertiary"
54
- })
55
- }), /* @__PURE__ */ a(e.Content, {
56
- align: "start",
57
- className: o.content,
58
- children: [l && /* @__PURE__ */ a(e.Header, {
59
- children: [/* @__PURE__ */ t(e.Header.MenuCloseButton, {
60
- "aria-label": s(i.closeButton),
61
- iconVariant: "back"
62
- }), /* @__PURE__ */ t(e.Header.TextContent, {
63
- title: s(i.shareLinkLabel)
64
- })]
65
- }), d.map((x) => {
66
- const {
67
- description: u,
68
- disabledReason: I,
69
- id: n,
70
- label: p
71
- } = x, c = C === n, v = () => {
72
- c || M(n);
73
- };
74
- return I ? /* @__PURE__ */ t(N, {
75
- content: s(i.disabledAccessLevelTooltip),
76
- children: /* @__PURE__ */ t(w, {
77
- children: /* @__PURE__ */ t(e.CheckboxItem, {
78
- checked: c,
79
- disabled: !0,
80
- children: /* @__PURE__ */ t(e.Item.MainContent, {
81
- caption: u,
82
- className: o.option,
83
- label: p
84
- })
85
- }, n)
86
- })
87
- }, n) : /* @__PURE__ */ t(e.CheckboxItem, {
88
- checked: c,
89
- onSelect: v,
90
- children: /* @__PURE__ */ t(e.Item.MainContent, {
91
- caption: u,
92
- className: o.option,
93
- label: p
94
- })
95
- }, n);
96
- })]
97
- })]
98
- });
99
- }
100
- export {
101
- P as SharedLinkAccess
102
- };
1
+ import { t as e } from "../../../../../chunks/shared-link-access.js";
2
+ export { e as SharedLinkAccess };
@@ -1,105 +1,2 @@
1
- import { useState as E } from "react";
2
- import { useIntl as I } from "react-intl";
3
- import { Tooltip as O, Focusable as P, TriggerButton as S, DropdownMenu as t } from "@box/blueprint-web";
4
- import { FILE_EXTENSION_BOX_NOTE as D } from "../../../constants.js";
5
- import r from "./messages.js";
6
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
7
- import { usePermissionLevels as w } from "../../../hooks/use-permission-levels.js";
8
- import { useUnifiedShareModalContext as A } from "../../../contexts/unified-share-modal-context.js";
9
- import { useSharingAction as F } from "../../../hooks/use-sharing-action.js";
10
- import '../../../../../styles/shared-link-access.css';const H = "_button_166my_1", j = "_content_166my_9", z = "_option_166my_12", n = {
11
- button: H,
12
- content: j,
13
- option: z
14
- };
15
- function W() {
16
- const {
17
- formatMessage: o
18
- } = I(), [c, f] = E(!1), {
19
- isSubmitting: g,
20
- item: l,
21
- sharedLink: _,
22
- sharingService: L,
23
- variant: k
24
- } = A(), {
25
- permissions: x = {}
26
- } = l, {
27
- access: M,
28
- permission: d
29
- } = _, {
30
- changeSharedLinkPermission: C
31
- } = L, m = k === "desktop", {
32
- onAction: N
33
- } = F(C), {
34
- allowedLevels: p,
35
- selectedPermission: u
36
- } = w();
37
- if (M === "collaborators" || !p.length || !u)
38
- return null;
39
- const {
40
- label: b
41
- } = u;
42
- let i = "";
43
- return l.extension === D && d === "can_edit" && (i = o(r.canEditBoxNoteDisabledTooltip)), i ? /* @__PURE__ */ e(O, {
44
- align: "start",
45
- content: i,
46
- "data-testid": "usm-SharedLinkPermission-tooltip",
47
- side: "bottom",
48
- children: /* @__PURE__ */ e(P, {
49
- children: /* @__PURE__ */ e(S, {
50
- caretDirection: "down",
51
- className: n.button,
52
- disabled: !0,
53
- label: b,
54
- size: "extraSmall",
55
- variant: "tertiary"
56
- })
57
- })
58
- }) : /* @__PURE__ */ a(t.Root, {
59
- isFullScreenEnabled: m,
60
- onOpenChange: f,
61
- open: c,
62
- children: [/* @__PURE__ */ e(t.Trigger, {
63
- children: /* @__PURE__ */ e(S, {
64
- caretDirection: c ? "up" : "down",
65
- className: n.button,
66
- "data-target-id": "Button-SharedLinkPermissionsMenuLabel",
67
- disabled: !x.canSetShareAccess || g,
68
- label: b,
69
- size: "extraSmall",
70
- variant: "tertiary"
71
- })
72
- }), /* @__PURE__ */ a(t.Content, {
73
- align: "start",
74
- className: n.content,
75
- children: [m && /* @__PURE__ */ a(t.Header, {
76
- children: [/* @__PURE__ */ e(t.Header.MenuCloseButton, {
77
- "aria-label": o(r.closeButton),
78
- iconVariant: "back"
79
- }), /* @__PURE__ */ e(t.Header.TextContent, {
80
- title: o(r.shareLinkLabel)
81
- })]
82
- }), p.map((T) => {
83
- const {
84
- description: v,
85
- id: s,
86
- label: y
87
- } = T, h = d === s, B = () => {
88
- h || N(s);
89
- };
90
- return /* @__PURE__ */ e(t.CheckboxItem, {
91
- checked: h,
92
- onSelect: B,
93
- children: /* @__PURE__ */ e(t.Item.MainContent, {
94
- caption: v,
95
- className: n.option,
96
- label: y
97
- })
98
- }, s);
99
- })]
100
- })]
101
- });
102
- }
103
- export {
104
- W as SharedLinkPermission
105
- };
1
+ import { t as e } from "../../../../../chunks/shared-link-permission.js";
2
+ export { e as SharedLinkPermission };