@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,65 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return Object.entries(L).forEach(([P, R]) => n(P, R)), !0;
|
|
50
|
-
}
|
|
51
|
-
return !1;
|
|
52
|
-
}, [s, e, m, n, p, a, f]);
|
|
53
|
-
return {
|
|
54
|
-
errors: E,
|
|
55
|
-
formData: s,
|
|
56
|
-
handleFormReset: b,
|
|
57
|
-
handleFormSubmit: v,
|
|
58
|
-
setFieldError: n,
|
|
59
|
-
setFieldValue: S,
|
|
60
|
-
validatePassword: a
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
export {
|
|
64
|
-
K as useLinkSettingsForm
|
|
1
|
+
import { useUnifiedShareModalContext as e } from "../contexts/unified-share-modal-context.js";
|
|
2
|
+
import { getUpdatedLinkSettingsFormData as t } from "../utils/form.js";
|
|
3
|
+
import { useFormValidation as n } from "./use-form-validation.js";
|
|
4
|
+
import { useSharingAction as r } from "./use-sharing-action.js";
|
|
5
|
+
import { useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
6
|
+
import c from "lodash/isEqual";
|
|
7
|
+
var l = (l) => {
|
|
8
|
+
let [u, d] = s(l), f = o(l), { errors: p, setErrors: m, setFieldError: h, validateExpiration: g, validatePassword: _, validateVanityName: v } = n(), { sharingService: y } = e(), { updateSharedLink: b } = y, { onAction: x } = r(b, "update-shared-link");
|
|
9
|
+
a(() => {
|
|
10
|
+
c(f.current, l) || (d(l), m({}), f.current = l);
|
|
11
|
+
}, [l, m]);
|
|
12
|
+
let S = i((e, t) => {
|
|
13
|
+
d((n) => ({
|
|
14
|
+
...n,
|
|
15
|
+
[e]: t
|
|
16
|
+
}));
|
|
17
|
+
}, []);
|
|
18
|
+
return {
|
|
19
|
+
errors: p,
|
|
20
|
+
formData: u,
|
|
21
|
+
handleFormReset: i(() => {
|
|
22
|
+
d(l), m({});
|
|
23
|
+
}, [l, m]),
|
|
24
|
+
handleFormSubmit: i(async () => {
|
|
25
|
+
let e = t(u, l), { expiration: n, isExpirationEnabled: r, isPasswordEnabled: i, isVanityNameEnabled: a, password: o, vanityName: s } = e, c = r && g(n), d = i && _(o), f = a && v(s);
|
|
26
|
+
if (c || d || f) return !0;
|
|
27
|
+
try {
|
|
28
|
+
await x({
|
|
29
|
+
...l,
|
|
30
|
+
...e
|
|
31
|
+
});
|
|
32
|
+
} catch (e) {
|
|
33
|
+
return Object.entries(e).forEach(([e, t]) => h(e, t)), !0;
|
|
34
|
+
}
|
|
35
|
+
return !1;
|
|
36
|
+
}, [
|
|
37
|
+
u,
|
|
38
|
+
l,
|
|
39
|
+
x,
|
|
40
|
+
h,
|
|
41
|
+
g,
|
|
42
|
+
_,
|
|
43
|
+
v
|
|
44
|
+
]),
|
|
45
|
+
setFieldError: h,
|
|
46
|
+
setFieldValue: S,
|
|
47
|
+
validatePassword: _
|
|
48
|
+
};
|
|
65
49
|
};
|
|
50
|
+
export { l as useLinkSettingsForm };
|
|
@@ -1,51 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
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
|
-
const {
|
|
34
|
-
description: c
|
|
35
|
-
} = s;
|
|
36
|
-
return {
|
|
37
|
-
...s,
|
|
38
|
-
description: c ?? "",
|
|
39
|
-
label: L(o, s)
|
|
40
|
-
};
|
|
41
|
-
}), [i, o]), m = a(() => e.find(({
|
|
42
|
-
id: s
|
|
43
|
-
}) => r === s), [r, e]);
|
|
44
|
-
return {
|
|
45
|
-
allowedLevels: e,
|
|
46
|
-
selectedPermission: m
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
export {
|
|
50
|
-
w as usePermissionLevels
|
|
1
|
+
import { useUnifiedShareModalContext as e } from "../contexts/unified-share-modal-context.js";
|
|
2
|
+
import { getAllowedPermissionLevels as t } from "../utils/permission.js";
|
|
3
|
+
import n from "../components/unified-share-form-modal/shared-link-section/messages.js";
|
|
4
|
+
import { useMemo as r } from "react";
|
|
5
|
+
import { useIntl as i } from "react-intl";
|
|
6
|
+
var a = (e, t) => {
|
|
7
|
+
let { id: r, label: i } = t, a;
|
|
8
|
+
switch (r) {
|
|
9
|
+
case "can_download":
|
|
10
|
+
a = n.canDownloadPermissionLevelLabel;
|
|
11
|
+
break;
|
|
12
|
+
case "can_edit":
|
|
13
|
+
a = n.canEditPermissionLevelLabel;
|
|
14
|
+
break;
|
|
15
|
+
case "can_preview":
|
|
16
|
+
a = n.canPreviewPermissionLevelLabel;
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
return i ?? (a ? e(a) : "");
|
|
20
|
+
}, o = () => {
|
|
21
|
+
let { formatMessage: n } = i(), { sharedLink: o } = e(), { permission: s, permissionLevels: c } = o, l = r(() => t(c).map((e) => {
|
|
22
|
+
let { description: t } = e;
|
|
23
|
+
return {
|
|
24
|
+
...e,
|
|
25
|
+
description: t ?? "",
|
|
26
|
+
label: a(n, e)
|
|
27
|
+
};
|
|
28
|
+
}), [c, n]);
|
|
29
|
+
return {
|
|
30
|
+
allowedLevels: l,
|
|
31
|
+
selectedPermission: r(() => l.find(({ id: e }) => s === e), [s, l])
|
|
32
|
+
};
|
|
51
33
|
};
|
|
34
|
+
export { o as usePermissionLevels };
|
|
@@ -1,60 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
} catch (s) {
|
|
46
|
-
const o = d(e, "error", t);
|
|
47
|
-
if (n && o && i({
|
|
48
|
-
...a(e, "error"),
|
|
49
|
-
styledText: o
|
|
50
|
-
}), s?.fields && Object.values(s.fields).length)
|
|
51
|
-
throw s.fields;
|
|
52
|
-
} finally {
|
|
53
|
-
c(!1);
|
|
54
|
-
}
|
|
55
|
-
}, [r, i, e, n, l, t, c])
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export {
|
|
59
|
-
v as useSharingAction
|
|
1
|
+
import { useUnifiedShareModalContext as e } from "../contexts/unified-share-modal-context.js";
|
|
2
|
+
import { getNotificationArgs as t, getNotificationMessage as n } from "../utils/notification.js";
|
|
3
|
+
import { useCallback as r, useMemo as i } from "react";
|
|
4
|
+
import { useIntl as a } from "react-intl";
|
|
5
|
+
import { useNotification as o } from "@box/blueprint-web";
|
|
6
|
+
var s = (s, c) => {
|
|
7
|
+
let { formatMessage: l } = a(), { addNotification: u } = o(), { config: d, item: f, setIsLoading: p } = e(), { notifications: m } = d, { name: h } = f, g = i(() => m.includes(c), [c, m]);
|
|
8
|
+
return { onAction: r(async (...e) => {
|
|
9
|
+
p(!0);
|
|
10
|
+
try {
|
|
11
|
+
if (s) {
|
|
12
|
+
let r = await s(...e), i = !!r && !!r.messages, a = g && !i;
|
|
13
|
+
i && r.messages.forEach(({ text: e, type: n, ...r }) => {
|
|
14
|
+
u({
|
|
15
|
+
...t(l, n),
|
|
16
|
+
styledText: e,
|
|
17
|
+
...r
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
let o = n(l, "success", c, { itemName: h });
|
|
21
|
+
a && o && u({
|
|
22
|
+
...t(l, "success"),
|
|
23
|
+
styledText: o
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
} catch (e) {
|
|
27
|
+
let r = n(l, "error", c);
|
|
28
|
+
if (g && r && u({
|
|
29
|
+
...t(l, "error"),
|
|
30
|
+
styledText: r
|
|
31
|
+
}), e?.fields && Object.values(e.fields).length) throw e.fields;
|
|
32
|
+
} finally {
|
|
33
|
+
p(!1);
|
|
34
|
+
}
|
|
35
|
+
}, [
|
|
36
|
+
s,
|
|
37
|
+
u,
|
|
38
|
+
l,
|
|
39
|
+
g,
|
|
40
|
+
h,
|
|
41
|
+
c,
|
|
42
|
+
p
|
|
43
|
+
]) };
|
|
60
44
|
};
|
|
45
|
+
export { s as useSharingAction };
|
package/dist/esm/lib/messages.js
CHANGED
|
@@ -1,110 +1,108 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
2
|
+
var t = e({
|
|
3
|
+
noticeCloseLabel: {
|
|
4
|
+
id: "groupSharedFeatures.usm.noticeCloseLabel",
|
|
5
|
+
defaultMessage: "Close"
|
|
6
|
+
},
|
|
7
|
+
successNoticeIcon: {
|
|
8
|
+
id: "groupSharedFeatures.usm.successNoticeIcon",
|
|
9
|
+
defaultMessage: "Success"
|
|
10
|
+
},
|
|
11
|
+
errorNoticeIcon: {
|
|
12
|
+
id: "groupSharedFeatures.usm.errorNoticeIcon",
|
|
13
|
+
defaultMessage: "Error"
|
|
14
|
+
},
|
|
15
|
+
warningNoticeIcon: {
|
|
16
|
+
id: "groupSharedFeatures.usm.warningNoticeIcon",
|
|
17
|
+
defaultMessage: "Warning"
|
|
18
|
+
},
|
|
19
|
+
defaultErrorNoticeText: {
|
|
20
|
+
id: "groupSharedFeatures.usm.defaultErrorNoticeText",
|
|
21
|
+
defaultMessage: "Something went wrong. Please try again later."
|
|
22
|
+
},
|
|
23
|
+
removeCollaboratorSuccessNoticeText: {
|
|
24
|
+
id: "groupSharedFeatures.usm.removeCollaboratorSuccessNoticeText",
|
|
25
|
+
defaultMessage: "The collaborator has been removed successfully."
|
|
26
|
+
},
|
|
27
|
+
removeCollaboratorErrorNoticeText: {
|
|
28
|
+
id: "groupSharedFeatures.usm.removeCollaboratorErrorNoticeText",
|
|
29
|
+
defaultMessage: "Unable to remove the collaborator. Please try again later."
|
|
30
|
+
},
|
|
31
|
+
deleteSharedLinkSuccessNoticeText: {
|
|
32
|
+
id: "groupSharedFeatures.usm.deleteSharedLinkSuccessNoticeText",
|
|
33
|
+
defaultMessage: "The shared link for “{itemName}” has been removed successfully."
|
|
34
|
+
},
|
|
35
|
+
deleteSharedLinkErrorNoticeText: {
|
|
36
|
+
id: "groupSharedFeatures.usm.deleteSharedLinkErrorNoticeText",
|
|
37
|
+
defaultMessage: "Unable to remove the shared link. Please try again later."
|
|
38
|
+
},
|
|
39
|
+
updateSharedLinkSuccessNoticeText: {
|
|
40
|
+
id: "groupSharedFeatures.usm.updateSharedLinkSuccessNoticeText",
|
|
41
|
+
defaultMessage: "The shared link settings were saved successfully."
|
|
42
|
+
},
|
|
43
|
+
createSharedLinkSuccessNoticeText: {
|
|
44
|
+
id: "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText",
|
|
45
|
+
defaultMessage: "Shared link created."
|
|
46
|
+
},
|
|
47
|
+
createSharedLinkErrorNoticeText: {
|
|
48
|
+
id: "groupSharedFeatures.usm.createSharedLinkErrorNoticeText",
|
|
49
|
+
defaultMessage: "Unable to create a shared link. Please try again later."
|
|
50
|
+
},
|
|
51
|
+
emailSharedLinkSuccessNoticeText: {
|
|
52
|
+
id: "groupSharedFeatures.usm.emailSharedLinkSuccessNoticeText",
|
|
53
|
+
defaultMessage: "The shared link for “{itemName}” was sent successfully."
|
|
54
|
+
},
|
|
55
|
+
vanityNameInvalidErrorMessage: {
|
|
56
|
+
id: "groupSharedFeatures.usm.vanityNameInvalidErrorMessage",
|
|
57
|
+
defaultMessage: "Custom URLs must be between 12-30 characters, and can include letters, numbers, and hyphens"
|
|
58
|
+
},
|
|
59
|
+
vanityNameRequiredErrorMessage: {
|
|
60
|
+
id: "groupSharedFeatures.usm.vanityNameRequiredErrorMessage",
|
|
61
|
+
defaultMessage: "Please enter a custom URL"
|
|
62
|
+
},
|
|
63
|
+
expirationRequiredErrorMessage: {
|
|
64
|
+
id: "groupSharedFeatures.usm.expirationRequiredErrorMessage",
|
|
65
|
+
defaultMessage: "Please select an expiration date"
|
|
66
|
+
},
|
|
67
|
+
expirationFutureDateErrorMessage: {
|
|
68
|
+
id: "groupSharedFeatures.usm.expirationFutureDateErrorMessage",
|
|
69
|
+
defaultMessage: "Expiration date must be in the future"
|
|
70
|
+
},
|
|
71
|
+
invalidEmailErrorMessage: {
|
|
72
|
+
id: "groupSharedFeatures.usm.invalidEmailErrorMessage",
|
|
73
|
+
defaultMessage: "Invalid email address"
|
|
74
|
+
},
|
|
75
|
+
emailRequiredErrorMessage: {
|
|
76
|
+
id: "groupSharedFeatures.usm.emailRequiredErrorMessage",
|
|
77
|
+
defaultMessage: "Enter at least one valid email"
|
|
78
|
+
},
|
|
79
|
+
contactsLimitErrorMessage: {
|
|
80
|
+
id: "groupSharedFeatures.usm.contactsLimitErrorMessage",
|
|
81
|
+
defaultMessage: "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches."
|
|
82
|
+
},
|
|
83
|
+
passwordRequiredErrorMessage: {
|
|
84
|
+
id: "groupSharedFeatures.usm.passwordRequiredErrorMessage",
|
|
85
|
+
defaultMessage: "Please enter a password"
|
|
86
|
+
},
|
|
87
|
+
passwordContainMinCharactersErrorMessage: {
|
|
88
|
+
id: "groupSharedFeatures.usm.passwordContainMinCharactersErrorMessage",
|
|
89
|
+
defaultMessage: "Password must contain at least 8 characters"
|
|
90
|
+
},
|
|
91
|
+
passwordContainInvalidCharacterErrorMessage: {
|
|
92
|
+
id: "groupSharedFeatures.usm.passwordContainInvalidCharacterErrorMessage",
|
|
93
|
+
defaultMessage: "Password cannot contain a space, \"<\" or \">\""
|
|
94
|
+
},
|
|
95
|
+
passwordContainLetterNumberOrSymbolErrorMessage: {
|
|
96
|
+
id: "groupSharedFeatures.usm.passwordContainLetterNumberOrSymbolErrorMessage",
|
|
97
|
+
defaultMessage: "Password must contain at least one upper case letter, number, or special character"
|
|
98
|
+
},
|
|
99
|
+
justificationRequiredErrorNotice: {
|
|
100
|
+
id: "groupSharedFeatures.usm.justificationRequiredErrorNotice",
|
|
101
|
+
defaultMessage: "Please select a justification or remove the {count, plural, one {{count} restricted user} other {{count} restricted users}} to continue."
|
|
102
|
+
},
|
|
103
|
+
restrictedContactsErrorNotice: {
|
|
104
|
+
id: "groupSharedFeatures.usm.restrictedContactsErrorNotice",
|
|
105
|
+
defaultMessage: "Please remove the {count, plural, one {{count} restricted user} other {{count} restricted users}} to continue."
|
|
106
|
+
}
|
|
107
107
|
});
|
|
108
|
-
export {
|
|
109
|
-
a as default
|
|
110
|
-
};
|
|
108
|
+
export { t as default };
|
|
@@ -1,41 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UnifiedShareFormProvider as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}), /* @__PURE__ */ e(p, {
|
|
31
|
-
isOpen: r && o === "remove-shared-link",
|
|
32
|
-
onOpenChange: () => i("unified-share-form")
|
|
33
|
-
}), /* @__PURE__ */ e(l, {
|
|
34
|
-
isOpen: r && o === "remove-collaborator",
|
|
35
|
-
onOpenChange: () => i("unified-share-form")
|
|
36
|
-
})]
|
|
37
|
-
});
|
|
1
|
+
import { useUnifiedShareModalContext as e } from "./contexts/unified-share-modal-context.js";
|
|
2
|
+
import { UnifiedShareFormProvider as t } from "./contexts/unified-share-form-context.js";
|
|
3
|
+
import { SharedLinkSettingsProvider as n } from "./contexts/shared-link-settings-context.js";
|
|
4
|
+
import { t as r } from "../../chunks/remove-collaborator-modal.js";
|
|
5
|
+
import { t as i } from "../../chunks/remove-shared-link-modal.js";
|
|
6
|
+
import { t as a } from "../../chunks/shared-link-settings-modal.js";
|
|
7
|
+
import { t as o } from "../../chunks/unified-share-form-modal.js";
|
|
8
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
function u({ children: u }) {
|
|
10
|
+
let { isOpen: d, onOpenChange: f, setView: p, view: m } = e();
|
|
11
|
+
return /* @__PURE__ */ l(s, { children: [
|
|
12
|
+
/* @__PURE__ */ c(t, { children: /* @__PURE__ */ c(o, {
|
|
13
|
+
isOpen: d && m === "unified-share-form",
|
|
14
|
+
onOpenChange: f,
|
|
15
|
+
children: u
|
|
16
|
+
}) }),
|
|
17
|
+
/* @__PURE__ */ c(n, { children: /* @__PURE__ */ c(a, {
|
|
18
|
+
isOpen: d && m === "shared-link-settings",
|
|
19
|
+
onOpenChange: () => p("unified-share-form")
|
|
20
|
+
}) }),
|
|
21
|
+
/* @__PURE__ */ c(i, {
|
|
22
|
+
isOpen: d && m === "remove-shared-link",
|
|
23
|
+
onOpenChange: () => p("unified-share-form")
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ c(r, {
|
|
26
|
+
isOpen: d && m === "remove-collaborator",
|
|
27
|
+
onOpenChange: () => p("unified-share-form")
|
|
28
|
+
})
|
|
29
|
+
] });
|
|
38
30
|
}
|
|
39
|
-
export {
|
|
40
|
-
x as UnifiedShareBase
|
|
41
|
-
};
|
|
31
|
+
export { u as UnifiedShareBase };
|