@box/unified-share-modal 0.45.2 → 0.46.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.
Files changed (47) hide show
  1. package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings-modal.js +109 -100
  2. package/dist/esm/lib/hooks/use-form-validation.js +24 -22
  3. package/dist/esm/lib/hooks/use-link-settings-form.js +46 -48
  4. package/dist/esm/lib/hooks/use-sharing-action.js +12 -12
  5. package/dist/esm/lib/messages.js +16 -0
  6. package/dist/esm/lib/utils/index.js +23 -16
  7. package/dist/esm/lib/utils/validation.js +41 -3
  8. package/dist/i18n/bn-IN.js +4 -0
  9. package/dist/i18n/da-DK.js +4 -0
  10. package/dist/i18n/de-DE.js +4 -0
  11. package/dist/i18n/en-AU.js +4 -0
  12. package/dist/i18n/en-CA.js +4 -0
  13. package/dist/i18n/en-GB.js +4 -0
  14. package/dist/i18n/en-US.js +4 -0
  15. package/dist/i18n/en-US.properties +8 -0
  16. package/dist/i18n/en-x-pseudo.js +4 -0
  17. package/dist/i18n/es-419.js +4 -0
  18. package/dist/i18n/es-ES.js +4 -0
  19. package/dist/i18n/fi-FI.js +4 -0
  20. package/dist/i18n/fr-CA.js +4 -0
  21. package/dist/i18n/fr-FR.js +4 -0
  22. package/dist/i18n/hi-IN.js +4 -0
  23. package/dist/i18n/it-IT.js +4 -0
  24. package/dist/i18n/ja-JP.js +4 -0
  25. package/dist/i18n/json/src/lib/messages.json +1 -1
  26. package/dist/i18n/ko-KR.js +4 -0
  27. package/dist/i18n/nb-NO.js +4 -0
  28. package/dist/i18n/nl-NL.js +4 -0
  29. package/dist/i18n/pl-PL.js +4 -0
  30. package/dist/i18n/pt-BR.js +4 -0
  31. package/dist/i18n/ru-RU.js +4 -0
  32. package/dist/i18n/sv-SE.js +4 -0
  33. package/dist/i18n/tr-TR.js +4 -0
  34. package/dist/i18n/zh-CN.js +4 -0
  35. package/dist/i18n/zh-TW.js +4 -0
  36. package/dist/types/lib/components/remove-shared-link-modal/stories/shared.d.ts +0 -1
  37. package/dist/types/lib/components/shared-link-settings-modal/stories/shared.d.ts +0 -34
  38. package/dist/types/lib/components/unified-share-form-modal/stories/shared.d.ts +1 -14
  39. package/dist/types/lib/hooks/use-form-validation.d.ts +2 -0
  40. package/dist/types/lib/hooks/use-link-settings-form.d.ts +1 -0
  41. package/dist/types/lib/messages.d.ts +20 -0
  42. package/dist/types/lib/stories/shared.d.ts +13 -6
  43. package/dist/types/lib/types.d.ts +2 -2
  44. package/dist/types/lib/utils/validation.d.ts +19 -0
  45. package/package.json +5 -8
  46. package/dist/esm/lib/store.js +0 -30
  47. package/dist/types/lib/store.d.ts +0 -21
@@ -1,30 +0,0 @@
1
- import { createStore as o } from "@xstate/store";
2
- const l = o({
3
- // Initial context
4
- context: {
5
- currentView: "default",
6
- collaborators: [],
7
- emailMessage: ""
8
- },
9
- // Transitions
10
- on: {
11
- // Transition to a new view
12
- changeView: (a, e) => ({
13
- ...a,
14
- collaborators: e.view === "default" ? [] : a.collaborators,
15
- currentView: e.view,
16
- emailMessage: e.view === "default" ? "" : a.emailMessage
17
- }),
18
- changeCollaborators: (a, e) => ({
19
- ...a,
20
- collaborators: e.collaborators
21
- }),
22
- changeEmailMessage: (a, e) => ({
23
- ...a,
24
- emailMessage: e.emailMessage
25
- })
26
- }
27
- });
28
- export {
29
- l as store
30
- };
@@ -1,21 +0,0 @@
1
- import { UserContactType } from '@box/user-selector';
2
- type ModalView = 'default' | 'collaborators' | 'sharedLink';
3
- export interface StoreContext {
4
- currentView: ModalView;
5
- collaborators: UserContactType[];
6
- emailMessage: string;
7
- }
8
- export declare const store: import('@xstate/store').Store<StoreContext, import('@xstate/store').ExtractEvents<{
9
- changeView: {
10
- view: ModalView;
11
- };
12
- changeCollaborators: {
13
- collaborators: UserContactType[];
14
- };
15
- changeEmailMessage: {
16
- emailMessage: string;
17
- };
18
- }>, {
19
- type: string;
20
- }>;
21
- export {};