@box/unified-share-modal 2.12.14 → 2.12.16
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/chunks/classification-status.js +62 -0
- package/dist/chunks/collaboration-role.js +89 -0
- package/dist/chunks/collaboration-section.js +156 -0
- package/dist/chunks/collaborator-list-item.js +61 -0
- package/dist/chunks/collaborator-list.js +74 -0
- package/dist/chunks/remove-collaborator-modal.js +61 -0
- package/dist/chunks/remove-shared-link-modal.js +56 -0
- package/dist/chunks/shared-link-access.js +65 -0
- package/dist/chunks/shared-link-permission.js +67 -0
- package/dist/chunks/shared-link-section.js +176 -0
- package/dist/chunks/shared-link-settings-modal.js +86 -0
- package/dist/chunks/shared-with-avatars.js +48 -0
- package/dist/chunks/shield-restriction-notice.js +97 -0
- package/dist/chunks/text-area-container.js +36 -0
- package/dist/chunks/unified-share-form-modal.js +66 -0
- package/dist/chunks/unified-share-form.js +23 -0
- package/dist/esm/index.js +2 -4
- package/dist/esm/lib/components/classification-status/classification-status.js +2 -80
- package/dist/esm/lib/components/classification-status/index.js +2 -4
- package/dist/esm/lib/components/classification-status/messages.js +10 -12
- package/dist/esm/lib/components/index.js +5 -10
- package/dist/esm/lib/components/remove-collaborator-modal/index.js +2 -4
- package/dist/esm/lib/components/remove-collaborator-modal/messages.js +26 -28
- package/dist/esm/lib/components/remove-collaborator-modal/remove-collaborator-modal.js +2 -84
- package/dist/esm/lib/components/remove-shared-link-modal/index.js +2 -4
- package/dist/esm/lib/components/remove-shared-link-modal/messages.js +26 -28
- package/dist/esm/lib/components/remove-shared-link-modal/remove-shared-link-modal.js +2 -72
- package/dist/esm/lib/components/shared-link-settings-modal/download-section.js +35 -61
- package/dist/esm/lib/components/shared-link-settings-modal/expiration-section.js +33 -50
- package/dist/esm/lib/components/shared-link-settings-modal/index.js +2 -4
- package/dist/esm/lib/components/shared-link-settings-modal/messages.js +138 -144
- package/dist/esm/lib/components/shared-link-settings-modal/password-section.js +32 -52
- package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings-modal.js +2 -98
- package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings.js +97 -126
- package/dist/esm/lib/components/shared-link-settings-modal/vanity-section.js +33 -47
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-role.js +2 -128
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/collaboration-section.js +2 -202
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/index.js +2 -4
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/messages.js +134 -136
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/shared-with-avatars.js +2 -67
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/shield-restriction-notice.js +2 -134
- package/dist/esm/lib/components/unified-share-form-modal/collaboration-section/text-area-container.js +2 -53
- package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-avatar.js +48 -60
- package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-list-item.js +2 -86
- package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/collaborator-list.js +2 -101
- package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/index.js +2 -4
- package/dist/esm/lib/components/unified-share-form-modal/collaborator-list/messages.js +38 -40
- package/dist/esm/lib/components/unified-share-form-modal/index.js +2 -4
- package/dist/esm/lib/components/unified-share-form-modal/messages.js +46 -48
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/index.js +2 -4
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/messages.js +142 -144
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-access.js +2 -102
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-permission.js +2 -105
- package/dist/esm/lib/components/unified-share-form-modal/shared-link-section/shared-link-section.js +2 -191
- package/dist/esm/lib/components/unified-share-form-modal/unified-share-form-modal.js +2 -85
- package/dist/esm/lib/components/unified-share-form-modal/unified-share-form.js +2 -29
- package/dist/esm/lib/constants.js +44 -28
- package/dist/esm/lib/contexts/index.js +4 -14
- package/dist/esm/lib/contexts/shared-link-settings-context.js +50 -59
- package/dist/esm/lib/contexts/unified-share-form-context.js +60 -57
- package/dist/esm/lib/contexts/unified-share-modal-context.js +65 -68
- package/dist/esm/lib/hooks/index.js +7 -14
- package/dist/esm/lib/hooks/use-access-levels.js +69 -93
- package/dist/esm/lib/hooks/use-collaboration-form.js +75 -95
- package/dist/esm/lib/hooks/use-form-validation.js +32 -43
- package/dist/esm/lib/hooks/use-link-settings-form.js +49 -64
- package/dist/esm/lib/hooks/use-permission-levels.js +33 -50
- package/dist/esm/lib/hooks/use-sharing-action.js +44 -59
- package/dist/esm/lib/messages.js +106 -108
- package/dist/esm/lib/unified-share-base.js +30 -40
- package/dist/esm/lib/unified-share-modal.js +41 -59
- package/dist/esm/lib/utils/collaborator.js +12 -27
- package/dist/esm/lib/utils/date.js +10 -14
- package/dist/esm/lib/utils/email.js +5 -7
- package/dist/esm/lib/utils/event.js +6 -13
- package/dist/esm/lib/utils/form.js +4 -14
- package/dist/esm/lib/utils/index.js +9 -34
- package/dist/esm/lib/utils/notification.js +19 -28
- package/dist/esm/lib/utils/permission.js +15 -22
- package/dist/esm/lib/utils/validation.js +2 -11
- package/dist/styles/classification-status.css +1 -1
- package/dist/styles/collaboration-role.css +1 -1
- package/dist/styles/collaboration-section.css +1 -1
- package/dist/styles/collaborator-list-item.css +1 -1
- package/dist/styles/collaborator-list.css +1 -1
- package/dist/styles/remove-collaborator-modal.css +1 -1
- package/dist/styles/shared-link-access.css +1 -1
- package/dist/styles/shared-link-section.css +1 -1
- package/dist/styles/shared-link-settings-modal.css +1 -1
- package/dist/styles/shared-with-avatars.css +1 -1
- package/dist/styles/shield-restriction-notice.css +1 -1
- package/dist/styles/text-area-container.css +1 -1
- package/dist/styles/unified-share-form-modal.css +1 -1
- package/dist/styles/unified-share-form.css +1 -1
- package/package.json +10 -10
|
@@ -1,60 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UnifiedShareBase as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
contactService: k,
|
|
42
|
-
currentUser: U,
|
|
43
|
-
eventService: x,
|
|
44
|
-
initialContacts: I,
|
|
45
|
-
isFetching: M ?? B,
|
|
46
|
-
isOpen: e,
|
|
47
|
-
isSubmitting: b,
|
|
48
|
-
item: j,
|
|
49
|
-
onOpenChange: E,
|
|
50
|
-
sharedLink: n,
|
|
51
|
-
sharingService: w,
|
|
52
|
-
variant: s,
|
|
53
|
-
children: /* @__PURE__ */ o(P, {
|
|
54
|
-
children: c
|
|
55
|
-
})
|
|
56
|
-
});
|
|
1
|
+
import { UnifiedShareModalProvider as e } from "./contexts/unified-share-modal-context.js";
|
|
2
|
+
import { UnifiedShareBase as t } from "./unified-share-base.js";
|
|
3
|
+
import { useCallback as n, useEffect as r, useState as i } from "react";
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
+
function o({ children: o, collaborationAccess: s, collaborationNotices: c, collaborationRoles: l, collaborators: u, config: d, contactService: f, currentUser: p, eventService: m, initialContacts: h, isFetching: g, isOpen: _, isSubmitting: v, item: y, onLoad: b, onOpenChange: x, sharedLink: S, sharingService: C, variant: w = "modal" }) {
|
|
6
|
+
let [T, E] = i(_ ?? (!o || w === "desktop")), [D, O] = i(!!b);
|
|
7
|
+
r(() => {
|
|
8
|
+
_ !== void 0 && E(_);
|
|
9
|
+
}, [_]), r(() => {
|
|
10
|
+
(async () => {
|
|
11
|
+
b && (T && await b(), O(!T));
|
|
12
|
+
})();
|
|
13
|
+
}, [T, b]);
|
|
14
|
+
let k = n((e) => {
|
|
15
|
+
_ === void 0 && w !== "desktop" && E(e), x && x(e);
|
|
16
|
+
}, [
|
|
17
|
+
_,
|
|
18
|
+
x,
|
|
19
|
+
w
|
|
20
|
+
]);
|
|
21
|
+
return /* @__PURE__ */ a(e, {
|
|
22
|
+
collaborationAccess: s,
|
|
23
|
+
collaborationNotices: c,
|
|
24
|
+
collaborationRoles: l,
|
|
25
|
+
collaborators: u,
|
|
26
|
+
config: d,
|
|
27
|
+
contactService: f,
|
|
28
|
+
currentUser: p,
|
|
29
|
+
eventService: m,
|
|
30
|
+
initialContacts: h,
|
|
31
|
+
isFetching: g ?? D,
|
|
32
|
+
isOpen: T,
|
|
33
|
+
isSubmitting: v,
|
|
34
|
+
item: y,
|
|
35
|
+
onOpenChange: k,
|
|
36
|
+
sharedLink: S,
|
|
37
|
+
sharingService: C,
|
|
38
|
+
variant: w,
|
|
39
|
+
children: /* @__PURE__ */ a(t, { children: o })
|
|
40
|
+
});
|
|
57
41
|
}
|
|
58
|
-
export {
|
|
59
|
-
H as UnifiedShareModal
|
|
60
|
-
};
|
|
42
|
+
export { o as UnifiedShareModal };
|
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
import { SUPPORTED_COLLABORATOR_ROLES as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return "xlarge";
|
|
14
|
-
default:
|
|
15
|
-
return "medium";
|
|
16
|
-
}
|
|
17
|
-
}, s = (e = []) => e.find(({
|
|
18
|
-
isDefault: r
|
|
19
|
-
}) => r) || e[0], u = (e) => e.replace(/[[({<]+.*[\])}>]+/g, "").trim().slice(0, 1).toUpperCase(), o = (e) => a.includes(e), c = (e) => l.includes(e), m = (e, r = [], t = []) => e.type === "group" ? t.includes(`${e.id}`) : r.includes(e.email);
|
|
20
|
-
export {
|
|
21
|
-
i as getAvatarBadgeSize,
|
|
22
|
-
s as getDefaultCollaborationRole,
|
|
23
|
-
u as getFirstInitial,
|
|
24
|
-
m as isCollaboratorRestricted,
|
|
25
|
-
o as isCollaboratorRoleSupported,
|
|
26
|
-
c as isInvitationRoleSupported
|
|
27
|
-
};
|
|
1
|
+
import { SUPPORTED_COLLABORATOR_ROLES as e, SUPPORTED_INVITATION_ROLES as t } from "../constants.js";
|
|
2
|
+
var n = (e) => {
|
|
3
|
+
switch (e) {
|
|
4
|
+
case "small": return "small";
|
|
5
|
+
case "medium": return "medium";
|
|
6
|
+
case "large": return "medium";
|
|
7
|
+
case "xlarge": return "large";
|
|
8
|
+
case "xxlarge": return "xlarge";
|
|
9
|
+
default: return "medium";
|
|
10
|
+
}
|
|
11
|
+
}, r = (e = []) => e.find(({ isDefault: e }) => e) || e[0], i = (e) => e.replace(/[[({<]+.*[\])}>]+/g, "").trim().slice(0, 1).toUpperCase(), a = (t) => e.includes(t), o = (e) => t.includes(e), s = (e, t = [], n = []) => e.type === "group" ? n.includes(`${e.id}`) : t.includes(e.email);
|
|
12
|
+
export { n as getAvatarBadgeSize, r as getDefaultCollaborationRole, i as getFirstInitial, s as isCollaboratorRestricted, a as isCollaboratorRoleSupported, o as isInvitationRoleSupported };
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
export {
|
|
11
|
-
s as formatDateFromTimestampToCalendarDate,
|
|
12
|
-
u as formatDateFromTimestampToDateString,
|
|
13
|
-
d as formatTomorrowDateToCalendarDate
|
|
14
|
-
};
|
|
1
|
+
import { DateFormatter as e, fromAbsolute as t, getLocalTimeZone as n, toCalendarDate as r } from "@box/blueprint-web";
|
|
2
|
+
var i = 1440 * 60 * 1e3, a = (e) => r(t(e, n())), o = (t) => {
|
|
3
|
+
let r = navigator.language || "en-US", i = a(t).toDate(n());
|
|
4
|
+
return new e(r, {
|
|
5
|
+
day: "numeric",
|
|
6
|
+
month: "long",
|
|
7
|
+
year: "numeric"
|
|
8
|
+
}).format(i);
|
|
9
|
+
}, s = () => r(t(Date.now() + i, n()));
|
|
10
|
+
export { a as formatDateFromTimestampToCalendarDate, o as formatDateFromTimestampToDateString, s as formatTomorrowDateToCalendarDate };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { isEmailValid as
|
|
2
|
-
|
|
3
|
-
function
|
|
4
|
-
|
|
1
|
+
import { isEmailValid as e } from "./validation.js";
|
|
2
|
+
var t = /[\s,;<>()[\]/\\"]+/;
|
|
3
|
+
function n(n) {
|
|
4
|
+
return n ? n.split(t).filter(e) : [];
|
|
5
5
|
}
|
|
6
|
-
export {
|
|
7
|
-
l as parseEmails
|
|
8
|
-
};
|
|
6
|
+
export { n as parseEmails };
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
keys: s = ["Enter", " "]
|
|
7
|
-
} = t;
|
|
8
|
-
return (a) => {
|
|
9
|
-
s.includes(a.key) && (o && a.preventDefault(), r && a.stopPropagation(), e(...n));
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
f as callOnKeyboardEvent
|
|
1
|
+
var e = (e, t = {}) => {
|
|
2
|
+
let { args: n = [], canPreventDefault: r = !1, canStopPropagation: i = !1, keys: a = ["Enter", " "] } = t;
|
|
3
|
+
return (t) => {
|
|
4
|
+
a.includes(t.key) && (r && t.preventDefault(), i && t.stopPropagation(), e(...n));
|
|
5
|
+
};
|
|
14
6
|
};
|
|
7
|
+
export { e as callOnKeyboardEvent };
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
isDownloadEnabled: t,
|
|
5
|
-
isExpirationEnabled: a,
|
|
6
|
-
isPasswordEnabled: s,
|
|
7
|
-
isVanityNameEnabled: d,
|
|
8
|
-
password: e,
|
|
9
|
-
vanityName: l
|
|
10
|
-
} = E, i = {};
|
|
11
|
-
return t !== n.isDownloadEnabled && (i.isDownloadEnabled = t), (a !== n.isExpirationEnabled || o?.toString() !== n.expiration?.toString()) && (i.isExpirationEnabled = a, i.expiration = a ? o : null), (s !== n.isPasswordEnabled || e !== n.password) && (i.isPasswordEnabled = s, i.password = s ? e : null), (d !== n.isVanityNameEnabled || l !== n.vanityName) && (i.isVanityNameEnabled = d, i.vanityName = d ? l : null), i;
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
b as getUpdatedLinkSettingsFormData
|
|
1
|
+
var e = (e, t) => {
|
|
2
|
+
let { expiration: n, isDownloadEnabled: r, isExpirationEnabled: i, isPasswordEnabled: a, isVanityNameEnabled: o, password: s, vanityName: c } = e, l = {};
|
|
3
|
+
return r !== t.isDownloadEnabled && (l.isDownloadEnabled = r), (i !== t.isExpirationEnabled || n?.toString() !== t.expiration?.toString()) && (l.isExpirationEnabled = i, l.expiration = i ? n : null), (a !== t.isPasswordEnabled || s !== t.password) && (l.isPasswordEnabled = a, l.password = a ? s : null), (o !== t.isVanityNameEnabled || c !== t.vanityName) && (l.isVanityNameEnabled = o, l.vanityName = o ? c : null), l;
|
|
15
4
|
};
|
|
5
|
+
export { e as getUpdatedLinkSettingsFormData };
|
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
import { getAvatarBadgeSize as
|
|
2
|
-
import { formatDateFromTimestampToCalendarDate as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
export {
|
|
10
|
-
w as callOnKeyboardEvent,
|
|
11
|
-
u as doesPasswordContainInvalidCharacter,
|
|
12
|
-
F as doesPasswordContainLetter,
|
|
13
|
-
L as doesPasswordContainMinCharacters,
|
|
14
|
-
N as doesPasswordContainMixedCase,
|
|
15
|
-
R as doesPasswordContainNumber,
|
|
16
|
-
y as doesPasswordContainSymbol,
|
|
17
|
-
l as formatDateFromTimestampToCalendarDate,
|
|
18
|
-
m as formatDateFromTimestampToDateString,
|
|
19
|
-
p as formatTomorrowDateToCalendarDate,
|
|
20
|
-
S as getAllowedAccessLevels,
|
|
21
|
-
T as getAllowedPermissionLevels,
|
|
22
|
-
t as getAvatarBadgeSize,
|
|
23
|
-
a as getDefaultCollaborationRole,
|
|
24
|
-
r as getFirstInitial,
|
|
25
|
-
P as getNotificationArgs,
|
|
26
|
-
b as getNotificationMessage,
|
|
27
|
-
c as getUpdatedLinkSettingsFormData,
|
|
28
|
-
s as isCollaboratorRestricted,
|
|
29
|
-
i as isCollaboratorRoleSupported,
|
|
30
|
-
E as isEmailValid,
|
|
31
|
-
n as isInvitationRoleSupported,
|
|
32
|
-
I as isVanityNameValid,
|
|
33
|
-
C as parseEmails
|
|
34
|
-
};
|
|
1
|
+
import { getAvatarBadgeSize as e, getDefaultCollaborationRole as t, getFirstInitial as n, isCollaboratorRestricted as r, isCollaboratorRoleSupported as i, isInvitationRoleSupported as a } from "./collaborator.js";
|
|
2
|
+
import { formatDateFromTimestampToCalendarDate as o, formatDateFromTimestampToDateString as s, formatTomorrowDateToCalendarDate as c } from "./date.js";
|
|
3
|
+
import { doesPasswordContainInvalidCharacter as l, doesPasswordContainLetter as u, doesPasswordContainMinCharacters as d, doesPasswordContainMixedCase as f, doesPasswordContainNumber as p, doesPasswordContainSymbol as m, isEmailValid as h, isVanityNameValid as g } from "./validation.js";
|
|
4
|
+
import { parseEmails as _ } from "./email.js";
|
|
5
|
+
import { callOnKeyboardEvent as v } from "./event.js";
|
|
6
|
+
import { getUpdatedLinkSettingsFormData as y } from "./form.js";
|
|
7
|
+
import { getNotificationArgs as b, getNotificationMessage as x } from "./notification.js";
|
|
8
|
+
import { getAllowedAccessLevels as S, getAllowedPermissionLevels as C } from "./permission.js";
|
|
9
|
+
export { v as callOnKeyboardEvent, l as doesPasswordContainInvalidCharacter, u as doesPasswordContainLetter, d as doesPasswordContainMinCharacters, f as doesPasswordContainMixedCase, p as doesPasswordContainNumber, m as doesPasswordContainSymbol, o as formatDateFromTimestampToCalendarDate, s as formatDateFromTimestampToDateString, c as formatTomorrowDateToCalendarDate, S as getAllowedAccessLevels, C as getAllowedPermissionLevels, e as getAvatarBadgeSize, t as getDefaultCollaborationRole, n as getFirstInitial, b as getNotificationArgs, x as getNotificationMessage, y as getUpdatedLinkSettingsFormData, r as isCollaboratorRestricted, i as isCollaboratorRoleSupported, h as isEmailValid, a as isInvitationRoleSupported, g as isVanityNameValid, _ as parseEmails };
|
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
variant: s
|
|
20
|
-
}), N = (e, s, t, c) => {
|
|
21
|
-
if (!t)
|
|
22
|
-
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) : "";
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
m as getNotificationArgs,
|
|
28
|
-
N as getNotificationMessage
|
|
1
|
+
import e from "../messages.js";
|
|
2
|
+
import t from "lodash/camelCase";
|
|
3
|
+
var n = (t) => {
|
|
4
|
+
switch (t) {
|
|
5
|
+
case "success": return e.successNoticeIcon;
|
|
6
|
+
case "warning": return e.warningNoticeIcon;
|
|
7
|
+
default: return e.errorNoticeIcon;
|
|
8
|
+
}
|
|
9
|
+
}, r = (t, r) => ({
|
|
10
|
+
closeButtonAriaLabel: t(e.noticeCloseLabel),
|
|
11
|
+
sensitivity: "foreground",
|
|
12
|
+
style: { pointerEvents: "auto" },
|
|
13
|
+
typeIconAriaLabel: t(n(r)),
|
|
14
|
+
variant: r
|
|
15
|
+
}), i = (n, r, i, a) => {
|
|
16
|
+
if (!i) return "";
|
|
17
|
+
let o = e[`${t(i)}${r === "success" ? "Success" : "Error"}NoticeText`];
|
|
18
|
+
return o ? n(o, a) : r === "error" ? n(e.defaultErrorNoticeText) : "";
|
|
29
19
|
};
|
|
20
|
+
export { r as getNotificationArgs, i as getNotificationMessage };
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return u.reduce((r, i) => {
|
|
16
|
-
const e = n[i];
|
|
17
|
-
return e ? [...r, e] : r;
|
|
18
|
-
}, []);
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
L as getAllowedAccessLevels,
|
|
22
|
-
p as getAllowedPermissionLevels
|
|
1
|
+
import { SUPPORTED_ACCESS_LEVELS as e, SUPPORTED_PERMISSION_LEVELS as t } from "../constants.js";
|
|
2
|
+
import n from "lodash/keyBy";
|
|
3
|
+
var r = (t = []) => {
|
|
4
|
+
let r = n(t.map((e) => typeof e == "string" ? { id: e } : e), "id");
|
|
5
|
+
return e.reduce((e, t) => {
|
|
6
|
+
let n = r[t];
|
|
7
|
+
return n ? [...e, n] : e;
|
|
8
|
+
}, []);
|
|
9
|
+
}, i = (e = []) => {
|
|
10
|
+
let r = n(e.map((e) => typeof e == "string" ? { id: e } : e), "id");
|
|
11
|
+
return t.reduce((e, t) => {
|
|
12
|
+
let n = r[t];
|
|
13
|
+
return n ? [...e, n] : e;
|
|
14
|
+
}, []);
|
|
23
15
|
};
|
|
16
|
+
export { r as getAllowedAccessLevels, i as getAllowedPermissionLevels };
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
l as doesPasswordContainInvalidCharacter,
|
|
4
|
-
c as doesPasswordContainLetter,
|
|
5
|
-
o as doesPasswordContainMinCharacters,
|
|
6
|
-
d as doesPasswordContainMixedCase,
|
|
7
|
-
a as doesPasswordContainNumber,
|
|
8
|
-
i as doesPasswordContainSymbol,
|
|
9
|
-
r as isEmailValid,
|
|
10
|
-
n as isVanityNameValid
|
|
11
|
-
};
|
|
1
|
+
var e = /^[a-zA-Z0-9-]{12,30}$/, t = /^[A-Z0-9._'%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i, n = (t) => e.test(t), r = (e) => t.test(e), i = (e) => e.length >= 8, a = (e) => e.replace(/\D/g, "").length >= 1, o = (e) => e.replace(/\s/g, "").replace(/\w/g, "").length >= 1, s = (e) => /[a-zA-Z]/.test(e), c = (e) => /[a-z]/.test(e) && /[A-Z]/.test(e), l = (e) => /[\s<>]/.test(e);
|
|
2
|
+
export { l as doesPasswordContainInvalidCharacter, s as doesPasswordContainLetter, i as doesPasswordContainMinCharacters, c as doesPasswordContainMixedCase, a as doesPasswordContainNumber, o as doesPasswordContainSymbol, r as isEmailValid, n as isVanityNameValid };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_1dpzl_1{display:inline-flex}._tooltip_1dpzl_5{
|
|
1
|
+
._container_1dpzl_1{display:inline-flex}._tooltip_1dpzl_5{gap:var(--bp-space-040);flex-direction:column;display:flex}._header_1dpzl_11{align-items:center;gap:var(--bp-space-020);display:flex}._content_1dpzl_17{gap:var(--bp-space-050);flex-direction:column;display:flex}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._button_jl1fl_1{align-self:flex-start;max-width:100%}._button_jl1fl_1 span:first-child{overflow:
|
|
1
|
+
._button_jl1fl_1{align-self:flex-start;max-width:100%}._button_jl1fl_1 span:first-child{text-overflow:ellipsis;overflow:hidden}._focusable_jl1fl_10{justify-self:flex-start}._content_jl1fl_14._content_jl1fl_14{--blueprint-web-dropdown-content-max-width:480px}._content_jl1fl_14._content_jl1fl_14 ._option_jl1fl_17 *{white-space:normal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_1e2gg_2{
|
|
1
|
+
._container_1e2gg_2{gap:var(--bp-space-040);flex-direction:column;display:flex}._label_1e2gg_8{padding:var(--bp-space-010) 0;color:var(--text-text-on-light);overflow-wrap:break-word;margin-block-end:var(--space-2);display:block}._label_1e2gg_8._modernized_1e2gg_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_1e2gg_8:not(._modernized_1e2gg_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);-webkit-text-decoration:var(--body-default-bold-text-decoration);text-decoration:var(--body-default-bold-text-decoration)}._security_1e2gg_33{margin-top:calc(var(--bp-space-010) * -1)}._icon_1e2gg_37{height:var(--bp-size-050);margin-right:var(--bp-space-010);vertical-align:text-bottom}._access_1e2gg_43{gap:var(--bp-space-010);margin-top:var(--bp-space-030);flex-wrap:wrap;display:flex}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._nameCell_19s89_1{
|
|
1
|
+
._nameCell_19s89_1{gap:var(--space-3);align-items:center;display:flex}._nameDetails_19s89_7{height:var(--size-10);flex-direction:column;justify-content:space-evenly;margin:-1px;padding:1px;display:flex;overflow:hidden}._roleCell_19s89_17{gap:var(--space-2);justify-content:flex-end;align-items:center;display:flex}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._divider_ozw7g_1._divider_ozw7g_1{
|
|
1
|
+
._divider_ozw7g_1._divider_ozw7g_1{z-index:1;width:100%;position:sticky;top:0}._manage_ozw7g_8{padding:var(--space-3) .625rem;flex-direction:row-reverse;display:flex}._link_ozw7g_14{cursor:pointer}._list_ozw7g_18{flex-grow:1;height:240px;position:relative}._list_ozw7g_18:after{z-index:1000;border:var(--border-1) solid var(--border-divider-border);border-radius:var(--bp-radius-08);box-shadow:var(--innershadow-1);content:"";pointer-events:none;position:absolute;inset:0}._scroll_ozw7g_34{border-radius:var(--bp-radius-08);height:100%;overflow-y:auto}._header_ozw7g_40{visibility:collapse}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._content_166yb_1._content_166yb_1._isFullscreen_166yb_1{width:100vw;max-width:none;height:100vh;max-height:none;margin:0;
|
|
1
|
+
._content_166yb_1._content_166yb_1._isFullscreen_166yb_1{border-radius:0;width:100vw;max-width:none;height:100vh;max-height:none;margin:0;animation:none}._content_166yb_1._content_166yb_1._isFullscreen_166yb_1 ._body_166yb_10{flex-grow:1;padding-top:0;position:relative;overflow:auto}._divider_166yb_17._divider_166yb_17{z-index:1;width:100%;margin-bottom:var(--bp-space-060);position:sticky;top:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._button_166my_1{max-width:100%}._button_166my_1 span:first-child{overflow:
|
|
1
|
+
._button_166my_1{max-width:100%}._button_166my_1 span:first-child{text-overflow:ellipsis;overflow:hidden}._content_166my_9._content_166my_9{--blueprint-web-dropdown-content-max-width:480px}._content_166my_9._content_166my_9 ._option_166my_12 *{white-space:normal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_j966c_1{
|
|
1
|
+
._container_j966c_1{gap:var(--bp-space-030);flex-direction:column;display:flex}._toggle_j966c_7{gap:var(--bp-space-020);align-items:center;display:flex}._settings_j966c_13{cursor:pointer;margin-left:auto}._settings_j966c_13[aria-disabled=true]{opacity:.3;pointer-events:none}._copy_j966c_22{gap:var(--bp-space-020);display:flex}._copy_j966c_22>div:first-child{flex-grow:1}._access_j966c_30{gap:var(--bp-space-010);flex-wrap:wrap;display:flex}._icon_j966c_36{height:var(--bp-size-050);margin-right:var(--bp-space-010);vertical-align:text-bottom}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._content_54561_1._content_54561_1{max-width:480px}._content_54561_1._content_54561_1._isFullscreen_54561_4{width:100vw;max-width:none;height:100vh;max-height:none;margin:0;
|
|
1
|
+
._content_54561_1._content_54561_1{max-width:480px}._content_54561_1._content_54561_1._isFullscreen_54561_4{border-radius:0;width:100vw;max-width:none;height:100vh;max-height:none;margin:0;animation:none}._content_54561_1._content_54561_1._isFullscreen_54561_4 ._body_54561_13{overflow:hidden auto}._content_54561_1._content_54561_1 [data-radix-popper-content-wrapper]:has([data-side=top]){margin-top:max(332px - var(--radix-popper-available-height), 0px)}._content_54561_1._content_54561_1 [data-radix-popper-content-wrapper]:has([data-side=bottom]){margin-top:min((332px - var(--radix-popper-available-height)) * -1, 0px)}._title_54561_23{display:inline}._title_54561_23:after{width:var(--bp-space-020);content:"";display:inline-block}._body_54561_13._body_54561_13{gap:var(--bp-space-040);margin-bottom:calc(var(--bp-space-010) * -1);padding-top:0;padding-bottom:var(--bp-space-010);flex-direction:column;flex-grow:1;display:flex;overflow:auto}._form_54561_43{flex-direction:column;flex-grow:1;display:flex;position:relative;overflow:hidden}._form_54561_43 ._isLoading_54561_50{visibility:hidden}._loading_54561_54{padding-bottom:var(--bp-space-080);align-items:center;display:flex;position:absolute;inset:0}._divider_54561_62._divider_54561_62{z-index:1;width:100%;position:sticky;top:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_1ku5s_2{
|
|
1
|
+
._container_1ku5s_2{gap:var(--space-2);float:right;border-radius:var(--radius-2);cursor:pointer;outline:none;align-items:center;display:flex}._container_1ku5s_2[aria-disabled=true]{opacity:.3;pointer-events:none}._container_1ku5s_2:focus-visible{box-shadow:0 0 0 var(--border-1,1px) var(--background-background), 0 0 0 var(--border-3) var(--outline-focus-on-light)}._avatars_1ku5s_19{gap:var(--space-1);align-items:center;display:flex}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._select_1e0dl_1{margin:var(--bp-space-030) 0}._link_1e0dl_5{cursor:pointer}._loading_1e0dl_9{
|
|
1
|
+
._select_1e0dl_1{margin:var(--bp-space-030) 0}._link_1e0dl_5{cursor:pointer}._loading_1e0dl_9{height:var(--bp-size-080);align-items:center;display:flex}._notice_1e0dl_15>div[class*=base-inline-notice][class*=contentContainer]{gap:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._textArea_v76md_1 label{padding:var(--space-1) 0}._textCount_v76md_5{
|
|
1
|
+
._textArea_v76md_1 label{padding:var(--space-1) 0}._textCount_v76md_5{margin-top:var(--space-1);padding:var(--space-1);justify-content:flex-end;display:flex}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._content_1k0mu_1._content_1k0mu_1{max-width:480px}._content_1k0mu_1._content_1k0mu_1._isFullscreen_1k0mu_4{width:100vw;max-width:none;height:100vh;max-height:none;margin:0;
|
|
1
|
+
._content_1k0mu_1._content_1k0mu_1{max-width:480px}._content_1k0mu_1._content_1k0mu_1._isFullscreen_1k0mu_4{border-radius:0;width:100vw;max-width:none;height:100vh;max-height:none;margin:0;animation:none}._content_1k0mu_1._content_1k0mu_1._isFullscreen_1k0mu_4 ._body_1k0mu_13{overflow:hidden auto}._title_1k0mu_17{display:inline}._title_1k0mu_17:after{width:var(--bp-space-020);content:"";display:inline-block}._body_1k0mu_13._body_1k0mu_13{padding-top:0;padding-bottom:var(--bp-space-080);flex-direction:column;flex-grow:1;display:flex;position:relative}._body_1k0mu_13._body_1k0mu_13:before{content:"";width:100vw;display:block}._body_1k0mu_13._body_1k0mu_13._hasFooter_1k0mu_39{padding-bottom:0}._loading_1k0mu_43{padding-bottom:var(--bp-space-080);align-items:center;display:flex;position:absolute;inset:0}._form_1k0mu_51{flex-direction:column;flex-grow:1;display:flex}._form_1k0mu_51._isLoading_1k0mu_56{visibility:hidden}@media (width>374px){._content_1k0mu_1._content_1k0mu_1{overflow:auto}}@media (width>459px){:has(>._content_1k0mu_1._content_1k0mu_1:not(._isFullscreen_1k0mu_4)){padding:var(--bp-space-080);display:flex;overflow:auto}._content_1k0mu_1._content_1k0mu_1{max-height:none;margin:auto;overflow:visible}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_rq40p_1{
|
|
1
|
+
._container_rq40p_1{flex-direction:column;display:flex}._divider_rq40p_6._divider_rq40p_6{margin:var(--bp-space-040) 0}._divider_rq40p_6._divider_rq40p_6:first-child{z-index:1;margin-top:0;position:sticky;top:0}
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/unified-share-modal",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.16",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@box/blueprint-web": "^14.
|
|
7
|
-
"@box/blueprint-web-assets": "^4.112.
|
|
8
|
-
"@box/copy-input": "^1.40.
|
|
9
|
-
"@box/user-selector": "^1.74.
|
|
6
|
+
"@box/blueprint-web": "^14.6.0",
|
|
7
|
+
"@box/blueprint-web-assets": "^4.112.2",
|
|
8
|
+
"@box/copy-input": "^1.40.33",
|
|
9
|
+
"@box/user-selector": "^1.74.34",
|
|
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": "^14.
|
|
17
|
-
"@box/blueprint-web-assets": "^4.112.
|
|
18
|
-
"@box/copy-input": "^1.40.
|
|
19
|
-
"@box/eslint-plugin-blueprint": "1.1.
|
|
20
|
-
"@box/storybook-utils": "0.17.
|
|
16
|
+
"@box/blueprint-web": "^14.6.0",
|
|
17
|
+
"@box/blueprint-web-assets": "^4.112.2",
|
|
18
|
+
"@box/copy-input": "^1.40.33",
|
|
19
|
+
"@box/eslint-plugin-blueprint": "1.1.12",
|
|
20
|
+
"@box/storybook-utils": "0.17.29",
|
|
21
21
|
"react-intl": "^6.4.2"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|