@box/unified-share-modal 1.37.5 → 1.37.7

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,64 +1,65 @@
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";
1
+ import T from "lodash/camelCase";
2
+ import { useState as y, useMemo as L, useEffect as k } from "react";
3
+ import { useIntl as N } from "react-intl";
4
+ import { Tooltip as F, Focusable as O, TriggerButton as D, DropdownMenu as n } from "@box/blueprint-web";
5
5
  import $ from "../messages.js";
6
6
  import l from "./messages.js";
7
7
  import { jsx as e, jsxs as j } from "react/jsx-runtime";
8
8
  import { isInvitationRoleSupported as z, getDefaultCollaborationRole as A } from "../../../utils/collaborator.js";
9
9
  import { useUnifiedShareFormContext as P } from "../../../contexts/unified-share-form-context.js";
10
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 = {
11
+ import '../../../../../styles/collaboration-role.css';const B = "_container_15wt1_1", E = "_focusable_15wt1_10", W = "_content_15wt1_14", d = {
12
12
  container: B,
13
- focusable: E
13
+ focusable: E,
14
+ content: W
14
15
  };
15
- function Z() {
16
+ function ee() {
16
17
  const {
17
18
  formatMessage: t
18
- } = F(), [f, M] = L(!1), {
19
+ } = N(), [f, M] = y(!1), {
19
20
  collaborationRole: u,
20
- setCollaborationRole: c
21
+ setCollaborationRole: m
21
22
  } = P(), {
22
23
  collaborationRoles: g,
23
24
  isSubmitting: S,
24
- item: I
25
+ item: v
25
26
  } = U(), {
26
- permissions: T = {},
27
- type: d
28
- } = I, r = k(() => g.map((i) => {
27
+ permissions: w = {},
28
+ type: p
29
+ } = v, r = L(() => g.map((i) => {
29
30
  const {
30
- description: m,
31
+ description: s,
31
32
  id: o,
32
- label: s
33
- } = i, p = z(o), C = y(o);
33
+ label: c
34
+ } = i, b = z(o), C = T(o);
34
35
  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`])), {
36
+ o === "editor" && p === "folder" && (R += "Folder");
37
+ let x = o, _ = "";
38
+ return b && (x = t($[`${C}Role`]), _ = t(l[`${R}Description`])), {
38
39
  ...i,
39
- description: m ?? x,
40
- label: s ?? v
40
+ description: s ?? _,
41
+ label: c ?? x
41
42
  };
42
- }), [g, t, d]);
43
- if (w(() => {
44
- c(A(r));
45
- }, [r, c]), !r.length || !u)
43
+ }), [g, t, p]);
44
+ if (k(() => {
45
+ m(A(r));
46
+ }, [r, m]), !r.length || !u)
46
47
  return null;
47
48
  const {
48
- id: _,
49
+ id: I,
49
50
  label: h
50
51
  } = u;
51
52
  let a;
52
- return T.canInviteCollaborator || (a = t(l.inviteDisabledTooltip)), d === "web_link" && (a = t(l.inviteWebLinkDisabledTooltip)), a ? /* @__PURE__ */ e(N, {
53
+ return w.canInviteCollaborator || (a = t(l.inviteDisabledTooltip)), p === "web_link" && (a = t(l.inviteWebLinkDisabledTooltip)), a ? /* @__PURE__ */ e(F, {
53
54
  align: "start",
54
55
  content: a,
55
56
  "data-testid": "collaboration-role-tooltip",
56
57
  side: "bottom",
57
58
  children: /* @__PURE__ */ e(O, {
58
- className: b.focusable,
59
+ className: d.focusable,
59
60
  children: /* @__PURE__ */ e(D, {
60
61
  caretDirection: "down",
61
- className: b.container,
62
+ className: d.container,
62
63
  disabled: !0,
63
64
  label: t(l.inviteAsRoleLabel, {
64
65
  role: h
@@ -73,7 +74,7 @@ function Z() {
73
74
  children: [/* @__PURE__ */ e(n.Trigger, {
74
75
  children: /* @__PURE__ */ e(D, {
75
76
  caretDirection: f ? "up" : "down",
76
- className: b.container,
77
+ className: d.container,
77
78
  disabled: S,
78
79
  label: t(l.inviteAsRoleLabel, {
79
80
  role: h
@@ -83,26 +84,28 @@ function Z() {
83
84
  })
84
85
  }), /* @__PURE__ */ e(n.Content, {
85
86
  align: "start",
87
+ className: d.content,
86
88
  children: r.map((i) => {
87
89
  const {
88
- description: m,
90
+ description: s,
89
91
  isDisabled: o,
90
- id: s,
91
- label: p
92
+ id: c,
93
+ label: b
92
94
  } = i;
93
95
  return /* @__PURE__ */ e(n.CheckboxItem, {
94
- checked: _ === s,
96
+ checked: I === c,
95
97
  disabled: o,
96
- onSelect: () => c(i),
98
+ onSelect: () => m(i),
97
99
  children: /* @__PURE__ */ e(n.Item.MainContent, {
98
- caption: m,
99
- label: p
100
+ caption: s,
101
+ label: b,
102
+ title: s
100
103
  })
101
- }, s);
104
+ }, c);
102
105
  })
103
106
  })]
104
107
  });
105
108
  }
106
109
  export {
107
- Z as CollaborationRole
110
+ ee as CollaborationRole
108
111
  };
@@ -1 +1 @@
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
+ ._container_15wt1_1{align-self:flex-start;max-width:100%}._container_15wt1_1 span:first-child{overflow:hidden;text-overflow:ellipsis}._focusable_15wt1_10{justify-self:flex-start}._content_15wt1_14{--blueprint-web-dropdown-content-max-width: 432px}
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@box/unified-share-modal",
3
- "version": "1.37.5",
3
+ "version": "1.37.7",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
- "@box/blueprint-web": "^12.116.0",
7
- "@box/blueprint-web-assets": "^4.93.1",
8
- "@box/copy-input": "^1.22.9",
9
- "@box/user-selector": "^1.55.9",
6
+ "@box/blueprint-web": "^12.116.1",
7
+ "@box/blueprint-web-assets": "^4.93.2",
8
+ "@box/copy-input": "^1.22.10",
9
+ "@box/user-selector": "^1.55.10",
10
10
  "lodash": "^4.17.15",
11
11
  "react": "^18.0.0",
12
12
  "react-dom": "^18.0.0",
13
13
  "react-intl": "^6.4.2"
14
14
  },
15
15
  "devDependencies": {
16
- "@box/blueprint-web": "^12.116.0",
17
- "@box/blueprint-web-assets": "^4.93.1",
18
- "@box/copy-input": "^1.22.9",
19
- "@box/storybook-utils": "0.15.9",
16
+ "@box/blueprint-web": "^12.116.1",
17
+ "@box/blueprint-web-assets": "^4.93.2",
18
+ "@box/copy-input": "^1.22.10",
19
+ "@box/storybook-utils": "0.16.0",
20
20
  "@box/eslint-plugin-blueprint": "1.0.5",
21
21
  "react-intl": "^6.4.2"
22
22
  },