@box/unified-share-modal 1.20.0 → 1.21.0

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,79 +1,83 @@
1
- import { useCallback as r } from "react";
2
- import { useFormValidation as E } from "./use-form-validation.js";
3
- import { useSharingAction as A } from "./use-sharing-action.js";
4
- import { useUnifiedShareFormContext as M } from "../contexts/unified-share-form-context.js";
5
- import { useUnifiedShareModalContext as O } from "../contexts/unified-share-modal-context.js";
6
- const I = (S, h) => {
1
+ import { useCallback as i } from "react";
2
+ import { useFormValidation as M } from "./use-form-validation.js";
3
+ import { useSharingAction as O } from "./use-sharing-action.js";
4
+ import { useUnifiedShareFormContext as P } from "../contexts/unified-share-form-context.js";
5
+ import { useUnifiedShareModalContext as R } from "../contexts/unified-share-modal-context.js";
6
+ const j = (h, p) => {
7
7
  const {
8
- errors: u,
8
+ errors: d,
9
9
  setFieldError: a,
10
- validateUserContact: m,
11
- validateUserSelector: c
12
- } = E(), {
13
- contactService: p
14
- } = O(), {
15
- collaborationRole: v,
16
- messageValue: F,
17
- setContactValue: s,
18
- setMessageValue: b,
19
- setUserContacts: n,
20
- shareView: U,
21
- userContacts: o
10
+ validateCollaborationLimit: r,
11
+ validateUserContact: f,
12
+ validateUserSelector: l
22
13
  } = M(), {
23
- isLoading: x,
24
- onAction: y
25
- } = A(S, h), {
26
- getContactByEmail: i
27
- } = p, d = () => {
28
- n([]), s(""), b(""), a("user-contact", "");
29
- }, V = r((t) => {
30
- a("user-contact", ""), s(t);
31
- }, [s, a]), f = r(async (t) => {
14
+ config: v,
15
+ contactService: F
16
+ } = R(), {
17
+ collaborationLimit: n
18
+ } = v, {
19
+ collaborationRole: U,
20
+ messageValue: x,
21
+ setContactValue: s,
22
+ setMessageValue: y,
23
+ setUserContacts: c,
24
+ shareView: V,
25
+ userContacts: e
26
+ } = P(), {
27
+ isLoading: w,
28
+ onAction: B
29
+ } = O(h, p), {
30
+ getContactByEmail: u
31
+ } = F, C = () => {
32
+ c([]), s(""), y(""), a("user-contact", "");
33
+ }, E = i((t) => {
34
+ r(e, n) || a("user-contact", ""), s(t);
35
+ }, [n, s, a, e, r]), g = i(async (t) => {
32
36
  if (t.id)
33
37
  return t;
34
- if (i) {
35
- const e = await i(t.value);
36
- if (e && e.id)
37
- return e;
38
+ if (u) {
39
+ const o = await u(t.value);
40
+ if (o && o.id)
41
+ return o;
38
42
  }
39
- return m(t.value) ? null : {
43
+ return f(t.value) ? null : {
40
44
  email: t.value,
41
45
  id: 0,
42
46
  isExternalUser: !0,
43
47
  name: t.value,
44
48
  value: t.value
45
49
  };
46
- }, [i, m]), l = r(async (t) => {
47
- if (a("user-contact", ""), c(t), o.length >= t.length) {
48
- n(t);
50
+ }, [u, f]), m = i(async (t) => {
51
+ if (a("user-contact", ""), l(t), n && r(t, n), e.length >= t.length) {
52
+ c(t);
49
53
  return;
50
54
  }
51
- const [e, C] = [t.slice(0, -1), t[t.length - 1]], g = await f(C), B = g ? [...e, g] : e;
52
- n(B.filter(Boolean));
53
- }, [f, a, n, c, o]), w = r((t) => {
54
- const e = t.relatedTarget?.closest(".collaboration-user-selector");
55
- document.querySelector('div[role="listbox"][aria-labelledby^="user-contacts"]')?.contains(t.relatedTarget) || e || l([...o, {
55
+ const [o, S] = [t.slice(0, -1), t[t.length - 1]], b = await g(S), A = b ? [...o, b] : o;
56
+ c(A.filter(Boolean));
57
+ }, [n, g, a, c, r, l, e]), L = i((t) => {
58
+ const o = t.relatedTarget?.closest(".collaboration-user-selector");
59
+ document.querySelector('div[role="listbox"][aria-labelledby^="user-contacts"]')?.contains(t.relatedTarget) || o || m([...e, {
56
60
  value: t.target.value
57
61
  }]);
58
- }, [l, o]);
62
+ }, [m, e]);
59
63
  return {
60
- errors: u,
61
- handleFormReset: d,
64
+ errors: d,
65
+ handleFormReset: C,
62
66
  handleFormSubmit: async () => {
63
- if (u["user-contact"] || c(o))
67
+ if (d["user-contact"] || l(e))
64
68
  return !0;
65
69
  const t = {
66
- contacts: o,
67
- message: F
70
+ contacts: e,
71
+ message: x
68
72
  };
69
- return U === "invite" && (t.role = v.id), await y(t), d(), !1;
73
+ return V === "invite" && (t.role = U.id), await B(t), C(), !1;
70
74
  },
71
- handleSelectedUsersChange: l,
72
- handleUserSelectorBlur: w,
73
- isFormSubmitting: x,
74
- updateContactValue: V
75
+ handleSelectedUsersChange: m,
76
+ handleUserSelectorBlur: L,
77
+ isFormSubmitting: w,
78
+ updateContactValue: E
75
79
  };
76
80
  };
77
81
  export {
78
- I as useCollaborationForm
82
+ j as useCollaborationForm
79
83
  };
@@ -1,30 +1,33 @@
1
- import { useState as g, useCallback as o } from "react";
2
- import { useIntl as v } from "react-intl";
1
+ import { useState as p, useCallback as o } from "react";
2
+ import { useIntl as w } from "react-intl";
3
3
  import a from "../messages.js";
4
- import { formatTomorrowDateToCalendarDate as p } from "../utils/date.js";
5
- import { isVanityNameValid as w, isEmailValid as y, doesPasswordContainMinCharacters as N, doesPasswordContainInvalidCharacter as P, doesPasswordContainMixedCase as x, doesPasswordContainLetter as i, doesPasswordContainNumber as u, doesPasswordContainSymbol as d } from "../utils/validation.js";
4
+ import { formatTomorrowDateToCalendarDate as y } from "../utils/date.js";
5
+ import { isVanityNameValid as N, isEmailValid as P, doesPasswordContainMinCharacters as b, doesPasswordContainInvalidCharacter as h, doesPasswordContainMixedCase as x, doesPasswordContainLetter as u, doesPasswordContainNumber as l, doesPasswordContainSymbol as d } from "../utils/validation.js";
6
6
  const q = () => {
7
7
  const {
8
8
  formatMessage: t
9
- } = v(), [l, n] = g({}), e = o((r, s) => {
10
- n((M) => ({
11
- ...M,
9
+ } = w(), [m, i] = p({}), e = o((r, s) => {
10
+ i((n) => ({
11
+ ...n,
12
12
  [r]: s
13
13
  }));
14
- }, []), m = o((r) => {
14
+ }, []), c = o((r) => {
15
15
  if (!r)
16
16
  return e("expiration", t(a.expirationRequiredErrorMessage)), !0;
17
- const s = p();
17
+ const s = y();
18
18
  return r.compare(s) < 0 ? (e("expiration", t(a.expirationFutureDateErrorMessage)), !0) : !1;
19
- }, [t, e]), c = o((r) => r ? w(r) ? !1 : (e("vanityName", t(a.vanityNameInvalidErrorMessage)), !0) : (e("vanityName", t(a.vanityNameRequiredErrorMessage)), !0), [t, e]), f = o((r) => r.length ? !1 : (e("user-contact", t(a.emailRequiredErrorMessage)), !0), [t, e]), C = o((r) => r === "" ? !0 : y(r) ? !1 : (e("user-contact", t(a.invalidEmailErrorMessage)), !0), [t, e]), E = o((r) => N(r) ? P(r) ? (e("password", t(a.passwordContainInvalidCharacterErrorMessage)), !0) : !x(r) && !(i(r) && u(r)) && !(i(r) && d(r)) && !(u(r) && d(r)) ? (e("password", t(a.passwordContainLetterNumberOrSymbolErrorMessage)), !0) : !1 : (e("password", t(a.passwordContainMinCharactersErrorMessage)), !0), [t, e]);
19
+ }, [t, e]), f = o((r) => r ? N(r) ? !1 : (e("vanityName", t(a.vanityNameInvalidErrorMessage)), !0) : (e("vanityName", t(a.vanityNameRequiredErrorMessage)), !0), [t, e]), C = o((r) => r.length ? !1 : (e("user-contact", t(a.emailRequiredErrorMessage)), !0), [t, e]), v = o((r, s) => r.filter((M) => M.value !== "").length <= s ? !1 : (e("user-contact", t(a.contactsExceedLimitError, {
20
+ maxContacts: s
21
+ })), !0), [t, e]), E = o((r) => r === "" ? !0 : P(r) ? !1 : (e("user-contact", t(a.invalidEmailErrorMessage)), !0), [t, e]), g = o((r) => b(r) ? h(r) ? (e("password", t(a.passwordContainInvalidCharacterErrorMessage)), !0) : !x(r) && !(u(r) && l(r)) && !(u(r) && d(r)) && !(l(r) && d(r)) ? (e("password", t(a.passwordContainLetterNumberOrSymbolErrorMessage)), !0) : !1 : (e("password", t(a.passwordContainMinCharactersErrorMessage)), !0), [t, e]);
20
22
  return {
21
- errors: l,
22
- validateExpiration: m,
23
- validatePassword: E,
24
- validateVanityName: c,
25
- validateUserContact: C,
26
- validateUserSelector: f,
27
- setErrors: n,
23
+ errors: m,
24
+ validateCollaborationLimit: v,
25
+ validateExpiration: c,
26
+ validatePassword: g,
27
+ validateVanityName: f,
28
+ validateUserContact: E,
29
+ validateUserSelector: C,
30
+ setErrors: i,
28
31
  setFieldError: e
29
32
  };
30
33
  };
@@ -1,5 +1,9 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const a = e({
2
+ const r = e({
3
+ contactsExceedLimitError: {
4
+ id: "groupSharedFeatures.usm.contactsExceedLimitError",
5
+ 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."
6
+ },
3
7
  noticeCloseLabel: {
4
8
  id: "groupSharedFeatures.usm.noticeCloseLabel",
5
9
  defaultMessage: "Close"
@@ -86,5 +90,5 @@ const a = e({
86
90
  }
87
91
  });
88
92
  export {
89
- a as default
93
+ r as default
90
94
  };
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "একটি শেয়ার করা লিঙ্ক তৈরি করা যায়নি। পরে আবার চেষ্টা করুন।",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "একটি শেয়ার করা লিঙ্ক তৈরি করা যায়নি। অনুগ্রহ করে পরে আবার চেষ্টা করুন.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "শেয়ারকৃত লিঙ্ক তৈরি হয়েছে।",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "কিছু সমস্যা হয়েছে। পরে আবার চেষ্টা করুন।",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Kunne ikke oprette et delt link. Prøv venligst igen senere.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Kunne ikke oprette et delt link. Prøv venligst igen senere.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Delt link blev oprettet.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Noget gik galt. Prøv venligst igen senere.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Ein Freigabe-Link kann nicht erzeugt werden. Versuchen Sie es bitte später noch einmal.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Ein Freigabe-Link kann nicht erstellt werden. Versuchen Sie es bitte später noch einmal.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Freigabe-Link generiert.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Es ist ein Fehler aufgetreten. Versuchen Sie es bitte später noch einmal.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Unable to create a shared link. Please try again later.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Unable to create a shared link. Please try again later.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Shared link created.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Something went wrong. Please try again later.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Unable to create a shared link. Please try again later.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Unable to create a shared link. Please try again later.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Shared link created.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Something went wrong. Please try again later.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Unable to create a shared link. Please try again later.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Unable to create a shared link. Please try again later.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Shared link created.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Something went wrong. Please try again later.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Unable to create a shared link. Please try again later.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Unable to create a shared link. Please try again later.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Shared link created.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Something went wrong. Please try again later.",
@@ -1,5 +1,7 @@
1
1
  # Notification text when the shared link is failed to be created
2
2
  groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText = Unable to create a shared link. Please try again later.
3
+ # Error message when more than the maximum number of contacts is entered
4
+ groupSharedFeatures.usm.contactsExceedLimitError = Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.
3
5
  # Notification text when the shared link failed to be created
4
6
  groupSharedFeatures.usm.createSharedLinkErrorNoticeText = Unable to create a shared link. Please try again later.
5
7
  # Notification text when the shared link is successfully created
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬 Ůйãвľê ţσ çřěαŧê α ŝħάгěď ľіʼnķ. Pľëãśě ŧřў àġāїň ĺăţéŕ. 國國國國國國國國國國國國國國國國⟧",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "⟦萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬萬 Űлαьĺе ţö çŕеåŧе α şĥäґёď ĺíйķ. Pĺέåşέ ťŗỳ åġåϊη ļâţёґ. 國國國國國國國國國國國國國國國國⟧",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "⟦萬萬萬萬萬 Şħάřęď ľίŋĸ çгĕąτēď. 國國國國國⟧",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "⟦萬萬萬萬萬萬萬萬萬萬萬萬萬 Ŝómёţĥїňġ ẃеиţ ŵѓôπĝ. Pļеäŝĕ ţгŷ āğàїи ĺâŧĕŗ. 國國國國國國國國國國國國國⟧",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "No se puede crear un enlace compartido. Inténtelo más tarde.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "No se puede crear un enlace compartido. Inténtelo más tarde.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Se ha creado el enlace compartido.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Se ha producido un error. Inténtelo más tarde.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "No se puede crear un enlace compartido. Inténtelo más tarde.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "No se puede crear un enlace compartido. Inténtelo más tarde.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Se ha creado el enlace compartido.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Se ha producido un error. Inténtelo más tarde.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Jaettua linkkiä ei voi luoda. Yritä myöhemmin uudelleen.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Jaettua linkkiä ei voi luoda. Yritä myöhemmin uudelleen.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Jaettu linkki luotu.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Jokin meni vikaan. Yritä myöhemmin uudelleen.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Impossible de créer un lien partagé. Veuillez réessayer ultérieurement.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Impossible de créer un lien partagé. Veuillez réessayer ultérieurement.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Lien partagé créé.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Une erreur est survenue. Veuillez réessayer ultérieurement .",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Impossible de créer un lien partagé. Veuillez réessayer ultérieurement.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Impossible de créer un lien partagé. Veuillez réessayer ultérieurement.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Lien partagé créé.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Une erreur est survenue. Veuillez réessayer ultérieurement .",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "शेयर्ड लिंक बनाने में असमर्थ। कृपया बाद में दोबारा कोशिश करें।",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "एक शेयर्ड लिंक बनाने में असमर्थ। कृपया बाद में पुनः प्रयास करें।",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "शेयर्ड लिंक बनाया गया।",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "कुछ गलत हो गया। कृपया बाद में पुनः प्रयास करें।",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Impossibile creare un collegamento condiviso. Riprova più tardi.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Impossibile creare un collegamento condiviso. Riprova più tardi.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Collegamento condiviso creato.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Si è verificato un errore. Riprova più tardi.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "共有リンクを作成できません。後でもう一度やり直してください。",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "共有リンクを作成できません。後でもう一度やり直してください。",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "共有リンクを作成しました。",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "問題が発生しました。後でもう一度やり直してください。",
@@ -1 +1 @@
1
- [{"id":"groupSharedFeatures.usm.noticeCloseLabel","description":"Close button aria label for the notifications","defaultMessage":"Close"},{"id":"groupSharedFeatures.usm.successNoticeIcon","description":"Icon label for the success notifications","defaultMessage":"Success"},{"id":"groupSharedFeatures.usm.errorNoticeIcon","description":"Icon label for the error notifications","defaultMessage":"Error"},{"id":"groupSharedFeatures.usm.defaultErrorNoticeText","description":"Default error notification text rendered when API fails","defaultMessage":"Something went wrong. Please try again later."},{"id":"groupSharedFeatures.usm.deleteSharedLinkSuccessNoticeText","description":"Notification text when the shared link is successfully removed","defaultMessage":"The shared link for “{itemName}” has been removed successfully."},{"id":"groupSharedFeatures.usm.deleteSharedLinkErrorNoticeText","description":"Notification text when the shared link failed to be removed","defaultMessage":"Unable to remove the shared link. Please try again later."},{"id":"groupSharedFeatures.usm.updateSharedLinkSuccessNoticeText","description":"Notification text when the shared link settings are successfully saved","defaultMessage":"The shared link settings were saved successfully."},{"id":"groupSharedFeatures.usm.createSharedLinkSuccessNoticeText","description":"Notification text when the shared link is successfully created","defaultMessage":"Shared link created."},{"id":"groupSharedFeatures.usm.createSharedLinkErrorNoticeText","description":"Notification text when the shared link failed to be created","defaultMessage":"Unable to create a shared link. Please try again later."},{"id":"groupSharedFeatures.usm.emailSharedLinkSuccessNoticeText","description":"Notification text when the shared link was sent successfully","defaultMessage":"The shared link for “{itemName}” was sent successfully."},{"id":"groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText","description":"Notification text when the shared link is failed to be created","defaultMessage":"Unable to create a shared link. Please try again later."},{"id":"groupSharedFeatures.usm.vanityNameInvalidErrorMessage","description":"Text for the vanity name invalid error","defaultMessage":"Custom URLs must be between 12-30 characters, and can include letters, numbers, and hyphens"},{"id":"groupSharedFeatures.usm.vanityNameRequiredErrorMessage","description":"Error message for the vanity name field when custom URL is not provided","defaultMessage":"Please enter a custom URL"},{"id":"groupSharedFeatures.usm.expirationRequiredErrorMessage","description":"Error message for the expiration date field when expiration date is not provided","defaultMessage":"Please select an expiration date"},{"id":"groupSharedFeatures.usm.expirationFutureDateErrorMessage","description":"Error message for the expiration date field when expiration date is in the past","defaultMessage":"Expiration date must be in the future"},{"id":"groupSharedFeatures.usm.invalidEmailErrorMessage","description":"Error message for the email field when email is invalid","defaultMessage":"Invalid email address"},{"id":"groupSharedFeatures.usm.emailRequiredErrorMessage","description":"Error message for the email field when email is not provided","defaultMessage":"Enter at least one valid email"},{"id":"groupSharedFeatures.usm.passwordRequiredErrorMessage","description":"Error message for the password field when password is not provided","defaultMessage":"Please enter a password"},{"id":"groupSharedFeatures.usm.passwordContainMinCharactersErrorMessage","description":"Error message for the password field when password does not contain at least 8 characters.","defaultMessage":"Password must contain at least 8 characters"},{"id":"groupSharedFeatures.usm.passwordContainInvalidCharacterErrorMessage","description":"Error message for the password field when password contains forbidden characters.","defaultMessage":"Password cannot contain a space, \"<\" or \">\""},{"id":"groupSharedFeatures.usm.passwordContainLetterNumberOrSymbolErrorMessage","description":"Error message for the password field when password does not contain at least one letter, number, or symbol","defaultMessage":"Password must contain at least one upper case letter, number, or special character"}]
1
+ [{"id":"groupSharedFeatures.usm.contactsExceedLimitError","description":"Error message when more than the maximum number of contacts is entered","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."},{"id":"groupSharedFeatures.usm.noticeCloseLabel","description":"Close button aria label for the notifications","defaultMessage":"Close"},{"id":"groupSharedFeatures.usm.successNoticeIcon","description":"Icon label for the success notifications","defaultMessage":"Success"},{"id":"groupSharedFeatures.usm.errorNoticeIcon","description":"Icon label for the error notifications","defaultMessage":"Error"},{"id":"groupSharedFeatures.usm.defaultErrorNoticeText","description":"Default error notification text rendered when API fails","defaultMessage":"Something went wrong. Please try again later."},{"id":"groupSharedFeatures.usm.deleteSharedLinkSuccessNoticeText","description":"Notification text when the shared link is successfully removed","defaultMessage":"The shared link for “{itemName}” has been removed successfully."},{"id":"groupSharedFeatures.usm.deleteSharedLinkErrorNoticeText","description":"Notification text when the shared link failed to be removed","defaultMessage":"Unable to remove the shared link. Please try again later."},{"id":"groupSharedFeatures.usm.updateSharedLinkSuccessNoticeText","description":"Notification text when the shared link settings are successfully saved","defaultMessage":"The shared link settings were saved successfully."},{"id":"groupSharedFeatures.usm.createSharedLinkSuccessNoticeText","description":"Notification text when the shared link is successfully created","defaultMessage":"Shared link created."},{"id":"groupSharedFeatures.usm.createSharedLinkErrorNoticeText","description":"Notification text when the shared link failed to be created","defaultMessage":"Unable to create a shared link. Please try again later."},{"id":"groupSharedFeatures.usm.emailSharedLinkSuccessNoticeText","description":"Notification text when the shared link was sent successfully","defaultMessage":"The shared link for “{itemName}” was sent successfully."},{"id":"groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText","description":"Notification text when the shared link is failed to be created","defaultMessage":"Unable to create a shared link. Please try again later."},{"id":"groupSharedFeatures.usm.vanityNameInvalidErrorMessage","description":"Text for the vanity name invalid error","defaultMessage":"Custom URLs must be between 12-30 characters, and can include letters, numbers, and hyphens"},{"id":"groupSharedFeatures.usm.vanityNameRequiredErrorMessage","description":"Error message for the vanity name field when custom URL is not provided","defaultMessage":"Please enter a custom URL"},{"id":"groupSharedFeatures.usm.expirationRequiredErrorMessage","description":"Error message for the expiration date field when expiration date is not provided","defaultMessage":"Please select an expiration date"},{"id":"groupSharedFeatures.usm.expirationFutureDateErrorMessage","description":"Error message for the expiration date field when expiration date is in the past","defaultMessage":"Expiration date must be in the future"},{"id":"groupSharedFeatures.usm.invalidEmailErrorMessage","description":"Error message for the email field when email is invalid","defaultMessage":"Invalid email address"},{"id":"groupSharedFeatures.usm.emailRequiredErrorMessage","description":"Error message for the email field when email is not provided","defaultMessage":"Enter at least one valid email"},{"id":"groupSharedFeatures.usm.passwordRequiredErrorMessage","description":"Error message for the password field when password is not provided","defaultMessage":"Please enter a password"},{"id":"groupSharedFeatures.usm.passwordContainMinCharactersErrorMessage","description":"Error message for the password field when password does not contain at least 8 characters.","defaultMessage":"Password must contain at least 8 characters"},{"id":"groupSharedFeatures.usm.passwordContainInvalidCharacterErrorMessage","description":"Error message for the password field when password contains forbidden characters.","defaultMessage":"Password cannot contain a space, \"<\" or \">\""},{"id":"groupSharedFeatures.usm.passwordContainLetterNumberOrSymbolErrorMessage","description":"Error message for the password field when password does not contain at least one letter, number, or symbol","defaultMessage":"Password must contain at least one upper case letter, number, or special character"}]
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "공유 링크를 생성할 수 없습니다. 잠시 후 다시 시도해 주세요.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "공유 링크를 생성할 수 없습니다. 잠시 후 다시 시도해 주세요.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "공유 링크가 생성되었습니다.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "문제가 발생했습니다. 잠시 후 다시 시도해 주세요.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Kan ikke opprette en delt kobling. Prøv igjen senere.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Kan ikke opprette en delt kobling. Prøv igjen senere.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Delt kobling er opprettet.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Noe gikk galt. Prøv igjen senere.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Kan geen gedeelde link maken. Probeer het later opnieuw.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Kan geen gedeelde link maken. Probeer het later opnieuw.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Gedeelde link gemaakt.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Er is iets misgegaan. Probeer het later opnieuw.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Nie można utworzyć łącza udostępnionego. Spróbuj ponownie później.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Nie można utworzyć łącza udostępnionego. Spróbuj ponownie później.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Utworzono łącze udostępnione.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Wystąpił błąd. Spróbuj ponownie później.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Não é possível criar um link compartilhado. Tente novamente mais tarde.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Não é possível criar um link compartilhado. Tente novamente mais tarde.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Link compartilhado criado.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Algo saiu errado. Tente novamente mais tarde.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Не удается создать общую ссылку. Повторите попытку позже.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Не удается создать общую ссылку. Повторите попытку позже.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Общая ссылка создана.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Что-то пошло не так. Повторите попытку позже.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Kunde inte skapa en delad länk. Försök igen senare.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Kunde inte skapa en delad länk. Försök igen senare.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Delad länk skapad.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Något gick fel. Försök igen senare.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "Paylaşılan bir bağlantı oluşturulamadı. Lütfen daha sonra tekrar deneyin.",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "Paylaşılan bir bağlantı oluşturulamadı. Lütfen daha sonra tekrar deneyin.",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "Paylaşılan bağlantı oluşturuldu.",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "Bir hata oluştu. Lütfen daha sonra tekrar deneyin.",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "无法创建共享链接。请稍后重试。",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "无法创建共享链接。请稍后重试。",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "已创建共享链接。",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "发生错误。请稍后重试。",
@@ -1,5 +1,6 @@
1
1
  export default {
2
2
  "groupSharedFeatures.usm.autoCopySharedLinkErrorNoticeText": "無法建立共用連結。 請稍後再試一次。",
3
+ "groupSharedFeatures.usm.contactsExceedLimitError": "Oops! The maximum number of collaborators that can be added at once is {maxContacts} collaborators. Please try again by splitting your invitations into batches.",
3
4
  "groupSharedFeatures.usm.createSharedLinkErrorNoticeText": "無法建立共用連結。 請稍後再試一次。",
4
5
  "groupSharedFeatures.usm.createSharedLinkSuccessNoticeText": "已建立共用的連結。",
5
6
  "groupSharedFeatures.usm.defaultErrorNoticeText": "發生問題。 請稍後再試一次。",
@@ -10,6 +10,7 @@ export type FormErrors = {
10
10
  };
11
11
  export declare const useFormValidation: () => {
12
12
  errors: FormErrors;
13
+ validateCollaborationLimit: (users: UserContactType[], maxContacts: number) => boolean;
13
14
  validateExpiration: (expiration: DateValue) => boolean;
14
15
  validatePassword: (password: string) => boolean;
15
16
  validateVanityName: (vanityName: string) => boolean;
@@ -1,4 +1,9 @@
1
1
  declare const messages: {
2
+ contactsExceedLimitError: {
3
+ defaultMessage: string;
4
+ description: string;
5
+ id: string;
6
+ };
2
7
  noticeCloseLabel: {
3
8
  defaultMessage: string;
4
9
  description: string;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@box/unified-share-modal",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@box/blueprint-web": "^12.104.1",
7
7
  "@box/blueprint-web-assets": "^4.87.0",
8
8
  "@box/copy-input": "^1.17.0",
9
- "@box/user-selector": "^1.49.0",
9
+ "@box/user-selector": "^1.49.1",
10
10
  "lodash": "^4.17.15",
11
11
  "react": "^18.0.0",
12
12
  "react-dom": "^18.0.0",