@box/unified-share-modal 1.36.5 → 1.36.6

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.
@@ -1,110 +1,108 @@
1
- import _ from "clsx";
2
- import L from "lodash/camelCase";
3
- import { useState as k, useMemo as w, useEffect as F } from "react";
4
- import { useIntl as N } from "react-intl";
5
- import { Tooltip as O, Focusable as $, TriggerButton as D, DropdownMenu as r } from "@box/blueprint-web";
6
- import j from "../messages.js";
1
+ import y from "lodash/camelCase";
2
+ import { useState as L, useMemo as k, useEffect as w } from "react";
3
+ import { useIntl as F } from "react-intl";
4
+ import { Tooltip as N, Focusable as O, TriggerButton as D, DropdownMenu as n } from "@box/blueprint-web";
5
+ import $ from "../messages.js";
7
6
  import l from "./messages.js";
8
- import { jsx as e, jsxs as z } from "react/jsx-runtime";
9
- import { isInvitationRoleSupported as A, getDefaultCollaborationRole as P } from "../../../utils/collaborator.js";
10
- import { useUnifiedShareFormContext as U } from "../../../contexts/unified-share-form-context.js";
11
- import { useUnifiedShareModalContext as B } from "../../../contexts/unified-share-modal-context.js";
12
- import '../../../../../styles/collaboration-role.css';const E = "_container_120dl_1", W = "_overrides_120dl_9", q = "_focusable_120dl_14", n = {
13
- container: E,
14
- overrides: W,
15
- focusable: q
7
+ import { jsx as e, jsxs as j } from "react/jsx-runtime";
8
+ import { isInvitationRoleSupported as z, getDefaultCollaborationRole as A } from "../../../utils/collaborator.js";
9
+ import { useUnifiedShareFormContext as P } from "../../../contexts/unified-share-form-context.js";
10
+ import { useUnifiedShareModalContext as U } from "../../../contexts/unified-share-modal-context.js";
11
+ import '../../../../../styles/collaboration-role.css';const B = "_container_h88vi_1", E = "_focusable_h88vi_10", b = {
12
+ container: B,
13
+ focusable: E
16
14
  };
17
- function te() {
15
+ function Z() {
18
16
  const {
19
- formatMessage: o
20
- } = N(), [f, M] = k(!1), {
17
+ formatMessage: t
18
+ } = F(), [f, M] = L(!1), {
21
19
  collaborationRole: u,
22
- setCollaborationRole: d
23
- } = U(), {
20
+ setCollaborationRole: c
21
+ } = P(), {
24
22
  collaborationRoles: g,
25
23
  isSubmitting: S,
26
24
  item: I
27
- } = B(), {
25
+ } = U(), {
28
26
  permissions: T = {},
29
- type: m
30
- } = I, s = w(() => g.map((i) => {
27
+ type: d
28
+ } = I, r = k(() => g.map((i) => {
31
29
  const {
32
- description: p,
33
- id: t,
34
- label: c
35
- } = i, b = A(t), h = L(t);
36
- let x = h;
37
- t === "editor" && m === "folder" && (x += "Folder");
38
- let C = t, R = "";
39
- return b && (C = o(j[`${h}Role`]), R = o(l[`${x}Description`])), {
30
+ description: m,
31
+ id: o,
32
+ label: s
33
+ } = i, p = z(o), C = y(o);
34
+ let R = C;
35
+ o === "editor" && d === "folder" && (R += "Folder");
36
+ let v = o, x = "";
37
+ return p && (v = t($[`${C}Role`]), x = t(l[`${R}Description`])), {
40
38
  ...i,
41
- description: p ?? R,
42
- label: c ?? C
39
+ description: m ?? x,
40
+ label: s ?? v
43
41
  };
44
- }), [g, o, m]);
45
- if (F(() => {
46
- d(P(s));
47
- }, [s, d]), !s.length || !u)
42
+ }), [g, t, d]);
43
+ if (w(() => {
44
+ c(A(r));
45
+ }, [r, c]), !r.length || !u)
48
46
  return null;
49
47
  const {
50
- id: y,
51
- label: v
48
+ id: _,
49
+ label: h
52
50
  } = u;
53
51
  let a;
54
- return T.canInviteCollaborator || (a = o(l.inviteDisabledTooltip)), m === "web_link" && (a = o(l.inviteWebLinkDisabledTooltip)), a ? /* @__PURE__ */ e(O, {
52
+ return T.canInviteCollaborator || (a = t(l.inviteDisabledTooltip)), d === "web_link" && (a = t(l.inviteWebLinkDisabledTooltip)), a ? /* @__PURE__ */ e(N, {
55
53
  align: "start",
56
54
  content: a,
57
55
  "data-testid": "collaboration-role-tooltip",
58
56
  side: "bottom",
59
- children: /* @__PURE__ */ e($, {
60
- className: n.focusable,
57
+ children: /* @__PURE__ */ e(O, {
58
+ className: b.focusable,
61
59
  children: /* @__PURE__ */ e(D, {
62
60
  caretDirection: "down",
63
- className: _(n.container, n.overrides),
61
+ className: b.container,
64
62
  disabled: !0,
65
- label: o(l.inviteAsRoleLabel, {
66
- role: v
63
+ label: t(l.inviteAsRoleLabel, {
64
+ role: h
67
65
  }),
68
66
  size: "extraSmall",
69
67
  variant: "tertiary"
70
68
  })
71
69
  })
72
- }) : /* @__PURE__ */ z(r.Root, {
70
+ }) : /* @__PURE__ */ j(n.Root, {
73
71
  onOpenChange: M,
74
72
  open: f,
75
- children: [/* @__PURE__ */ e(r.Trigger, {
73
+ children: [/* @__PURE__ */ e(n.Trigger, {
76
74
  children: /* @__PURE__ */ e(D, {
77
75
  caretDirection: f ? "up" : "down",
78
- className: _(n.container, n.overrides),
76
+ className: b.container,
79
77
  disabled: S,
80
- label: o(l.inviteAsRoleLabel, {
81
- role: v
78
+ label: t(l.inviteAsRoleLabel, {
79
+ role: h
82
80
  }),
83
81
  size: "extraSmall",
84
82
  variant: "tertiary"
85
83
  })
86
- }), /* @__PURE__ */ e(r.Content, {
84
+ }), /* @__PURE__ */ e(n.Content, {
87
85
  align: "start",
88
- children: s.map((i) => {
86
+ children: r.map((i) => {
89
87
  const {
90
- description: p,
91
- isDisabled: t,
92
- id: c,
93
- label: b
88
+ description: m,
89
+ isDisabled: o,
90
+ id: s,
91
+ label: p
94
92
  } = i;
95
- return /* @__PURE__ */ e(r.CheckboxItem, {
96
- checked: y === c,
97
- disabled: t,
98
- onSelect: () => d(i),
99
- children: /* @__PURE__ */ e(r.Item.MainContent, {
100
- caption: p,
101
- label: b
93
+ return /* @__PURE__ */ e(n.CheckboxItem, {
94
+ checked: _ === s,
95
+ disabled: o,
96
+ onSelect: () => c(i),
97
+ children: /* @__PURE__ */ e(n.Item.MainContent, {
98
+ caption: m,
99
+ label: p
102
100
  })
103
- }, c);
101
+ }, s);
104
102
  })
105
103
  })]
106
104
  });
107
105
  }
108
106
  export {
109
- te as CollaborationRole
107
+ Z as CollaborationRole
110
108
  };
@@ -1,86 +1,92 @@
1
- import { useState as ce, useRef as de, useEffect as N, useCallback as F } from "react";
2
- import { createPortal as ue } from "react-dom";
3
- import { useIntl as me } from "react-intl";
4
- import { useNotification as he, useUniqueId as fe, useLabelable as pe, Tooltip as be, Focusable as Ce, Text as ve, Modal as h } from "@box/blueprint-web";
5
- import { Globe as ge } from "@box/blueprint-web-assets/icons/Medium";
6
- import { UserSelectorContainer as Se } from "@box/user-selector";
7
- import { CollaborationRole as Ae } 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 Fe } from "./text-area-container.js";
11
- import { COLLABORATION_MESSAGE_CHARACTER_LIMIT as ye } from "../../../constants.js";
1
+ import me from "clsx";
2
+ import { useState as ue, useRef as pe, useEffect as I, useCallback as F } from "react";
3
+ import { createPortal as he } from "react-dom";
4
+ import { useIntl as fe } from "react-intl";
5
+ import { useBlueprintModernization as be, useNotification as Ce, useUniqueId as ge, useLabelable as ve, Tooltip as Se, Focusable as _e, Text as Le, Modal as h } from "@box/blueprint-web";
6
+ import { Globe as Ue } from "@box/blueprint-web-assets/icons/Medium";
7
+ import { bpSize040 as R } from "@box/blueprint-web-assets/tokens/tokens";
8
+ import { UserSelectorContainer as Fe } from "@box/user-selector";
9
+ import { CollaborationRole as ye } from "./collaboration-role.js";
10
+ import { SharedWithAvatars as Ae } from "./shared-with-avatars.js";
11
+ import { ShieldRestrictionNotice as xe } from "./shield-restriction-notice.js";
12
+ import { TextAreaContainer as Ee } from "./text-area-container.js";
13
+ import { COLLABORATION_MESSAGE_CHARACTER_LIMIT as Be } from "../../../constants.js";
12
14
  import o from "./messages.js";
13
- import { jsxs as i, jsx as r, Fragment as Ie } from "react/jsx-runtime";
14
- import { useFormValidation as _e } from "../../../hooks/use-form-validation.js";
15
- import { useCollaborationForm as xe } 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_1d5sq_2", Ne = "_label_1d5sq_8", Re = "_securityIndicator_1d5sq_23", Te = "_collaborationAccessContainer_1d5sq_29", f = {
19
- container: Ve,
20
- label: Ne,
21
- securityIndicator: Re,
22
- collaborationAccessContainer: Te
15
+ import { jsxs as a, jsx as r, Fragment as Ne } from "react/jsx-runtime";
16
+ import { useFormValidation as Ve } from "../../../hooks/use-form-validation.js";
17
+ import { useCollaborationForm as Ie } from "../../../hooks/use-collaboration-form.js";
18
+ import { useUnifiedShareFormContext as Re } from "../../../contexts/unified-share-form-context.js";
19
+ import { useUnifiedShareModalContext as Te } from "../../../contexts/unified-share-modal-context.js";
20
+ import '../../../../../styles/collaboration-section.css';const Me = "_container_1spii_2", Oe = "_label_1spii_8", Pe = "_modernized_1spii_15", ke = "_security_1spii_33", ze = "_icon_1spii_37", we = "_access_1spii_43", s = {
21
+ container: Me,
22
+ label: Oe,
23
+ modernized: Pe,
24
+ security: ke,
25
+ icon: ze,
26
+ access: we
23
27
  };
24
- function Ye() {
28
+ function at() {
25
29
  const {
26
30
  formatMessage: t
27
- } = me(), [p, y] = ce(), {
28
- addNotification: R
29
- } = he(), {
30
- validateShieldRestriction: T
31
- } = _e(), {
32
- contactValue: O,
31
+ } = fe(), [f, y] = ue(), {
32
+ enableModernizedComponents: T
33
+ } = be(), {
34
+ addNotification: M
35
+ } = Ce(), {
36
+ validateShieldRestriction: O
37
+ } = Ve(), {
38
+ contactValue: P,
33
39
  container: b,
34
- onModalOpenChange: I,
40
+ onModalOpenChange: A,
35
41
  onShareViewChange: C,
36
- setUserContacts: P,
37
- shareView: n,
38
- userContacts: a
39
- } = Ee(), {
40
- collaborationAccess: k,
41
- collaborationNotices: M,
42
- config: v,
43
- contactService: q,
44
- isFetching: w,
45
- isSubmitting: D,
46
- item: G,
47
- sharingService: W
48
- } = Be(), {
49
- permissions: j = {},
50
- type: H
51
- } = G, {
52
- getContacts: g,
42
+ setUserContacts: k,
43
+ shareView: i,
44
+ userContacts: n
45
+ } = Re(), {
46
+ collaborationAccess: z,
47
+ collaborationNotices: w,
48
+ config: g,
49
+ contactService: D,
50
+ isFetching: G,
51
+ isSubmitting: W,
52
+ item: j,
53
+ sharingService: q
54
+ } = Te(), {
55
+ permissions: H = {},
56
+ type: K
57
+ } = j, {
58
+ getContacts: v,
53
59
  getContactsAvatarUrls: S
54
- } = q, {
55
- sendInvitations: K,
56
- sendSharedLink: $
57
- } = W;
58
- let A, L;
59
- n === "invite" && (A = K, L = "invite-collaborators"), n === "email" && (A = $, L = "email-shared-link");
60
+ } = D, {
61
+ sendInvitations: $,
62
+ sendSharedLink: J
63
+ } = q;
64
+ let _, L;
65
+ i === "invite" && (_ = $, L = "invite-collaborators"), i === "email" && (_ = J, L = "email-shared-link");
60
66
  const {
61
- errors: z,
62
- handleFormReset: _,
63
- handleFormSubmit: J,
64
- handleSelectedUsersChange: x,
65
- handleUserSelectorBlur: Q,
66
- isFormSubmitting: X,
67
- updateContactValue: Y
68
- } = xe(A, L), s = n === "default" || n === "invite", l = n === "invite" || n === "email", c = D ?? X, Z = a.some((e) => e.isExternalUser), E = de(n === "email" ? "email" : "invite");
69
- N(() => {
70
- E.current = n === "email" ? "email" : "invite";
71
- }, [n]), N(() => {
72
- (!a.length || !a.some((e) => e.chipVariant === "error")) && y(null);
73
- }, [a]);
74
- const ee = F((e) => (e.stopPropagation(), !0), []), te = F((e) => g ? g(e, E.current) : Promise.resolve([]), [g]), oe = F((e) => S ? S(e) : Promise.resolve({}), [S]), re = (e) => {
75
- l || C("invite"), Y(e);
76
- }, ne = () => {
77
- _(), C("default");
78
- }, ae = async () => {
67
+ errors: Q,
68
+ handleFormReset: x,
69
+ handleFormSubmit: X,
70
+ handleSelectedUsersChange: E,
71
+ handleUserSelectorBlur: Y,
72
+ isFormSubmitting: Z,
73
+ updateContactValue: ee
74
+ } = Ie(_, L), l = i === "default" || i === "invite", c = i === "invite" || i === "email", d = W ?? Z, te = n.some((e) => e.isExternalUser), B = pe(i === "email" ? "email" : "invite");
75
+ I(() => {
76
+ B.current = i === "email" ? "email" : "invite";
77
+ }, [i]), I(() => {
78
+ (!n.length || !n.some((e) => e.chipVariant === "error")) && y(null);
79
+ }, [n]);
80
+ const oe = F((e) => (e.stopPropagation(), !0), []), re = F((e) => v ? v(e, B.current) : Promise.resolve([]), [v]), ie = F((e) => S ? S(e) : Promise.resolve({}), [S]), ne = (e) => {
81
+ c || C("invite"), ee(e);
82
+ }, ae = () => {
83
+ x(), C("default");
84
+ }, se = async () => {
79
85
  try {
80
- if (p) {
81
- const e = T(a);
86
+ if (f) {
87
+ const e = O(n);
82
88
  if (e) {
83
- R({
89
+ M({
84
90
  closeButtonAriaLabel: t(o.closeButton),
85
91
  sensitivity: "foreground",
86
92
  styledText: e,
@@ -90,87 +96,91 @@ function Ye() {
90
96
  return;
91
97
  }
92
98
  }
93
- if (await J())
99
+ if (await X())
94
100
  return;
95
- _(), I && I(!1), C("default");
101
+ x(), A && A(!1), C("default");
96
102
  } catch (e) {
97
103
  if (!e.shieldRestriction)
98
104
  return;
99
105
  const {
100
106
  shieldRestriction: U
101
- } = e, V = [...U.restrictedEmails ?? [], ...U.restrictedGroups ?? []], le = a.map((m) => V.includes(m.email) || V.includes(`${m.id}`) ? {
102
- ...m,
107
+ } = e, V = [...U.restrictedEmails ?? [], ...U.restrictedGroups ?? []], de = n.map((p) => V.includes(p.email) || V.includes(`${p.id}`) ? {
108
+ ...p,
103
109
  chipVariant: "error"
104
- } : m);
105
- y(U), P(le);
110
+ } : p);
111
+ y(U), k(de);
106
112
  }
107
113
  };
108
- let d, u = !1;
109
- s && !j.canInviteCollaborator && (d = t(o.inviteDisabledTooltip), u = !0), s && H === "web_link" && (d = t(o.inviteWebLinkDisabledTooltip), u = !0);
110
- const B = fe("user-contacts-"), ie = t(s ? o.invitePeopleLabel : o.emailSharedLinkLabel), se = pe(ie, B);
111
- return /* @__PURE__ */ i("form", {
112
- className: f.container,
114
+ let m, u = !1;
115
+ l && !H.canInviteCollaborator && (m = t(o.inviteDisabledTooltip), u = !0), l && K === "web_link" && (m = t(o.inviteWebLinkDisabledTooltip), u = !0);
116
+ const N = ge("user-contacts-"), le = t(l ? o.invitePeopleLabel : o.emailSharedLinkLabel), ce = ve(le, N);
117
+ return /* @__PURE__ */ a("form", {
118
+ className: s.container,
113
119
  onSubmit: (e) => e.preventDefault(),
114
- children: [p && /* @__PURE__ */ r(Ue, {
115
- error: p,
116
- isLoading: c,
117
- onSelectedUsersChange: x
118
- }), M, /* @__PURE__ */ i("div", {
119
- children: [s && v.collaborators && /* @__PURE__ */ r(Le, {}), /* @__PURE__ */ r(se, {
120
- className: f.label
121
- }), /* @__PURE__ */ r(be, {
122
- content: d,
120
+ children: [f && /* @__PURE__ */ r(xe, {
121
+ error: f,
122
+ isLoading: d,
123
+ onSelectedUsersChange: E
124
+ }), w, /* @__PURE__ */ a("div", {
125
+ children: [l && g.collaborators && /* @__PURE__ */ r(Ae, {}), /* @__PURE__ */ r(ce, {
126
+ className: me(s.label, T && s.modernized)
127
+ }), /* @__PURE__ */ r(Se, {
128
+ content: m,
123
129
  "data-testid": "user-contacts-tooltip",
124
- open: d ? void 0 : !1,
130
+ open: m ? void 0 : !1,
125
131
  side: "bottom",
126
- children: /* @__PURE__ */ r(Ce, {
132
+ children: /* @__PURE__ */ r(_e, {
127
133
  focusable: u,
128
- children: /* @__PURE__ */ r(Se, {
134
+ children: /* @__PURE__ */ r(Fe, {
129
135
  className: "collaboration-user-selector",
130
136
  clearButtonAriaLabel: t(o.clearButton),
131
137
  clearOnBlur: !1,
132
- disabled: u || c,
138
+ disabled: u || d,
133
139
  displayChipVariant: (e) => e.chipVariant,
134
- error: z["user-contact"],
135
- fetchAvatarUrls: oe,
136
- fetchUsers: te,
137
- hideOnEscape: ee,
138
- idForLabel: B,
139
- inputValue: O,
140
+ error: Q["user-contact"],
141
+ fetchAvatarUrls: ie,
142
+ fetchUsers: re,
143
+ hideOnEscape: oe,
144
+ idForLabel: N,
145
+ inputValue: P,
140
146
  label: null,
141
- onBlur: Q,
142
- onInputValueChange: re,
143
- onSelectedUsersChange: x,
144
- placeholder: a.length ? "" : t(o.invitePeoplePlaceholder),
147
+ onBlur: Y,
148
+ onInputValueChange: ne,
149
+ onSelectedUsersChange: E,
150
+ placeholder: n.length ? "" : t(o.invitePeoplePlaceholder),
145
151
  portalElement: b,
146
- selectedUsers: a,
152
+ selectedUsers: n,
147
153
  selectOnEnterOrTab: !0,
148
- variant: l ? "textarea" : "input"
154
+ variant: c ? "textarea" : "input"
149
155
  })
150
156
  })
151
- }), s && /* @__PURE__ */ i("div", {
152
- className: f.collaborationAccessContainer,
153
- children: [v.collaborationRole && /* @__PURE__ */ r(Ae, {}), k]
157
+ }), l && /* @__PURE__ */ a("div", {
158
+ className: s.access,
159
+ children: [g.collaborationRole && /* @__PURE__ */ r(ye, {}), z]
154
160
  })]
155
- }), l && v.collaborationMessage && /* @__PURE__ */ r(Fe, {
156
- maxCount: ye
157
- }), l && Z && /* @__PURE__ */ i("div", {
158
- className: f.securityIndicator,
159
- children: [/* @__PURE__ */ r(ge, {}), /* @__PURE__ */ r(ve, {
161
+ }), c && g.collaborationMessage && /* @__PURE__ */ r(Ee, {
162
+ maxCount: Be
163
+ }), c && te && /* @__PURE__ */ a("div", {
164
+ className: s.security,
165
+ children: [/* @__PURE__ */ r(Ue, {
166
+ className: s.icon,
167
+ height: R,
168
+ width: R
169
+ }), /* @__PURE__ */ r(Le, {
160
170
  as: "span",
161
171
  color: "textOnLightSecondary",
162
172
  children: t(o.contentSharedWithExternalCollaborators)
163
173
  })]
164
- }), l && b && /* @__PURE__ */ ue(/* @__PURE__ */ i(Ie, {
165
- children: [!w && /* @__PURE__ */ i(h.Footer, {
174
+ }), c && b && /* @__PURE__ */ he(/* @__PURE__ */ a(Ne, {
175
+ children: [!G && /* @__PURE__ */ a(h.Footer, {
166
176
  children: [/* @__PURE__ */ r(h.Footer.SecondaryButton, {
167
- disabled: c,
168
- onClick: ne,
177
+ disabled: d,
178
+ onClick: ae,
169
179
  children: t(o.cancelButton)
170
180
  }), /* @__PURE__ */ r(h.Footer.PrimaryButton, {
171
- loading: c,
181
+ loading: d,
172
182
  loadingAriaLabel: t(o.loadingLabel),
173
- onClick: ae,
183
+ onClick: se,
174
184
  children: t(o.sendButton)
175
185
  })]
176
186
  }), /* @__PURE__ */ r(h.Close, {
@@ -180,5 +190,5 @@ function Ye() {
180
190
  });
181
191
  }
182
192
  export {
183
- Ye as CollaborationSection
193
+ at as CollaborationSection
184
194
  };
@@ -1,88 +1,94 @@
1
1
  import { createPortal as C } from "react-dom";
2
- import { useIntl as k } from "react-intl";
3
- import { useBreakpoint as B, Breakpoint as v, TextButton as S, Link as x, Table as A, TableHeader as F, Column as h, TableBody as L, Modal as n } from "@box/blueprint-web";
4
- import { CollaboratorListItem as y } from "./collaborator-list-item.js";
5
- import a from "./messages.js";
6
- import { jsxs as t, jsx as e, Fragment as M } from "react/jsx-runtime";
7
- import { useUnifiedShareModalContext as N } from "../../../contexts/unified-share-modal-context.js";
8
- import { useUnifiedShareFormContext as T } from "../../../contexts/unified-share-form-context.js";
9
- import '../../../../../styles/collaborators-view.css';const H = "_manage_8rmie_1", w = "_manageAllButton_8rmie_6", I = "_list_8rmie_13", j = "_scroll_8rmie_30", U = "_header_8rmie_36", r = {
2
+ import { useIntl as v } from "react-intl";
3
+ import { useBreakpoint as y, Breakpoint as S, Link as h, Table as x, TableHeader as B, Column as f, TableBody as L, Modal as t } from "@box/blueprint-web";
4
+ import { CollaboratorListItem as q } from "./collaborator-list-item.js";
5
+ import l from "./messages.js";
6
+ import { jsxs as a, jsx as e, Fragment as F } from "react/jsx-runtime";
7
+ import { useUnifiedShareModalContext as M } from "../../../contexts/unified-share-modal-context.js";
8
+ import { useUnifiedShareFormContext as N } from "../../../contexts/unified-share-form-context.js";
9
+ import { callOnKeyboardEvent as w } from "../../../utils/event.js";
10
+ import '../../../../../styles/collaborators-view.css';const H = "_manage_1ilfq_1", I = "_link_1ilfq_7", T = "_list_1ilfq_11", j = "_scroll_1ilfq_28", A = "_header_1ilfq_34", n = {
10
11
  manage: H,
11
- manageAllButton: w,
12
- list: I,
12
+ link: I,
13
+ list: T,
13
14
  scroll: j,
14
- header: U
15
+ header: A
15
16
  };
16
- function J() {
17
+ function G() {
17
18
  const {
18
19
  formatMessage: o
19
- } = k(), l = B() === v.Small, {
20
+ } = v(), i = y() === S.Small, {
20
21
  collaborators: u,
21
- config: i,
22
- eventService: g,
23
- isFetching: s,
22
+ config: s,
23
+ eventService: b,
24
+ isFetching: c,
24
25
  item: p
25
- } = N(), {
26
+ } = M(), {
26
27
  id: _,
27
- type: b
28
+ type: g
28
29
  } = p, {
29
- onCollaboratorsManagementClick: m
30
- } = g, {
31
- container: c,
32
- onShareViewChange: f
33
- } = T();
34
- return /* @__PURE__ */ t("div", {
35
- inert: s ? "" : null,
36
- children: [i.collaboratorsManagement && /* @__PURE__ */ e("div", {
37
- className: r.manage,
38
- children: m ? /* @__PURE__ */ e(S, {
39
- className: r.manageAllButton,
40
- inheritFont: !0,
41
- onClick: m,
42
- children: o(a.manageAllLink)
43
- }) : /* @__PURE__ */ e(x, {
44
- href: `/${b}/${_}/collaborators`,
30
+ onCollaboratorsManagementClick: r
31
+ } = b, {
32
+ container: m,
33
+ onShareViewChange: k
34
+ } = N();
35
+ return /* @__PURE__ */ a("div", {
36
+ inert: c ? "" : null,
37
+ children: [s.collaboratorsManagement && /* @__PURE__ */ e("div", {
38
+ className: n.manage,
39
+ children: r ? /* @__PURE__ */ e(h, {
40
+ className: n.link,
41
+ onClick: r,
42
+ onKeyDown: w(r, {
43
+ canPreventDefault: !0
44
+ }),
45
+ role: "button",
46
+ tabIndex: 0,
47
+ variant: "standalone",
48
+ children: o(l.manageAllLink)
49
+ }) : /* @__PURE__ */ e(h, {
50
+ href: `/${g}/${_}/collaborators`,
45
51
  rel: "noopener",
46
52
  target: "_blank",
47
53
  variant: "standalone",
48
- children: o(a.manageAllLink)
54
+ children: o(l.manageAllLink)
49
55
  })
50
56
  }), /* @__PURE__ */ e("div", {
51
- className: r.list,
57
+ className: n.list,
52
58
  children: /* @__PURE__ */ e("div", {
53
- className: r.scroll,
54
- children: /* @__PURE__ */ t(A, {
55
- "aria-label": o(a.listLabel),
56
- children: [/* @__PURE__ */ t(F, {
57
- className: r.header,
58
- children: [/* @__PURE__ */ e(h, {
59
+ className: n.scroll,
60
+ children: /* @__PURE__ */ a(x, {
61
+ "aria-label": o(l.listLabel),
62
+ children: [/* @__PURE__ */ a(B, {
63
+ className: n.header,
64
+ children: [/* @__PURE__ */ e(f, {
59
65
  hideHeader: !0,
60
66
  isRowHeader: !0,
61
- children: o(a.nameColumn)
62
- }), !l && /* @__PURE__ */ e(h, {
67
+ children: o(l.nameColumn)
68
+ }), !i && /* @__PURE__ */ e(f, {
63
69
  hideHeader: !0,
64
- children: o(a.roleColumn)
70
+ children: o(l.roleColumn)
65
71
  })]
66
72
  }), /* @__PURE__ */ e(L, {
67
- children: u.slice(0, i.collaboratorsLimit).map((d) => /* @__PURE__ */ e(y, {
73
+ children: u.slice(0, s.collaboratorsLimit).map((d) => /* @__PURE__ */ e(q, {
68
74
  collaborator: d,
69
- isSmall: l
75
+ isSmall: i
70
76
  }, d.id))
71
77
  })]
72
78
  })
73
79
  })
74
- }), c && /* @__PURE__ */ C(/* @__PURE__ */ t(M, {
75
- children: [!s && /* @__PURE__ */ e(n.Footer, {
76
- children: /* @__PURE__ */ e(n.Footer.SecondaryButton, {
77
- onClick: () => f("default"),
78
- children: o(a.doneButton)
80
+ }), m && /* @__PURE__ */ C(/* @__PURE__ */ a(F, {
81
+ children: [!c && /* @__PURE__ */ e(t.Footer, {
82
+ children: /* @__PURE__ */ e(t.Footer.SecondaryButton, {
83
+ onClick: () => k("default"),
84
+ children: o(l.doneButton)
79
85
  })
80
- }), /* @__PURE__ */ e(n.Close, {
81
- "aria-label": o(a.closeButton)
86
+ }), /* @__PURE__ */ e(t.Close, {
87
+ "aria-label": o(l.closeButton)
82
88
  })]
83
- }), c)]
89
+ }), m)]
84
90
  });
85
91
  }
86
92
  export {
87
- J as CollaboratorsView
93
+ G as CollaboratorsView
88
94
  };
@@ -1,85 +1,83 @@
1
- import k from "clsx";
2
- import { useState as M } from "react";
3
- import { useIntl as I } from "react-intl";
4
- import { DropdownMenu as n, TriggerButton as j, Tooltip as T, Focusable as w } from "@box/blueprint-web";
1
+ import { useState as I } from "react";
2
+ import { useIntl as _ } from "react-intl";
3
+ import { DropdownMenu as n, TriggerButton as v, Tooltip as T, Focusable as w } from "@box/blueprint-web";
5
4
  import O from "./messages.js";
6
- import { jsxs as y, jsx as e } from "react/jsx-runtime";
7
- import { useUnifiedShareModalContext as D } from "../../../contexts/unified-share-modal-context.js";
8
- import { useSharingAction as N } from "../../../hooks/use-sharing-action.js";
9
- import { useAccessLevels as R } from "../../../hooks/use-access-levels.js";
10
- import '../../../../../styles/shared-link-access.css';const z = "_container_1jrg6_1", B = "_overrides_1jrg6_8", F = "_content_1jrg6_13", s = {
11
- container: z,
12
- overrides: B,
13
- content: F
5
+ import { jsxs as j, jsx as e } from "react/jsx-runtime";
6
+ import { useUnifiedShareModalContext as y } from "../../../contexts/unified-share-modal-context.js";
7
+ import { useSharingAction as D } from "../../../hooks/use-sharing-action.js";
8
+ import { useAccessLevels as N } from "../../../hooks/use-access-levels.js";
9
+ import '../../../../../styles/shared-link-access.css';const R = "_container_1um3f_1", z = "_content_1um3f_9", l = {
10
+ container: R,
11
+ content: z
14
12
  };
15
- function V() {
13
+ function K() {
16
14
  const {
17
15
  formatMessage: d
18
- } = I(), [r, m] = M(!1), {
16
+ } = _(), [s, m] = I(!1), {
19
17
  isSubmitting: h,
20
18
  item: p,
21
19
  sharedLink: u,
22
- sharingService: g
23
- } = D(), {
24
- permissions: f = {}
20
+ sharingService: f
21
+ } = y(), {
22
+ permissions: g = {}
25
23
  } = p, {
26
24
  access: S
27
25
  } = u, {
28
26
  changeSharedLinkAccess: b
29
- } = g, {
30
- isLoading: v,
31
- onAction: _
32
- } = N(b), {
27
+ } = f, {
28
+ isLoading: A,
29
+ onAction: C
30
+ } = D(b), {
33
31
  allowedLevels: c,
34
32
  selectedAccess: i
35
- } = R();
33
+ } = N();
36
34
  if (!c.length || !i)
37
35
  return null;
38
36
  const {
39
- label: x
37
+ label: L
40
38
  } = i;
41
- return /* @__PURE__ */ y(n.Root, {
39
+ return /* @__PURE__ */ j(n.Root, {
42
40
  onOpenChange: m,
43
- open: r,
41
+ open: s,
44
42
  children: [/* @__PURE__ */ e(n.Trigger, {
45
- children: /* @__PURE__ */ e(j, {
46
- caretDirection: r ? "up" : "down",
47
- className: k(s.container, s.overrides),
48
- disabled: !f.canSetShareAccess || (h ?? v),
49
- label: x,
43
+ children: /* @__PURE__ */ e(v, {
44
+ caretDirection: s ? "up" : "down",
45
+ className: l.container,
46
+ disabled: !g.canSetShareAccess || (h ?? A),
47
+ label: L,
50
48
  size: "extraSmall",
51
49
  variant: "tertiary"
52
50
  })
53
51
  }), /* @__PURE__ */ e(n.Content, {
54
52
  align: "start",
55
- className: s.content,
56
- children: c.map((A) => {
53
+ className: l.content,
54
+ children: c.map((k) => {
57
55
  const {
58
- description: a,
59
- disabledReason: C,
56
+ description: r,
57
+ disabledReason: x,
60
58
  id: t,
61
- label: l
62
- } = A, o = S === t, L = () => {
63
- o || _(t);
59
+ label: a
60
+ } = k, o = S === t, M = () => {
61
+ o || C(t);
64
62
  };
65
- return C ? /* @__PURE__ */ e(T, {
63
+ return x ? /* @__PURE__ */ e(T, {
66
64
  content: d(O.disabledAccessLevelTooltip),
67
65
  children: /* @__PURE__ */ e(w, {
68
66
  children: /* @__PURE__ */ e(n.CheckboxItem, {
69
67
  checked: o,
70
68
  disabled: !0,
71
69
  children: /* @__PURE__ */ e(n.Item.MainContent, {
72
- caption: a,
73
- label: l
70
+ caption: r,
71
+ label: a
74
72
  })
75
73
  }, t)
76
74
  })
77
75
  }, t) : /* @__PURE__ */ e(n.CheckboxItem, {
78
76
  checked: o,
79
- onSelect: L,
77
+ onSelect: M,
80
78
  children: /* @__PURE__ */ e(n.Item.MainContent, {
81
- caption: a,
82
- label: l
79
+ caption: r,
80
+ label: a
83
81
  })
84
82
  }, t);
85
83
  })
@@ -87,5 +85,5 @@ function V() {
87
85
  });
88
86
  }
89
87
  export {
90
- V as SharedLinkAccess
88
+ K as SharedLinkAccess
91
89
  };
@@ -1,96 +1,94 @@
1
- import p from "clsx";
2
1
  import { useState as I } from "react";
3
2
  import { useIntl as O } from "react-intl";
4
- import { Tooltip as j, Focusable as E, TriggerButton as h, DropdownMenu as t } from "@box/blueprint-web";
3
+ import { Tooltip as v, Focusable as E, TriggerButton as p, DropdownMenu as t } from "@box/blueprint-web";
5
4
  import { FILE_EXTENSION_BOX_NOTE as w } from "../../../constants.js";
6
5
  import D from "./messages.js";
7
6
  import { jsx as e, jsxs as P } from "react/jsx-runtime";
8
7
  import { usePermissionLevels as y } from "../../../hooks/use-permission-levels.js";
9
8
  import { useUnifiedShareModalContext as A } from "../../../contexts/unified-share-modal-context.js";
10
9
  import { useSharingAction as B } from "../../../hooks/use-sharing-action.js";
11
- import '../../../../../styles/shared-link-access.css';const z = "_container_1jrg6_1", F = "_overrides_1jrg6_8", X = "_content_1jrg6_13", n = {
12
- container: z,
13
- overrides: F,
14
- content: X
10
+ import '../../../../../styles/shared-link-access.css';const j = "_container_1um3f_1", z = "_content_1um3f_9", i = {
11
+ container: j,
12
+ content: z
15
13
  };
16
- function Y() {
14
+ function Q() {
17
15
  const {
18
- formatMessage: g
19
- } = O(), [r, u] = I(!1), {
16
+ formatMessage: h
17
+ } = O(), [s, u] = I(!1), {
20
18
  isSubmitting: f,
21
- item: s,
22
- sharedLink: S,
23
- sharingService: b
19
+ item: r,
20
+ sharedLink: g,
21
+ sharingService: S
24
22
  } = A(), {
25
- permissions: _ = {}
26
- } = s, {
27
- access: v,
23
+ permissions: b = {}
24
+ } = r, {
25
+ access: _,
28
26
  permission: a
29
- } = S, {
27
+ } = g, {
30
28
  changeSharedLinkPermission: x
31
- } = b, {
29
+ } = S, {
32
30
  isLoading: L,
33
31
  onAction: M
34
32
  } = B(x), {
35
33
  allowedLevels: c,
36
34
  selectedPermission: l
37
35
  } = y();
38
- if (v === "collaborators" || !c.length || !l)
36
+ if (_ === "collaborators" || !c.length || !l)
39
37
  return null;
40
38
  const {
41
- label: d
39
+ label: m
42
40
  } = l;
43
- let o = "";
44
- return s.extension === w && a === "can_edit" && (o = g(D.canEditBoxNoteDisabledTooltip)), o ? /* @__PURE__ */ e(j, {
41
+ let n = "";
42
+ return r.extension === w && a === "can_edit" && (n = h(D.canEditBoxNoteDisabledTooltip)), n ? /* @__PURE__ */ e(v, {
45
43
  align: "start",
46
- content: o,
44
+ content: n,
47
45
  "data-testid": "shared-link-permission-tooltip",
48
46
  side: "bottom",
49
47
  children: /* @__PURE__ */ e(E, {
50
- children: /* @__PURE__ */ e(h, {
48
+ children: /* @__PURE__ */ e(p, {
51
49
  caretDirection: "down",
52
- className: p(n.container, n.overrides),
50
+ className: i.container,
53
51
  disabled: !0,
54
- label: d,
52
+ label: m,
55
53
  size: "extraSmall",
56
54
  variant: "tertiary"
57
55
  })
58
56
  })
59
57
  }) : /* @__PURE__ */ P(t.Root, {
60
58
  onOpenChange: u,
61
- open: r,
59
+ open: s,
62
60
  children: [/* @__PURE__ */ e(t.Trigger, {
63
- children: /* @__PURE__ */ e(h, {
64
- caretDirection: r ? "up" : "down",
65
- className: p(n.container, n.overrides),
66
- disabled: !_.canSetShareAccess || (f ?? L),
67
- label: d,
61
+ children: /* @__PURE__ */ e(p, {
62
+ caretDirection: s ? "up" : "down",
63
+ className: i.container,
64
+ disabled: !b.canSetShareAccess || (f ?? L),
65
+ label: m,
68
66
  size: "extraSmall",
69
67
  variant: "tertiary"
70
68
  })
71
69
  }), /* @__PURE__ */ e(t.Content, {
72
70
  align: "start",
73
- className: n.content,
71
+ className: i.content,
74
72
  children: c.map((N) => {
75
73
  const {
76
74
  description: T,
77
- id: i,
75
+ id: o,
78
76
  label: k
79
- } = N, m = a === i, C = () => {
80
- m || M(i);
77
+ } = N, d = a === o, C = () => {
78
+ d || M(o);
81
79
  };
82
80
  return /* @__PURE__ */ e(t.CheckboxItem, {
83
- checked: m,
81
+ checked: d,
84
82
  onSelect: C,
85
83
  children: /* @__PURE__ */ e(t.Item.MainContent, {
86
84
  caption: T,
87
85
  label: k
88
86
  })
89
- }, i);
87
+ }, o);
90
88
  })
91
89
  })]
92
90
  });
93
91
  }
94
92
  export {
95
- Y as SharedLinkPermission
93
+ Q as SharedLinkPermission
96
94
  };
@@ -1,170 +1,176 @@
1
- import { useRef as S, useState as V, useCallback as v, useEffect as N } from "react";
2
- import { useIntl as z } from "react-intl";
3
- import { Text as x, Tooltip as _, Focusable as G, 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 P } 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";
1
+ import { useRef as v, useState as G, useCallback as x, useEffect as w } from "react";
2
+ import { useIntl as q } from "react-intl";
3
+ import { Text as _, Tooltip as A, Focusable as H, Switch as J, Status as Q, Link as W, Button as X } from "@box/blueprint-web";
4
+ import { ClockBadge as Y } from "@box/blueprint-web-assets/icons/Line";
5
+ import { Mail as Z, Globe as D } from "@box/blueprint-web-assets/icons/Medium";
6
+ import { SurfaceStatusSurfaceRed as $, bpSize040 as g } from "@box/blueprint-web-assets/tokens/tokens";
7
+ import { CopyInput as ee } from "@box/copy-input";
8
+ import { SharedLinkAccess as ie } from "./shared-link-access.js";
9
9
  import { SharedLinkPermission as te } from "./shared-link-permission.js";
10
- import t from "./messages.js";
11
- import { jsxs as l, jsx as i } from "react/jsx-runtime";
12
- import { useUnifiedShareFormContext as ie } from "../../../contexts/unified-share-form-context.js";
13
- import { useUnifiedShareModalContext as ae } from "../../../contexts/unified-share-modal-context.js";
14
- import { useSharingAction as D } 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_1b8qy_1", re = "_toggle_1b8qy_7", ce = "_settings_1b8qy_13", le = "_copy_1b8qy_22", de = "_access_1b8qy_30", he = "_securityIndicator_1b8qy_36", s = {
18
- container: se,
19
- toggle: re,
20
- settings: ce,
21
- copy: le,
22
- access: de,
23
- securityIndicator: he
10
+ import i from "./messages.js";
11
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
12
+ import { useUnifiedShareFormContext as ae } from "../../../contexts/unified-share-form-context.js";
13
+ import { useUnifiedShareModalContext as ne } from "../../../contexts/unified-share-modal-context.js";
14
+ import { useSharingAction as I } from "../../../hooks/use-sharing-action.js";
15
+ import { formatDateFromTimestampToDateString as oe } from "../../../utils/date.js";
16
+ import { callOnKeyboardEvent as se } from "../../../utils/event.js";
17
+ import '../../../../../styles/shared-link-section.css';const re = "_container_1hae4_1", ce = "_toggle_1hae4_7", le = "_settings_1hae4_13", de = "_copy_1hae4_22", he = "_access_1hae4_30", me = "_icon_1hae4_36", s = {
18
+ container: re,
19
+ toggle: ce,
20
+ settings: le,
21
+ copy: de,
22
+ access: he,
23
+ icon: me
24
24
  };
25
- function Ie() {
25
+ function Ne() {
26
26
  const {
27
27
  formatMessage: e
28
- } = z(), g = S(!0), k = S(null), m = S(null), {
29
- onModalViewChange: y,
30
- onShareViewChange: w
31
- } = ie(), {
28
+ } = q(), k = v(!0), L = v(null), p = v(null), {
29
+ onModalViewChange: b,
30
+ onShareViewChange: F
31
+ } = ae(), {
32
32
  config: o,
33
- isFetching: A,
34
- isSubmitting: F,
35
- item: q,
33
+ isFetching: T,
34
+ isSubmitting: R,
35
+ item: M,
36
36
  sharedLink: n,
37
- sharingService: R
38
- } = ae(), {
39
- permissions: T = {}
40
- } = q, {
41
- createSharedLink: M
42
- } = R, {
37
+ sharingService: B
38
+ } = ne(), {
39
+ permissions: E = {}
40
+ } = M, {
41
+ createSharedLink: O
42
+ } = B, {
43
43
  sharedLinkAutoCopy: d,
44
- sharedLinkAutoCreate: L
44
+ sharedLinkAutoCreate: y
45
45
  } = o;
46
- let I = "create-shared-link";
47
- d && (I = "auto-copy-shared-link");
46
+ let N = "create-shared-link";
47
+ d && (N = "auto-copy-shared-link");
48
48
  const {
49
- isLoading: B,
50
- onAction: b
51
- } = D(M, I), a = !!n.url, r = F ?? B, [C, O] = V(!1), p = v(async () => {
52
- a || (await b(), O(!0));
53
- }, [a, b]), U = v(async () => (p(), new Promise((c) => {
54
- m.current = {
49
+ isLoading: U,
50
+ onAction: C
51
+ } = I(O, N), a = !!n.url, r = R ?? U, [S, j] = G(!1), u = x(async () => {
52
+ a || (await C(), j(!0));
53
+ }, [a, C]), z = x(async () => (u(), new Promise((c) => {
54
+ p.current = {
55
55
  resolve: c
56
56
  };
57
- })), [p]), {
58
- onAction: E
59
- } = D(U, "auto-copy-shared-link");
60
- N(() => {
61
- !g.current || A || (d ? E() : L && p(), g.current = !1);
62
- }, [A, g, d, L, p, E]), N(() => {
63
- a && d && k.current && k.current.click();
57
+ })), [u]), {
58
+ onAction: P
59
+ } = I(z, "auto-copy-shared-link");
60
+ w(() => {
61
+ !k.current || T || (d ? P() : y && u(), k.current = !1);
62
+ }, [T, k, d, y, u, P]), w(() => {
63
+ a && d && L.current && L.current.click();
64
64
  }, [a, d]);
65
- const j = v((u) => {
66
- if (!m.current)
65
+ const K = x((m) => {
66
+ if (!p.current)
67
67
  return;
68
68
  let c;
69
- u instanceof Error ? c = C ? e(t.autoCreateCopyErrorNoticeText) : null : c = e(C ? t.autoCreateCopySuccessNoticeText : t.autoCopySuccessNoticeText), c && m.current.resolve({
69
+ m instanceof Error ? c = S ? e(i.autoCreateCopyErrorNoticeText) : null : c = e(S ? i.autoCreateCopySuccessNoticeText : i.autoCopySuccessNoticeText), c && p.current.resolve({
70
70
  messages: [{
71
71
  text: c,
72
72
  type: "success"
73
73
  }]
74
- }), m.current = null;
75
- }, [e, C]), K = async (u) => {
76
- u || y("remove-shared-link"), u && await b();
74
+ }), p.current = null;
75
+ }, [e, S]), V = async (m) => {
76
+ m || b("remove-shared-link"), m && await C();
77
77
  };
78
78
  let h, f = !1;
79
- return !a && !r && (h = e(t.sharedLinkToggleTooltip)), !a && !T.canShare && (h = e(t.createLinkDisabledTooltip), f = !0), a && !T.canSetShareAccess && (h = e(t.removeLinkDisabledTooltip), f = !0), /* @__PURE__ */ l("div", {
79
+ return !a && !r && (h = e(i.sharedLinkToggleTooltip)), !a && !E.canShare && (h = e(i.createLinkDisabledTooltip), f = !0), a && !E.canSetShareAccess && (h = e(i.removeLinkDisabledTooltip), f = !0), /* @__PURE__ */ l("div", {
80
80
  className: s.container,
81
- children: [/* @__PURE__ */ i(x, {
81
+ children: [/* @__PURE__ */ t(_, {
82
82
  as: "label",
83
83
  variant: "bodyDefaultBold",
84
- children: e(t.shareLinkLabel)
84
+ children: e(i.shareLinkLabel)
85
85
  }), /* @__PURE__ */ l("div", {
86
86
  className: s.toggle,
87
- children: [/* @__PURE__ */ i(_, {
87
+ children: [/* @__PURE__ */ t(A, {
88
88
  align: "start",
89
89
  content: h,
90
90
  "data-testid": "shared-link-tooltip",
91
91
  open: h ? void 0 : !1,
92
- children: /* @__PURE__ */ i(G, {
92
+ children: /* @__PURE__ */ t(H, {
93
93
  focusable: f,
94
- children: /* @__PURE__ */ i(H.Item, {
94
+ children: /* @__PURE__ */ t(J.Item, {
95
95
  checked: a,
96
96
  disabled: f || r,
97
- label: e(t.sharedLinkToggleLabel),
98
- onCheckedChange: K,
97
+ label: e(i.sharedLinkToggleLabel),
98
+ onCheckedChange: V,
99
99
  value: "shared-link"
100
100
  })
101
101
  })
102
- }), a && !!n.expiresAt && /* @__PURE__ */ i(_, {
103
- content: e(t.expirationIconTooltip, {
104
- expirationDate: ne(n.expiresAt)
102
+ }), a && !!n.expiresAt && /* @__PURE__ */ t(A, {
103
+ content: e(i.expirationIconTooltip, {
104
+ expirationDate: oe(n.expiresAt)
105
105
  }),
106
106
  "data-testid": "expiration-date-tooltip",
107
- children: /* @__PURE__ */ i(J, {
108
- color: Z,
107
+ children: /* @__PURE__ */ t(Q, {
108
+ color: $,
109
109
  hideText: !0,
110
- icon: X,
111
- text: e(t.expirationIconLabel)
110
+ icon: Y,
111
+ text: e(i.expirationIconLabel)
112
112
  })
113
- }), a && o.sharedLinkSettings && /* @__PURE__ */ i(Q, {
113
+ }), a && o.sharedLinkSettings && /* @__PURE__ */ t(W, {
114
114
  "aria-disabled": r,
115
115
  "aria-haspopup": "dialog",
116
116
  className: s.settings,
117
- onClick: () => y("shared-link-settings"),
118
- onKeyDown: oe(() => y("shared-link-settings"), {
117
+ onClick: () => b("shared-link-settings"),
118
+ onKeyDown: se(() => b("shared-link-settings"), {
119
119
  canPreventDefault: !0
120
120
  }),
121
121
  role: "button",
122
122
  tabIndex: r ? -1 : 0,
123
123
  variant: "standalone",
124
- children: e(t.sharedLinkSettingsLabel)
124
+ children: e(i.sharedLinkSettingsLabel)
125
125
  })]
126
126
  }), a && /* @__PURE__ */ l("div", {
127
127
  className: s.copy,
128
- children: [/* @__PURE__ */ i($, {
129
- ref: k,
130
- autoFocus: L && a,
128
+ children: [/* @__PURE__ */ t(ee, {
129
+ ref: L,
130
+ autoFocus: y && a,
131
131
  disabled: r,
132
132
  hideLabel: !0,
133
- label: e(t.sharedLinkUrlLabel),
134
- onCopy: j,
133
+ label: e(i.sharedLinkUrlLabel),
134
+ onCopy: K,
135
135
  value: n.url
136
- }), o.sharedLinkEmail && /* @__PURE__ */ i(_, {
136
+ }), o.sharedLinkEmail && /* @__PURE__ */ t(A, {
137
137
  align: "end",
138
- content: e(t.sharedLinkEmailLabel),
139
- children: /* @__PURE__ */ i(W, {
140
- "aria-label": e(t.sharedLinkEmailLabel),
138
+ content: e(i.sharedLinkEmailLabel),
139
+ children: /* @__PURE__ */ t(X, {
140
+ "aria-label": e(i.sharedLinkEmailLabel),
141
141
  disabled: r,
142
- icon: Y,
143
- onClick: () => w("email"),
142
+ icon: Z,
143
+ onClick: () => F("email"),
144
144
  size: "large",
145
145
  variant: "secondary"
146
146
  })
147
147
  })]
148
148
  }), a && (o.sharedLinkAccess || o.sharedLinkPermission) && /* @__PURE__ */ l("div", {
149
149
  className: s.access,
150
- children: [o.sharedLinkAccess && /* @__PURE__ */ i(ee, {}), o.sharedLinkPermission && /* @__PURE__ */ i(te, {})]
150
+ children: [o.sharedLinkAccess && /* @__PURE__ */ t(ie, {}), o.sharedLinkPermission && /* @__PURE__ */ t(te, {})]
151
151
  }), a && n.access === "open" && /* @__PURE__ */ l("div", {
152
- className: s.securityIndicator,
153
- children: [/* @__PURE__ */ i(P, {}), /* @__PURE__ */ i(x, {
152
+ children: [/* @__PURE__ */ t(D, {
153
+ className: s.icon,
154
+ height: g,
155
+ width: g
156
+ }), /* @__PURE__ */ t(_, {
154
157
  as: "span",
155
158
  color: "textOnLightSecondary",
156
- children: n.permission === "can_edit" ? e(t.sharedLinkEditablePubliclyAvailable) : e(t.sharedLinkPubliclyAvailable)
159
+ children: n.permission === "can_edit" ? e(i.sharedLinkEditablePubliclyAvailable) : e(i.sharedLinkPubliclyAvailable)
157
160
  })]
158
161
  }), a && n.access === "company" && n.permission === "can_edit" && /* @__PURE__ */ l("div", {
159
- className: s.securityIndicator,
160
- children: [/* @__PURE__ */ i(P, {}), /* @__PURE__ */ i(x, {
162
+ children: [/* @__PURE__ */ t(D, {
163
+ className: s.icon,
164
+ height: g,
165
+ width: g
166
+ }), /* @__PURE__ */ t(_, {
161
167
  as: "span",
162
168
  color: "textOnLightSecondary",
163
- children: e(t.sharedLinkElevatedEditableCompanyAvailable)
169
+ children: e(i.sharedLinkElevatedEditableCompanyAvailable)
164
170
  })]
165
171
  })]
166
172
  });
167
173
  }
168
174
  export {
169
- Ie as SharedLinkSection
175
+ Ne as SharedLinkSection
170
176
  };
@@ -1 +1 @@
1
- ._container_120dl_1{align-self:flex-start;max-width:100%}._container_120dl_1 span:first-child{overflow:hidden;text-overflow:ellipsis}._container_120dl_1._overrides_120dl_9{min-height:unset;font-weight:var(--body-default-font-weight)}._focusable_120dl_14{justify-self:flex-start}
1
+ ._container_h88vi_1{align-self:flex-start;max-width:100%}._container_h88vi_1 span:first-child{overflow:hidden;text-overflow:ellipsis}._focusable_h88vi_10{justify-self:flex-start}
@@ -1 +1 @@
1
- ._container_1d5sq_2{display:flex;flex-direction:column;gap:var(--space-4)}._label_1d5sq_8{font-weight:var(--body-default-bold-font-weight);font-size:var(--body-default-bold-font-size);font-family:var(--body-default-bold-font-family);line-height:var(--body-default-bold-line-height);letter-spacing:var(--body-default-bold-letter-spacing);text-transform:var(--body-default-bold-text-case);text-decoration:var(--body-default-bold-text-decoration);display:block;margin-block-end:var(--space-2);padding:var(--space-1) 0;color:var(--text-text-on-light);overflow-wrap:break-word}._securityIndicator_1d5sq_23>svg{display:inline-block;margin-bottom:-3px;padding-right:var(--space-1)}._collaborationAccessContainer_1d5sq_29{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-3)}
1
+ ._container_1spii_2{display:flex;flex-direction:column;gap:var(--space-4)}._label_1spii_8{display:block;margin-block-end:var(--space-2);padding:var(--space-1) 0;color:var(--text-text-on-light);overflow-wrap:break-word}._label_1spii_8._modernized_1spii_15{font-weight:var(--bp-font-weight-bold);font-size:var(--bp-font-size-05);font-family:var(--bp-font-font-family),-apple-system,BlinkMacSystemFont,"San Francisco","Segoe UI",Roboto,"Helvetica Neue",sans-serif;font-style:normal;line-height:var(--bp-font-line-height-04);letter-spacing:var(--bp-font-letter-spacing-01)}._label_1spii_8:not(._modernized_1spii_15){font-weight:var(--body-default-bold-font-weight);font-size:var(--body-default-bold-font-size);font-family:var(--body-default-bold-font-family);line-height:var(--body-default-bold-line-height);letter-spacing:var(--body-default-bold-letter-spacing);text-transform:var(--body-default-bold-text-case);text-decoration:var(--body-default-bold-text-decoration)}._security_1spii_33{margin-top:calc(var(--space-1) * -1)}._icon_1spii_37{height:var(--size-5);margin-right:var(--space-1);vertical-align:text-bottom}._access_1spii_43{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-3)}
@@ -1 +1 @@
1
- ._manage_8rmie_1{display:flex;flex-direction:row-reverse;padding:var(--space-3) .625rem}._manage_8rmie_1 ._manageAllButton_8rmie_6{font-size:var(--link-default-font-size);font-family:var(--link-default-font-family);line-height:var(--link-default-line-height);letter-spacing:var(--link-default-letter-spacing)}._list_8rmie_13{position:relative}._list_8rmie_13:after{position:absolute;inset:0;z-index:1000;border:var(--border-1) solid var(--border-divider-border);border-radius:var(--radius-4);box-shadow:var(--innershadow-1);content:"";pointer-events:none}._scroll_8rmie_30{height:240px;overflow-y:auto;border-radius:var(--radius-4)}._header_8rmie_36{visibility:collapse}
1
+ ._manage_1ilfq_1{display:flex;flex-direction:row-reverse;padding:var(--space-3) .625rem}._link_1ilfq_7{cursor:pointer}._list_1ilfq_11{position:relative}._list_1ilfq_11:after{position:absolute;inset:0;z-index:1000;border:var(--border-1) solid var(--border-divider-border);border-radius:var(--radius-4);box-shadow:var(--innershadow-1);content:"";pointer-events:none}._scroll_1ilfq_28{height:240px;overflow-y:auto;border-radius:var(--radius-4)}._header_1ilfq_34{visibility:collapse}
@@ -1 +1 @@
1
- ._container_1jrg6_1{max-width:100%}._container_1jrg6_1 span:first-child{overflow:hidden;text-overflow:ellipsis}._container_1jrg6_1._overrides_1jrg6_8{min-height:unset;font-weight:var(--body-default-font-weight)}._content_1jrg6_13{z-index:2147483646}
1
+ ._container_1um3f_1{max-width:100%}._container_1um3f_1 span:first-child{overflow:hidden;text-overflow:ellipsis}._content_1um3f_9{z-index:2147483646}
@@ -1 +1 @@
1
- ._container_1b8qy_1{display:flex;flex-direction:column;gap:var(--space-3)}._toggle_1b8qy_7{display:flex;gap:var(--space-2);align-items:center}._settings_1b8qy_13{margin-left:auto;cursor:pointer}._settings_1b8qy_13[aria-disabled=true]{opacity:.3;pointer-events:none}._copy_1b8qy_22{display:flex;gap:var(--space-2)}._copy_1b8qy_22>div:first-child{flex-grow:1}._access_1b8qy_30{display:flex;flex-wrap:wrap;gap:var(--space-2)}._securityIndicator_1b8qy_36>svg{display:inline-block;margin-bottom:-3px;padding-right:var(--space-1)}
1
+ ._container_1hae4_1{display:flex;flex-direction:column;gap:var(--space-3)}._toggle_1hae4_7{display:flex;gap:var(--space-2);align-items:center}._settings_1hae4_13{margin-left:auto;cursor:pointer}._settings_1hae4_13[aria-disabled=true]{opacity:.3;pointer-events:none}._copy_1hae4_22{display:flex;gap:var(--space-2)}._copy_1hae4_22>div:first-child{flex-grow:1}._access_1hae4_30{display:flex;flex-wrap:wrap;gap:var(--space-2)}._icon_1hae4_36{height:var(--size-5);margin-right:var(--space-1);vertical-align:text-bottom}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/unified-share-modal",
3
- "version": "1.36.5",
3
+ "version": "1.36.6",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@box/blueprint-web": "^12.114.0",