@box/unified-share-modal 0.45.2 → 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings-modal.js +109 -100
- package/dist/esm/lib/hooks/use-form-validation.js +24 -22
- package/dist/esm/lib/hooks/use-link-settings-form.js +46 -48
- package/dist/esm/lib/hooks/use-sharing-action.js +12 -12
- package/dist/esm/lib/messages.js +16 -0
- package/dist/esm/lib/utils/index.js +23 -16
- package/dist/esm/lib/utils/validation.js +41 -3
- package/dist/i18n/bn-IN.js +4 -0
- package/dist/i18n/da-DK.js +4 -0
- package/dist/i18n/de-DE.js +4 -0
- package/dist/i18n/en-AU.js +4 -0
- package/dist/i18n/en-CA.js +4 -0
- package/dist/i18n/en-GB.js +4 -0
- package/dist/i18n/en-US.js +4 -0
- package/dist/i18n/en-US.properties +8 -0
- package/dist/i18n/en-x-pseudo.js +4 -0
- package/dist/i18n/es-419.js +4 -0
- package/dist/i18n/es-ES.js +4 -0
- package/dist/i18n/fi-FI.js +4 -0
- package/dist/i18n/fr-CA.js +4 -0
- package/dist/i18n/fr-FR.js +4 -0
- package/dist/i18n/hi-IN.js +4 -0
- package/dist/i18n/it-IT.js +4 -0
- package/dist/i18n/ja-JP.js +4 -0
- package/dist/i18n/json/src/lib/messages.json +1 -1
- package/dist/i18n/ko-KR.js +4 -0
- package/dist/i18n/nb-NO.js +4 -0
- package/dist/i18n/nl-NL.js +4 -0
- package/dist/i18n/pl-PL.js +4 -0
- package/dist/i18n/pt-BR.js +4 -0
- package/dist/i18n/ru-RU.js +4 -0
- package/dist/i18n/sv-SE.js +4 -0
- package/dist/i18n/tr-TR.js +4 -0
- package/dist/i18n/zh-CN.js +4 -0
- package/dist/i18n/zh-TW.js +4 -0
- package/dist/types/lib/components/remove-shared-link-modal/stories/shared.d.ts +0 -1
- package/dist/types/lib/components/shared-link-settings-modal/stories/shared.d.ts +0 -34
- package/dist/types/lib/components/unified-share-form-modal/stories/shared.d.ts +1 -14
- package/dist/types/lib/hooks/use-form-validation.d.ts +2 -0
- package/dist/types/lib/hooks/use-link-settings-form.d.ts +1 -0
- package/dist/types/lib/messages.d.ts +20 -0
- package/dist/types/lib/stories/shared.d.ts +13 -6
- package/dist/types/lib/types.d.ts +2 -2
- package/dist/types/lib/utils/validation.d.ts +19 -0
- package/package.json +5 -8
- package/dist/esm/lib/store.js +0 -30
- package/dist/types/lib/store.d.ts +0 -21
package/dist/esm/lib/store.js
DELETED
|
@@ -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 {};
|