@box/unified-share-modal 1.31.3 → 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.
Files changed (38) hide show
  1. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-section.js +106 -97
  2. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/messages.js +4 -0
  3. package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/messages.js +12 -0
  4. package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-section.js +127 -112
  5. package/dist/i18n/bn-IN.js +4 -0
  6. package/dist/i18n/da-DK.js +4 -0
  7. package/dist/i18n/de-DE.js +4 -0
  8. package/dist/i18n/en-AU.js +4 -0
  9. package/dist/i18n/en-CA.js +4 -0
  10. package/dist/i18n/en-GB.js +4 -0
  11. package/dist/i18n/en-US.js +4 -0
  12. package/dist/i18n/en-US.properties +8 -0
  13. package/dist/i18n/en-x-pseudo.js +4 -0
  14. package/dist/i18n/es-419.js +4 -0
  15. package/dist/i18n/es-ES.js +4 -0
  16. package/dist/i18n/fi-FI.js +4 -0
  17. package/dist/i18n/fr-CA.js +4 -0
  18. package/dist/i18n/fr-FR.js +4 -0
  19. package/dist/i18n/hi-IN.js +4 -0
  20. package/dist/i18n/it-IT.js +4 -0
  21. package/dist/i18n/ja-JP.js +4 -0
  22. package/dist/i18n/json/src/lib/components/unified-share-form-modal/collaboration-section/messages.json +1 -1
  23. package/dist/i18n/json/src/lib/components/unified-share-form-modal/shared-link-section/messages.json +1 -1
  24. package/dist/i18n/ko-KR.js +4 -0
  25. package/dist/i18n/nb-NO.js +4 -0
  26. package/dist/i18n/nl-NL.js +4 -0
  27. package/dist/i18n/pl-PL.js +4 -0
  28. package/dist/i18n/pt-BR.js +4 -0
  29. package/dist/i18n/ru-RU.js +4 -0
  30. package/dist/i18n/sv-SE.js +4 -0
  31. package/dist/i18n/tr-TR.js +4 -0
  32. package/dist/i18n/zh-CN.js +4 -0
  33. package/dist/i18n/zh-TW.js +4 -0
  34. package/dist/styles/collaboration-section.css +1 -1
  35. package/dist/styles/shared-link-section.css +1 -1
  36. package/dist/types/lib/components/unified-share-form-modal/collaboration-section/messages.d.ts +5 -0
  37. package/dist/types/lib/components/unified-share-form-modal/shared-link-section/messages.d.ts +15 -0
  38. package/package.json +1 -1
