@box/unified-share-modal 2.12.15 → 2.12.17
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/chunks/classification-status.js +62 -0
- package/dist/chunks/collaboration-role.js +89 -0
- package/dist/chunks/collaboration-section.js +156 -0
- package/dist/chunks/collaborator-list-item.js +61 -0
- package/dist/chunks/collaborator-list.js +74 -0
- package/dist/chunks/remove-collaborator-modal.js +61 -0
- package/dist/chunks/remove-shared-link-modal.js +56 -0
- package/dist/chunks/shared-link-access.js +65 -0
- package/dist/chunks/shared-link-permission.js +67 -0
- package/dist/chunks/shared-link-section.js +176 -0
- package/dist/chunks/shared-link-settings-modal.js +86 -0
- package/dist/chunks/shared-with-avatars.js +48 -0
- package/dist/chunks/shield-restriction-notice.js +97 -0
- package/dist/chunks/text-area-container.js +36 -0
- package/dist/chunks/unified-share-form-modal.js +66 -0
- package/dist/chunks/unified-share-form.js +23 -0
- package/dist/esm/index.js +2 -4
- package/dist/esm/lib/components/classification-status/classification-status.js +2 -80
- package/dist/esm/lib/components/classification-status/index.js +2 -4
- package/dist/esm/lib/components/classification-status/messages.js +10 -12
- package/dist/esm/lib/components/index.js +5 -10
- package/dist/esm/lib/components/remove-collaborator-modal/index.js +2 -4
- package/dist/esm/lib/components/remove-collaborator-modal/messages.js +26 -28
- package/dist/esm/lib/components/remove-collaborator-modal/remove-collaborator-modal.js +2 -84
- package/dist/esm/lib/components/remove-shared-link-modal/index.js +2 -4
- package/dist/esm/lib/components/remove-shared-link-modal/messages.js +26 -28
- package/dist/esm/lib/components/remove-shared-link-modal/remove-shared-link-modal.js +2 -72
- package/dist/esm/lib/components/shared-link-settings-modal/download-section.js +35 -61
- package/dist/esm/lib/components/shared-link-settings-modal/expiration-section.js +33 -50
- package/dist/esm/lib/components/shared-link-settings-modal/index.js +2 -4
- package/dist/esm/lib/components/shared-link-settings-modal/messages.js +138 -144
- package/dist/esm/lib/components/shared-link-settings-modal/password-section.js +32 -52
- package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings-modal.js +2 -98
- package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings.js +97 -126
- package/dist/esm/lib/components/shared-link-settings-modal/vanity-section.js +33 -47
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-role.js +2 -128
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-section.js +2 -202
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/index.js +2 -4
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/messages.js +134 -136
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/shared-with-avatars.js +2 -67
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/shield-restriction-notice.js +2 -134
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/text-area-container.js +2 -53
- package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-avatar.js +48 -60
- package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-list-item.js +2 -86
- package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-list.js +2 -101
- package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/index.js +2 -4
- package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/messages.js +38 -40
- package/dist/esm/lib/components/unified-share-form-modal/index.js +2 -4
- package/dist/esm/lib/components/unified-share-form-modal/messages.js +46 -48
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/index.js +2 -4
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/messages.js +142 -144
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-access.js +2 -102
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-permission.js +2 -105
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-section.js +2 -191
- package/dist/esm/lib/components/unified-share-form-modal/unified-share-form-modal.js +2 -85
- package/dist/esm/lib/components/unified-share-form-modal/unified-share-form.js +2 -29
- package/dist/esm/lib/constants.js +44 -28
- package/dist/esm/lib/contexts/index.js +4 -14
- package/dist/esm/lib/contexts/shared-link-settings-context.js +50 -59
- package/dist/esm/lib/contexts/unified-share-form-context.js +60 -57
- package/dist/esm/lib/contexts/unified-share-modal-context.js +65 -68
- package/dist/esm/lib/hooks/index.js +7 -14
- package/dist/esm/lib/hooks/use-access-levels.js +69 -93
- package/dist/esm/lib/hooks/use-collaboration-form.js +75 -95
- package/dist/esm/lib/hooks/use-form-validation.js +32 -43
- package/dist/esm/lib/hooks/use-link-settings-form.js +49 -64
- package/dist/esm/lib/hooks/use-permission-levels.js +33 -50
- package/dist/esm/lib/hooks/use-sharing-action.js +44 -59
- package/dist/esm/lib/messages.js +106 -108
- package/dist/esm/lib/unified-share-base.js +30 -40
- package/dist/esm/lib/unified-share-modal.js +41 -59
- package/dist/esm/lib/utils/collaborator.js +12 -27
- package/dist/esm/lib/utils/date.js +10 -14
- package/dist/esm/lib/utils/email.js +5 -7
- package/dist/esm/lib/utils/event.js +6 -13
- package/dist/esm/lib/utils/form.js +4 -14
- package/dist/esm/lib/utils/index.js +9 -34
- package/dist/esm/lib/utils/notification.js +19 -28
- package/dist/esm/lib/utils/permission.js +15 -22
- package/dist/esm/lib/utils/validation.js +2 -11
- package/dist/styles/classification-status.css +1 -1
- package/dist/styles/collaboration-role.css +1 -1
- package/dist/styles/collaboration-section.css +1 -1
- package/dist/styles/collaborator-list-item.css +1 -1
- package/dist/styles/collaborator-list.css +1 -1
- package/dist/styles/remove-collaborator-modal.css +1 -1
- package/dist/styles/shared-link-access.css +1 -1
- package/dist/styles/shared-link-section.css +1 -1
- package/dist/styles/shared-link-settings-modal.css +1 -1
- package/dist/styles/shared-with-avatars.css +1 -1
- package/dist/styles/shield-restriction-notice.css +1 -1
- package/dist/styles/text-area-container.css +1 -1
- package/dist/styles/unified-share-form-modal.css +1 -1
- package/dist/styles/unified-share-form.css +1 -1
- package/package.json +9 -9
|
@@ -1,146 +1,140 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
inaccessibleSettingsNotice: {
|
|
140
|
-
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.inaccessibleSettingsNotice",
|
|
141
|
-
defaultMessage: "Certain settings may not be available for this item due to permissions."
|
|
142
|
-
}
|
|
2
|
+
var t = e({
|
|
3
|
+
title: {
|
|
4
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.title",
|
|
5
|
+
defaultMessage: "Shared Link Settings"
|
|
6
|
+
},
|
|
7
|
+
subtitleCompanyDownload: {
|
|
8
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.subtitleCompanyDownload",
|
|
9
|
+
defaultMessage: "This content is available to anyone within your company with the link, and can be viewed or downloaded. {learnSharedLinkSettingsLink}"
|
|
10
|
+
},
|
|
11
|
+
subtitleCompanyView: {
|
|
12
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.subtitleCompanyView",
|
|
13
|
+
defaultMessage: "This content is available to anyone within your company with the link, and can be viewed. {learnSharedLinkSettingsLink}"
|
|
14
|
+
},
|
|
15
|
+
subtitleOpenDownload: {
|
|
16
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.subtitleOpenDownload",
|
|
17
|
+
defaultMessage: "This content is publicly available to anyone with the link, and can be viewed or downloaded. {learnSharedLinkSettingsLink}"
|
|
18
|
+
},
|
|
19
|
+
subtitleOpenView: {
|
|
20
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.subtitleOpenView",
|
|
21
|
+
defaultMessage: "This content is publicly available to anyone with the link, and can be viewed. {learnSharedLinkSettingsLink}"
|
|
22
|
+
},
|
|
23
|
+
subtitleCollaborators: {
|
|
24
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.subtitleCollaborators",
|
|
25
|
+
defaultMessage: "This content is available to invited collaborators with the link. {learnSharedLinkSettingsLink}"
|
|
26
|
+
},
|
|
27
|
+
cancelButton: {
|
|
28
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.cancelButton",
|
|
29
|
+
defaultMessage: "Cancel"
|
|
30
|
+
},
|
|
31
|
+
closeButton: {
|
|
32
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.closeButton",
|
|
33
|
+
defaultMessage: "Close"
|
|
34
|
+
},
|
|
35
|
+
loadingLabel: {
|
|
36
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.loadingLabel",
|
|
37
|
+
defaultMessage: "Loading"
|
|
38
|
+
},
|
|
39
|
+
saveButton: {
|
|
40
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.saveButton",
|
|
41
|
+
defaultMessage: "Save"
|
|
42
|
+
},
|
|
43
|
+
learnSharedLinkSettingsLink: {
|
|
44
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.learnSharedLinkSettingsLink",
|
|
45
|
+
defaultMessage: "Learn more about shared link settings."
|
|
46
|
+
},
|
|
47
|
+
linkExpirationCalendarAriaLabel: {
|
|
48
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.linkExpirationCalendarAriaLabel",
|
|
49
|
+
defaultMessage: "Select an expiration date"
|
|
50
|
+
},
|
|
51
|
+
linkExpirationClearDatePickerAriaLabel: {
|
|
52
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.linkExpirationClearDatePickerAriaLabel",
|
|
53
|
+
defaultMessage: "Clear date picker"
|
|
54
|
+
},
|
|
55
|
+
linkExpirationNextMonthAriaLabel: {
|
|
56
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.linkExpirationNextMonthAriaLabel",
|
|
57
|
+
defaultMessage: "Switch to next month"
|
|
58
|
+
},
|
|
59
|
+
linkExpirationOpenCalendarDropdownAriaLabel: {
|
|
60
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.linkExpirationOpenCalendarDropdownAriaLabel",
|
|
61
|
+
defaultMessage: "Open calendar"
|
|
62
|
+
},
|
|
63
|
+
linkExpirationPreviousMonthAriaLabel: {
|
|
64
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.linkExpirationPreviousMonthAriaLabel",
|
|
65
|
+
defaultMessage: "Switch to previous month"
|
|
66
|
+
},
|
|
67
|
+
linkExpirationDatePickerLabel: {
|
|
68
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.linkExpirationDatePickerLabel",
|
|
69
|
+
defaultMessage: "Expiration date"
|
|
70
|
+
},
|
|
71
|
+
linkExpirationToggleText: {
|
|
72
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.linkExpirationToggleText",
|
|
73
|
+
defaultMessage: "Link expiration"
|
|
74
|
+
},
|
|
75
|
+
vanityNameToggleText: {
|
|
76
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.vanityNameToggleText",
|
|
77
|
+
defaultMessage: "Publish content broadly with a custom, non-private URL"
|
|
78
|
+
},
|
|
79
|
+
warningNoticeIconAriaLabel: {
|
|
80
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.warningNoticeIconAriaLabel",
|
|
81
|
+
defaultMessage: "Warning"
|
|
82
|
+
},
|
|
83
|
+
vanityDomainSettingsWarningText: {
|
|
84
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.vanityDomainSettingsWarningText",
|
|
85
|
+
defaultMessage: "Custom URLs should not be used when sharing sensitive content."
|
|
86
|
+
},
|
|
87
|
+
vanityNameInputLabel: {
|
|
88
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.vanityNameInputLabel",
|
|
89
|
+
defaultMessage: "Custom path"
|
|
90
|
+
},
|
|
91
|
+
vanityNameInputPlaceholder: {
|
|
92
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.vanityNameInputPlaceholder",
|
|
93
|
+
defaultMessage: "Enter a custom path (12 or more characters)"
|
|
94
|
+
},
|
|
95
|
+
downloadSettingsToggleText: {
|
|
96
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.downloadSettingsToggleText",
|
|
97
|
+
defaultMessage: "Allow users with the shared link to download this item"
|
|
98
|
+
},
|
|
99
|
+
directLinkLabel: {
|
|
100
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.directLinkLabel",
|
|
101
|
+
defaultMessage: "Direct link"
|
|
102
|
+
},
|
|
103
|
+
directLinkBlockedByMaliciousContent: {
|
|
104
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.directLinkBlockedByMaliciousContent",
|
|
105
|
+
defaultMessage: "Download for this content has been disabled due to a security policy."
|
|
106
|
+
},
|
|
107
|
+
directLinkBlockedByAccessPolicyWithClassification: {
|
|
108
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.directLinkBlockedByAccessPolicyWithClassification",
|
|
109
|
+
defaultMessage: "Download has been disabled for content due to the classification."
|
|
110
|
+
},
|
|
111
|
+
directLinkBlockedByAccessPolicyWithoutClassification: {
|
|
112
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.directLinkBlockedByAccessPolicyWithoutClassification",
|
|
113
|
+
defaultMessage: "Download has been disabled for content without classification."
|
|
114
|
+
},
|
|
115
|
+
passwordToggleText: {
|
|
116
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.passwordToggleText",
|
|
117
|
+
defaultMessage: "Password protection"
|
|
118
|
+
},
|
|
119
|
+
passwordInputPlaceholder: {
|
|
120
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.passwordInputPlaceholder",
|
|
121
|
+
defaultMessage: "Enter a password"
|
|
122
|
+
},
|
|
123
|
+
passwordWarningText: {
|
|
124
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.passwordWarningText",
|
|
125
|
+
defaultMessage: "Passwords must include at least 8 characters, and must contain at least one upper case letter, number, or special character."
|
|
126
|
+
},
|
|
127
|
+
showPasswordAriaLabel: {
|
|
128
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.showPasswordAriaLabel",
|
|
129
|
+
defaultMessage: "Show password"
|
|
130
|
+
},
|
|
131
|
+
hidePasswordAriaLabel: {
|
|
132
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.hidePasswordAriaLabel",
|
|
133
|
+
defaultMessage: "Hide password"
|
|
134
|
+
},
|
|
135
|
+
inaccessibleSettingsNotice: {
|
|
136
|
+
id: "groupSharedFeatures.usm.sharedLinkSettingsModal.inaccessibleSettingsNotice",
|
|
137
|
+
defaultMessage: "Certain settings may not be available for this item due to permissions."
|
|
138
|
+
}
|
|
143
139
|
});
|
|
144
|
-
export {
|
|
145
|
-
t as default
|
|
146
|
-
};
|
|
140
|
+
export { t as default };
|
|
@@ -1,53 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import r from "
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
variantIconAriaLabel: e(r.warningNoticeIconAriaLabel),
|
|
33
|
-
children: e(r.passwordWarningText)
|
|
34
|
-
}), /* @__PURE__ */ o(f, {
|
|
35
|
-
autoComplete: "new-password",
|
|
36
|
-
disabled: t || !a,
|
|
37
|
-
error: n,
|
|
38
|
-
hideLabel: !0,
|
|
39
|
-
hidePasswordAriaLabel: e(r.hidePasswordAriaLabel),
|
|
40
|
-
label: e(r.passwordToggleText),
|
|
41
|
-
onBlur: p,
|
|
42
|
-
onChange: c,
|
|
43
|
-
onFocus: m,
|
|
44
|
-
placeholder: w ? A : e(r.passwordInputPlaceholder),
|
|
45
|
-
showPasswordAriaLabel: e(r.showPasswordAriaLabel),
|
|
46
|
-
value: u
|
|
47
|
-
})]
|
|
48
|
-
})]
|
|
49
|
-
}) : null;
|
|
1
|
+
import e from "./messages.js";
|
|
2
|
+
import { useIntl as t } from "react-intl";
|
|
3
|
+
import { InlineNotice as n, PasswordInput as r, Switch as i } from "@box/blueprint-web";
|
|
4
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
var c = "••••••••";
|
|
6
|
+
function l({ canChange: l, error: u, isAvailable: d, isChecked: f, isDefaultChecked: p, isDisabled: m, onBlur: h, onChange: g, onFocus: _, onToggle: v, password: y }) {
|
|
7
|
+
let { formatMessage: b } = t();
|
|
8
|
+
return d ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(i.Item, {
|
|
9
|
+
checked: f,
|
|
10
|
+
disabled: m || !l,
|
|
11
|
+
label: b(e.passwordToggleText),
|
|
12
|
+
onCheckedChange: v,
|
|
13
|
+
value: "password-settings"
|
|
14
|
+
}), f && /* @__PURE__ */ s(a, { children: [l && /* @__PURE__ */ o(n, {
|
|
15
|
+
variant: "warning",
|
|
16
|
+
variantIconAriaLabel: b(e.warningNoticeIconAriaLabel),
|
|
17
|
+
children: b(e.passwordWarningText)
|
|
18
|
+
}), /* @__PURE__ */ o(r, {
|
|
19
|
+
autoComplete: "new-password",
|
|
20
|
+
disabled: m || !l,
|
|
21
|
+
error: u,
|
|
22
|
+
hideLabel: !0,
|
|
23
|
+
hidePasswordAriaLabel: b(e.hidePasswordAriaLabel),
|
|
24
|
+
label: b(e.passwordToggleText),
|
|
25
|
+
onBlur: h,
|
|
26
|
+
onChange: g,
|
|
27
|
+
onFocus: _,
|
|
28
|
+
placeholder: p ? c : b(e.passwordInputPlaceholder),
|
|
29
|
+
showPasswordAriaLabel: b(e.showPasswordAriaLabel),
|
|
30
|
+
value: y
|
|
31
|
+
})] })] }) : null;
|
|
50
32
|
}
|
|
51
|
-
export {
|
|
52
|
-
T as PasswordSection
|
|
53
|
-
};
|
|
33
|
+
export { l as PasswordSection };
|
|
@@ -1,98 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { useIntl as B } from "react-intl";
|
|
4
|
-
import { Modal as i, LoadingIndicator as N, Divider as x } from "@box/blueprint-web";
|
|
5
|
-
import { SharedLinkSettings as D } from "./shared-link-settings.js";
|
|
6
|
-
import n from "./messages.js";
|
|
7
|
-
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
8
|
-
import { ClassificationStatus as M } from "../classification-status/classification-status.js";
|
|
9
|
-
import { useUnifiedShareModalContext as w } from "../../contexts/unified-share-modal-context.js";
|
|
10
|
-
import { useSharedLinkSettingsContext as I } from "../../contexts/shared-link-settings-context.js";
|
|
11
|
-
import '../../../../styles/shared-link-settings-modal.css';const P = "_content_54561_1", j = "_isFullscreen_54561_4", z = "_body_54561_13", A = "_title_54561_23", E = "_form_54561_43", H = "_isLoading_54561_50", R = "_loading_54561_54", U = "_divider_54561_62", t = {
|
|
12
|
-
content: P,
|
|
13
|
-
isFullscreen: j,
|
|
14
|
-
body: z,
|
|
15
|
-
title: A,
|
|
16
|
-
form: E,
|
|
17
|
-
isLoading: H,
|
|
18
|
-
loading: R,
|
|
19
|
-
divider: U
|
|
20
|
-
};
|
|
21
|
-
function Z({
|
|
22
|
-
isOpen: a,
|
|
23
|
-
onOpenChange: f
|
|
24
|
-
}) {
|
|
25
|
-
const {
|
|
26
|
-
formatMessage: o
|
|
27
|
-
} = B(), {
|
|
28
|
-
eventService: h,
|
|
29
|
-
isSubmitting: r,
|
|
30
|
-
variant: S
|
|
31
|
-
} = w(), {
|
|
32
|
-
onSharedLinkSettingsClose: u,
|
|
33
|
-
onSharedLinkSettingsLoad: d
|
|
34
|
-
} = h, c = S === "desktop", {
|
|
35
|
-
resetForm: g,
|
|
36
|
-
setContainerRef: L,
|
|
37
|
-
submitForm: b
|
|
38
|
-
} = I(), [m, p] = C(!!d);
|
|
39
|
-
F(() => {
|
|
40
|
-
(async () => d && (a && await d(), p(!a)))();
|
|
41
|
-
}, [a, d]);
|
|
42
|
-
const _ = () => {
|
|
43
|
-
r || (g(), u && u(), f(!1));
|
|
44
|
-
}, v = async () => {
|
|
45
|
-
await b() || (g(), f(!1));
|
|
46
|
-
}, y = (k) => {
|
|
47
|
-
k.preventDefault();
|
|
48
|
-
};
|
|
49
|
-
return /* @__PURE__ */ e(i, {
|
|
50
|
-
onOpenChange: _,
|
|
51
|
-
open: a,
|
|
52
|
-
children: /* @__PURE__ */ s(i.Content, {
|
|
53
|
-
ref: L,
|
|
54
|
-
className: l(t.content, c && t.isFullscreen),
|
|
55
|
-
onPointerDownOutside: y,
|
|
56
|
-
size: "medium",
|
|
57
|
-
children: [/* @__PURE__ */ s(i.Header, {
|
|
58
|
-
children: [/* @__PURE__ */ e("div", {
|
|
59
|
-
className: t.title,
|
|
60
|
-
children: o(n.title)
|
|
61
|
-
}), /* @__PURE__ */ e(M, {})]
|
|
62
|
-
}), /* @__PURE__ */ s("div", {
|
|
63
|
-
className: l(t.form),
|
|
64
|
-
children: [m && /* @__PURE__ */ e("div", {
|
|
65
|
-
className: t.loading,
|
|
66
|
-
children: /* @__PURE__ */ e(N, {
|
|
67
|
-
"aria-label": o(n.loadingLabel),
|
|
68
|
-
size: "large"
|
|
69
|
-
})
|
|
70
|
-
}), /* @__PURE__ */ s(i.Body, {
|
|
71
|
-
className: l(t.body, m && t.isLoading),
|
|
72
|
-
children: [c && /* @__PURE__ */ e(x, {
|
|
73
|
-
className: t.divider
|
|
74
|
-
}), /* @__PURE__ */ e(D, {})]
|
|
75
|
-
}), /* @__PURE__ */ s(i.Footer, {
|
|
76
|
-
className: l(m && t.isLoading),
|
|
77
|
-
children: [/* @__PURE__ */ e(i.Footer.SecondaryButton, {
|
|
78
|
-
disabled: r,
|
|
79
|
-
onClick: _,
|
|
80
|
-
children: o(n.cancelButton)
|
|
81
|
-
}), /* @__PURE__ */ e(i.Footer.PrimaryButton, {
|
|
82
|
-
id: "usm-SharedLinkSettingsModal-primaryButton",
|
|
83
|
-
loading: r,
|
|
84
|
-
loadingAriaLabel: o(n.loadingLabel),
|
|
85
|
-
onClick: v,
|
|
86
|
-
children: o(n.saveButton)
|
|
87
|
-
})]
|
|
88
|
-
})]
|
|
89
|
-
}), !c && /* @__PURE__ */ e(i.Close, {
|
|
90
|
-
"aria-label": o(n.closeButton),
|
|
91
|
-
disabled: r
|
|
92
|
-
})]
|
|
93
|
-
})
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
export {
|
|
97
|
-
Z as SharedLinkSettingsModal
|
|
98
|
-
};
|
|
1
|
+
import { t as e } from "../../../../chunks/shared-link-settings-modal.js";
|
|
2
|
+
export { e as SharedLinkSettingsModal };
|