jamespot-react-components 1.0.207 → 1.0.208
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/build/jamespot-react-components.js +1078 -1003
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Drives/MicrosoftGraph/App365AccessDenied.d.ts +3 -0
- package/build/src/components/Drives/MicrosoftGraph/App365Account.d.ts +17 -0
- package/build/src/components/Drives/MicrosoftGraph/App365Documents.d.ts +20 -0
- package/build/src/components/Drives/MicrosoftGraph/App365Groups.d.ts +19 -0
- package/build/src/components/Drives/MicrosoftGraph/App365IsEmpty.d.ts +3 -0
- package/build/src/components/Drives/MicrosoftGraph/App365Tenants.d.ts +9 -0
- package/build/src/components/Drives/MicrosoftGraph/JRCApp365.d.ts +30 -0
- package/build/src/components/Drives/MicrosoftGraph/components/EntityAvarar.d.ts +6 -0
- package/build/src/components/Drives/MicrosoftGraph/components/EntityItem.d.ts +14 -0
- package/build/src/components/Drives/MicrosoftGraph/components/EntityItemSelection.d.ts +5 -0
- package/build/src/components/Drives/MicrosoftGraph/components/EntityItemTitle.d.ts +10 -0
- package/build/src/components/Drives/MicrosoftGraph/components/TenantEntityItem.d.ts +7 -0
- package/build/src/components/Drives/components/DriveFiltererList.d.ts +60 -0
- package/build/src/components/Drives/components/DriveItem.d.ts +7 -0
- package/build/src/components/Drives/drive.const.d.ts +2 -0
- package/build/src/components/Drives/drive.style.d.ts +3 -0
- package/build/src/components/Drives/hooks.d.ts +40 -0
- package/build/src/components/Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw.d.ts +13 -2
- package/build/src/components/JRCCommentsBloc/JRCComment.d.ts +18 -3
- package/build/src/components/JRCCommentsBloc/JRCCommentsBloc.d.ts +14 -2
- package/build/src/index.d.ts +1 -0
- package/build/src/styles/theme.d.ts +7 -0
- package/build/src/utils/utils.array.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ApiWrapper, DriveAccount, DriveGetAccount, DriveGetAccountParams, DriveLogoutParams, DriveSetDefaultAccountParams } from 'jamespot-user-api';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type App365AccountProps = {
|
|
4
|
+
accounts?: DriveAccount[];
|
|
5
|
+
activeAccount?: DriveAccount;
|
|
6
|
+
isLogged: boolean;
|
|
7
|
+
onLogout: () => void;
|
|
8
|
+
onLogin: (account: DriveAccount) => void;
|
|
9
|
+
onSetDefaultAccount: (account: DriveAccount) => void;
|
|
10
|
+
requests: {
|
|
11
|
+
getAccount: (params: DriveGetAccountParams) => Promise<ApiWrapper<DriveGetAccount>>;
|
|
12
|
+
logout: (params: DriveLogoutParams) => Promise<ApiWrapper<boolean>>;
|
|
13
|
+
setDefaultAccount: (params: DriveSetDefaultAccountParams) => Promise<ApiWrapper<boolean>>;
|
|
14
|
+
};
|
|
15
|
+
onLoginError: (errorMsg?: string) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const App365Account: ({ accounts, activeAccount, onLogout, onLogin, onSetDefaultAccount, requests, isLogged, onLoginError, }: App365AccountProps) => React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ApiWrapper, DriveDocumentParams, DriveGetDocumentsParams, MSDocumentEntity, MSUnifiedEntity } from 'jamespot-user-api';
|
|
3
|
+
type App365DocumentsProps = {
|
|
4
|
+
driveDocumentParams: DriveDocumentParams;
|
|
5
|
+
initialFolderColor?: string;
|
|
6
|
+
useNavigation: boolean;
|
|
7
|
+
useFilter: boolean;
|
|
8
|
+
useDocumentFilters: string[];
|
|
9
|
+
onClick: (entity: MSUnifiedEntity) => void;
|
|
10
|
+
onSelect?: (entity: MSUnifiedEntity) => void;
|
|
11
|
+
onSelectDocument?: (entity: MSUnifiedEntity) => void;
|
|
12
|
+
onSelectMultiDocument?: (entity: MSUnifiedEntity) => void;
|
|
13
|
+
onError?: (code: string) => void;
|
|
14
|
+
driveRequests: {
|
|
15
|
+
documents: (params: DriveGetDocumentsParams) => Promise<ApiWrapper<MSDocumentEntity[]>>;
|
|
16
|
+
};
|
|
17
|
+
id: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const App365Documents: (props: App365DocumentsProps) => React.JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ApiWrapper, DriveGetGroupsParams, MSGroupEntity } from 'jamespot-user-api';
|
|
3
|
+
export declare const CSSSearchAndFilters: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const CSSSearch: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const LoaderWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
type App365GroupsProps = {
|
|
7
|
+
useFilter: boolean;
|
|
8
|
+
initialFolderColor?: string;
|
|
9
|
+
useNavigation: boolean;
|
|
10
|
+
onSelect?: (entity: MSGroupEntity) => void;
|
|
11
|
+
onClick: (entity: MSGroupEntity) => void;
|
|
12
|
+
onError?: (code: string) => void;
|
|
13
|
+
driveRequests: {
|
|
14
|
+
groups: (params: DriveGetGroupsParams) => Promise<ApiWrapper<MSGroupEntity[]>>;
|
|
15
|
+
};
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const App365Groups: ({ useFilter, useNavigation, onSelect, onClick, driveRequests, onError, id, }: App365GroupsProps) => React.JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ApiWrapper, DriveGetTenantsParams, MSTenantEntity } from 'jamespot-user-api';
|
|
3
|
+
export declare const App365Tenants: ({ initialFolderColor, onClick, onError, request, id, }: {
|
|
4
|
+
initialFolderColor?: string | undefined;
|
|
5
|
+
onClick: (entity: MSTenantEntity) => void;
|
|
6
|
+
onError?: ((code: string) => void) | undefined;
|
|
7
|
+
request: (params: DriveGetTenantsParams) => Promise<ApiWrapper<MSTenantEntity[]>>;
|
|
8
|
+
id: string;
|
|
9
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ApiWrapper, DriveAccount, DriveDocumentParams, DriveGetAccount, DriveGetAccountParams, DriveGetDocumentsParams, DriveGetGroupsParams, DriveGetTenantsParams, DriveItemType, DriveLogoutParams, DriveSetDefaultAccountParams, MSDocumentEntity, MSGroupEntity, MSTenantEntity, MSUnifiedEntity } from 'jamespot-user-api';
|
|
3
|
+
type JRCApp365Props = {
|
|
4
|
+
initialParams?: DriveDocumentParams;
|
|
5
|
+
initialFolder?: DriveItemType;
|
|
6
|
+
initialFolderColor?: string;
|
|
7
|
+
useNavigation?: boolean;
|
|
8
|
+
useFilter?: boolean;
|
|
9
|
+
useDocumentFilters: string[];
|
|
10
|
+
onSelect?: (item: MSUnifiedEntity, driveParams: DriveDocumentParams) => void;
|
|
11
|
+
onSelectMultiDocument?: (items: MSUnifiedEntity[], driveParams: DriveDocumentParams) => void;
|
|
12
|
+
onSelectDocument?: (item: MSUnifiedEntity, lastFolder: MSUnifiedEntity | undefined, driveParams: DriveDocumentParams) => void;
|
|
13
|
+
onError?: (code?: string) => void;
|
|
14
|
+
driveRequests: {
|
|
15
|
+
documents: (params: DriveGetDocumentsParams) => Promise<ApiWrapper<MSDocumentEntity[]>>;
|
|
16
|
+
groups: (params: DriveGetGroupsParams) => Promise<ApiWrapper<MSGroupEntity[]>>;
|
|
17
|
+
tenants: (params: DriveGetTenantsParams) => Promise<ApiWrapper<MSTenantEntity[]>>;
|
|
18
|
+
listAccount?: (service: string) => Promise<ApiWrapper<DriveAccount[]>>;
|
|
19
|
+
isAccountLogged?: (service: string, id: string) => Promise<ApiWrapper<boolean>>;
|
|
20
|
+
checkAccountToken?: (service: string) => Promise<ApiWrapper<boolean>>;
|
|
21
|
+
getAccount?: (service: DriveGetAccountParams) => Promise<ApiWrapper<DriveGetAccount>>;
|
|
22
|
+
logout?: (params: DriveLogoutParams) => Promise<ApiWrapper<boolean>>;
|
|
23
|
+
setDefaultAccount?: (params: DriveSetDefaultAccountParams) => Promise<ApiWrapper<boolean>>;
|
|
24
|
+
};
|
|
25
|
+
handleLogin?: boolean;
|
|
26
|
+
onLogin?: (account: DriveAccount) => void;
|
|
27
|
+
onLogout?: () => void;
|
|
28
|
+
};
|
|
29
|
+
export declare const JRCApp365: ({ initialParams, initialFolder, initialFolderColor, useDocumentFilters, useFilter, useNavigation, onSelect, onSelectDocument, onSelectMultiDocument, onError, driveRequests, handleLogin, onLogin, }: JRCApp365Props) => React.JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MSUnifiedEntity } from 'jamespot-user-api';
|
|
3
|
+
export declare const CSSEntity: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const CSSEntityAvatar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const CSSEntityAvatarHover: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const EntityItem: ({ entity, initialFolderColor, useNavigation, onSelect, onSelectDocument, onSelectMultiDocument, onClick, }: {
|
|
7
|
+
entity: MSUnifiedEntity;
|
|
8
|
+
initialFolderColor?: string | undefined;
|
|
9
|
+
useNavigation: boolean;
|
|
10
|
+
onSelect?: ((entity: MSUnifiedEntity) => void) | undefined;
|
|
11
|
+
onSelectDocument?: ((entity: MSUnifiedEntity) => void) | undefined;
|
|
12
|
+
onSelectMultiDocument?: ((entity: MSUnifiedEntity) => void) | undefined;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const CSSTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const CSSTitleA: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const EntityItemTitle: ({ title, type, url, useNavigation, onClick, }: {
|
|
5
|
+
title: string;
|
|
6
|
+
type: string;
|
|
7
|
+
url?: string | undefined;
|
|
8
|
+
useNavigation: boolean;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MSTenantEntity } from 'jamespot-user-api';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const TenantEntityItem: ({ entity, initialFolderColor, onClick, }: {
|
|
4
|
+
entity: MSTenantEntity;
|
|
5
|
+
initialFolderColor?: string | undefined;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { MSUnifiedEntity } from 'jamespot-user-api';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* We need to apply the type order at the end to split folders and documents
|
|
5
|
+
*/
|
|
6
|
+
export declare const alphabeticallyOrder: <T extends {
|
|
7
|
+
title: string;
|
|
8
|
+
type: string;
|
|
9
|
+
}>(array: T[], sortBy: 'ASC' | 'DESC') => T[];
|
|
10
|
+
export declare const visibilityFilter: <T extends {
|
|
11
|
+
type: string;
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
visibility?: "public" | "private" | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
type: string;
|
|
17
|
+
id: string;
|
|
18
|
+
title: string;
|
|
19
|
+
mimetype?: string | undefined;
|
|
20
|
+
size?: number | undefined;
|
|
21
|
+
webUrl?: string | undefined;
|
|
22
|
+
}>(array: T[], filters: Array<'public' | 'private'>) => T[];
|
|
23
|
+
export declare const typeFilter: <T extends {
|
|
24
|
+
type: string;
|
|
25
|
+
id: string;
|
|
26
|
+
title: string;
|
|
27
|
+
visibility?: "public" | "private" | undefined;
|
|
28
|
+
} & {
|
|
29
|
+
type: string;
|
|
30
|
+
id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
mimetype?: string | undefined;
|
|
33
|
+
size?: number | undefined;
|
|
34
|
+
webUrl?: string | undefined;
|
|
35
|
+
}>(array: T[], filters: string[]) => T[];
|
|
36
|
+
export declare function useFilters<T extends MSUnifiedEntity>(initialEntities: T[], query: string): {
|
|
37
|
+
visibility: ("public" | "private")[];
|
|
38
|
+
setVisibility: React.Dispatch<React.SetStateAction<("public" | "private")[]>>;
|
|
39
|
+
types: string[];
|
|
40
|
+
setTypes: React.Dispatch<React.SetStateAction<string[]>>;
|
|
41
|
+
entities: T[];
|
|
42
|
+
};
|
|
43
|
+
export declare const CSSFilterHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
44
|
+
export declare const DriveFiltererList: <T extends {
|
|
45
|
+
type: string;
|
|
46
|
+
id: string;
|
|
47
|
+
title: string;
|
|
48
|
+
visibility?: "public" | "private" | undefined;
|
|
49
|
+
} & {
|
|
50
|
+
type: string;
|
|
51
|
+
id: string;
|
|
52
|
+
title: string;
|
|
53
|
+
mimetype?: string | undefined;
|
|
54
|
+
size?: number | undefined;
|
|
55
|
+
webUrl?: string | undefined;
|
|
56
|
+
}>({ initialEntities, renderItem, filters, }: {
|
|
57
|
+
initialEntities: T[];
|
|
58
|
+
filters: Array<'visibility' | 'alpha' | 'document'>;
|
|
59
|
+
renderItem: (entity: T) => void;
|
|
60
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const CSSTree: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const CSSTreeItem: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const CSSDriveApp: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ApiWrapper, DriveGetTenantsParams, MSGroupEntity, MSTenantEntity } from 'jamespot-user-api';
|
|
2
|
+
type ErrorType = {
|
|
3
|
+
error: number;
|
|
4
|
+
errorMsg: string;
|
|
5
|
+
messages: {
|
|
6
|
+
code: number;
|
|
7
|
+
msg: string;
|
|
8
|
+
}[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* This is only used inside App365. if you need to use it outside of this component, consider making it a slice
|
|
12
|
+
*/
|
|
13
|
+
export declare function useTenants({ request, id, }: {
|
|
14
|
+
request: (params: DriveGetTenantsParams) => Promise<ApiWrapper<MSTenantEntity[]>>;
|
|
15
|
+
id: string;
|
|
16
|
+
}): {
|
|
17
|
+
loading: boolean;
|
|
18
|
+
entities: {
|
|
19
|
+
type: string;
|
|
20
|
+
title: string;
|
|
21
|
+
name?: "group" | "groups" | "sites" | "onedrive" | "documents" | "me" | undefined;
|
|
22
|
+
}[];
|
|
23
|
+
error: ErrorType | undefined;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* This is only used inside App365. if you need to use it outside of this component, consider making it a slice
|
|
27
|
+
*/
|
|
28
|
+
export declare function useGroups({ request, }: {
|
|
29
|
+
request: (query?: string, filter?: string) => Promise<ApiWrapper<MSGroupEntity[]>>;
|
|
30
|
+
}): {
|
|
31
|
+
loading: boolean;
|
|
32
|
+
entities: {
|
|
33
|
+
type: string;
|
|
34
|
+
id: string;
|
|
35
|
+
title: string;
|
|
36
|
+
visibility?: "public" | "private" | undefined;
|
|
37
|
+
}[];
|
|
38
|
+
error: ErrorType | undefined;
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import jamespot, { Drive, FileCopyParams, jFileLittle, Network } from 'jamespot-user-api';
|
|
1
|
+
import jamespot, { ApiWrapper, Drive, DriveAccount, DriveGetDocumentParams, DriveGetDocumentsParams, DriveGetGroupsParams, DriveGetTenantsParams, FileCopyParams, jFileLittle, MSDocumentEntity, MSGroupEntity, MSTenantEntity, Network } from 'jamespot-user-api';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { WrappedFieldInputProps } from 'redux-form';
|
|
4
4
|
export type DriveOrFilebank = Drive | 'fileBank';
|
|
@@ -13,8 +13,8 @@ export interface JRCInputFileAdavancedProps extends React.ComponentPropsWithoutR
|
|
|
13
13
|
multiple?: boolean;
|
|
14
14
|
accept?: 'image/png' | 'image/jpg' | 'image/png, image/jpg' | 'image/png, image/jpeg, image/jpg' | 'image/pdf' | 'image/doc' | 'image/pdf, image/doc' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.oasis.opendocument.spreadsheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.oasis.opendocument.text,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.oasis.opendocument.presentation';
|
|
15
15
|
input?: WrappedFieldInputProps;
|
|
16
|
+
onUploadSuccess?: (response: jFileLittle, token?: string) => void;
|
|
16
17
|
network?: Pick<Network, 'token' | 'postFile' | 'getUrl'>;
|
|
17
|
-
onUploadSuccess?: (response: jFileLittle, token: string) => void;
|
|
18
18
|
onDeleteSuccess?: (index: number) => void;
|
|
19
19
|
onUploadStart?: (count?: number) => void;
|
|
20
20
|
existingFiles?: Array<jFileLittle>;
|
|
@@ -26,5 +26,16 @@ export interface JRCInputFileAdavancedProps extends React.ComponentPropsWithoutR
|
|
|
26
26
|
getDocuments: (uri: string) => ReturnType<typeof jamespot.filebank.getDocuments>;
|
|
27
27
|
copyFile: (params: FileCopyParams) => ReturnType<typeof jamespot.file.copy>;
|
|
28
28
|
};
|
|
29
|
+
dispatchOnError?: (code?: string) => void;
|
|
30
|
+
msGraphRequests?: {
|
|
31
|
+
documents: (params: DriveGetDocumentsParams) => Promise<ApiWrapper<MSDocumentEntity[]>>;
|
|
32
|
+
groups: (params: DriveGetGroupsParams) => Promise<ApiWrapper<MSGroupEntity[]>>;
|
|
33
|
+
tenants: (params: DriveGetTenantsParams) => Promise<ApiWrapper<MSTenantEntity[]>>;
|
|
34
|
+
getDocument: (params: DriveGetDocumentParams) => Promise<ApiWrapper<jFileLittle>>;
|
|
35
|
+
listAccount: (service: string) => Promise<ApiWrapper<DriveAccount[]>>;
|
|
36
|
+
isAccountLogged: (service: string, id: string) => Promise<ApiWrapper<boolean>>;
|
|
37
|
+
checkAccountToken: (service: string) => Promise<ApiWrapper<boolean>>;
|
|
38
|
+
};
|
|
39
|
+
directFilePopupOpening?: boolean;
|
|
29
40
|
}
|
|
30
41
|
export declare const JRCInputFileAdvancedRaw: React.ForwardRefExoticComponent<JRCInputFileAdavancedProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import jamespot, { AddRemoveActionParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jUserView } from 'jamespot-user-api';
|
|
1
|
+
import jamespot, { AddRemoveActionParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jUserView, DriveGetDocumentsParams, ApiWrapper, MSDocumentEntity, DriveGetGroupsParams, MSGroupEntity, DriveGetTenantsParams, MSTenantEntity, DriveGetDocumentParams, jFileLittle, DriveAccount, DriveGetAccountParams, DriveGetAccount, DriveLogoutParams, DriveSetDefaultAccountParams } from 'jamespot-user-api';
|
|
2
2
|
import { jCommentList } from 'jamespot-user-api/lib/src/types/comment';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { JRCInputTinyMCERawProps } from 'types';
|
|
4
|
+
import { DriveOrFilebank, JRCInputTinyMCERawProps } from 'types';
|
|
5
|
+
import { JRCInputFileAdavancedProps } from '../Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw';
|
|
5
6
|
export type JRCCommentProps = {
|
|
6
7
|
isFocused: boolean;
|
|
7
8
|
comment: jCommentList;
|
|
@@ -24,6 +25,20 @@ export type JRCCommentProps = {
|
|
|
24
25
|
onGetHashError: (message?: string) => void;
|
|
25
26
|
socialActionAdd: ({ targetId, targetType, type, }: AddRemoveActionParams) => ReturnType<typeof jamespot.socialAction.add>;
|
|
26
27
|
existingWidgetsWrapperComponent: (comment: Partial<jCommentList>, content: WidgetWrapperProps[], mode: WidgetDisplayMode, inplace: boolean, idComment: number, editRight?: boolean, deleteRight?: boolean) => React.ReactNode;
|
|
28
|
+
activeDrives: DriveOrFilebank[];
|
|
29
|
+
fileBankRequests: Required<JRCInputFileAdavancedProps>['fileBankRequests'];
|
|
30
|
+
msGraphRequests: {
|
|
31
|
+
documents: (params: DriveGetDocumentsParams) => Promise<ApiWrapper<MSDocumentEntity[]>>;
|
|
32
|
+
groups: (params: DriveGetGroupsParams) => Promise<ApiWrapper<MSGroupEntity[]>>;
|
|
33
|
+
tenants: (params: DriveGetTenantsParams) => Promise<ApiWrapper<MSTenantEntity[]>>;
|
|
34
|
+
getDocument: (params: DriveGetDocumentParams) => Promise<ApiWrapper<jFileLittle>>;
|
|
35
|
+
listAccount: (service: string) => Promise<ApiWrapper<DriveAccount[]>>;
|
|
36
|
+
isAccountLogged: (service: string, id: string) => Promise<ApiWrapper<boolean>>;
|
|
37
|
+
checkAccountToken: (service: string) => Promise<ApiWrapper<boolean>>;
|
|
38
|
+
getAccount: (service: DriveGetAccountParams) => Promise<ApiWrapper<DriveGetAccount>>;
|
|
39
|
+
logout: (params: DriveLogoutParams) => Promise<ApiWrapper<boolean>>;
|
|
40
|
+
setDefaultAccount: (params: DriveSetDefaultAccountParams) => Promise<ApiWrapper<boolean>>;
|
|
41
|
+
};
|
|
27
42
|
};
|
|
28
43
|
export declare const DropdownButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
29
|
-
export declare const JRCComment: ({ isFocused, comment, token, tinyMCEConfig, onCommentUpdate, onCommentDelete, fetchUser, fetchUserFields, fetchSocialActionUserList, removeAction, onError, highlightFields, userModel, userAccountStatus, isWedocActive, isWidgetActive, getAccessHash, onGetHashError, socialActionAdd, deleteFile, existingWidgetsWrapperComponent, }: JRCCommentProps) => React.JSX.Element;
|
|
44
|
+
export declare const JRCComment: ({ isFocused, comment, token, tinyMCEConfig, onCommentUpdate, onCommentDelete, fetchUser, fetchUserFields, fetchSocialActionUserList, removeAction, onError, highlightFields, userModel, userAccountStatus, isWedocActive, isWidgetActive, getAccessHash, onGetHashError, socialActionAdd, deleteFile, existingWidgetsWrapperComponent, activeDrives, fileBankRequests, msGraphRequests, }: JRCCommentProps) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import jamespot, { AddCommentParams, AddRemoveActionParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jUserList, jUserView } from 'jamespot-user-api';
|
|
1
|
+
import jamespot, { AddCommentParams, AddRemoveActionParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jFileLittle, jUserList, jUserView, ApiWrapper, MSDocumentEntity, MSGroupEntity, MSTenantEntity, DriveAccount, DriveGetDocumentParams, DriveGetAccountParams, DriveLogoutParams, DriveGetAccount, DriveSetDefaultAccountParams, DriveGetTenantsParams, DriveGetDocumentsParams, DriveGetGroupsParams } from 'jamespot-user-api';
|
|
2
2
|
import { jCommentList } from 'jamespot-user-api/lib/src/types/comment';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { JRCInputTinyMCERawProps } from '../Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
|
|
@@ -34,6 +34,18 @@ export type JRCCommentsBlocProps = {
|
|
|
34
34
|
variant?: 'modal' | 'inline';
|
|
35
35
|
canComment: boolean;
|
|
36
36
|
fileBankRequests: Required<JRCInputFileAdavancedProps>['fileBankRequests'];
|
|
37
|
+
msGraphRequests: {
|
|
38
|
+
documents: (params: DriveGetDocumentsParams) => Promise<ApiWrapper<MSDocumentEntity[]>>;
|
|
39
|
+
groups: (params: DriveGetGroupsParams) => Promise<ApiWrapper<MSGroupEntity[]>>;
|
|
40
|
+
tenants: (params: DriveGetTenantsParams) => Promise<ApiWrapper<MSTenantEntity[]>>;
|
|
41
|
+
getDocument: (params: DriveGetDocumentParams) => Promise<ApiWrapper<jFileLittle>>;
|
|
42
|
+
listAccount: (service: string) => Promise<ApiWrapper<DriveAccount[]>>;
|
|
43
|
+
isAccountLogged: (service: string, id: string) => Promise<ApiWrapper<boolean>>;
|
|
44
|
+
checkAccountToken: (service: string) => Promise<ApiWrapper<boolean>>;
|
|
45
|
+
getAccount: (service: DriveGetAccountParams) => Promise<ApiWrapper<DriveGetAccount>>;
|
|
46
|
+
logout: (params: DriveLogoutParams) => Promise<ApiWrapper<boolean>>;
|
|
47
|
+
setDefaultAccount: (params: DriveSetDefaultAccountParams) => Promise<ApiWrapper<boolean>>;
|
|
48
|
+
};
|
|
37
49
|
};
|
|
38
50
|
export declare const AvatarWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
39
|
-
export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, fetchUser, fetchUserFields, deleteFile, fetchSocialActionUserList, removeLike, onError, highlightFields, userModel, userAccountStatus, isWedocActive, getAccessHash, onGetHashError, activeDrives, socialActionAdd, variant, canComment, fileBankRequests, }: JRCCommentsBlocProps) => React.JSX.Element;
|
|
51
|
+
export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, fetchUser, fetchUserFields, deleteFile, fetchSocialActionUserList, removeLike, onError, highlightFields, userModel, userAccountStatus, isWedocActive, getAccessHash, onGetHashError, activeDrives, socialActionAdd, variant, canComment, fileBankRequests, msGraphRequests, }: JRCCommentsBlocProps) => React.JSX.Element;
|
package/build/src/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export { default as Resources } from './translation';
|
|
|
28
28
|
export { JRC404 } from './components/404';
|
|
29
29
|
export { BETA_JRCDoubleClick } from './components/Beta/BETA_JRCDoubleClick/BETA_JRCDoubleClick';
|
|
30
30
|
export { BETA_JRCDragAndDrop } from './components/Beta/BETA_JRCDragAndDrop/BETA_JRCDragAndDrop';
|
|
31
|
+
export { JRCApp365 } from './components/Drives/MicrosoftGraph/JRCApp365';
|
|
31
32
|
export { JRCConditionalWrapper } from './components/Common/JRCConditionalWrapper';
|
|
32
33
|
export { JRCDraggingPlaceholder } from './components/Common/JRCDraggingPlaceholder';
|
|
33
34
|
export { ClickAwayListener } from './components/Form/Common/ClickAwayListener';
|
|
@@ -66,6 +66,13 @@ export type ThemeType = {
|
|
|
66
66
|
l: number;
|
|
67
67
|
xl: number;
|
|
68
68
|
};
|
|
69
|
+
size: {
|
|
70
|
+
xs: number;
|
|
71
|
+
sm: number;
|
|
72
|
+
md: number;
|
|
73
|
+
l: number;
|
|
74
|
+
xl: number;
|
|
75
|
+
};
|
|
69
76
|
};
|
|
70
77
|
export declare function getColor(theme: ThemeType, color: string): string;
|
|
71
78
|
declare const Theme: ITheme;
|
|
@@ -19,4 +19,5 @@ export declare const arrayUniqueByUri: <T extends {
|
|
|
19
19
|
uri: string;
|
|
20
20
|
}>(arr1: T[], arr2: T[]) => T[];
|
|
21
21
|
export declare const arraySwapElements: <T>(arr: T[], index1: number, index2: number) => T[];
|
|
22
|
+
export declare function strArrayToggle(str: string, array: string[]): string[];
|
|
22
23
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.208",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"chroma-js": "^2.1.1",
|
|
81
81
|
"classnames": "^2.3.1",
|
|
82
82
|
"dompurify": "^3.0.5",
|
|
83
|
-
"jamespot-user-api": "^1.0.
|
|
83
|
+
"jamespot-user-api": "^1.0.186",
|
|
84
84
|
"moment": "2.29.4",
|
|
85
85
|
"react": "^17.x",
|
|
86
86
|
"react-beautiful-dnd": "^13.1.1",
|