@box/unified-share-modal 1.52.0 → 1.52.2

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 (28) hide show
  1. package/dist/esm/lib/components/remove-collaborator-modal/remove-collaborator-modal.js +54 -51
  2. package/dist/esm/lib/components/remove-shared-link-modal/remove-shared-link-modal.js +44 -41
  3. package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings-modal.js +56 -58
  4. package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings.js +70 -71
  5. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-role.js +60 -58
  6. package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-section.js +98 -99
  7. package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-list-item.js +39 -40
  8. package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-list.js +55 -54
  9. package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-access.js +73 -70
  10. package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-permission.js +57 -56
  11. package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-section.js +107 -108
  12. package/dist/esm/lib/components/unified-share-form-modal/unified-share-form-modal.js +55 -54
  13. package/dist/esm/lib/contexts/shared-link-settings-context.js +32 -34
  14. package/dist/esm/lib/contexts/unified-share-modal-context.js +39 -38
  15. package/dist/esm/lib/hooks/use-collaboration-form.js +31 -33
  16. package/dist/esm/lib/hooks/use-link-settings-form.js +30 -32
  17. package/dist/esm/lib/hooks/use-sharing-action.js +39 -39
  18. package/dist/styles/collaboration-role.css +1 -1
  19. package/dist/styles/collaborator-list-item.css +1 -1
  20. package/dist/styles/shared-link-access.css +1 -1
  21. package/dist/styles/shared-link-settings-modal.css +1 -1
  22. package/dist/types/lib/contexts/shared-link-settings-context.d.ts +0 -1
  23. package/dist/types/lib/contexts/unified-share-modal-context.d.ts +2 -1
  24. package/dist/types/lib/hooks/use-collaboration-form.d.ts +0 -1
  25. package/dist/types/lib/hooks/use-link-settings-form.d.ts +0 -1
  26. package/dist/types/lib/hooks/use-sharing-action.d.ts +0 -1
  27. package/dist/types/lib/types.d.ts +12 -0
  28. package/package.json +9 -9
@@ -1,79 +1,82 @@
1
1
  import x from "clsx";
2
- import { useEffect as B } from "react";
3
- import { useIntl as C } from "react-intl";
2
+ import C from "lodash/noop";
3
+ import { useEffect as F } from "react";
4
+ import { useIntl as B } from "react-intl";
4
5
  import { Modal as o, Divider as S, Text as k } from "@box/blueprint-web";
