@zextras/carbonio-ui-commons 2.0.0-beta.2 → 2.0.0-beta.3
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/lib/types/components/breadcrumbs/static-breadcrumbs.d.ts +8 -0
- package/lib/types/components/list/list-item.d.ts +3 -0
- package/lib/types/components/list/list.d.ts +3 -0
- package/lib/types/components/modals/folder-initialization-error-modal.d.ts +4 -0
- package/lib/types/components/modals/modal-footer.d.ts +3 -0
- package/lib/types/components/modals/modal-header.d.ts +6 -0
- package/lib/types/components/select/color-select.d.ts +14 -0
- package/lib/types/components/select/folders/flat-folder.d.ts +8 -0
- package/lib/types/components/select/folders/flat-folders.d.ts +12 -0
- package/lib/types/components/select/folders/flat-root.d.ts +12 -0
- package/lib/types/components/select/folders/folder-accordions-custom-component.d.ts +5 -0
- package/lib/types/components/select/folders/folder-selector.d.ts +12 -0
- package/lib/types/components/select/folders/folders-accordion.d.ts +14 -0
- package/lib/types/components/select/folders/hooks.d.ts +29 -0
- package/lib/types/components/select/folders/status-icon.d.ts +5 -0
- package/lib/types/components/select/folders/utils.d.ts +12 -0
- package/lib/types/components/select/folders-selector.d.ts +11 -0
- package/lib/types/components/select/select-label-factory.d.ts +10 -0
- package/lib/types/components/sidebar/sidebar-accordion-mui.d.ts +3 -0
- package/lib/types/components/tags/delete-tag-modal.d.ts +3 -0
- package/lib/types/constants/folders.d.ts +30 -0
- package/lib/types/constants/participants.d.ts +11 -0
- package/lib/types/constants/search.d.ts +22 -0
- package/lib/types/constants/utils/index.d.ts +41 -0
- package/lib/types/helpers/api-wrapper.d.ts +8 -0
- package/lib/types/helpers/email-parser.d.ts +2 -0
- package/lib/types/helpers/errors.d.ts +2 -0
- package/lib/types/helpers/folders.d.ts +100 -0
- package/lib/types/helpers/identities.d.ts +25 -0
- package/lib/types/helpers/search.d.ts +6 -0
- package/lib/types/helpers/use-history-navigation.d.ts +5 -0
- package/lib/types/hooks/use-initialize-folders.d.ts +2 -0
- package/lib/types/hooks/use-initialize-tags.d.ts +1 -0
- package/lib/types/hooks/use-update-view.d.ts +1 -0
- package/lib/types/index.d.ts +75 -0
- package/lib/types/integrations/constants.d.ts +3 -0
- package/lib/types/integrations/default-contact-input.d.ts +3 -0
- package/lib/types/integrations/hooks.d.ts +3 -0
- package/lib/types/integrations/search/use-run-search.d.ts +2 -0
- package/lib/types/integrations/types.d.ts +41 -0
- package/lib/types/soap/errors/generic-soap-api-error.d.ts +13 -0
- package/lib/types/soap/errors/soap-api-error.d.ts +7 -0
- package/lib/types/soap/get-folder.d.ts +5 -0
- package/lib/types/soap/get-share-info.d.ts +13 -0
- package/lib/types/soap/no-op.d.ts +4 -0
- package/lib/types/soap/tags.d.ts +27 -0
- package/lib/types/store/zustand/folder/hooks.d.ts +91 -0
- package/lib/types/store/zustand/folder/store.d.ts +2 -0
- package/lib/types/store/zustand/folder/utils.d.ts +25 -0
- package/lib/types/store/zustand/tags/hooks.d.ts +4 -0
- package/lib/types/store/zustand/tags/index.d.ts +2 -0
- package/lib/types/store/zustand/tags/store.d.ts +2 -0
- package/lib/types/theme/theme-mui.d.ts +5 -0
- package/lib/types/theme/theme.d.ts +48 -0
- package/lib/types/types/actions/index.d.ts +8 -0
- package/lib/types/types/emotion.d.ts +9 -0
- package/lib/types/types/folder/index.d.ts +124 -0
- package/lib/types/types/i18next.d.ts +11 -0
- package/lib/types/types/identities/index.d.ts +33 -0
- package/lib/types/types/index.d.ts +9 -0
- package/lib/types/types/modals/index.d.ts +31 -0
- package/lib/types/types/select/index.d.ts +15 -0
- package/lib/types/types/sidebar/index.d.ts +179 -0
- package/lib/types/types/soap/index.d.ts +10 -0
- package/lib/types/types/tags/index.d.ts +46 -0
- package/lib/types/types/workers/index.d.ts +12 -0
- package/lib/types/utils/clipboard.d.ts +1 -0
- package/lib/types/utils/get-prefs.d.ts +2 -0
- package/lib/types/utils/index.d.ts +15 -0
- package/lib/types/utils/use-prefs.d.ts +2 -0
- package/lib/types/utils/utils.d.ts +3 -0
- package/lib/types/worker/folder.d.ts +1 -0
- package/lib/types/worker/handle-message.d.ts +30 -0
- package/lib/types/worker/index.d.ts +2 -0
- package/lib/types/worker/tags.d.ts +4 -0
- package/lib/types/worker/utils.d.ts +8 -0
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { BreadcrumbsProps, TextProps } from '@zextras/carbonio-design-system';
|
|
3
|
+
type StaticBreadcrumbsProps = BreadcrumbsProps & {
|
|
4
|
+
size?: TextProps['size'];
|
|
5
|
+
tooltipLabel?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const StaticBreadcrumbs: FC<StaticBreadcrumbsProps>;
|
|
8
|
+
export { type StaticBreadcrumbsProps, StaticBreadcrumbs };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SingleSelectionOnChange } from '@zextras/carbonio-design-system';
|
|
3
|
+
export declare const ColorContainer: import("@emotion/styled").StyledComponent<import("@zextras/carbonio-design-system").ContainerProps & React.RefAttributes<HTMLDivElement> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
}, {}, {}>;
|
|
6
|
+
export declare const TextUpperCase: import("@emotion/styled").StyledComponent<import("@zextras/carbonio-design-system").TextProps & React.RefAttributes<HTMLDivElement> & {
|
|
7
|
+
theme?: import("@emotion/react").Theme;
|
|
8
|
+
}, {}, {}>;
|
|
9
|
+
export type ColorSelectProps = {
|
|
10
|
+
onChange: SingleSelectionOnChange;
|
|
11
|
+
defaultColor: number;
|
|
12
|
+
label: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const ColorSelect: ({ onChange, defaultColor, label }: ColorSelectProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Folder } from '../../../types';
|
|
3
|
+
export type FlaFolderProps = {
|
|
4
|
+
folder: Folder;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
onFolderSelected?: (arg: Folder) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const FlatFolder: ({ folder, onFolderSelected, ...rest }: FlaFolderProps) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Folder } from '../../../types';
|
|
3
|
+
type FlatFoldersProps = {
|
|
4
|
+
rootFolders: Array<Folder>;
|
|
5
|
+
searchString: string;
|
|
6
|
+
selectedFolderId?: string;
|
|
7
|
+
onFolderSelected?: (folder: Folder) => void;
|
|
8
|
+
allowRootSelection?: boolean;
|
|
9
|
+
filterChildren?: (folder: Folder) => boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const FlatFolders: ({ rootFolders, searchString, onFolderSelected, selectedFolderId, allowRootSelection, filterChildren }: FlatFoldersProps) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FlaFolderProps } from './flat-folder';
|
|
3
|
+
import { Folder } from '../../../types';
|
|
4
|
+
type FlatRootProps = FlaFolderProps & {
|
|
5
|
+
childrenFolders: Array<Folder>;
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
onOpenStatusChange?: (isOpen: boolean) => void;
|
|
8
|
+
selectedFolderId?: string;
|
|
9
|
+
allowRootSelection?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const FlatRoot: ({ folder, childrenFolders, isOpen, onFolderSelected, onOpenStatusChange, selectedFolderId, allowRootSelection }: FlatRootProps) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { Folder } from '../../../types';
|
|
3
|
+
export type FolderSelectorProps = {
|
|
4
|
+
inputLabel?: string;
|
|
5
|
+
onNewFolderClick?: () => void;
|
|
6
|
+
selectedFolderId?: string;
|
|
7
|
+
onFolderSelected: (arg: Folder) => void;
|
|
8
|
+
showSharedAccounts: boolean;
|
|
9
|
+
allowRootSelection: boolean;
|
|
10
|
+
filterChildren?: (folder: Folder) => boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const FolderSelector: ({ inputLabel, onNewFolderClick, selectedFolderId, onFolderSelected, allowRootSelection, showSharedAccounts, filterChildren }: FolderSelectorProps) => ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Folder } from '../../../types';
|
|
3
|
+
type FolderAccordionProps = {
|
|
4
|
+
folders: Array<Folder>;
|
|
5
|
+
onFolderSelected: (arg: Folder) => void;
|
|
6
|
+
selectedFolderId?: string;
|
|
7
|
+
disabledFolderIds?: Array<string>;
|
|
8
|
+
FolderAccordionCustomComponent: React.FC<{
|
|
9
|
+
folder: Folder;
|
|
10
|
+
}>;
|
|
11
|
+
filterChildren?: (folder: Folder) => boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const FoldersAccordion: ({ folders, onFolderSelected, FolderAccordionCustomComponent, selectedFolderId, disabledFolderIds, filterChildren }: FolderAccordionProps) => React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Folder } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* calculate the sorting criteria for a given folder
|
|
4
|
+
* system folders are placed before user folders
|
|
5
|
+
* the trash folder is always the last one
|
|
6
|
+
* @param folder
|
|
7
|
+
* @returns the sorting criteria
|
|
8
|
+
*/
|
|
9
|
+
export declare const getSortCriteria: (folder: Folder) => string;
|
|
10
|
+
/**
|
|
11
|
+
* recursively sort the children of a folder according to a given sort function
|
|
12
|
+
* @param children
|
|
13
|
+
* @param sortFunction
|
|
14
|
+
* @returns the sorted children
|
|
15
|
+
*/
|
|
16
|
+
export declare const sortFolders: ({ children, sortFunction }: {
|
|
17
|
+
children: Folder[];
|
|
18
|
+
sortFunction: (folder: Folder) => number | string;
|
|
19
|
+
}) => Folder[];
|
|
20
|
+
/**
|
|
21
|
+
* sorts the children of the useRootsArray hook according to the specified sort function
|
|
22
|
+
* @returns the sorted children
|
|
23
|
+
*/
|
|
24
|
+
export declare const useFolders: () => Array<Folder>;
|
|
25
|
+
/**
|
|
26
|
+
* sorts the children of the getRootsArray hook according to the specified sort function
|
|
27
|
+
* @returns the sorted children
|
|
28
|
+
*/
|
|
29
|
+
export declare const getFolders: () => Array<Folder>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AccordionItemType } from '@zextras/carbonio-design-system';
|
|
2
|
+
import { Folder } from '../../../types';
|
|
3
|
+
export declare function flattenAndFilterFoldersWithCap(folders: Array<Folder>, search: string, limit: number, filterFolders?: ((folder: Folder) => boolean) | undefined): Array<Folder>;
|
|
4
|
+
export declare const getFolderIconColor: (f: Folder | AccordionItemType) => string;
|
|
5
|
+
export declare const getFolderIconName: (folder: Folder | AccordionItemType) => string | null;
|
|
6
|
+
type GetSystemFolderProps = {
|
|
7
|
+
folderId?: string;
|
|
8
|
+
folderName: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const getSystemFolderTranslatedName: ({ folderName }: GetSystemFolderProps) => string;
|
|
11
|
+
export declare const getFolderTranslatedName: ({ folderId, folderName }: GetSystemFolderProps) => string;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import type { FolderSelectorItem, OnChangeSelect } from '../../types/select';
|
|
3
|
+
type FolderSelectorProps = {
|
|
4
|
+
defaultFolderId: string;
|
|
5
|
+
onChange: OnChangeSelect;
|
|
6
|
+
label?: string;
|
|
7
|
+
folderItems: FolderSelectorItem[];
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const FoldersSelector: ({ defaultFolderId, onChange, label, folderItems, disabled }: FolderSelectorProps) => ReactElement | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { CustomLabelFactoryProps } from '../../types/select';
|
|
3
|
+
export declare const Square: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
} & {
|
|
7
|
+
$disabled?: boolean;
|
|
8
|
+
$color: string | undefined;
|
|
9
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const FolderSelectorLabelFactory: ({ selected, label, open, focus, disabled }: CustomLabelFactoryProps) => ReactElement;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const FolderActionsType: {
|
|
2
|
+
readonly NEW: "new";
|
|
3
|
+
readonly MOVE: "move";
|
|
4
|
+
readonly DELETE: "delete";
|
|
5
|
+
readonly EDIT: "edit";
|
|
6
|
+
readonly EMPTY: "empty";
|
|
7
|
+
readonly REMOVE_FROM_LIST: "removeFromList";
|
|
8
|
+
readonly SHARES_INFO: "sharesInfo";
|
|
9
|
+
readonly SHARE: "share";
|
|
10
|
+
readonly MARK_ALL_READ: "read";
|
|
11
|
+
};
|
|
12
|
+
export declare const FOLDERS: {
|
|
13
|
+
readonly USER_ROOT: "1";
|
|
14
|
+
readonly INBOX: "2";
|
|
15
|
+
readonly TRASH: "3";
|
|
16
|
+
readonly SPAM: "4";
|
|
17
|
+
readonly SENT: "5";
|
|
18
|
+
readonly DRAFTS: "6";
|
|
19
|
+
readonly CONTACTS: "7";
|
|
20
|
+
readonly TAGS: "8";
|
|
21
|
+
readonly CONVERSATIONS: "9";
|
|
22
|
+
readonly CALENDAR: "10";
|
|
23
|
+
readonly ROOT: "11";
|
|
24
|
+
readonly NOTEBOOK: "12";
|
|
25
|
+
readonly AUTO_CONTACTS: "13";
|
|
26
|
+
readonly IM_LOGS: "14";
|
|
27
|
+
readonly TASKS: "15";
|
|
28
|
+
readonly BRIEFCASE: "16";
|
|
29
|
+
readonly LAST_SYSTEM_FOLDER_POSITION: "16.1";
|
|
30
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ParticipantRole: {
|
|
2
|
+
readonly FROM: "f";
|
|
3
|
+
readonly TO: "t";
|
|
4
|
+
readonly CARBON_COPY: "c";
|
|
5
|
+
readonly BLIND_CARBON_COPY: "b";
|
|
6
|
+
readonly REPLY_TO: "r";
|
|
7
|
+
readonly SENDER: "s";
|
|
8
|
+
readonly READ_RECEIPT_NOTIFICATION: "n";
|
|
9
|
+
readonly RESENT_FROM: "rf";
|
|
10
|
+
};
|
|
11
|
+
export type ParticipantRoleType = (typeof ParticipantRole)[keyof typeof ParticipantRole];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const SEARCH_QUERY_PREFIXES: {
|
|
2
|
+
content: string;
|
|
3
|
+
from: string;
|
|
4
|
+
to: string;
|
|
5
|
+
cc: string;
|
|
6
|
+
subject: string;
|
|
7
|
+
in: string;
|
|
8
|
+
has: string;
|
|
9
|
+
filename: string;
|
|
10
|
+
type: string;
|
|
11
|
+
attachment: string;
|
|
12
|
+
is: string;
|
|
13
|
+
date: string;
|
|
14
|
+
after: string;
|
|
15
|
+
before: string;
|
|
16
|
+
size: string;
|
|
17
|
+
larger: string;
|
|
18
|
+
smaller: string;
|
|
19
|
+
solo: string;
|
|
20
|
+
tag: string;
|
|
21
|
+
priority: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const FOLDER_VIEW: FolderViewType;
|
|
2
|
+
type FolderViewType = {
|
|
3
|
+
search_folder: 'search folder';
|
|
4
|
+
tag: 'tag';
|
|
5
|
+
conversation: 'conversation';
|
|
6
|
+
message: 'message';
|
|
7
|
+
contact: 'contact';
|
|
8
|
+
document: 'document';
|
|
9
|
+
appointment: 'appointment';
|
|
10
|
+
virtual_conversation: 'virtual conversation';
|
|
11
|
+
remote_folder: 'remote folder';
|
|
12
|
+
wiki: 'wiki';
|
|
13
|
+
task: 'task';
|
|
14
|
+
chat: 'chat';
|
|
15
|
+
};
|
|
16
|
+
export declare enum TagsActionsType {
|
|
17
|
+
NEW = "new",
|
|
18
|
+
DELETE = "delete",
|
|
19
|
+
EDIT = "edit",
|
|
20
|
+
Apply = "apply"
|
|
21
|
+
}
|
|
22
|
+
export declare const DRAG_DATA_TYPE: {
|
|
23
|
+
readonly MESSAGE: "message";
|
|
24
|
+
readonly CONVERSATION: "conversation";
|
|
25
|
+
readonly FOLDER: "folder";
|
|
26
|
+
readonly CONTACT: "contact";
|
|
27
|
+
};
|
|
28
|
+
export declare const ZIMBRA_STANDARD_COLORS: {
|
|
29
|
+
zValue: number;
|
|
30
|
+
hex: string;
|
|
31
|
+
zLabel: string;
|
|
32
|
+
}[];
|
|
33
|
+
export declare enum JSNS {
|
|
34
|
+
ACCOUNT = "urn:zimbraAccount",
|
|
35
|
+
ADMIN = "urn:zimbraAdmin",
|
|
36
|
+
MAIL = "urn:zimbraMail",
|
|
37
|
+
ALL = "urn:zimbra",
|
|
38
|
+
SYNC = "urn:zimbraSync"
|
|
39
|
+
}
|
|
40
|
+
export declare const ROOT_NAME = "USER_ROOT";
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { Folder, Folders } from '../types/folder';
|
|
2
|
+
type FolderIdType = {
|
|
3
|
+
zid: string | null;
|
|
4
|
+
id: string | null;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Parse the given folder id and returns on object with the composing parts of the folder id
|
|
8
|
+
* @param folderId
|
|
9
|
+
*/
|
|
10
|
+
export declare const getFolderIdParts: (folderId: string) => FolderIdType;
|
|
11
|
+
/**
|
|
12
|
+
* Get the account name of the owner of the given folder, if the owner is an
|
|
13
|
+
* "other" account, different from the primary account of the current user.
|
|
14
|
+
* If the owner is the primary account then <code>null</code> is returned
|
|
15
|
+
* @param folderId
|
|
16
|
+
* @param folderRoots
|
|
17
|
+
*/
|
|
18
|
+
export declare const getFolderOtherOwnerAccountName: (folderId: string, folderRoots: Folders) => string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the account name of the owner of the folder, based on the folder id
|
|
21
|
+
* @param folderId
|
|
22
|
+
* @param folderRoots
|
|
23
|
+
*/
|
|
24
|
+
export declare const getFolderOwnerAccountName: (folderId: string, folderRoots: Folders) => string;
|
|
25
|
+
/**
|
|
26
|
+
* Tells if a folder with the given id is a spam folder
|
|
27
|
+
* @param folderId
|
|
28
|
+
* @param folderType
|
|
29
|
+
*/
|
|
30
|
+
export declare const isA: (folderId: string, folderType: keyof Folders) => boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Tells if a folder with the given id is the default account root folder
|
|
33
|
+
* @param folderId
|
|
34
|
+
*/
|
|
35
|
+
export declare const isDefaultAccountRoot: (folderId: string) => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Tells if a folder with the given id is a root folder
|
|
38
|
+
* @param folderId
|
|
39
|
+
*/
|
|
40
|
+
export declare const isRoot: (folderId: string) => boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Tells if the given folder is a link to a folder shared by another user
|
|
43
|
+
* @param folder
|
|
44
|
+
*/
|
|
45
|
+
export declare const isLink: (folder: Folder) => boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Tells if a folder is a folder of a shared account
|
|
48
|
+
* @param folderId
|
|
49
|
+
*/
|
|
50
|
+
export declare function isSharedAccountFolder(folderId: string): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Tells if a folder is a system one
|
|
53
|
+
* @param folderId
|
|
54
|
+
*/
|
|
55
|
+
export declare const isSystemFolder: (folderId: string) => boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Tells if a folder is a trashed folder
|
|
58
|
+
* @param folder
|
|
59
|
+
* @param folderId
|
|
60
|
+
*/
|
|
61
|
+
export declare const isTrashed: ({ folder, folderId }: {
|
|
62
|
+
folder?: Folder;
|
|
63
|
+
folderId?: string;
|
|
64
|
+
}) => boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Tells if a folder with the given id is a trash folder
|
|
67
|
+
* @param folderId
|
|
68
|
+
*/
|
|
69
|
+
export declare const isTrash: (folderId: string) => boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Tells if the current user has read permission on the given folder/link
|
|
72
|
+
* @param folder
|
|
73
|
+
*/
|
|
74
|
+
export declare const isReadAllowed: (folder: Folder) => boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Tells if the current user has write permission on the given folder/link
|
|
77
|
+
* @param folder
|
|
78
|
+
*/
|
|
79
|
+
export declare const isWriteAllowed: (folder: Folder) => boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Tells if the current user has insertion permission on the given folder/link
|
|
82
|
+
* @param folder
|
|
83
|
+
*/
|
|
84
|
+
export declare const isInsertAllowed: (folder: Folder) => boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Tells if the current user has subfolder creation permission on the given folder/link
|
|
87
|
+
* @param folder
|
|
88
|
+
*/
|
|
89
|
+
export declare const isCreateAllowed: (folder: Folder) => boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Tells if the current user has deletion permission on the given folder/link
|
|
92
|
+
* @param folder
|
|
93
|
+
*/
|
|
94
|
+
export declare const isDeleteAllowed: (folder: Folder) => boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Tells if the current user has administration permission on the given folder/link
|
|
97
|
+
* @param folder
|
|
98
|
+
*/
|
|
99
|
+
export declare const isAdministerAllowed: (folder: Folder) => boolean;
|
|
100
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
2
|
+
import { IdentityDescriptor } from '../types/identities';
|
|
3
|
+
type AccountItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
address: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function getSharedAccounts(): Promise<Array<AccountItem>>;
|
|
8
|
+
export declare function getDefaultAccount(): AccountItem | undefined;
|
|
9
|
+
export declare function getOrderedAccountIds(priorityAccountAddress?: string): Promise<Array<string>>;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the list of all the identities for the account. For each identity a type
|
|
12
|
+
* is give, by matching the email address with all the available addresses, or by
|
|
13
|
+
* setting a default one if the address does not match any of the available addresses.
|
|
14
|
+
*
|
|
15
|
+
* The function returns also an identity for each account for which the user is a delegate
|
|
16
|
+
* (sendAs or sendOnBehalfOf) if there is no an already existing identity
|
|
17
|
+
*/
|
|
18
|
+
export declare const getIdentitiesDescriptors: () => Array<IdentityDescriptor>;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param identity
|
|
22
|
+
* @param t
|
|
23
|
+
*/
|
|
24
|
+
export declare const getIdentityDescription: (identity: IdentityDescriptor, t: TFunction) => string | null;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useInitializeTags: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useUpdateView: () => void;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export * from './components/breadcrumbs/static-breadcrumbs';
|
|
2
|
+
export * from './components/sidebar/sidebar-accordion-mui';
|
|
3
|
+
export * from './components/modals/modal-footer';
|
|
4
|
+
export * from './components/modals/modal-header';
|
|
5
|
+
export * from './components/modals/folder-initialization-error-modal';
|
|
6
|
+
export * from './components/select/folders/folders-accordion';
|
|
7
|
+
export * from './components/select/folders/flat-folder';
|
|
8
|
+
export * from './components/select/folders/flat-folders';
|
|
9
|
+
export * from './components/select/folders/folder-accordions-custom-component';
|
|
10
|
+
export * from './components/select/folders/folder-selector';
|
|
11
|
+
export * from './components/select/folders/flat-root';
|
|
12
|
+
export * from './components/select/folders/status-icon';
|
|
13
|
+
export * from './components/select/folders/hooks';
|
|
14
|
+
export * from './components/select/folders/utils';
|
|
15
|
+
export * from './components/select/select-label-factory';
|
|
16
|
+
export * from './components/select/color-select';
|
|
17
|
+
export * from './components/select/folders-selector';
|
|
18
|
+
export * from './components/list/list-item';
|
|
19
|
+
export * from './components/list/list';
|
|
20
|
+
export * from './components/tags/delete-tag-modal';
|
|
21
|
+
export * from './hooks/use-initialize-folders';
|
|
22
|
+
export * from './hooks/use-update-view';
|
|
23
|
+
export * from './hooks/use-initialize-tags';
|
|
24
|
+
export * from './utils/utils';
|
|
25
|
+
export * from './utils/index';
|
|
26
|
+
export * from './utils/clipboard';
|
|
27
|
+
export * from './utils/get-prefs';
|
|
28
|
+
export * from './utils/use-prefs';
|
|
29
|
+
export * from './helpers/errors';
|
|
30
|
+
export * from './helpers/email-parser';
|
|
31
|
+
export * from './helpers/api-wrapper';
|
|
32
|
+
export * from './helpers/folders';
|
|
33
|
+
export * from './helpers/identities';
|
|
34
|
+
export * from './helpers/search';
|
|
35
|
+
export * from './helpers/use-history-navigation';
|
|
36
|
+
export * from './integrations/hooks';
|
|
37
|
+
export * from './integrations/constants';
|
|
38
|
+
export * from './integrations/default-contact-input';
|
|
39
|
+
export * from './integrations/search/use-run-search';
|
|
40
|
+
export * from './integrations/types';
|
|
41
|
+
export * from './soap/errors/generic-soap-api-error';
|
|
42
|
+
export * from './soap/errors/soap-api-error';
|
|
43
|
+
export * from './soap/no-op';
|
|
44
|
+
export * from './soap/get-share-info';
|
|
45
|
+
export * from './soap/get-folder';
|
|
46
|
+
export * from './soap/tags';
|
|
47
|
+
export * from './store/zustand/folder/hooks';
|
|
48
|
+
export * from './store/zustand/folder/utils';
|
|
49
|
+
export * from './store/zustand/folder/store';
|
|
50
|
+
export * from './store/zustand/tags/hooks';
|
|
51
|
+
export * from './store/zustand/tags/store';
|
|
52
|
+
export * from './store/zustand/tags/index';
|
|
53
|
+
export * from './constants/folders';
|
|
54
|
+
export * from './constants/utils/index';
|
|
55
|
+
export * from './constants/participants';
|
|
56
|
+
export * from './constants/search';
|
|
57
|
+
export * from './theme/theme-mui';
|
|
58
|
+
export * from './theme/theme';
|
|
59
|
+
export * from './worker/folder';
|
|
60
|
+
export * from './worker/tags';
|
|
61
|
+
export * from './worker/handle-message';
|
|
62
|
+
export * from './worker/utils';
|
|
63
|
+
export * from './worker';
|
|
64
|
+
export * from './types';
|
|
65
|
+
export * from './types/actions';
|
|
66
|
+
export * from './types/folder';
|
|
67
|
+
export * from './types/i18next';
|
|
68
|
+
export * from './types/identities';
|
|
69
|
+
export * from './types/modals';
|
|
70
|
+
export * from './types/select';
|
|
71
|
+
export * from './types/sidebar';
|
|
72
|
+
export * from './types/soap';
|
|
73
|
+
export * from './types/emotion';
|
|
74
|
+
export * from './types/tags';
|
|
75
|
+
export * from './types/workers';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ContactInputProps } from './types';
|
|
3
|
+
export declare const DefaultContactInput: ({ onChange, defaultValue, dragAndDropEnabled: _dragAndDropEnabled, orderedAccountIds: _orderedAccountIds, chipLabelFactory: _labelFactory, ...rest }: ContactInputProps) => React.JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ChipInputProps, ChipItem } from '@zextras/carbonio-design-system';
|
|
2
|
+
type RequiredEmailLabelChipItem<T> = Required<Pick<ChipItem<T>, 'value'>> & Required<Pick<ChipItem<T>, 'label'>> & Omit<ChipItem<T>, 'label' | 'value'>;
|
|
3
|
+
export type ContactType = {
|
|
4
|
+
GROUP: 'CONTACT_GROUP';
|
|
5
|
+
DISTRIBUTION_LIST: 'DISTRIBUTION_LIST';
|
|
6
|
+
CONTACT: 'CONTACT';
|
|
7
|
+
};
|
|
8
|
+
export type UserContact = {
|
|
9
|
+
id: string;
|
|
10
|
+
firstName?: string;
|
|
11
|
+
middleName?: string;
|
|
12
|
+
lastName?: string;
|
|
13
|
+
fullName?: string;
|
|
14
|
+
company?: string;
|
|
15
|
+
email: string;
|
|
16
|
+
type: ContactType['CONTACT'];
|
|
17
|
+
};
|
|
18
|
+
export type DistributionListContact = {
|
|
19
|
+
id: string;
|
|
20
|
+
email: string;
|
|
21
|
+
type: ContactType['DISTRIBUTION_LIST'];
|
|
22
|
+
};
|
|
23
|
+
export type GroupContact = {
|
|
24
|
+
id: string;
|
|
25
|
+
display: string;
|
|
26
|
+
groupId: string;
|
|
27
|
+
type: ContactType['GROUP'];
|
|
28
|
+
};
|
|
29
|
+
export type UserOrDL = UserContact | DistributionListContact;
|
|
30
|
+
export type ContactInputItem = RequiredEmailLabelChipItem<UserOrDL>;
|
|
31
|
+
export type ContactInputValue = Array<ContactInputItem>;
|
|
32
|
+
export type ContactInputOnChange = ((items: ContactInputItem[]) => void) | undefined;
|
|
33
|
+
export type ContactInputItemInternalValue = GroupContact | DistributionListContact | UserContact;
|
|
34
|
+
export type ContactInputProps = Pick<ChipInputProps, 'icon' | 'iconAction' | 'placeholder' | 'background' | 'iconDisabled' | 'description' | 'hasError' | 'inputRef' | 'disabled' | 'maxChips'> & {
|
|
35
|
+
onChange?: ContactInputOnChange;
|
|
36
|
+
defaultValue: Array<ContactInputItem>;
|
|
37
|
+
dragAndDropEnabled?: boolean;
|
|
38
|
+
orderedAccountIds?: Array<string>;
|
|
39
|
+
chipLabelFactory?: (value: ContactInputItemInternalValue, defaultLabel: string) => string;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
2
|
+
import { SoapApiError } from './soap-api-error';
|
|
3
|
+
/**
|
|
4
|
+
* Implements a generic API error which can be used when no specific error is available
|
|
5
|
+
*/
|
|
6
|
+
export declare class GenericSoapApiError extends SoapApiError {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the generic localized message for the error
|
|
9
|
+
* @param t - The translation function
|
|
10
|
+
* @returns The localized message
|
|
11
|
+
*/
|
|
12
|
+
getLocalizedMessage(t: TFunction): string;
|
|
13
|
+
}
|