@box/unified-share-modal 2.8.8 → 2.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/lib/components/remove-collaborator-modal/remove-collaborator-modal.js +32 -32
- package/dist/esm/lib/components/remove-shared-link-modal/remove-shared-link-modal.js +13 -13
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-section.js +80 -82
- package/dist/esm/lib/utils/notification.js +6 -3
- package/dist/types/lib/utils/notification.d.ts +3 -0
- package/package.json +9 -9
|
@@ -4,14 +4,14 @@ import { useEffect as F } from "react";
|
|
|
4
4
|
import { useIntl as B } from "react-intl";
|
|
5
5
|
import { Modal as o, Divider as S, Text as k } from "@box/blueprint-web";
|
|
6
6
|
import n from "./messages.js";
|
|
7
|
-
import { jsx as e, jsxs as
|
|
8
|
-
import { useUnifiedShareModalContext as
|
|
9
|
-
import { useSharingAction as
|
|
10
|
-
import '../../../../styles/remove-collaborator-modal.css';const
|
|
11
|
-
content:
|
|
12
|
-
isFullscreen:
|
|
13
|
-
body:
|
|
14
|
-
divider:
|
|
7
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { useUnifiedShareModalContext as D } from "../../contexts/unified-share-modal-context.js";
|
|
9
|
+
import { useSharingAction as M } from "../../hooks/use-sharing-action.js";
|
|
10
|
+
import '../../../../styles/remove-collaborator-modal.css';const w = "_content_166yb_1", A = "_isFullscreen_166yb_1", N = "_body_166yb_10", P = "_divider_166yb_17", i = {
|
|
11
|
+
content: w,
|
|
12
|
+
isFullscreen: A,
|
|
13
|
+
body: N,
|
|
14
|
+
divider: P
|
|
15
15
|
};
|
|
16
16
|
function q({
|
|
17
17
|
isOpen: l,
|
|
@@ -20,47 +20,47 @@ function q({
|
|
|
20
20
|
const {
|
|
21
21
|
formatMessage: t
|
|
22
22
|
} = B(), {
|
|
23
|
-
collaborator:
|
|
23
|
+
collaborator: d,
|
|
24
24
|
isSubmitting: r,
|
|
25
|
-
sharingService:
|
|
26
|
-
setCollaborator:
|
|
27
|
-
variant:
|
|
28
|
-
} =
|
|
29
|
-
email:
|
|
30
|
-
name:
|
|
31
|
-
} =
|
|
32
|
-
removeCollaborator:
|
|
33
|
-
} =
|
|
25
|
+
sharingService: b,
|
|
26
|
+
setCollaborator: m,
|
|
27
|
+
variant: u
|
|
28
|
+
} = D(), {
|
|
29
|
+
email: f,
|
|
30
|
+
name: y
|
|
31
|
+
} = d ?? {}, {
|
|
32
|
+
removeCollaborator: p
|
|
33
|
+
} = b, a = u === "desktop";
|
|
34
34
|
F(() => {
|
|
35
|
-
l ||
|
|
36
|
-
}, [l,
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
}, {
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
35
|
+
l || m(null);
|
|
36
|
+
}, [l, m]);
|
|
37
|
+
const {
|
|
38
|
+
onAction: h
|
|
39
|
+
} = M(p, "remove-collaborator"), v = async () => {
|
|
40
|
+
await h(d), s(!1);
|
|
41
|
+
}, _ = (g) => {
|
|
42
|
+
g.preventDefault();
|
|
43
43
|
};
|
|
44
44
|
return /* @__PURE__ */ e(o, {
|
|
45
45
|
onOpenChange: r ? C : s,
|
|
46
46
|
open: l,
|
|
47
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ c(o.Content, {
|
|
48
48
|
className: x(i.content, a && i.isFullscreen),
|
|
49
|
-
onPointerDownOutside:
|
|
49
|
+
onPointerDownOutside: _,
|
|
50
50
|
size: "small",
|
|
51
51
|
children: [/* @__PURE__ */ e(o.Header, {
|
|
52
52
|
children: t(n.title)
|
|
53
|
-
}), /* @__PURE__ */
|
|
53
|
+
}), /* @__PURE__ */ c(o.Body, {
|
|
54
54
|
className: i.body,
|
|
55
55
|
children: [a && /* @__PURE__ */ e(S, {
|
|
56
56
|
className: i.divider
|
|
57
57
|
}), /* @__PURE__ */ e(k, {
|
|
58
58
|
as: "p",
|
|
59
59
|
children: t(n.bodyText, {
|
|
60
|
-
name:
|
|
60
|
+
name: f || y
|
|
61
61
|
})
|
|
62
62
|
})]
|
|
63
|
-
}), /* @__PURE__ */
|
|
63
|
+
}), /* @__PURE__ */ c(o.Footer, {
|
|
64
64
|
children: [/* @__PURE__ */ e(o.Footer.SecondaryButton, {
|
|
65
65
|
disabled: r,
|
|
66
66
|
onClick: () => s(!1),
|
|
@@ -68,7 +68,7 @@ function q({
|
|
|
68
68
|
}), /* @__PURE__ */ e(o.Footer.PrimaryButton, {
|
|
69
69
|
loading: r,
|
|
70
70
|
loadingAriaLabel: t(n.loadingLabel),
|
|
71
|
-
onClick:
|
|
71
|
+
onClick: v,
|
|
72
72
|
children: t(n.okayButton)
|
|
73
73
|
})]
|
|
74
74
|
}), !a && /* @__PURE__ */ e(o.Close, {
|
|
@@ -6,34 +6,34 @@ import n from "./messages.js";
|
|
|
6
6
|
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
7
7
|
import { useUnifiedShareModalContext as g } from "../../contexts/unified-share-modal-context.js";
|
|
8
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",
|
|
9
|
+
import '../../../../styles/remove-collaborator-modal.css';const F = "_content_166yb_1", B = "_isFullscreen_166yb_1", D = "_body_166yb_10", C = "_divider_166yb_17", s = {
|
|
10
10
|
content: F,
|
|
11
11
|
isFullscreen: B,
|
|
12
12
|
body: D,
|
|
13
|
-
divider:
|
|
13
|
+
divider: C
|
|
14
14
|
};
|
|
15
15
|
function z({
|
|
16
|
-
isOpen:
|
|
16
|
+
isOpen: a,
|
|
17
17
|
onOpenChange: r
|
|
18
18
|
}) {
|
|
19
19
|
const {
|
|
20
20
|
formatMessage: t
|
|
21
21
|
} = v(), {
|
|
22
22
|
isSubmitting: i,
|
|
23
|
-
sharingService:
|
|
24
|
-
variant:
|
|
23
|
+
sharingService: c,
|
|
24
|
+
variant: m
|
|
25
25
|
} = g(), {
|
|
26
|
-
deleteSharedLink:
|
|
27
|
-
} =
|
|
28
|
-
|
|
29
|
-
}, {
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
26
|
+
deleteSharedLink: u
|
|
27
|
+
} = c, l = m === "desktop", {
|
|
28
|
+
onAction: b
|
|
29
|
+
} = x(u, "delete-shared-link"), h = async () => {
|
|
30
|
+
await b(), r(!1);
|
|
31
|
+
}, y = (f) => {
|
|
32
|
+
f.preventDefault();
|
|
33
33
|
};
|
|
34
34
|
return /* @__PURE__ */ o(e, {
|
|
35
35
|
onOpenChange: i ? _ : r,
|
|
36
|
-
open:
|
|
36
|
+
open: a,
|
|
37
37
|
children: /* @__PURE__ */ d(e.Content, {
|
|
38
38
|
className: p(s.content, l && s.isFullscreen),
|
|
39
39
|
onPointerDownOutside: y,
|
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
import pe from "clsx";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as fe, useRef as he, useEffect as R, useCallback as C } from "react";
|
|
3
3
|
import { createPortal as be } from "react-dom";
|
|
4
4
|
import { useIntl as ge } from "react-intl";
|
|
5
|
-
import { useBlueprintModernization as Ce, useNotification as ve, useUniqueId as Se, useLabelable as Ue, Tooltip as _e, Focusable as Fe, Text as
|
|
6
|
-
import { Globe as
|
|
7
|
-
import { bpSize040 as
|
|
8
|
-
import { UserSelectorContainer as
|
|
9
|
-
import { CollaborationRole as
|
|
10
|
-
import { SharedWithAvatars as
|
|
11
|
-
import { ShieldRestrictionNotice as
|
|
12
|
-
import { TextAreaContainer as
|
|
13
|
-
import
|
|
14
|
-
import { jsxs as l, jsx as
|
|
15
|
-
import { useFormValidation as
|
|
5
|
+
import { useBlueprintModernization as Ce, useNotification as ve, useUniqueId as Se, useLabelable as Ue, Tooltip as _e, Focusable as Fe, Text as xe, Modal as v } from "@box/blueprint-web";
|
|
6
|
+
import { Globe as ye } from "@box/blueprint-web-assets/icons/Medium";
|
|
7
|
+
import { bpSize040 as B } from "@box/blueprint-web-assets/tokens/tokens";
|
|
8
|
+
import { UserSelectorContainer as Ee } from "@box/user-selector";
|
|
9
|
+
import { CollaborationRole as Le } from "./collaboration-role.js";
|
|
10
|
+
import { SharedWithAvatars as Ne } from "./shared-with-avatars.js";
|
|
11
|
+
import { ShieldRestrictionNotice as Ae } from "./shield-restriction-notice.js";
|
|
12
|
+
import { TextAreaContainer as Pe } from "./text-area-container.js";
|
|
13
|
+
import r from "./messages.js";
|
|
14
|
+
import { jsxs as l, jsx as t, Fragment as Re } from "react/jsx-runtime";
|
|
15
|
+
import { useFormValidation as Be } from "../../../hooks/use-form-validation.js";
|
|
16
16
|
import { useCollaborationForm as ke } from "../../../hooks/use-collaboration-form.js";
|
|
17
17
|
import { useUnifiedShareFormContext as Ve } from "../../../contexts/unified-share-form-context.js";
|
|
18
18
|
import { useUnifiedShareModalContext as De } from "../../../contexts/unified-share-modal-context.js";
|
|
19
|
-
import { parseEmails as
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
import { parseEmails as Te } from "../../../utils/email.js";
|
|
20
|
+
import { getNotificationArgs as Me } from "../../../utils/notification.js";
|
|
21
|
+
import '../../../../../styles/collaboration-section.css';const ze = "_container_1e2gg_2", Ie = "_label_1e2gg_8", Oe = "_modernized_1e2gg_15", we = "_security_1e2gg_33", We = "_icon_1e2gg_37", je = "_access_1e2gg_43", c = {
|
|
22
|
+
container: ze,
|
|
23
|
+
label: Ie,
|
|
24
|
+
modernized: Oe,
|
|
25
|
+
security: we,
|
|
26
|
+
icon: We,
|
|
27
|
+
access: je
|
|
27
28
|
};
|
|
28
|
-
function
|
|
29
|
+
function dt() {
|
|
29
30
|
const {
|
|
30
|
-
formatMessage:
|
|
31
|
-
} = ge(), [S,
|
|
31
|
+
formatMessage: o
|
|
32
|
+
} = ge(), [S, E] = fe(), {
|
|
32
33
|
enableModernizedComponents: k
|
|
33
34
|
} = Ce(), {
|
|
34
35
|
addNotification: V
|
|
35
36
|
} = ve(), {
|
|
36
37
|
validateShieldRestriction: D
|
|
37
|
-
} =
|
|
38
|
-
contactValue:
|
|
38
|
+
} = Be(), {
|
|
39
|
+
contactValue: T,
|
|
39
40
|
containerRef: U,
|
|
40
41
|
form: n,
|
|
41
42
|
setForm: d,
|
|
42
|
-
setUserContacts:
|
|
43
|
-
shieldRestriction:
|
|
43
|
+
setUserContacts: M,
|
|
44
|
+
shieldRestriction: z,
|
|
44
45
|
userContacts: i
|
|
45
46
|
} = Ve(), {
|
|
46
|
-
collaborationAccess:
|
|
47
|
+
collaborationAccess: I,
|
|
47
48
|
collaborationNotices: O,
|
|
48
49
|
config: p,
|
|
49
50
|
contactService: w,
|
|
@@ -63,83 +64,80 @@ function lt() {
|
|
|
63
64
|
sendInvitations: J,
|
|
64
65
|
sendSharedLink: Q
|
|
65
66
|
} = q;
|
|
66
|
-
let
|
|
67
|
-
n === "invite" && (
|
|
67
|
+
let x, y;
|
|
68
|
+
n === "invite" && (x = J, y = "invite-collaborators"), n === "email" && (x = Q, y = "email-shared-link");
|
|
68
69
|
const {
|
|
69
70
|
errors: X,
|
|
70
|
-
handleFormReset:
|
|
71
|
+
handleFormReset: L,
|
|
71
72
|
handleFormSubmit: Y,
|
|
72
|
-
handleSelectedUsersChange:
|
|
73
|
+
handleSelectedUsersChange: f,
|
|
73
74
|
handleUserSelectorBlur: Z,
|
|
74
75
|
updateContactValue: ee
|
|
75
|
-
} = ke(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}, [n]),
|
|
79
|
-
(!i.length || !i.some((e) => e.chipVariant === "error")) &&
|
|
76
|
+
} = ke(x, y), te = K === "desktop", u = n === "default" || n === "invite", a = n === "invite" || n === "email", oe = i.some((e) => e.isExternalUser), N = he(n === "email" ? "email" : "invite");
|
|
77
|
+
R(() => {
|
|
78
|
+
N.current = n === "email" ? "email" : "invite";
|
|
79
|
+
}, [n]), R(() => {
|
|
80
|
+
(!i.length || !i.some((e) => e.chipVariant === "error")) && E(null);
|
|
80
81
|
}, [i]);
|
|
81
|
-
const re = C((e) => (e.stopPropagation(), !0), []), ie = C((e) => _ ? _(e,
|
|
82
|
+
const re = C((e) => (e.stopPropagation(), !0), []), ie = C((e) => _ ? _(e, N.current) : Promise.resolve([]), [_]), ne = C((e) => F ? F(e) : Promise.resolve({}), [F]), ae = (e) => {
|
|
82
83
|
a || d("invite"), ee(e);
|
|
83
84
|
}, se = C((e) => {
|
|
84
85
|
const s = e.clipboardData.getData("text");
|
|
85
|
-
|
|
86
|
+
Te(s).length !== 0 && (e.preventDefault(), a || d("invite"), f([...i, {
|
|
86
87
|
value: s
|
|
87
88
|
}]));
|
|
88
|
-
}, [
|
|
89
|
-
|
|
89
|
+
}, [f, a, d, i]), le = () => {
|
|
90
|
+
L(), d("default");
|
|
90
91
|
}, ce = async () => {
|
|
91
92
|
try {
|
|
92
93
|
if (S) {
|
|
93
|
-
const e = D(i,
|
|
94
|
+
const e = D(i, z);
|
|
94
95
|
if (e) {
|
|
95
96
|
V({
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
styledText: e,
|
|
99
|
-
typeIconAriaLabel: t(o.errorNoticeIconAriaLabel),
|
|
100
|
-
variant: "error"
|
|
97
|
+
...Me(o, "error"),
|
|
98
|
+
styledText: e
|
|
101
99
|
});
|
|
102
100
|
return;
|
|
103
101
|
}
|
|
104
102
|
}
|
|
105
103
|
if (await Y())
|
|
106
104
|
return;
|
|
107
|
-
|
|
105
|
+
L(), G(!1), d("default");
|
|
108
106
|
} catch (e) {
|
|
109
107
|
if (!e.shieldRestriction)
|
|
110
108
|
return;
|
|
111
109
|
const {
|
|
112
110
|
shieldRestriction: s
|
|
113
|
-
} = e,
|
|
111
|
+
} = e, P = [...s.restrictedEmails ?? [], ...s.restrictedGroups ?? []], ue = i.map((g) => P.includes(g.email) || P.includes(`${g.id}`) ? {
|
|
114
112
|
...g,
|
|
115
113
|
chipVariant: "error"
|
|
116
114
|
} : g);
|
|
117
|
-
|
|
115
|
+
E(s), M(ue);
|
|
118
116
|
}
|
|
119
117
|
};
|
|
120
|
-
let
|
|
121
|
-
u && !$.canInviteCollaborator && (
|
|
122
|
-
const
|
|
118
|
+
let h, b = !1;
|
|
119
|
+
u && !$.canInviteCollaborator && (h = o(r.inviteDisabledTooltip), b = !0), u && H === "web_link" && (h = o(r.inviteWebLinkDisabledTooltip), b = !0);
|
|
120
|
+
const A = Se("user-contacts-"), de = o(u ? r.invitePeopleLabel : r.emailSharedLinkLabel), me = Ue(de, A);
|
|
123
121
|
return /* @__PURE__ */ l("form", {
|
|
124
122
|
className: c.container,
|
|
125
123
|
onSubmit: (e) => e.preventDefault(),
|
|
126
|
-
children: [S && /* @__PURE__ */
|
|
124
|
+
children: [S && /* @__PURE__ */ t(Ae, {
|
|
127
125
|
error: S,
|
|
128
126
|
isLoading: m,
|
|
129
|
-
onSelectedUsersChange:
|
|
127
|
+
onSelectedUsersChange: f
|
|
130
128
|
}), O, /* @__PURE__ */ l("div", {
|
|
131
|
-
children: [u && p.collaborators && /* @__PURE__ */
|
|
129
|
+
children: [u && p.collaborators && /* @__PURE__ */ t(Ne, {}), /* @__PURE__ */ t(me, {
|
|
132
130
|
className: pe(c.label, k && c.modernized)
|
|
133
|
-
}), /* @__PURE__ */
|
|
134
|
-
content:
|
|
131
|
+
}), /* @__PURE__ */ t(_e, {
|
|
132
|
+
content: h,
|
|
135
133
|
"data-testid": "user-contacts-tooltip",
|
|
136
|
-
open:
|
|
134
|
+
open: h ? void 0 : !1,
|
|
137
135
|
side: "bottom",
|
|
138
|
-
children: /* @__PURE__ */
|
|
136
|
+
children: /* @__PURE__ */ t(Fe, {
|
|
139
137
|
focusable: b,
|
|
140
|
-
children: /* @__PURE__ */
|
|
138
|
+
children: /* @__PURE__ */ t(Ee, {
|
|
141
139
|
className: "collaboration-user-selector",
|
|
142
|
-
clearButtonAriaLabel:
|
|
140
|
+
clearButtonAriaLabel: o(r.clearButton),
|
|
143
141
|
clearOnBlur: !1,
|
|
144
142
|
"data-target-id": "PillSelectorDropdown-AddNamesOrEmailAddresses",
|
|
145
143
|
disabled: b || m,
|
|
@@ -148,14 +146,14 @@ function lt() {
|
|
|
148
146
|
fetchAvatarUrls: ne,
|
|
149
147
|
fetchUsers: ie,
|
|
150
148
|
hideOnEscape: re,
|
|
151
|
-
idForLabel:
|
|
152
|
-
inputValue:
|
|
149
|
+
idForLabel: A,
|
|
150
|
+
inputValue: T,
|
|
153
151
|
label: null,
|
|
154
152
|
onBlur: Z,
|
|
155
153
|
onInputValueChange: ae,
|
|
156
154
|
onPaste: se,
|
|
157
|
-
onSelectedUsersChange:
|
|
158
|
-
placeholder: i.length ? "" :
|
|
155
|
+
onSelectedUsersChange: f,
|
|
156
|
+
placeholder: i.length ? "" : o(r.invitePeoplePlaceholder),
|
|
159
157
|
portalElement: U,
|
|
160
158
|
selectedUsers: i,
|
|
161
159
|
selectOnEnterOrTab: !0,
|
|
@@ -164,40 +162,40 @@ function lt() {
|
|
|
164
162
|
})
|
|
165
163
|
}), u && /* @__PURE__ */ l("div", {
|
|
166
164
|
className: c.access,
|
|
167
|
-
children: [p.collaborationRole && /* @__PURE__ */
|
|
165
|
+
children: [p.collaborationRole && /* @__PURE__ */ t(Le, {}), I]
|
|
168
166
|
})]
|
|
169
|
-
}), a && p.collaborationMessage && /* @__PURE__ */
|
|
167
|
+
}), a && p.collaborationMessage && /* @__PURE__ */ t(Pe, {
|
|
170
168
|
maxCount: p.collaborationMessageLimit
|
|
171
169
|
}), a && oe && /* @__PURE__ */ l("div", {
|
|
172
170
|
className: c.security,
|
|
173
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ t(ye, {
|
|
174
172
|
className: c.icon,
|
|
175
|
-
height:
|
|
176
|
-
width:
|
|
177
|
-
}), /* @__PURE__ */
|
|
173
|
+
height: B,
|
|
174
|
+
width: B
|
|
175
|
+
}), /* @__PURE__ */ t(xe, {
|
|
178
176
|
as: "span",
|
|
179
177
|
color: "textOnLightSecondary",
|
|
180
|
-
children:
|
|
178
|
+
children: o(r.contentSharedWithExternalCollaborators)
|
|
181
179
|
})]
|
|
182
|
-
}), a && U && /* @__PURE__ */ be(/* @__PURE__ */ l(
|
|
180
|
+
}), a && U && /* @__PURE__ */ be(/* @__PURE__ */ l(Re, {
|
|
183
181
|
children: [!W && /* @__PURE__ */ l(v.Footer, {
|
|
184
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ t(v.Footer.SecondaryButton, {
|
|
185
183
|
disabled: m,
|
|
186
184
|
onClick: le,
|
|
187
|
-
children:
|
|
188
|
-
}), /* @__PURE__ */
|
|
185
|
+
children: o(r.cancelButton)
|
|
186
|
+
}), /* @__PURE__ */ t(v.Footer.PrimaryButton, {
|
|
189
187
|
loading: m,
|
|
190
|
-
loadingAriaLabel:
|
|
188
|
+
loadingAriaLabel: o(r.loadingLabel),
|
|
191
189
|
onClick: ce,
|
|
192
|
-
children:
|
|
190
|
+
children: o(r.sendButton)
|
|
193
191
|
})]
|
|
194
|
-
}), !te && /* @__PURE__ */
|
|
195
|
-
"aria-label":
|
|
192
|
+
}), !te && /* @__PURE__ */ t(v.Close, {
|
|
193
|
+
"aria-label": o(r.closeButton),
|
|
196
194
|
disabled: m
|
|
197
195
|
})]
|
|
198
196
|
}), U)]
|
|
199
197
|
});
|
|
200
198
|
}
|
|
201
199
|
export {
|
|
202
|
-
|
|
200
|
+
dt as CollaborationSection
|
|
203
201
|
};
|
|
@@ -12,13 +12,16 @@ const a = (e) => {
|
|
|
12
12
|
}, m = (e, s) => ({
|
|
13
13
|
closeButtonAriaLabel: e(r.noticeCloseLabel),
|
|
14
14
|
sensitivity: "foreground",
|
|
15
|
+
style: {
|
|
16
|
+
pointerEvents: "auto"
|
|
17
|
+
},
|
|
15
18
|
typeIconAriaLabel: e(a(s)),
|
|
16
19
|
variant: s
|
|
17
|
-
}), N = (e, s, t,
|
|
20
|
+
}), N = (e, s, t, c) => {
|
|
18
21
|
if (!t)
|
|
19
22
|
return "";
|
|
20
|
-
const n = i(t),
|
|
21
|
-
return
|
|
23
|
+
const n = i(t), o = r[`${n}${s === "success" ? "Success" : "Error"}NoticeText`];
|
|
24
|
+
return o ? e(o, c) : s === "error" ? e(r.defaultErrorNoticeText) : "";
|
|
22
25
|
};
|
|
23
26
|
export {
|
|
24
27
|
m as getNotificationArgs,
|
|
@@ -2,6 +2,9 @@ import { NotificationType, NotificationVariant } from '../types';
|
|
|
2
2
|
declare const getNotificationArgs: (formatMessage: any, type: NotificationVariant) => {
|
|
3
3
|
closeButtonAriaLabel: any;
|
|
4
4
|
sensitivity: "foreground";
|
|
5
|
+
style: {
|
|
6
|
+
pointerEvents: "auto";
|
|
7
|
+
};
|
|
5
8
|
typeIconAriaLabel: any;
|
|
6
9
|
variant: NotificationVariant;
|
|
7
10
|
};
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/unified-share-modal",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.9",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@box/blueprint-web": "^13.8.
|
|
7
|
-
"@box/blueprint-web-assets": "^4.109.
|
|
8
|
-
"@box/copy-input": "^1.39.
|
|
9
|
-
"@box/user-selector": "^1.73.
|
|
6
|
+
"@box/blueprint-web": "^13.8.3",
|
|
7
|
+
"@box/blueprint-web-assets": "^4.109.2",
|
|
8
|
+
"@box/copy-input": "^1.39.32",
|
|
9
|
+
"@box/user-selector": "^1.73.33",
|
|
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": "^13.8.
|
|
17
|
-
"@box/blueprint-web-assets": "^4.109.
|
|
18
|
-
"@box/copy-input": "^1.39.
|
|
19
|
-
"@box/storybook-utils": "0.16.
|
|
16
|
+
"@box/blueprint-web": "^13.8.3",
|
|
17
|
+
"@box/blueprint-web-assets": "^4.109.2",
|
|
18
|
+
"@box/copy-input": "^1.39.32",
|
|
19
|
+
"@box/storybook-utils": "0.16.82",
|
|
20
20
|
"@box/eslint-plugin-blueprint": "1.1.6",
|
|
21
21
|
"react-intl": "^6.4.2"
|
|
22
22
|
},
|