5
- import i from "./messages.js";
6
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
7
- import { useUnifiedShareModalContext as M } from "../../contexts/unified-share-modal-context.js";
8
- import { useSharingAction as w } from "../../hooks/use-sharing-action.js";
9
- import '../../../../styles/remove-collaborator-modal.css';const A = "_content_166yb_1", D = "_isFullscreen_166yb_1", L = "_body_166yb_10", N = "_divider_166yb_17", r = {
10
- content: A,
11
- isFullscreen: D,
12
- body: L,
6
+ import n from "./messages.js";
7
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
8
+ import { useUnifiedShareModalContext as w } from "../../contexts/unified-share-modal-context.js";
9
+ import { useSharingAction as D } from "../../hooks/use-sharing-action.js";
10
+ import '../../../../styles/remove-collaborator-modal.css';const M = "_content_166yb_1", P = "_isFullscreen_166yb_1", A = "_body_166yb_10", N = "_divider_166yb_17", i = {
11
+ content: M,
12
+ isFullscreen: P,
13
+ body: A,
13
14
  divider: N
14
15
  };
15
- function U({
16
- isOpen: n,
16
+ function q({
17
+ isOpen: l,
17
18
  onOpenChange: s
18
19
  }) {
19
20
  const {
20
21
  formatMessage: t
21
- } = C(), {
22
- collaborator: c,
23
- isSubmitting: u,
22
+ } = B(), {
23
+ collaborator: m,
24
+ isSubmitting: r,
24
25
  sharingService: f,
25
- setCollaborator: d,
26
+ setCollaborator: u,
26
27
  variant: y
27
- } = M(), {
28
- email: v,
29
- name: _
30
- } = c ?? {}, {
31
- removeCollaborator: m
32
- } = f, l = y === "desktop";
33
- B(() => {
34
- n || d(null);
35
- }, [n, d]);
36
- const h = async () => {
37
- m && (await m(c), s(!1), await new Promise((F) => setTimeout(F)));
28
+ } = w(), {
29
+ email: p,
30
+ name: h
31
+ } = m ?? {}, {
32
+ removeCollaborator: b
33
+ } = f, a = y === "desktop";
34
+ F(() => {
35
+ l || u(null);
36
+ }, [l, u]);
37
+ const v = async () => {
38
+ b && (await b(m), s(!1), await new Promise((c) => setTimeout(c)));
38
39
  }, {
39
- isLoading: p,
40
- onAction: g
41
- } = w(h, "remove-collaborator"), b = u ?? p;
40
+ onAction: _
41
+ } = D(v, "remove-collaborator"), g = (c) => {
42
+ c.preventDefault();
43
+ };
42
44
  return /* @__PURE__ */ e(o, {
43
- onOpenChange: s,
44
- open: n,
45
- children: /* @__PURE__ */ a(o.Content, {
46
- className: x(r.content, l && r.isFullscreen),
45
+ onOpenChange: r ? C : s,
46
+ open: l,
47
+ children: /* @__PURE__ */ d(o.Content, {
48
+ className: x(i.content, a && i.isFullscreen),
49
+ onPointerDownOutside: g,
47
50
  size: "small",
48
51
  children: [/* @__PURE__ */ e(o.Header, {
49
- children: t(i.title)
50
- }), /* @__PURE__ */ a(o.Body, {
51
- className: r.body,
52
- children: [l && /* @__PURE__ */ e(S, {
53
- className: r.divider
52
+ children: t(n.title)
53
+ }), /* @__PURE__ */ d(o.Body, {
54
+ className: i.body,
55
+ children: [a && /* @__PURE__ */ e(S, {
56
+ className: i.divider
54
57
  }), /* @__PURE__ */ e(k, {
55
58
  as: "p",
56
- children: t(i.bodyText, {
57
- name: v || _
59
+ children: t(n.bodyText, {
60
+ name: p || h
58
61
  })
59
62
  })]
60
- }), /* @__PURE__ */ a(o.Footer, {
63
+ }), /* @__PURE__ */ d(o.Footer, {
61
64
  children: [/* @__PURE__ */ e(o.Footer.SecondaryButton, {
62
- disabled: b,
65
+ disabled: r,
63
66
  onClick: () => s(!1),
64
- children: t(i.cancelButton)
67
+ children: t(n.cancelButton)
65
68
  }), /* @__PURE__ */ e(o.Footer.PrimaryButton, {
66
- loading: b,
67
- loadingAriaLabel: t(i.loadingLabel),
68
- onClick: g,
69
- children: t(i.okayButton)
69
+ loading: r,
70
+ loadingAriaLabel: t(n.loadingLabel),
71
+ onClick: _,
72
+ children: t(n.okayButton)
70
73
  })]
71
- }), !l && /* @__PURE__ */ e(o.Close, {
72
- "aria-label": t(i.closeButton)
74
+ }), !r && !a && /* @__PURE__ */ e(o.Close, {
75
+ "aria-label": t(n.closeButton)
73
76
  })]
74
77
  })
75
78
  });
76
79
  }
77
80
  export {
78
- U as RemoveCollaboratorModal
81
+ q as RemoveCollaboratorModal
79
82
  };
@@ -1,67 +1,70 @@
1
1
  import p from "clsx";
2
- import { useIntl as g } from "react-intl";
3
- import { Modal as e, Divider as k, Text as v } from "@box/blueprint-web";
4
- import i from "./messages.js";
5
- import { jsx as o, jsxs as l } from "react/jsx-runtime";
6
- import { useUnifiedShareModalContext as F } from "../../contexts/unified-share-modal-context.js";
7
- import { useSharingAction as S } from "../../hooks/use-sharing-action.js";
8
- import '../../../../styles/remove-collaborator-modal.css';const x = "_content_166yb_1", B = "_isFullscreen_166yb_1", D = "_body_166yb_10", L = "_divider_166yb_17", n = {
9
- content: x,
2
+ import _ from "lodash/noop";
3
+ import { useIntl as v } from "react-intl";
4
+ import { Modal as e, Divider as k, Text as S } from "@box/blueprint-web";
5
+ import n from "./messages.js";
6
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
7
+ import { useUnifiedShareModalContext as g } from "../../contexts/unified-share-modal-context.js";
8
+ import { useSharingAction as x } from "../../hooks/use-sharing-action.js";
9
+ import '../../../../styles/remove-collaborator-modal.css';const F = "_content_166yb_1", B = "_isFullscreen_166yb_1", D = "_body_166yb_10", w = "_divider_166yb_17", s = {
10
+ content: F,
10
11
  isFullscreen: B,
11
12
  body: D,
12
- divider: L
13
+ divider: w
13
14
  };
14
- function P({
15
- isOpen: d,
16
- onOpenChange: s
15
+ function z({
16
+ isOpen: m,
17
+ onOpenChange: r
17
18
  }) {
18
19
  const {
19
20
  formatMessage: t
20
- } = g(), {
21
- isSubmitting: m,
21
+ } = v(), {
22
+ isSubmitting: i,
22
23
  sharingService: u,
23
24
  variant: b
24
- } = F(), {
25
- deleteSharedLink: a
26
- } = u, r = b === "desktop", y = async () => {
27
- a && (await a(), s(!1), await new Promise((_) => setTimeout(_)));
25
+ } = g(), {
26
+ deleteSharedLink: c
27
+ } = u, l = b === "desktop", f = async () => {
28
+ c && (await c(), r(!1), await new Promise((a) => setTimeout(a)));
28
29
  }, {
29
- isLoading: f,
30
30
  onAction: h
31
- } = S(y, "delete-shared-link"), c = m ?? f;
31
+ } = x(f, "delete-shared-link"), y = (a) => {
32
+ a.preventDefault();
33
+ };
32
34
  return /* @__PURE__ */ o(e, {
33
- onOpenChange: s,
34
- open: d,
35
- children: /* @__PURE__ */ l(e.Content, {
36
- className: p(n.content, r && n.isFullscreen),
35
+ onOpenChange: i ? _ : r,
36
+ open: m,
37
+ children: /* @__PURE__ */ d(e.Content, {
38
+ className: p(s.content, l && s.isFullscreen),
39
+ onPointerDownOutside: y,
37
40
  size: "small",
38
41
  children: [/* @__PURE__ */ o(e.Header, {
39
- children: t(i.title)
40
- }), /* @__PURE__ */ l(e.Body, {
41
- className: n.body,
42
- children: [r && /* @__PURE__ */ o(k, {
43
- className: n.divider
44
- }), /* @__PURE__ */ o(v, {
42
+ children: t(n.title)
43
+ }), /* @__PURE__ */ d(e.Body, {
44
+ className: s.body,
45
+ children: [l && /* @__PURE__ */ o(k, {
46
+ className: s.divider
47
+ }), /* @__PURE__ */ o(S, {
45
48
  as: "p",
46
- children: t(i.bodyText)
49
+ children: t(n.bodyText)
47
50
  })]
48
- }), /* @__PURE__ */ l(e.Footer, {
51
+ }), /* @__PURE__ */ d(e.Footer, {
49
52
  children: [/* @__PURE__ */ o(e.Footer.SecondaryButton, {
50
- disabled: c,
51
- onClick: () => s(!1),
52
- children: t(i.cancelButton)
53
+ disabled: i,
54
+ onClick: () => r(!1),
55
+ children: t(n.cancelButton)
53
56
  }), /* @__PURE__ */ o(e.Footer.PrimaryButton, {
54
- loading: c,
55
- loadingAriaLabel: t(i.loadingLabel),
57
+ loading: i,
58
+ loadingAriaLabel: t(n.loadingLabel),
56
59
  onClick: h,
57
- children: t(i.okayButton)
60
+ children: t(n.okayButton)
58
61
  })]
59
- }), !r && /* @__PURE__ */ o(e.Close, {
60
- "aria-label": t(i.closeButton)
62
+ }), !i && !l && /* @__PURE__ */ o(e.Close, {
63
+ "aria-label": t(n.closeButton)
61
64
  })]
62
65
  })
63
66
  });
64
67
  }
65
68
  export {
66
- P as RemoveSharedLinkModal
69
+ z as RemoveSharedLinkModal
67
70
  };
@@ -1,95 +1,93 @@
1
- import d from "clsx";
2
- import { useState as N, useEffect as x } from "react";
3
- import { useIntl as D } from "react-intl";
4
- import { Modal as i, LoadingIndicator as M, Divider as w } from "@box/blueprint-web";
5
- import { SharedLinkSettings as I } from "./shared-link-settings.js";
1
+ import l from "clsx";
2
+ import { useState as k, useEffect as C } from "react";
3
+ import { useIntl as F } from "react-intl";
4
+ import { Modal as i, LoadingIndicator as B, Divider as N } from "@box/blueprint-web";
5
+ import { SharedLinkSettings as x } from "./shared-link-settings.js";
6
6
  import t from "./messages.js";
7
7
  import { jsx as e, jsxs as s } from "react/jsx-runtime";
8
- import { ClassificationStatus as P } from "../classification-status/classification-status.js";
9
- import { useUnifiedShareModalContext as j } from "../../contexts/unified-share-modal-context.js";
10
- import { useSharedLinkSettingsContext as z } from "../../contexts/shared-link-settings-context.js";
11
- import '../../../../styles/shared-link-settings-modal.css';const U = "_content_1bhek_1", A = "_isFullscreen_1bhek_4", E = "_body_1bhek_13", H = "_header_1bhek_17", q = "_form_1bhek_34", G = "_isLoading_1bhek_41", J = "_loading_1bhek_45", K = "_divider_1bhek_53", o = {
12
- content: U,
13
- isFullscreen: A,
14
- body: E,
15
- header: H,
16
- form: q,
17
- isLoading: G,
18
- loading: J,
19
- divider: K
8
+ import { ClassificationStatus as D } from "../classification-status/classification-status.js";
9
+ import { useUnifiedShareModalContext as M } from "../../contexts/unified-share-modal-context.js";
10
+ import { useSharedLinkSettingsContext as w } from "../../contexts/shared-link-settings-context.js";
11
+ import '../../../../styles/shared-link-settings-modal.css';const I = "_content_1dmg4_1", P = "_isFullscreen_1dmg4_4", j = "_body_1dmg4_13", z = "_header_1dmg4_17", A = "_form_1dmg4_35", E = "_isLoading_1dmg4_42", H = "_loading_1dmg4_46", U = "_divider_1dmg4_54", o = {
12
+ content: I,
13
+ isFullscreen: P,
14
+ body: j,
15
+ header: z,
16
+ form: A,
17
+ isLoading: E,
18
+ loading: H,
19
+ divider: U
20
20
  };
21
- function ee({
21
+ function Y({
22
22
  isOpen: a,
23
- onOpenChange: m
23
+ onOpenChange: g
24
24
  }) {
25
25
  const {
26
26
  formatMessage: n
27
- } = D(), {
28
- eventService: _,
29
- isFetching: b,
30
- isSubmitting: L,
27
+ } = F(), {
28
+ eventService: h,
29
+ isSubmitting: r,
31
30
  variant: S
32
- } = j(), {
33
- onSharedLinkSettingsClose: h,
34
- onSharedLinkSettingsLoad: r
35
- } = _, l = S === "desktop", {
36
- isUpdating: k,
37
- resetForm: g,
38
- submitForm: p
39
- } = z(), [v, F] = N(!!r);
40
- x(() => {
41
- (async () => r && (a && await r(), F(!a)))();
42
- }, [a, r]);
43
- const f = () => {
44
- g(), h && h(), m(!1);
45
- }, y = async () => {
46
- await p() || (g(), m(!1));
47
- }, C = (B) => {
48
- B.preventDefault();
49
- }, c = b || v, u = L || k;
31
+ } = M(), {
32
+ onSharedLinkSettingsClose: f,
33
+ onSharedLinkSettingsLoad: d
34
+ } = h, c = S === "desktop", {
35
+ resetForm: u,
36
+ submitForm: L
37
+ } = w(), [m, b] = k(!!d);
38
+ C(() => {
39
+ (async () => d && (a && await d(), b(!a)))();
40
+ }, [a, d]);
41
+ const _ = () => {
42
+ r || (u(), f && f(), g(!1));
43
+ }, p = async () => {
44
+ await L() || (u(), g(!1));
45
+ }, v = (y) => {
46
+ y.preventDefault();
47
+ };
50
48
  return /* @__PURE__ */ e(i, {
51
- onOpenChange: f,
49
+ onOpenChange: _,
52
50
  open: a,
53
51
  children: /* @__PURE__ */ s(i.Content, {
54
- className: d(o.content, l && o.isFullscreen),
55
- onPointerDownOutside: C,
52
+ className: l(o.content, c && o.isFullscreen),
53
+ onPointerDownOutside: v,
56
54
  size: "medium",
57
55
  children: [/* @__PURE__ */ s(i.Header, {
58
56
  className: o.header,
59
- children: [n(t.title), /* @__PURE__ */ e(P, {})]
57
+ children: [n(t.title), /* @__PURE__ */ e(D, {})]
60
58
  }), /* @__PURE__ */ s("div", {
61
- className: d(o.form),
62
- children: [c && /* @__PURE__ */ e("div", {
59
+ className: l(o.form),
60
+ children: [m && /* @__PURE__ */ e("div", {
63
61
  className: o.loading,
64
- children: /* @__PURE__ */ e(M, {
62
+ children: /* @__PURE__ */ e(B, {
65
63
  "aria-label": n(t.loadingLabel),
66
64
  size: "large"
67
65
  })
68
66
  }), /* @__PURE__ */ s(i.Body, {
69
- className: d(o.body, c && o.isLoading),
70
- children: [l && /* @__PURE__ */ e(w, {
67
+ className: l(o.body, m && o.isLoading),
68
+ children: [c && /* @__PURE__ */ e(N, {
71
69
  className: o.divider
72
- }), /* @__PURE__ */ e(I, {})]
70
+ }), /* @__PURE__ */ e(x, {})]
73
71
  }), /* @__PURE__ */ s(i.Footer, {
74
- className: d(c && o.isLoading),
72
+ className: l(m && o.isLoading),
75
73
  children: [/* @__PURE__ */ e(i.Footer.SecondaryButton, {
76
- disabled: u,
77
- onClick: f,
74
+ disabled: r,
75
+ onClick: _,
78
76
  children: n(t.cancelButton)
79
77
  }), /* @__PURE__ */ e(i.Footer.PrimaryButton, {
80
78
  id: "usm-SharedLinkSettingsModal-primaryButton",
81
- loading: u,
79
+ loading: r,
82
80
  loadingAriaLabel: n(t.loadingLabel),
83
- onClick: y,
81
+ onClick: p,
84
82
  children: n(t.saveButton)
85
83
  })]
86
84
  })]
87
- }), !l && /* @__PURE__ */ e(i.Close, {
85
+ }), !r && !c && /* @__PURE__ */ e(i.Close, {
88
86
  "aria-label": n(t.closeButton)
89
87
  })]
90
88
  })
91
89
  });
92
90
  }
93
91
  export {
94
- ee as SharedLinkSettingsModal
92
+ Y as SharedLinkSettingsModal
95
93
  };
@@ -1,46 +1,45 @@
1
- import { useMemo as I } from "react";
2
- import { useIntl as M } from "react-intl";
3
- import { InlineNotice as B, Text as O, Link as j } from "@box/blueprint-web";
4
- import { DownloadSection as U } from "./download-section.js";
5
- import { ExpirationSection as _ } from "./expiration-section.js";
6
- import { PasswordSection as q } from "./password-section.js";
7
- import { VanitySection as z } from "./vanity-section.js";
1
+ import { useMemo as V } from "react";
2
+ import { useIntl as F } from "react-intl";
3
+ import { InlineNotice as I, Text as M, Link as B } from "@box/blueprint-web";
4
+ import { DownloadSection as O } from "./download-section.js";
5
+ import { ExpirationSection as j } from "./expiration-section.js";
6
+ import { PasswordSection as U } from "./password-section.js";
7
+ import { VanitySection as _ } from "./vanity-section.js";
8
8
  import n from "./messages.js";
9
- import { jsxs as G, Fragment as H, jsx as s } from "react/jsx-runtime";
10
- import { useAccessLevels as J } from "../../hooks/use-access-levels.js";
11
- import { useSharedLinkSettingsContext as K } from "../../contexts/shared-link-settings-context.js";
12
- import { useUnifiedShareModalContext as Q } from "../../contexts/unified-share-modal-context.js";
13
- function re() {
9
+ import { jsxs as q, Fragment as z, jsx as s } from "react/jsx-runtime";
10
+ import { useAccessLevels as G } from "../../hooks/use-access-levels.js";
11
+ import { useSharedLinkSettingsContext as H } from "../../contexts/shared-link-settings-context.js";
12
+ import { useUnifiedShareModalContext as J } from "../../contexts/unified-share-modal-context.js";
13
+ function se() {
14
14
  const {
15
15
  formatMessage: t
16
- } = M(), {
17
- isSubmitting: u,
18
- sharedLink: w
19
- } = Q(), {
20
- settings: v = {},
21
- vanityDomain: C = ""
22
- } = w, {
16
+ } = F(), {
17
+ isSubmitting: r,
18
+ sharedLink: b
19
+ } = J(), {
20
+ settings: w = {},
21
+ vanityDomain: v = ""
22
+ } = b, {
23
23
  canChangeDownload: c,
24
24
  canChangeExpiration: g,
25
25
  canChangePassword: m,
26
- canChangeVanityName: p,
27
- isDownloadAvailable: f,
28
- isPasswordAvailable: S,
29
- isVanityNameAvailable: E
30
- } = v, {
31
- selectedAccess: r
32
- } = J(), {
26
+ canChangeVanityName: h,
27
+ isDownloadAvailable: C,
28
+ isPasswordAvailable: f,
29
+ isVanityNameAvailable: S
30
+ } = w, {
31
+ selectedAccess: l
32
+ } = G(), {
33
33
  errors: d,
34
34
  formData: a,
35
- initialFormData: h,
36
- isUpdating: x,
35
+ initialFormData: p,
37
36
  setFieldError: i,
38
37
  setFieldValue: o,
39
- validatePassword: y
40
- } = K(), b = I(() => {
41
- if (!r)
38
+ validatePassword: E
39
+ } = H(), u = V(() => {
40
+ if (!l)
42
41
  return null;
43
- switch (r.id) {
42
+ switch (l.id) {
44
43
  case "collaborators":
45
44
  return n.subtitleCollaborators;
46
45
  case "open":
@@ -50,79 +49,79 @@ function re() {
50
49
  default:
51
50
  return null;
52
51
  }
53
- }, [a.isDownloadEnabled, r]), D = (e) => {
52
+ }, [a.isDownloadEnabled, l]), x = (e) => {
54
53
  i("expiration", void 0), o("isExpirationEnabled", e);
55
- }, k = (e) => {
54
+ }, y = (e) => {
56
55
  i("expiration", void 0), o("expiration", e);
57
- }, N = (e) => {
56
+ }, D = (e) => {
58
57
  i("vanityName", void 0), o("isVanityNameEnabled", e);
59
- }, L = (e) => {
58
+ }, k = (e) => {
60
59
  i("vanityName", void 0), o("vanityName", e.target.value);
61
- }, A = (e) => {
60
+ }, N = (e) => {
62
61
  i("password", void 0), o("isPasswordEnabled", e);
63
- }, P = (e) => {
62
+ }, L = (e) => {
64
63
  i("password", void 0), o("password", e.target.value);
65
- }, T = (e) => {
64
+ }, A = (e) => {
66
65
  o("isDownloadEnabled", e);
67
- }, V = (e) => {
68
- const F = document.getElementById("usm-SharedLinkSettingsModal-primaryButton")?.contains(e.relatedTarget);
69
- h.isPasswordEnabled && !a.password || F || y(a.password);
70
- }, l = u || x;
71
- return /* @__PURE__ */ G(H, {
72
- children: [!(c && g && m && p) && /* @__PURE__ */ s(B, {
66
+ }, P = (e) => {
67
+ const T = document.getElementById("usm-SharedLinkSettingsModal-primaryButton")?.contains(e.relatedTarget);
68
+ p.isPasswordEnabled && !a.password || T || E(a.password);
69
+ };
70
+ return /* @__PURE__ */ q(z, {
71
+ children: [!(c && g && m && h) && /* @__PURE__ */ s(I, {
73
72
  variant: "warning",
74
73
  variantIconAriaLabel: t(n.warningNoticeIconAriaLabel),
75
74
  children: t(n.inaccessibleSettingsNotice)
76
- }), b && /* @__PURE__ */ s(O, {
75
+ }), u && /* @__PURE__ */ s(M, {
77
76
  as: "p",
78
77
  color: "textOnLightSecondary",
79
- children: t(b, {
80
- learnSharedLinkSettingsLink: /* @__PURE__ */ s(j, {
78
+ children: t(u, {
79
+ learnSharedLinkSettingsLink: /* @__PURE__ */ s(B, {
81
80
  href: "https://support.box.com/hc/en-us/articles/360043697554-Configuring-Individual-Shared-Link-Settings",
82
81
  rel: "noreferrer",
83
82
  target: "_blank",
84
83
  children: t(n.learnSharedLinkSettingsLink)
85
84
  })
86
85
  })
87
- }), /* @__PURE__ */ s(_, {
86
+ }), /* @__PURE__ */ s(j, {
88
87
  canChange: !!g,
89
88
  error: d.expiration,
90
89
  expiration: a.expiration,
91
90
  isChecked: a.isExpirationEnabled,
92
- isDisabled: l,
93
- onChange: k,
94
- onToggle: D
95
- }), /* @__PURE__ */ s(q, {
91
+ isDisabled: r,
92
+ onChange: y,
93
+ onToggle: x
94
+ }), /* @__PURE__ */ s(U, {
96
95
  canChange: !!m,
97
96
  error: d.password,
98
- isAvailable: S && r?.id === "open",
97
+ isAvailable: f && l?.id === "open",
99
98
  isChecked: a.isPasswordEnabled,
100
- isDefaultChecked: h.isPasswordEnabled,
101
- isDisabled: l,
102
- onBlur: V,
103
- onChange: P,
99
+ isDefaultChecked: p.isPasswordEnabled,
100
+ isDisabled: r,
101
+ onBlur: P,
102
+ onChange: L,
104
103
  onFocus: () => i("password", void 0),
105
- onToggle: A,
104
+ onToggle: N,
106
105
  password: a.password
107
- }), /* @__PURE__ */ s(z, {
108
- canChange: !!p,
106
+ }), /* @__PURE__ */ s(_, {
107
+ canChange: !!h,
109
108
  error: d.vanityName,
110
- isAvailable: !!E,
109
+ isAvailable: !!S,
111
110
  isChecked: a.isVanityNameEnabled,
112
- isDisabled: l,
113
- onChange: L,
114
- onToggle: N,
115
- vanityDomain: C,
111
+ isDisabled: r,
112
+ onChange: k,
113
+ onToggle: D,
114
+ vanityDomain: v,
116
115
  vanityName: a.vanityName
117
- }), /* @__PURE__ */ s(U, {
116
+ }), /* @__PURE__ */ s(O, {
118
117
  canChange: !!c,
119
- isAvailable: !!f,
118
+ isAvailable: !!C,
120
119
  isChecked: a.isDownloadEnabled,
121
- isDisabled: l,
122
- onToggle: T
120
+ isDisabled: r,
121
+ onToggle: A
123
122
  })]
124
123
  });
125
124
  }
126
125
  export {
127
- re as SharedLinkSettings
126
+ se as SharedLinkSettings
128
127
  };