@box/unified-share-modal 1.31.2 → 1.32.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/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-section.js +106 -97
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/messages.js +4 -0
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/messages.js +12 -0
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-section.js +127 -112
- package/dist/i18n/bn-IN.js +4 -0
- package/dist/i18n/da-DK.js +4 -0
- package/dist/i18n/de-DE.js +4 -0
- package/dist/i18n/en-AU.js +4 -0
- package/dist/i18n/en-CA.js +4 -0
- package/dist/i18n/en-GB.js +4 -0
- package/dist/i18n/en-US.js +4 -0
- package/dist/i18n/en-US.properties +8 -0
- package/dist/i18n/en-x-pseudo.js +4 -0
- package/dist/i18n/es-419.js +4 -0
- package/dist/i18n/es-ES.js +4 -0
- package/dist/i18n/fi-FI.js +4 -0
- package/dist/i18n/fr-CA.js +4 -0
- package/dist/i18n/fr-FR.js +4 -0
- package/dist/i18n/hi-IN.js +4 -0
- package/dist/i18n/it-IT.js +4 -0
- package/dist/i18n/ja-JP.js +4 -0
- package/dist/i18n/json/src/lib/components/unified-share-form-modal/collaboration-section/messages.json +1 -1
- package/dist/i18n/json/src/lib/components/unified-share-form-modal/shared-link-section/messages.json +1 -1
- package/dist/i18n/ko-KR.js +4 -0
- package/dist/i18n/nb-NO.js +4 -0
- package/dist/i18n/nl-NL.js +4 -0
- package/dist/i18n/pl-PL.js +4 -0
- package/dist/i18n/pt-BR.js +4 -0
- package/dist/i18n/ru-RU.js +4 -0
- package/dist/i18n/sv-SE.js +4 -0
- package/dist/i18n/tr-TR.js +4 -0
- package/dist/i18n/zh-CN.js +4 -0
- package/dist/i18n/zh-TW.js +4 -0
- package/dist/styles/collaboration-section.css +1 -1
- package/dist/styles/shared-link-section.css +1 -1
- package/dist/types/lib/components/unified-share-form-modal/collaboration-section/messages.d.ts +5 -0
- package/dist/types/lib/components/unified-share-form-modal/shared-link-section/messages.d.ts +15 -0
- package/package.json +2 -2
|
@@ -1,82 +1,84 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import { createPortal as
|
|
3
|
-
import { useIntl as
|
|
4
|
-
import { useNotification as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { useState as le, useRef as ce, useEffect as R, useCallback as x } from "react";
|
|
2
|
+
import { createPortal as de } from "react-dom";
|
|
3
|
+
import { useIntl as ue } from "react-intl";
|
|
4
|
+
import { useNotification as me, useUniqueId as he, useLabelable as fe, Tooltip as pe, Focusable as be, Text as Ce, Modal as h } from "@box/blueprint-web";
|
|
5
|
+
import { Globe as ge } from "@box/blueprint-web-assets/icons/Medium";
|
|
6
|
+
import { UserSelectorContainer as ve } from "@box/user-selector";
|
|
7
|
+
import { CollaborationRole as Se } from "./collaboration-role.js";
|
|
8
|
+
import { SharedWithAvatars as Le } from "./shared-with-avatars.js";
|
|
9
|
+
import { ShieldRestrictionNotice as Ue } from "./shield-restriction-notice.js";
|
|
10
|
+
import { TextAreaContainer as xe } from "./text-area-container.js";
|
|
11
|
+
import { COLLABORATION_MESSAGE_CHARACTER_LIMIT as Fe } from "../../../constants.js";
|
|
11
12
|
import o from "./messages.js";
|
|
12
|
-
import { jsxs as
|
|
13
|
-
import { useFormValidation as
|
|
14
|
-
import { useCollaborationForm as
|
|
15
|
-
import { useUnifiedShareFormContext as
|
|
16
|
-
import { useUnifiedShareModalContext as
|
|
17
|
-
import '../../../../../styles/collaboration-section.css';const
|
|
18
|
-
container:
|
|
19
|
-
label:
|
|
13
|
+
import { jsxs as l, jsx as r, Fragment as ye } from "react/jsx-runtime";
|
|
14
|
+
import { useFormValidation as Ae } from "../../../hooks/use-form-validation.js";
|
|
15
|
+
import { useCollaborationForm as Ie } from "../../../hooks/use-collaboration-form.js";
|
|
16
|
+
import { useUnifiedShareFormContext as Ee } from "../../../contexts/unified-share-form-context.js";
|
|
17
|
+
import { useUnifiedShareModalContext as Be } from "../../../contexts/unified-share-modal-context.js";
|
|
18
|
+
import '../../../../../styles/collaboration-section.css';const Ve = "_container_1ixpu_2", _e = "_label_1ixpu_8", Re = "_securityIndicator_1ixpu_23", F = {
|
|
19
|
+
container: Ve,
|
|
20
|
+
label: _e,
|
|
21
|
+
securityIndicator: Re
|
|
20
22
|
};
|
|
21
|
-
function
|
|
23
|
+
function Qe() {
|
|
22
24
|
const {
|
|
23
25
|
formatMessage: t
|
|
24
|
-
} =
|
|
25
|
-
addNotification:
|
|
26
|
-
} =
|
|
27
|
-
validateShieldRestriction:
|
|
28
|
-
} =
|
|
29
|
-
contactValue:
|
|
26
|
+
} = ue(), [f, y] = le(), {
|
|
27
|
+
addNotification: T
|
|
28
|
+
} = me(), {
|
|
29
|
+
validateShieldRestriction: N
|
|
30
|
+
} = Ae(), {
|
|
31
|
+
contactValue: O,
|
|
30
32
|
container: p,
|
|
31
|
-
onModalOpenChange:
|
|
33
|
+
onModalOpenChange: A,
|
|
32
34
|
onShareViewChange: b,
|
|
33
|
-
setUserContacts:
|
|
35
|
+
setUserContacts: P,
|
|
34
36
|
shareView: i,
|
|
35
37
|
userContacts: n
|
|
36
|
-
} =
|
|
37
|
-
collaborationNotices:
|
|
38
|
+
} = Ee(), {
|
|
39
|
+
collaborationNotices: k,
|
|
38
40
|
config: C,
|
|
39
|
-
contactService:
|
|
41
|
+
contactService: M,
|
|
40
42
|
isFetching: w,
|
|
41
|
-
isSubmitting:
|
|
42
|
-
item:
|
|
43
|
-
sharingService:
|
|
44
|
-
} =
|
|
45
|
-
permissions:
|
|
43
|
+
isSubmitting: D,
|
|
44
|
+
item: G,
|
|
45
|
+
sharingService: W
|
|
46
|
+
} = Be(), {
|
|
47
|
+
permissions: j = {},
|
|
46
48
|
type: q
|
|
47
|
-
} =
|
|
49
|
+
} = G, {
|
|
48
50
|
getContacts: g,
|
|
49
51
|
getContactsAvatarUrls: v
|
|
50
|
-
} =
|
|
52
|
+
} = M, {
|
|
51
53
|
sendInvitations: H,
|
|
52
54
|
sendSharedLink: K
|
|
53
|
-
} =
|
|
55
|
+
} = W;
|
|
54
56
|
let S, L;
|
|
55
57
|
i === "invite" && (S = H, L = "invite-collaborators"), i === "email" && (S = K, L = "email-shared-link");
|
|
56
58
|
const {
|
|
57
59
|
errors: $,
|
|
58
|
-
handleFormReset:
|
|
60
|
+
handleFormReset: I,
|
|
59
61
|
handleFormSubmit: z,
|
|
60
|
-
handleSelectedUsersChange:
|
|
62
|
+
handleSelectedUsersChange: E,
|
|
61
63
|
handleUserSelectorBlur: J,
|
|
62
64
|
isFormSubmitting: Q,
|
|
63
65
|
updateContactValue: X
|
|
64
|
-
} =
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}, [i]),
|
|
68
|
-
(!n.length || !n.some((e) => e.chipVariant === "error")) &&
|
|
66
|
+
} = Ie(S, L), a = i === "default" || i === "invite", s = i === "invite" || i === "email", c = D ?? Q, Y = n.some((e) => e.isExternalUser), B = ce(i === "email" ? "email" : "invite");
|
|
67
|
+
R(() => {
|
|
68
|
+
B.current = i === "email" ? "email" : "invite";
|
|
69
|
+
}, [i]), R(() => {
|
|
70
|
+
(!n.length || !n.some((e) => e.chipVariant === "error")) && y(null);
|
|
69
71
|
}, [n]);
|
|
70
|
-
const
|
|
72
|
+
const Z = x((e) => (e.stopPropagation(), !0), []), ee = x((e) => g ? g(e, B.current) : Promise.resolve([]), [g]), te = x((e) => v ? v(e) : Promise.resolve({}), [v]), oe = (e) => {
|
|
71
73
|
s || b("invite"), X(e);
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
},
|
|
74
|
+
}, re = () => {
|
|
75
|
+
I(), b("default");
|
|
76
|
+
}, ie = async () => {
|
|
75
77
|
try {
|
|
76
|
-
if (
|
|
77
|
-
const e =
|
|
78
|
+
if (f) {
|
|
79
|
+
const e = N(n);
|
|
78
80
|
if (e) {
|
|
79
|
-
|
|
81
|
+
T({
|
|
80
82
|
closeButtonAriaLabel: t(o.closeButton),
|
|
81
83
|
sensitivity: "foreground",
|
|
82
84
|
styledText: e,
|
|
@@ -88,55 +90,55 @@ function He() {
|
|
|
88
90
|
}
|
|
89
91
|
if (await z())
|
|
90
92
|
return;
|
|
91
|
-
|
|
93
|
+
I(), A && A(!1), b("default");
|
|
92
94
|
} catch (e) {
|
|
93
95
|
if (!e.shieldRestriction)
|
|
94
96
|
return;
|
|
95
97
|
const {
|
|
96
|
-
shieldRestriction:
|
|
97
|
-
} = e,
|
|
98
|
-
...
|
|
98
|
+
shieldRestriction: U
|
|
99
|
+
} = e, _ = [...U.restrictedEmails ?? [], ...U.restrictedGroups ?? []], se = n.map((m) => _.includes(m.email) || _.includes(`${m.id}`) ? {
|
|
100
|
+
...m,
|
|
99
101
|
chipVariant: "error"
|
|
100
|
-
} :
|
|
101
|
-
|
|
102
|
+
} : m);
|
|
103
|
+
y(U), P(se);
|
|
102
104
|
}
|
|
103
105
|
};
|
|
104
|
-
let
|
|
105
|
-
a && !
|
|
106
|
-
const
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
-
className:
|
|
106
|
+
let d, u = !1;
|
|
107
|
+
a && !j.canInviteCollaborator && (d = t(o.inviteDisabledTooltip), u = !0), a && q === "web_link" && (d = t(o.inviteWebLinkDisabledTooltip), u = !0);
|
|
108
|
+
const V = he("user-contacts-"), ne = t(a ? o.invitePeopleLabel : o.emailSharedLinkLabel), ae = fe(ne, V);
|
|
109
|
+
return /* @__PURE__ */ l("form", {
|
|
110
|
+
className: F.container,
|
|
109
111
|
onSubmit: (e) => e.preventDefault(),
|
|
110
|
-
children: [
|
|
111
|
-
error:
|
|
112
|
-
isLoading:
|
|
113
|
-
onSelectedUsersChange:
|
|
114
|
-
}),
|
|
115
|
-
children: [a && C.collaborators && /* @__PURE__ */ r(
|
|
116
|
-
className:
|
|
117
|
-
}), /* @__PURE__ */ r(
|
|
118
|
-
content:
|
|
112
|
+
children: [f && /* @__PURE__ */ r(Ue, {
|
|
113
|
+
error: f,
|
|
114
|
+
isLoading: c,
|
|
115
|
+
onSelectedUsersChange: E
|
|
116
|
+
}), k, /* @__PURE__ */ l("div", {
|
|
117
|
+
children: [a && C.collaborators && /* @__PURE__ */ r(Le, {}), /* @__PURE__ */ r(ae, {
|
|
118
|
+
className: F.label
|
|
119
|
+
}), /* @__PURE__ */ r(pe, {
|
|
120
|
+
content: d,
|
|
119
121
|
"data-testid": "user-contacts-tooltip",
|
|
120
|
-
open:
|
|
122
|
+
open: d ? void 0 : !1,
|
|
121
123
|
side: "bottom",
|
|
122
|
-
children: /* @__PURE__ */ r(
|
|
123
|
-
focusable:
|
|
124
|
-
children: /* @__PURE__ */ r(
|
|
124
|
+
children: /* @__PURE__ */ r(be, {
|
|
125
|
+
focusable: u,
|
|
126
|
+
children: /* @__PURE__ */ r(ve, {
|
|
125
127
|
className: "collaboration-user-selector",
|
|
126
128
|
clearButtonAriaLabel: t(o.clearButton),
|
|
127
129
|
clearOnBlur: !1,
|
|
128
|
-
disabled:
|
|
130
|
+
disabled: u || c,
|
|
129
131
|
displayChipVariant: (e) => e.chipVariant,
|
|
130
132
|
error: $["user-contact"],
|
|
131
|
-
fetchAvatarUrls:
|
|
132
|
-
fetchUsers:
|
|
133
|
-
hideOnEscape:
|
|
134
|
-
idForLabel:
|
|
135
|
-
inputValue:
|
|
133
|
+
fetchAvatarUrls: te,
|
|
134
|
+
fetchUsers: ee,
|
|
135
|
+
hideOnEscape: Z,
|
|
136
|
+
idForLabel: V,
|
|
137
|
+
inputValue: O,
|
|
136
138
|
label: null,
|
|
137
139
|
onBlur: J,
|
|
138
|
-
onInputValueChange:
|
|
139
|
-
onSelectedUsersChange:
|
|
140
|
+
onInputValueChange: oe,
|
|
141
|
+
onSelectedUsersChange: E,
|
|
140
142
|
placeholder: n.length ? "" : t(o.invitePeoplePlaceholder),
|
|
141
143
|
portalElement: p,
|
|
142
144
|
selectedUsers: n,
|
|
@@ -144,27 +146,34 @@ function He() {
|
|
|
144
146
|
variant: s ? "textarea" : "input"
|
|
145
147
|
})
|
|
146
148
|
})
|
|
147
|
-
}), a && C.collaborationRole && /* @__PURE__ */ r(
|
|
148
|
-
}), s && C.collaborationMessage && /* @__PURE__ */ r(
|
|
149
|
-
maxCount:
|
|
150
|
-
}), s &&
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
}), a && C.collaborationRole && /* @__PURE__ */ r(Se, {})]
|
|
150
|
+
}), s && C.collaborationMessage && /* @__PURE__ */ r(xe, {
|
|
151
|
+
maxCount: Fe
|
|
152
|
+
}), s && Y && /* @__PURE__ */ l("div", {
|
|
153
|
+
className: F.securityIndicator,
|
|
154
|
+
children: [/* @__PURE__ */ r(ge, {}), /* @__PURE__ */ r(Ce, {
|
|
155
|
+
as: "span",
|
|
156
|
+
color: "textOnLightSecondary",
|
|
157
|
+
children: t(o.contentSharedWithExternalCollaborators)
|
|
158
|
+
})]
|
|
159
|
+
}), s && p && /* @__PURE__ */ de(/* @__PURE__ */ l(ye, {
|
|
160
|
+
children: [!w && /* @__PURE__ */ l(h.Footer, {
|
|
161
|
+
children: [/* @__PURE__ */ r(h.Footer.SecondaryButton, {
|
|
162
|
+
disabled: c,
|
|
163
|
+
onClick: re,
|
|
155
164
|
children: t(o.cancelButton)
|
|
156
|
-
}), /* @__PURE__ */ r(
|
|
157
|
-
loading:
|
|
165
|
+
}), /* @__PURE__ */ r(h.Footer.PrimaryButton, {
|
|
166
|
+
loading: c,
|
|
158
167
|
loadingAriaLabel: t(o.loadingLabel),
|
|
159
|
-
onClick:
|
|
168
|
+
onClick: ie,
|
|
160
169
|
children: t(o.sendButton)
|
|
161
170
|
})]
|
|
162
|
-
}), /* @__PURE__ */ r(
|
|
171
|
+
}), /* @__PURE__ */ r(h.Close, {
|
|
163
172
|
"aria-label": t(o.closeButton)
|
|
164
173
|
})]
|
|
165
174
|
}), p)]
|
|
166
175
|
});
|
|
167
176
|
}
|
|
168
177
|
export {
|
|
169
|
-
|
|
178
|
+
Qe as CollaborationSection
|
|
170
179
|
};
|
|
@@ -12,6 +12,10 @@ const a = e({
|
|
|
12
12
|
id: "groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.clearButton",
|
|
13
13
|
defaultMessage: "Clear"
|
|
14
14
|
},
|
|
15
|
+
contentSharedWithExternalCollaborators: {
|
|
16
|
+
id: "groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.contentSharedWithExternalCollaborators",
|
|
17
|
+
defaultMessage: "This content will be shared with external collaborators."
|
|
18
|
+
},
|
|
15
19
|
sendButton: {
|
|
16
20
|
id: "groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.sendButton",
|
|
17
21
|
defaultMessage: "Send"
|
|
@@ -32,6 +32,18 @@ const i = e({
|
|
|
32
32
|
id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkEmailLabel",
|
|
33
33
|
defaultMessage: "Send Shared Link"
|
|
34
34
|
},
|
|
35
|
+
sharedLinkPubliclyAvailable: {
|
|
36
|
+
id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkPubliclyAvailable",
|
|
37
|
+
defaultMessage: "This content is publicly available to anyone with the link."
|
|
38
|
+
},
|
|
39
|
+
sharedLinkEditablePubliclyAvailable: {
|
|
40
|
+
id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkEditablePubliclyAvailable",
|
|
41
|
+
defaultMessage: "Publicly available for anyone to view and download. Any logged in users with the link can edit."
|
|
42
|
+
},
|
|
43
|
+
sharedLinkElevatedEditableCompanyAvailable: {
|
|
44
|
+
id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkElevatedEditableCompanyAvailable",
|
|
45
|
+
defaultMessage: "People who have access to this link can edit."
|
|
46
|
+
},
|
|
35
47
|
expirationIconLabel: {
|
|
36
48
|
id: "groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.expirationIconLabel",
|
|
37
49
|
defaultMessage: "Expires"
|
package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-section.js
CHANGED
|
@@ -1,155 +1,170 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { useIntl as
|
|
3
|
-
import { Text as
|
|
4
|
-
import { ClockBadge as
|
|
5
|
-
import { Mail as
|
|
6
|
-
import { SurfaceStatusSurfaceRed as
|
|
7
|
-
import { CopyInput as
|
|
8
|
-
import { SharedLinkAccess as
|
|
9
|
-
import { SharedLinkPermission as
|
|
10
|
-
import
|
|
11
|
-
import { jsxs as
|
|
1
|
+
import { useRef as S, useState as z, useCallback as v, useEffect as E } from "react";
|
|
2
|
+
import { useIntl as G } from "react-intl";
|
|
3
|
+
import { Text as x, Tooltip as _, Focusable as q, Switch as H, Status as J, Link as Q, Button as W } from "@box/blueprint-web";
|
|
4
|
+
import { ClockBadge as X } from "@box/blueprint-web-assets/icons/Line";
|
|
5
|
+
import { Mail as Y, Globe as N } from "@box/blueprint-web-assets/icons/Medium";
|
|
6
|
+
import { SurfaceStatusSurfaceRed as Z } from "@box/blueprint-web-assets/tokens/tokens";
|
|
7
|
+
import { CopyInput as $ } from "@box/copy-input";
|
|
8
|
+
import { SharedLinkAccess as ee } from "./shared-link-access.js";
|
|
9
|
+
import { SharedLinkPermission as ie } from "./shared-link-permission.js";
|
|
10
|
+
import i from "./messages.js";
|
|
11
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
12
12
|
import { useUnifiedShareFormContext as te } from "../../../contexts/unified-share-form-context.js";
|
|
13
|
-
import { useUnifiedShareModalContext as
|
|
14
|
-
import { useSharingAction as
|
|
15
|
-
import { formatDateFromTimestampToDateString as
|
|
16
|
-
import { callOnKeyboardEvent as
|
|
17
|
-
import '../../../../../styles/shared-link-section.css';const
|
|
18
|
-
container:
|
|
19
|
-
toggle:
|
|
20
|
-
settings:
|
|
21
|
-
copy:
|
|
22
|
-
access:
|
|
13
|
+
import { useUnifiedShareModalContext as ae } from "../../../contexts/unified-share-modal-context.js";
|
|
14
|
+
import { useSharingAction as P } from "../../../hooks/use-sharing-action.js";
|
|
15
|
+
import { formatDateFromTimestampToDateString as ne } from "../../../utils/date.js";
|
|
16
|
+
import { callOnKeyboardEvent as oe } from "../../../utils/event.js";
|
|
17
|
+
import '../../../../../styles/shared-link-section.css';const se = "_container_1w9vi_1", re = "_toggle_1w9vi_7", ce = "_settings_1w9vi_13", le = "_copy_1w9vi_22", de = "_access_1w9vi_30", he = "_securityIndicator_1w9vi_36", s = {
|
|
18
|
+
container: se,
|
|
19
|
+
toggle: re,
|
|
20
|
+
settings: ce,
|
|
21
|
+
copy: le,
|
|
22
|
+
access: de,
|
|
23
|
+
securityIndicator: he
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
+
function we() {
|
|
25
26
|
const {
|
|
26
27
|
formatMessage: e
|
|
27
|
-
} =
|
|
28
|
+
} = G(), g = S(!0), k = S(null), m = S(null), {
|
|
28
29
|
onModalViewChange: L,
|
|
29
|
-
onShareViewChange:
|
|
30
|
+
onShareViewChange: D
|
|
30
31
|
} = te(), {
|
|
31
|
-
config:
|
|
32
|
-
isFetching:
|
|
33
|
-
isSubmitting:
|
|
34
|
-
item:
|
|
35
|
-
sharedLink:
|
|
36
|
-
sharingService:
|
|
37
|
-
} =
|
|
38
|
-
permissions:
|
|
39
|
-
} =
|
|
40
|
-
createSharedLink:
|
|
41
|
-
} =
|
|
42
|
-
sharedLinkAutoCopy:
|
|
43
|
-
sharedLinkAutoCreate:
|
|
44
|
-
} =
|
|
45
|
-
let
|
|
46
|
-
|
|
32
|
+
config: o,
|
|
33
|
+
isFetching: A,
|
|
34
|
+
isSubmitting: F,
|
|
35
|
+
item: R,
|
|
36
|
+
sharedLink: n,
|
|
37
|
+
sharingService: M
|
|
38
|
+
} = ae(), {
|
|
39
|
+
permissions: T = {}
|
|
40
|
+
} = R, {
|
|
41
|
+
createSharedLink: B
|
|
42
|
+
} = M, {
|
|
43
|
+
sharedLinkAutoCopy: d,
|
|
44
|
+
sharedLinkAutoCreate: y
|
|
45
|
+
} = o;
|
|
46
|
+
let w = "create-shared-link";
|
|
47
|
+
d && (w = "auto-copy-shared-link");
|
|
47
48
|
const {
|
|
48
|
-
isLoading:
|
|
49
|
-
onAction:
|
|
50
|
-
} =
|
|
51
|
-
|
|
52
|
-
}, [
|
|
53
|
-
|
|
54
|
-
resolve:
|
|
49
|
+
isLoading: O,
|
|
50
|
+
onAction: b
|
|
51
|
+
} = P(B, w), a = !!n.url, r = F ?? O, [C, U] = z(!1), p = v(async () => {
|
|
52
|
+
a || (await b(), U(!0));
|
|
53
|
+
}, [a, b]), j = v(async () => (p(), new Promise((c) => {
|
|
54
|
+
m.current = {
|
|
55
|
+
resolve: c
|
|
55
56
|
};
|
|
56
|
-
})), [
|
|
57
|
-
onAction:
|
|
58
|
-
} =
|
|
59
|
-
|
|
60
|
-
!g.current ||
|
|
61
|
-
}, [
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
const
|
|
65
|
-
if (!
|
|
57
|
+
})), [p]), {
|
|
58
|
+
onAction: I
|
|
59
|
+
} = P(j, "auto-copy-shared-link");
|
|
60
|
+
E(() => {
|
|
61
|
+
!g.current || A || (d ? I() : y && p(), g.current = !1);
|
|
62
|
+
}, [A, g, d, y, p, I]), E(() => {
|
|
63
|
+
a && d && k.current && k.current.click();
|
|
64
|
+
}, [a, d]);
|
|
65
|
+
const K = v((u) => {
|
|
66
|
+
if (!m.current)
|
|
66
67
|
return;
|
|
67
|
-
let
|
|
68
|
-
|
|
68
|
+
let c;
|
|
69
|
+
u instanceof Error ? c = C ? e(i.autoCreateCopyErrorNoticeText) : null : c = e(C ? i.autoCreateCopySuccessNoticeText : i.autoCopySuccessNoticeText), c && m.current.resolve({
|
|
69
70
|
messages: [{
|
|
70
|
-
text:
|
|
71
|
+
text: c,
|
|
71
72
|
type: "success"
|
|
72
73
|
}]
|
|
73
|
-
}),
|
|
74
|
-
}, [e,
|
|
75
|
-
|
|
74
|
+
}), m.current = null;
|
|
75
|
+
}, [e, C]), V = async (u) => {
|
|
76
|
+
u || L("remove-shared-link"), u && await b();
|
|
76
77
|
};
|
|
77
|
-
let
|
|
78
|
-
return !
|
|
79
|
-
className:
|
|
80
|
-
children: [/* @__PURE__ */
|
|
78
|
+
let h, f = !1;
|
|
79
|
+
return !a && !r && (h = e(i.sharedLinkToggleTooltip)), !a && !T.canShare && (h = e(i.createLinkDisabledTooltip), f = !0), a && !T.canSetShareAccess && (h = e(i.removeLinkDisabledTooltip), f = !0), /* @__PURE__ */ l("div", {
|
|
80
|
+
className: s.container,
|
|
81
|
+
children: [/* @__PURE__ */ t(x, {
|
|
81
82
|
as: "label",
|
|
82
83
|
variant: "bodyDefaultBold",
|
|
83
|
-
children: e(
|
|
84
|
-
}), /* @__PURE__ */
|
|
85
|
-
className:
|
|
86
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: e(i.shareLinkLabel)
|
|
85
|
+
}), /* @__PURE__ */ l("div", {
|
|
86
|
+
className: s.toggle,
|
|
87
|
+
children: [/* @__PURE__ */ t(_, {
|
|
87
88
|
align: "start",
|
|
88
|
-
content:
|
|
89
|
+
content: h,
|
|
89
90
|
"data-testid": "shared-link-tooltip",
|
|
90
|
-
open:
|
|
91
|
-
children: /* @__PURE__ */
|
|
92
|
-
focusable:
|
|
93
|
-
children: /* @__PURE__ */
|
|
94
|
-
checked:
|
|
95
|
-
disabled:
|
|
96
|
-
label: e(
|
|
97
|
-
onCheckedChange:
|
|
91
|
+
open: h ? void 0 : !1,
|
|
92
|
+
children: /* @__PURE__ */ t(q, {
|
|
93
|
+
focusable: f,
|
|
94
|
+
children: /* @__PURE__ */ t(H.Item, {
|
|
95
|
+
checked: a,
|
|
96
|
+
disabled: f || r,
|
|
97
|
+
label: e(i.sharedLinkToggleLabel),
|
|
98
|
+
onCheckedChange: V,
|
|
98
99
|
value: "shared-link"
|
|
99
100
|
})
|
|
100
101
|
})
|
|
101
|
-
}),
|
|
102
|
-
content: e(
|
|
103
|
-
expirationDate:
|
|
102
|
+
}), a && !!n.expiresAt && /* @__PURE__ */ t(_, {
|
|
103
|
+
content: e(i.expirationIconTooltip, {
|
|
104
|
+
expirationDate: ne(n.expiresAt)
|
|
104
105
|
}),
|
|
105
106
|
"data-testid": "expiration-date-tooltip",
|
|
106
|
-
children: /* @__PURE__ */
|
|
107
|
-
color:
|
|
107
|
+
children: /* @__PURE__ */ t(J, {
|
|
108
|
+
color: Z,
|
|
108
109
|
hideText: !0,
|
|
109
|
-
icon:
|
|
110
|
-
text: e(
|
|
110
|
+
icon: X,
|
|
111
|
+
text: e(i.expirationIconLabel)
|
|
111
112
|
})
|
|
112
|
-
}),
|
|
113
|
-
"aria-disabled":
|
|
113
|
+
}), a && o.sharedLinkSettings && /* @__PURE__ */ t(Q, {
|
|
114
|
+
"aria-disabled": r,
|
|
114
115
|
"aria-haspopup": "dialog",
|
|
115
|
-
className:
|
|
116
|
+
className: s.settings,
|
|
116
117
|
onClick: () => L("shared-link-settings"),
|
|
117
|
-
onKeyDown:
|
|
118
|
+
onKeyDown: oe(() => L("shared-link-settings"), {
|
|
118
119
|
canPreventDefault: !0
|
|
119
120
|
}),
|
|
120
121
|
role: "button",
|
|
121
|
-
tabIndex:
|
|
122
|
+
tabIndex: r ? -1 : 0,
|
|
122
123
|
variant: "standalone",
|
|
123
|
-
children: e(
|
|
124
|
+
children: e(i.sharedLinkSettingsLabel)
|
|
124
125
|
})]
|
|
125
|
-
}),
|
|
126
|
-
className:
|
|
127
|
-
children: [/* @__PURE__ */
|
|
126
|
+
}), a && /* @__PURE__ */ l("div", {
|
|
127
|
+
className: s.copy,
|
|
128
|
+
children: [/* @__PURE__ */ t($, {
|
|
128
129
|
ref: k,
|
|
129
|
-
autoFocus:
|
|
130
|
-
disabled:
|
|
130
|
+
autoFocus: y && a,
|
|
131
|
+
disabled: r,
|
|
131
132
|
hideLabel: !0,
|
|
132
|
-
label: e(
|
|
133
|
-
onCopy:
|
|
134
|
-
value:
|
|
135
|
-
}),
|
|
133
|
+
label: e(i.sharedLinkUrlLabel),
|
|
134
|
+
onCopy: K,
|
|
135
|
+
value: n.url
|
|
136
|
+
}), o.sharedLinkEmail && /* @__PURE__ */ t(_, {
|
|
136
137
|
align: "end",
|
|
137
|
-
content: e(
|
|
138
|
-
children: /* @__PURE__ */
|
|
139
|
-
"aria-label": e(
|
|
140
|
-
disabled:
|
|
141
|
-
icon:
|
|
142
|
-
onClick: () =>
|
|
138
|
+
content: e(i.sharedLinkEmailLabel),
|
|
139
|
+
children: /* @__PURE__ */ t(W, {
|
|
140
|
+
"aria-label": e(i.sharedLinkEmailLabel),
|
|
141
|
+
disabled: r,
|
|
142
|
+
icon: Y,
|
|
143
|
+
onClick: () => D("email"),
|
|
143
144
|
size: "large",
|
|
144
145
|
variant: "secondary"
|
|
145
146
|
})
|
|
146
147
|
})]
|
|
147
|
-
}),
|
|
148
|
-
className:
|
|
149
|
-
children: [
|
|
148
|
+
}), a && (o.sharedLinkAccess || o.sharedLinkPermission) && /* @__PURE__ */ l("div", {
|
|
149
|
+
className: s.access,
|
|
150
|
+
children: [o.sharedLinkAccess && /* @__PURE__ */ t(ee, {}), o.sharedLinkPermission && /* @__PURE__ */ t(ie, {})]
|
|
151
|
+
}), a && n.access === "open" && /* @__PURE__ */ l("div", {
|
|
152
|
+
className: s.securityIndicator,
|
|
153
|
+
children: [/* @__PURE__ */ t(N, {}), /* @__PURE__ */ t(x, {
|
|
154
|
+
as: "span",
|
|
155
|
+
color: "textOnLightSecondary",
|
|
156
|
+
children: n.permission === "can_edit" ? e(i.sharedLinkEditablePubliclyAvailable) : e(i.sharedLinkPubliclyAvailable)
|
|
157
|
+
})]
|
|
158
|
+
}), a && n.access === "company" && n.permission === "can_edit" && /* @__PURE__ */ l("div", {
|
|
159
|
+
className: s.securityIndicator,
|
|
160
|
+
children: [/* @__PURE__ */ t(N, {}), /* @__PURE__ */ t(x, {
|
|
161
|
+
as: "span",
|
|
162
|
+
color: "textOnLightSecondary",
|
|
163
|
+
children: e(i.sharedLinkElevatedEditableCompanyAvailable)
|
|
164
|
+
})]
|
|
150
165
|
})]
|
|
151
166
|
});
|
|
152
167
|
}
|
|
153
168
|
export {
|
|
154
|
-
|
|
169
|
+
we as SharedLinkSection
|
|
155
170
|
};
|
package/dist/i18n/bn-IN.js
CHANGED
|
@@ -73,6 +73,7 @@ export default {
|
|
|
73
73
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.contactRestrictionInformationBarrierNotice": "{count, plural, one {{count} invitation} other {{count} invitations}} cannot be sent due to a security policy. {removeLink}",
|
|
74
74
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.contactRestrictionNotice": "{count, plural, one {{count} invitation} other {{count} invitations}} cannot be sent because external collaboration is restricted due to the applied security policy. {removeLink}",
|
|
75
75
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.contactRestrictionRemoveButtonLabel": "Remove to continue",
|
|
76
|
+
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.contentSharedWithExternalCollaborators": "This content will be shared with external collaborators.",
|
|
76
77
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.editorDescription": "আপলোড, ডাউনলোড করুন, প্রিভিউ দেখুন, শেয়ার ও সম্পাদনা করুন",
|
|
77
78
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.editorFolderDescription": "আপলোড, ডাউনলোড করুন, প্রিভিউ দেখুন, শেয়ার, সম্পাদনা করুন এবং মুছুন",
|
|
78
79
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.emailSharedLinkLabel": "শেয়ারকৃত লিঙ্ক ইমেইল করুন",
|
|
@@ -135,7 +136,10 @@ export default {
|
|
|
135
136
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.openAccessLevelLabel": "লিঙ্ক সহ লোকজনেরা",
|
|
136
137
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.removeLinkDisabledTooltip": "লিঙ্কটি অপসারণ করতে আপনার অনুমতি নেই",
|
|
137
138
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.shareLinkLabel": "লিঙ্ক শেয়ার করুন",
|
|
139
|
+
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkEditablePubliclyAvailable": "Publicly available for anyone to view and download. Any logged in users with the link can edit.",
|
|
140
|
+
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkElevatedEditableCompanyAvailable": "People who have access to this link can edit.",
|
|
138
141
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkEmailLabel": "শেয়ার করা লিঙ্ক পাঠান",
|
|
142
|
+
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkPubliclyAvailable": "This content is publicly available to anyone with the link.",
|
|
139
143
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkSettingsLabel": "লিঙ্ক সেটিংস",
|
|
140
144
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkToggleLabel": "শেয়ার করা লিঙ্ক",
|
|
141
145
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkToggleTooltip": "লিঙ্ক তৈরি করুন এবং কপি করুন",
|
package/dist/i18n/da-DK.js
CHANGED
|
@@ -73,6 +73,7 @@ export default {
|
|
|
73
73
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.contactRestrictionInformationBarrierNotice": "{count, plural, one {{count} invitation} other {{count} invitations}} cannot be sent due to a security policy. {removeLink}",
|
|
74
74
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.contactRestrictionNotice": "{count, plural, one {{count} invitation} other {{count} invitations}} cannot be sent because external collaboration is restricted due to the applied security policy. {removeLink}",
|
|
75
75
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.contactRestrictionRemoveButtonLabel": "Remove to continue",
|
|
76
|
+
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.contentSharedWithExternalCollaborators": "This content will be shared with external collaborators.",
|
|
76
77
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.editorDescription": "Upload, download, vis eksempel, del og rediger",
|
|
77
78
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.editorFolderDescription": "Upload, download, vis eksempel, del, rediger og slet",
|
|
78
79
|
"groupSharedFeatures.usm.unifiedShareFormModal.collaborationSection.emailSharedLinkLabel": "Send delt link via e-mail",
|
|
@@ -135,7 +136,10 @@ export default {
|
|
|
135
136
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.openAccessLevelLabel": "Personer med linket",
|
|
136
137
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.removeLinkDisabledTooltip": "Du har ikke det rette adgangsniveau til at fjerne linket",
|
|
137
138
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.shareLinkLabel": "Del link",
|
|
139
|
+
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkEditablePubliclyAvailable": "Publicly available for anyone to view and download. Any logged in users with the link can edit.",
|
|
140
|
+
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkElevatedEditableCompanyAvailable": "People who have access to this link can edit.",
|
|
138
141
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkEmailLabel": "Send delt link",
|
|
142
|
+
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkPubliclyAvailable": "This content is publicly available to anyone with the link.",
|
|
139
143
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkSettingsLabel": "Linkindstillinger",
|
|
140
144
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkToggleLabel": "Delt link",
|
|
141
145
|
"groupSharedFeatures.usm.unifiedShareFormModal.sharedLinkSection.sharedLinkToggleTooltip": "Opret og kopiér link",
|