@@ -1,82 +1,84 @@
1
- import { useState as se, useRef as le, useEffect as T, useCallback as U } from "react";
2
- import { createPortal as ce } from "react-dom";
3
- import { useIntl as de } from "react-intl";
4
- import { useNotification as ue, useUniqueId as me, useLabelable as fe, Tooltip as he, Focusable as pe, Modal as m } from "@box/blueprint-web";
5
- import { UserSelectorContainer as be } from "@box/user-selector";
6
- import { CollaborationRole as Ce } from "./collaboration-role.js";
7
- import { SharedWithAvatars as ge } from "./shared-with-avatars.js";
8
- import { ShieldRestrictionNotice as ve } from "./shield-restriction-notice.js";
9
- import { TextAreaContainer as Se } from "./text-area-container.js";
10
- import { COLLABORATION_MESSAGE_CHARACTER_LIMIT as Le } from "../../../constants.js";
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 f, jsx as r, Fragment as Fe } from "react/jsx-runtime";
13
- import { useFormValidation as Ue } from "../../../hooks/use-form-validation.js";
14
- import { useCollaborationForm as Ae } from "../../../hooks/use-collaboration-form.js";
15
- import { useUnifiedShareFormContext as Be } from "../../../contexts/unified-share-form-context.js";
16
- import { useUnifiedShareModalContext as Ve } from "../../../contexts/unified-share-modal-context.js";
17
- import '../../../../../styles/collaboration-section.css';const ye = "_container_1o05j_2", Ee = "_label_1o05j_8", x = {
18
- container: ye,
19
- label: Ee
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 He() {
23
+ function Qe() {
22
24
  const {
23
25
  formatMessage: t
24
- } = de(), [h, A] = se(), {
25
- addNotification: N
26
- } = ue(), {
27
- validateShieldRestriction: _
28
- } = Ue(), {
29
- contactValue: P,
26
+ } = ue(), [f, y] = le(), {
27
+ addNotification: T
28
+ } = me(), {
29
+ validateShieldRestriction: N
30
+ } = Ae(), {
31
+ contactValue: O,
30
32
  container: p,
31
- onModalOpenChange: B,
33
+ onModalOpenChange: A,
32
34
  onShareViewChange: b,
33
- setUserContacts: k,
35
+ setUserContacts: P,
34
36
  shareView: i,
35
37
  userContacts: n
36
- } = Be(), {
37
- collaborationNotices: M,
38
+ } = Ee(), {
39
+ collaborationNotices: k,
38
40
  config: C,
39
- contactService: O,
41
+ contactService: M,
40
42
  isFetching: w,
41
- isSubmitting: j,
42
- item: D,
43
- sharingService: G
44
- } = Ve(), {
45
- permissions: W = {},
43
+ isSubmitting: D,
44
+ item: G,
45
+ sharingService: W
46
+ } = Be(), {
47
+ permissions: j = {},
46
48
  type: q
47
- } = D, {
49
+ } = G, {
48
50
  getContacts: g,
49
51
  getContactsAvatarUrls: v
50
- } = O, {
52
+ } = M, {
51
53
  sendInvitations: H,
52
54
  sendSharedLink: K
53
- } = G;
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: V,
60
+ handleFormReset: I,
59
61
  handleFormSubmit: z,
60
- handleSelectedUsersChange: y,
62
+ handleSelectedUsersChange: E,
61
63
  handleUserSelectorBlur: J,
62
64
  isFormSubmitting: Q,
63
65
  updateContactValue: X
64
- } = Ae(S, L), a = i === "default" || i === "invite", s = i === "invite" || i === "email", l = j ?? Q, E = le(i === "email" ? "email" : "invite");
65
- T(() => {
66
- E.current = i === "email" ? "email" : "invite";
67
- }, [i]), T(() => {
68
- (!n.length || !n.some((e) => e.chipVariant === "error")) && A(null);
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 Y = U((e) => (e.stopPropagation(), !0), []), Z = U((e) => g ? g(e, E.current) : Promise.resolve([]), [g]), ee = U((e) => v ? v(e) : Promise.resolve({}), [v]), te = (e) => {
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
- }, oe = () => {
73
- V(), b("default");
74
- }, re = async () => {
74
+ }, re = () => {
75
+ I(), b("default");
76
+ }, ie = async () => {
75
77
  try {
76
- if (h) {
77
- const e = _(n);
78
+ if (f) {
79
+ const e = N(n);
78
80
  if (e) {
79
- N({
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
- V(), B && B(!1), b("default");
93
+ I(), A && A(!1), b("default");
92
94
  } catch (e) {
93
95
  if (!e.shieldRestriction)
94
96
  return;
95
97
  const {
96
- shieldRestriction: F
97
- } = e, R = [...F.restrictedEmails ?? [], ...F.restrictedGroups ?? []], ae = n.map((u) => R.includes(u.email) || R.includes(`${u.id}`) ? {
98
- ...u,
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
- } : u);
101
- A(F), k(ae);
102
+ } : m);
103
+ y(U), P(se);
102
104
  }
103
105
  };
104
- let c, d = !1;
105
- a && !W.canInviteCollaborator && (c = t(o.inviteDisabledTooltip), d = !0), a && q === "web_link" && (c = t(o.inviteWebLinkDisabledTooltip), d = !0);
106
- const I = me("user-contacts-"), ie = t(a ? o.invitePeopleLabel : o.emailSharedLinkLabel), ne = fe(ie, I);
107
- return /* @__PURE__ */ f("form", {
108
- className: x.container,
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: [h && /* @__PURE__ */ r(ve, {
111
- error: h,
112
- isLoading: l,
113
- onSelectedUsersChange: y
114
- }), M, /* @__PURE__ */ f("div", {
115
- children: [a && C.collaborators && /* @__PURE__ */ r(ge, {}), /* @__PURE__ */ r(ne, {
116
- className: x.label
117
- }), /* @__PURE__ */ r(he, {
118
- content: c,
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: c ? void 0 : !1,
122
+ open: d ? void 0 : !1,
121
123
  side: "bottom",
122
- children: /* @__PURE__ */ r(pe, {
123
- focusable: d,
124
- children: /* @__PURE__ */ r(be, {
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: d || l,
130
+ disabled: u || c,
129
131
  displayChipVariant: (e) => e.chipVariant,
130
132
  error: $["user-contact"],
131
- fetchAvatarUrls: ee,
132
- fetchUsers: Z,
133
- hideOnEscape: Y,
134
- idForLabel: I,
135
- inputValue: P,
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: te,
139
- onSelectedUsersChange: y,
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(Ce, {})]
148
- }), s && C.collaborationMessage && /* @__PURE__ */ r(Se, {
149
- maxCount: Le
150
- }), s && p && /* @__PURE__ */ ce(/* @__PURE__ */ f(Fe, {
151
- children: [!w && /* @__PURE__ */ f(m.Footer, {
152
- children: [/* @__PURE__ */ r(m.Footer.SecondaryButton, {
153
- disabled: l,
154
- onClick: oe,
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(m.Footer.PrimaryButton, {
157
- loading: l,
165
+ }), /* @__PURE__ */ r(h.Footer.PrimaryButton, {
166
+ loading: c,
158
167
  loadingAriaLabel: t(o.loadingLabel),
159
- onClick: re,
168
+ onClick: ie,
160
169
  children: t(o.sendButton)
161
170
  })]
162
- }), /* @__PURE__ */ r(m.Close, {
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
- He as CollaborationSection
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"
@@ -1,155 +1,170 @@
1
- import { useRef as b, useState as j, useCallback as x, useEffect as I } from "react";
2
- import { useIntl as K } from "react-intl";
3
- import { Text as V, Tooltip as T, Focusable as O, Switch as G, Status as H, Link as J, Button as Q } from "@box/blueprint-web";
4
- import { ClockBadge as W } from "@box/blueprint-web-assets/icons/Line";
5
- import { Mail as X } from "@box/blueprint-web-assets/icons/Medium";
6
- import { SurfaceStatusSurfaceRed as Y } from "@box/blueprint-web-assets/tokens/tokens";
7
- import { CopyInput as Z } from "@box/copy-input";
8
- import { SharedLinkAccess as $ } from "./shared-link-access.js";
9
- import { SharedLinkPermission as ee } from "./shared-link-permission.js";
10
- import t from "./messages.js";
11
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
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 ie } from "../../../contexts/unified-share-modal-context.js";
14
- import { useSharingAction as N } from "../../../hooks/use-sharing-action.js";
15
- import { formatDateFromTimestampToDateString as oe } from "../../../utils/date.js";
16
- import { callOnKeyboardEvent as ne } from "../../../utils/event.js";
17
- import '../../../../../styles/shared-link-section.css';const ae = "_container_q90iz_1", se = "_toggle_q90iz_7", re = "_settings_q90iz_13", ce = "_copy_q90iz_22", le = "_access_q90iz_30", d = {
18
- container: ae,
19
- toggle: se,
20
- settings: re,
21
- copy: ce,
22
- access: le
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 Ae() {
25
+ function we() {
25
26
  const {
26
27
  formatMessage: e
27
- } = K(), g = b(!0), k = b(null), u = b(null), {
28
+ } = G(), g = S(!0), k = S(null), m = S(null), {
28
29
  onModalViewChange: L,
29
- onShareViewChange: P
30
+ onShareViewChange: D
30
31
  } = te(), {
31
- config: n,
32
- isFetching: v,
33
- isSubmitting: w,
34
- item: E,
35
- sharedLink: h,
36
- sharingService: F
37
- } = ie(), {
38
- permissions: A = {}
39
- } = E, {
40
- createSharedLink: z
41
- } = F, {
42
- sharedLinkAutoCopy: r,
43
- sharedLinkAutoCreate: C
44
- } = n;
45
- let _ = "create-shared-link";
46
- r && (_ = "auto-copy-shared-link");
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: q,
49
- onAction: y
50
- } = N(z, _), i = !!h.url, a = w ?? q, [S, R] = j(!1), m = x(async () => {
51
- i || (await y(), R(!0));
52
- }, [i, y]), M = x(async () => (m(), new Promise((s) => {
53
- u.current = {
54
- resolve: s
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
- })), [m]), {
57
- onAction: D
58
- } = N(M, "auto-copy-shared-link");
59
- I(() => {
60
- !g.current || v || (r ? D() : C && m(), g.current = !1);
61
- }, [v, g, r, C, m, D]), I(() => {
62
- i && r && k.current && k.current.click();
63
- }, [i, r]);
64
- const B = x((l) => {
65
- if (!u.current)
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 s;
68
- l instanceof Error ? s = S ? e(t.autoCreateCopyErrorNoticeText) : null : s = e(S ? t.autoCreateCopySuccessNoticeText : t.autoCopySuccessNoticeText), s && u.current.resolve({
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: s,
71
+ text: c,
71
72
  type: "success"
72
73
  }]
73
- }), u.current = null;
74
- }, [e, S]), U = async (l) => {
75
- l || L("remove-shared-link"), l && await y();
74
+ }), m.current = null;
75
+ }, [e, C]), V = async (u) => {
76
+ u || L("remove-shared-link"), u && await b();
76
77
  };
77
- let c, p = !1;
78
- return !i && !a && (c = e(t.sharedLinkToggleTooltip)), !i && !A.canShare && (c = e(t.createLinkDisabledTooltip), p = !0), i && !A.canSetShareAccess && (c = e(t.removeLinkDisabledTooltip), p = !0), /* @__PURE__ */ f("div", {
79
- className: d.container,
80
- children: [/* @__PURE__ */ o(V, {
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(t.shareLinkLabel)
84
- }), /* @__PURE__ */ f("div", {
85
- className: d.toggle,
86
- children: [/* @__PURE__ */ o(T, {
84
+ children: e(i.shareLinkLabel)
85
+ }), /* @__PURE__ */ l("div", {
86
+ className: s.toggle,
87
+ children: [/* @__PURE__ */ t(_, {
87
88
  align: "start",
88
- content: c,
89
+ content: h,
89
90
  "data-testid": "shared-link-tooltip",
90
- open: c ? void 0 : !1,
91
- children: /* @__PURE__ */ o(O, {
92
- focusable: p,
93
- children: /* @__PURE__ */ o(G.Item, {
94
- checked: i,
95
- disabled: p || a,
96
- label: e(t.sharedLinkToggleLabel),
97
- onCheckedChange: U,
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
- }), i && !!h.expiresAt && /* @__PURE__ */ o(T, {
102
- content: e(t.expirationIconTooltip, {
103
- expirationDate: oe(h.expiresAt)
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__ */ o(H, {
107
- color: Y,
107
+ children: /* @__PURE__ */ t(J, {
108
+ color: Z,
108
109
  hideText: !0,
109
- icon: W,
110
- text: e(t.expirationIconLabel)
110
+ icon: X,
111
+ text: e(i.expirationIconLabel)
111
112
  })
112
- }), i && n.sharedLinkSettings && /* @__PURE__ */ o(J, {
113
- "aria-disabled": a,
113
+ }), a && o.sharedLinkSettings && /* @__PURE__ */ t(Q, {
114
+ "aria-disabled": r,
114
115
  "aria-haspopup": "dialog",
115
- className: d.settings,
116
+ className: s.settings,
116
117
  onClick: () => L("shared-link-settings"),
117
- onKeyDown: ne(() => L("shared-link-settings"), {
118
+ onKeyDown: oe(() => L("shared-link-settings"), {
118
119
  canPreventDefault: !0
119
120
  }),
120
121
  role: "button",
121
- tabIndex: a ? -1 : 0,
122
+ tabIndex: r ? -1 : 0,
122
123
  variant: "standalone",
123
- children: e(t.sharedLinkSettingsLabel)
124
+ children: e(i.sharedLinkSettingsLabel)
124
125
  })]
125
- }), i && /* @__PURE__ */ f("div", {
126
- className: d.copy,
127
- children: [/* @__PURE__ */ o(Z, {
126
+ }), a && /* @__PURE__ */ l("div", {
127
+ className: s.copy,
128
+ children: [/* @__PURE__ */ t($, {
128
129
  ref: k,
129
- autoFocus: C && i,
130
- disabled: a,
130
+ autoFocus: y && a,
131
+ disabled: r,
131
132
  hideLabel: !0,
132
- label: e(t.sharedLinkUrlLabel),
133
- onCopy: B,
134
- value: h.url
135
- }), n.sharedLinkEmail && /* @__PURE__ */ o(T, {
133
+ label: e(i.sharedLinkUrlLabel),
134
+ onCopy: K,
135
+ value: n.url
136
+ }), o.sharedLinkEmail && /* @__PURE__ */ t(_, {
136
137
  align: "end",
137
- content: e(t.sharedLinkEmailLabel),
138
- children: /* @__PURE__ */ o(Q, {
139
- "aria-label": e(t.sharedLinkEmailLabel),
140
- disabled: a,
141
- icon: X,
142
- onClick: () => P("email"),
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
- }), i && (n.sharedLinkAccess || n.sharedLinkPermission) && /* @__PURE__ */ f("div", {
148
- className: d.access,
149
- children: [n.sharedLinkAccess && /* @__PURE__ */ o($, {}), n.sharedLinkPermission && /* @__PURE__ */ o(ee, {})]
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
- Ae as SharedLinkSection
169
+ we as SharedLinkSection
155
170
  };
@@ -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": "লিঙ্ক তৈরি করুন এবং কপি করুন",
@@ -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",