jamespot-react-components 1.0.211 → 1.0.213
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 +765 -750
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Drives/Dropbox/DropboxDocuments.d.ts +23 -0
- package/build/src/components/Drives/JRCDriveDropbox.d.ts +23 -0
- package/build/src/components/Drives/JRCDriveMSGraph.d.ts +24 -0
- package/build/src/components/Drives/MicrosoftGraph/{App365AccessDenied.d.ts → MSGraphAccessDenied.d.ts} +1 -1
- package/build/src/components/Drives/MicrosoftGraph/{App365Documents.d.ts → MSGraphDocuments.d.ts} +7 -6
- package/build/src/components/Drives/MicrosoftGraph/{App365Groups.d.ts → MSGraphGroups.d.ts} +6 -5
- package/build/src/components/Drives/MicrosoftGraph/MSGraphTenants.d.ts +12 -0
- package/build/src/components/Drives/components/DriveAccountHeader.d.ts +20 -0
- package/build/src/components/Drives/{MicrosoftGraph/App365IsEmpty.d.ts → components/DriveIsEmpty.d.ts} +1 -1
- package/build/src/components/Drives/{MicrosoftGraph/components/EntityAvarar.d.ts → components/EntityAvatar.d.ts} +1 -1
- package/build/src/components/Drives/components/EntityItem.d.ts +35 -0
- package/build/src/components/Drives/drive.const.d.ts +2 -1
- package/build/src/components/Drives/drive.types.d.ts +2 -0
- package/build/src/components/Drives/hooks.d.ts +6 -3
- package/build/src/components/Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw.d.ts +10 -16
- package/build/src/components/JRCButton/JRCButton.d.ts +3 -0
- package/build/src/components/JRCButtonDropdown/JRCButtonDropdown.styles.d.ts +1 -0
- package/build/src/components/JRCCommentsBloc/JRCComment.d.ts +17 -15
- package/build/src/components/JRCCommentsBloc/JRCCommentsBloc.d.ts +18 -15
- package/build/src/components/JRCDropDown/JRCDropDown.d.ts +1 -1
- package/build/src/components/JRCFolders/JRCFolders.d.ts +1 -1
- package/build/src/components/JRCFolders/JRCFolders.stories.d.ts +1 -1
- package/build/src/components/JRCFolders/types.d.ts +4 -4
- package/build/src/components/api/jamespot/mock_jamespot.d.ts +2 -2
- package/build/src/hooks/useAbortController.d.ts +1 -0
- package/build/src/index.d.ts +3 -1
- package/package.json +2 -2
- package/build/src/components/Drives/MicrosoftGraph/App365Account.d.ts +0 -17
- package/build/src/components/Drives/MicrosoftGraph/App365Tenants.d.ts +0 -9
- package/build/src/components/Drives/MicrosoftGraph/JRCApp365.d.ts +0 -31
- package/build/src/components/Drives/MicrosoftGraph/components/EntityItem.d.ts +0 -14
- /package/build/src/components/Drives/{MicrosoftGraph/components → components}/EntityItemSelection.d.ts +0 -0
- /package/build/src/components/Drives/{MicrosoftGraph/components → components}/EntityItemTitle.d.ts +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DropboxDocumentEntity } from 'jamespot-user-api';
|
|
3
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
4
|
+
export declare const LoaderWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
type DropboxDocumentsProps = {
|
|
6
|
+
path: string;
|
|
7
|
+
initialFolderColor?: string;
|
|
8
|
+
useNavigation: boolean;
|
|
9
|
+
useFilter: boolean;
|
|
10
|
+
useDocumentFilters: string[];
|
|
11
|
+
onClick: (entity: DropboxDocumentEntity) => void;
|
|
12
|
+
onSelect?: (entity: DropboxDocumentEntity) => void;
|
|
13
|
+
onSelectDocument?: (entity: DropboxDocumentEntity) => void;
|
|
14
|
+
onSelectMultiDocument?: (entity: DropboxDocumentEntity) => void;
|
|
15
|
+
onError?: (code: string) => void;
|
|
16
|
+
handlers: {
|
|
17
|
+
drive: Pick<JDriveApi, 'dropboxDocuments'>;
|
|
18
|
+
};
|
|
19
|
+
id: string;
|
|
20
|
+
service: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const DropboxDocuments: (props: DropboxDocumentsProps) => React.JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DriveAccount, DriveItemType, DropboxDocumentEntity } from 'jamespot-user-api';
|
|
3
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
4
|
+
type JRCDriveDropboxProps = {
|
|
5
|
+
initialFolder?: DriveItemType;
|
|
6
|
+
initialFolderColor?: string;
|
|
7
|
+
useNavigation?: boolean;
|
|
8
|
+
useFilter?: boolean;
|
|
9
|
+
useDocumentFilters: string[];
|
|
10
|
+
onSelect?: (item: DropboxDocumentEntity) => void;
|
|
11
|
+
onSelectMultiDocument?: (items: DropboxDocumentEntity[]) => void;
|
|
12
|
+
onSelectDocument?: (item: DropboxDocumentEntity, lastFolder: DropboxDocumentEntity | undefined) => void;
|
|
13
|
+
onError?: (code?: string) => void;
|
|
14
|
+
handlers: {
|
|
15
|
+
drive: Pick<JDriveApi, 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount'>;
|
|
16
|
+
};
|
|
17
|
+
handleLogin?: boolean;
|
|
18
|
+
onLogin?: (account: DriveAccount) => void;
|
|
19
|
+
onLogout?: () => void;
|
|
20
|
+
currentAccount?: DriveAccount;
|
|
21
|
+
};
|
|
22
|
+
export declare const JRCDriveDropbox: ({ initialFolder, initialFolderColor, useDocumentFilters, useFilter, useNavigation, onSelect, onSelectDocument, onSelectMultiDocument, onError, handlers, handleLogin, onLogin, currentAccount, }: JRCDriveDropboxProps) => React.JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DriveAccount, DriveItemType, MSDocumentParams, MSUnifiedEntity } from 'jamespot-user-api';
|
|
3
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
4
|
+
type JRCDriveMSGraphProps = {
|
|
5
|
+
initialParams?: MSDocumentParams;
|
|
6
|
+
initialFolder?: DriveItemType;
|
|
7
|
+
initialFolderColor?: string;
|
|
8
|
+
useNavigation?: boolean;
|
|
9
|
+
useFilter?: boolean;
|
|
10
|
+
useDocumentFilters: string[];
|
|
11
|
+
onSelect?: (item: MSUnifiedEntity, driveParams: MSDocumentParams) => void;
|
|
12
|
+
onSelectMultiDocument?: (items: MSUnifiedEntity[], driveParams: MSDocumentParams) => void;
|
|
13
|
+
onSelectDocument?: (item: MSUnifiedEntity, lastFolder: MSUnifiedEntity | undefined, driveParams: MSDocumentParams) => void;
|
|
14
|
+
onError?: (code?: string) => void;
|
|
15
|
+
handlers: {
|
|
16
|
+
drive: Pick<JDriveApi, 'msDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount'>;
|
|
17
|
+
};
|
|
18
|
+
handleLogin?: boolean;
|
|
19
|
+
onLogin?: (account: DriveAccount) => void;
|
|
20
|
+
onLogout?: () => void;
|
|
21
|
+
currentAccount?: DriveAccount;
|
|
22
|
+
};
|
|
23
|
+
export declare const JRCDriveMSGraph: ({ initialParams, initialFolder, initialFolderColor, useDocumentFilters, useFilter, useNavigation, onSelect, onSelectDocument, onSelectMultiDocument, onError, handlers, handleLogin, onLogin, currentAccount, }: JRCDriveMSGraphProps) => React.JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export declare const CSSIsEmpty: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const MSGraphAccessDenied: () => React.JSX.Element;
|
package/build/src/components/Drives/MicrosoftGraph/{App365Documents.d.ts → MSGraphDocuments.d.ts}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { MSDocumentParams, MSUnifiedEntity } from 'jamespot-user-api';
|
|
3
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
4
|
+
type MSGraphDocumentsProps = {
|
|
5
|
+
driveDocumentParams: MSDocumentParams;
|
|
5
6
|
initialFolderColor?: string;
|
|
6
7
|
useNavigation: boolean;
|
|
7
8
|
useFilter: boolean;
|
|
@@ -11,10 +12,10 @@ type App365DocumentsProps = {
|
|
|
11
12
|
onSelectDocument?: (entity: MSUnifiedEntity) => void;
|
|
12
13
|
onSelectMultiDocument?: (entity: MSUnifiedEntity) => void;
|
|
13
14
|
onError?: (code: string) => void;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
handlers: {
|
|
16
|
+
drive: Pick<JDriveApi, 'msDocuments'>;
|
|
16
17
|
};
|
|
17
18
|
id: string;
|
|
18
19
|
};
|
|
19
|
-
export declare const
|
|
20
|
+
export declare const MSGraphDocuments: (props: MSGraphDocumentsProps) => React.JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { MSGroupEntity } from 'jamespot-user-api';
|
|
3
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
3
4
|
export declare const CSSSearchAndFilters: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
5
|
export declare const CSSSearch: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
6
|
export declare const LoaderWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
-
type
|
|
7
|
+
type MSGraphGroupsProps = {
|
|
7
8
|
useFilter: boolean;
|
|
8
9
|
initialFolderColor?: string;
|
|
9
10
|
useNavigation: boolean;
|
|
10
11
|
onSelect?: (entity: MSGroupEntity) => void;
|
|
11
12
|
onClick: (entity: MSGroupEntity) => void;
|
|
12
13
|
onError?: (code: string) => void;
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
handlers: {
|
|
15
|
+
drive: Pick<JDriveApi, 'groups'>;
|
|
15
16
|
};
|
|
16
17
|
id: string;
|
|
17
18
|
};
|
|
18
|
-
export declare const
|
|
19
|
+
export declare const MSGraphGroups: ({ useFilter, useNavigation, onSelect, onClick, handlers, onError, id, }: MSGraphGroupsProps) => React.JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MSTenantEntity } from 'jamespot-user-api';
|
|
3
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
4
|
+
export declare const MSGraphTenants: ({ initialFolderColor, onClick, onError, handlers, id, }: {
|
|
5
|
+
initialFolderColor?: string | undefined;
|
|
6
|
+
onClick: (entity: MSTenantEntity) => void;
|
|
7
|
+
onError?: ((code: string) => void) | undefined;
|
|
8
|
+
handlers: {
|
|
9
|
+
drive: Pick<JDriveApi, 'tenants'>;
|
|
10
|
+
};
|
|
11
|
+
id: string;
|
|
12
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DriveAccount } from 'jamespot-user-api';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
4
|
+
import { DriveService } from '../drive.types';
|
|
5
|
+
export type DriveAccountHeaderProps = {
|
|
6
|
+
accounts?: DriveAccount[];
|
|
7
|
+
activeAccount?: DriveAccount;
|
|
8
|
+
isLogged: boolean;
|
|
9
|
+
onLogout: () => void;
|
|
10
|
+
onLogin: (account: DriveAccount) => void;
|
|
11
|
+
onSetDefaultAccount: (account: DriveAccount) => void;
|
|
12
|
+
handlers: {
|
|
13
|
+
drive: Pick<JDriveApi, 'getAccount' | 'logout' | 'setDefaultAccount'>;
|
|
14
|
+
};
|
|
15
|
+
onLoginError: (errorMsg?: string) => void;
|
|
16
|
+
service: DriveService;
|
|
17
|
+
description?: string;
|
|
18
|
+
onError?: (code: string) => void;
|
|
19
|
+
};
|
|
20
|
+
export declare const DriveAccountHeader: ({ accounts, activeAccount, onLogout, onLogin, onSetDefaultAccount, handlers, isLogged, onLoginError, service, description, onError, }: DriveAccountHeaderProps) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export declare const CSSIsEmpty: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const DriveIsEmpty: () => React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const EntityAvatar: ({ type, mimetype, initialFolderColor, }: {
|
|
3
3
|
type: string;
|
|
4
4
|
mimetype?: string | undefined;
|
|
5
5
|
initialFolderColor?: string | undefined;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const CSSEntity: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const CSSEntityAvatar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const CSSEntityAvatarHover: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const EntityItem: <T extends ({
|
|
6
|
+
type: string;
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
visibility?: "public" | "private" | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
type: string;
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
mimetype?: string | undefined;
|
|
15
|
+
size?: number | undefined;
|
|
16
|
+
webUrl?: string | undefined;
|
|
17
|
+
}) | {
|
|
18
|
+
type: string;
|
|
19
|
+
id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
_extend: {
|
|
22
|
+
path: string;
|
|
23
|
+
};
|
|
24
|
+
mimetype?: string | undefined;
|
|
25
|
+
size?: number | undefined;
|
|
26
|
+
webUrl?: string | undefined;
|
|
27
|
+
}>({ entity, initialFolderColor, useNavigation, onSelect, onSelectDocument, onSelectMultiDocument, onClick, }: {
|
|
28
|
+
entity: T;
|
|
29
|
+
initialFolderColor?: string | undefined;
|
|
30
|
+
useNavigation: boolean;
|
|
31
|
+
onSelect?: ((entity: T) => void) | undefined;
|
|
32
|
+
onSelectDocument?: ((entity: T) => void) | undefined;
|
|
33
|
+
onSelectMultiDocument?: ((entity: T) => void) | undefined;
|
|
34
|
+
onClick: () => void;
|
|
35
|
+
}) => React.JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ApiWrapper,
|
|
1
|
+
import { ApiWrapper, MSGroupEntity } from 'jamespot-user-api';
|
|
2
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
2
3
|
type ErrorType = {
|
|
3
4
|
error: number;
|
|
4
5
|
errorMsg: string;
|
|
@@ -10,8 +11,10 @@ type ErrorType = {
|
|
|
10
11
|
/**
|
|
11
12
|
* This is only used inside App365. if you need to use it outside of this component, consider making it a slice
|
|
12
13
|
*/
|
|
13
|
-
export declare function useTenants({
|
|
14
|
-
|
|
14
|
+
export declare function useTenants({ handlers, id }: {
|
|
15
|
+
handlers: {
|
|
16
|
+
drive: Pick<JDriveApi, 'tenants'>;
|
|
17
|
+
};
|
|
15
18
|
id: string;
|
|
16
19
|
}): {
|
|
17
20
|
loading: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Drive, JFileApi, JFilebankApi, jFileLittle, Network } from 'jamespot-user-api';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { WrappedFieldInputProps } from 'redux-form';
|
|
4
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
4
5
|
export type DriveOrFilebank = Drive | 'fileBank';
|
|
5
6
|
export interface JRCInputFileAdavancedProps extends React.ComponentPropsWithoutRef<'input'> {
|
|
6
7
|
required?: boolean;
|
|
@@ -20,22 +21,15 @@ export interface JRCInputFileAdavancedProps extends React.ComponentPropsWithoutR
|
|
|
20
21
|
existingFiles?: Array<jFileLittle>;
|
|
21
22
|
deleteFile?: (id: number) => Promise<void>;
|
|
22
23
|
activeDrives?: DriveOrFilebank[];
|
|
23
|
-
fileBankRequests?: {
|
|
24
|
-
getBanks: () => ReturnType<typeof jamespot.filebank.getBanks>;
|
|
25
|
-
getFolders: (uri: string) => ReturnType<typeof jamespot.filebank.getFolders>;
|
|
26
|
-
getDocuments: (uri: string) => ReturnType<typeof jamespot.filebank.getDocuments>;
|
|
27
|
-
copyFile: (params: FileCopyParams) => ReturnType<typeof jamespot.file.copy>;
|
|
28
|
-
};
|
|
29
24
|
dispatchOnError?: (code?: string) => void;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
handlers?: {
|
|
26
|
+
filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
|
|
27
|
+
file: Pick<JFileApi, 'copy'>;
|
|
28
|
+
drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
|
|
29
|
+
};
|
|
30
|
+
directFilePopupOpening?: {
|
|
31
|
+
open: boolean;
|
|
32
|
+
onClose: () => void;
|
|
38
33
|
};
|
|
39
|
-
directFilePopupOpening?: boolean;
|
|
40
34
|
}
|
|
41
35
|
export declare const JRCInputFileAdvancedRaw: React.ForwardRefExoticComponent<JRCInputFileAdavancedProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -32,6 +32,7 @@ export type JRCButtonProps = React.ComponentPropsWithoutRef<'button'> & DataCy &
|
|
|
32
32
|
label?: string;
|
|
33
33
|
/** Disable margins **/
|
|
34
34
|
noMargin?: boolean;
|
|
35
|
+
size?: 'm' | 's';
|
|
35
36
|
};
|
|
36
37
|
export declare const transformColor: (color?: string) => JRCIconProps['color'];
|
|
37
38
|
/**
|
|
@@ -67,6 +68,7 @@ export declare const Button: import("styled-components").StyledComponent<"button
|
|
|
67
68
|
label?: string | undefined;
|
|
68
69
|
/** Disable margins **/
|
|
69
70
|
noMargin?: boolean | undefined;
|
|
71
|
+
size?: "s" | "m" | undefined;
|
|
70
72
|
} & DashedFocusBorderProps, never>;
|
|
71
73
|
export declare const JRCButton: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & DataCy & {
|
|
72
74
|
/** Color of the background of the button */
|
|
@@ -95,4 +97,5 @@ export declare const JRCButton: React.ForwardRefExoticComponent<Omit<React.Detai
|
|
|
95
97
|
label?: string | undefined;
|
|
96
98
|
/** Disable margins **/
|
|
97
99
|
noMargin?: boolean | undefined;
|
|
100
|
+
size?: "s" | "m" | undefined;
|
|
98
101
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -14,6 +14,7 @@ export declare const MarginLessJRCButton: import("styled-components").StyledComp
|
|
|
14
14
|
tooltip?: Omit<import("../..").JRCTooltipProps, "children"> | undefined;
|
|
15
15
|
label?: string | undefined;
|
|
16
16
|
noMargin?: boolean | undefined;
|
|
17
|
+
size?: "s" | "m" | undefined;
|
|
17
18
|
} & React.RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, ButtonProps, never>;
|
|
18
19
|
export declare const MenuWithoutTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
20
|
export declare const MenuWithTitle: ({ direction, label, themeButton, children }: MenuWithTitleProps) => React.JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import jamespot, { AddRemoveActionParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jUserView,
|
|
1
|
+
import jamespot, { AddRemoveActionParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jUserView, JFilebankApi, JFileApi } 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 { DriveOrFilebank, JRCInputTinyMCERawProps } from 'types';
|
|
5
|
-
import {
|
|
5
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
6
|
+
import { JQuestionAnswerApi } from 'jamespot-user-api/lib/src/apis/questionAnswer/questionAnswer';
|
|
6
7
|
export type JRCCommentProps = {
|
|
7
8
|
isFocused: boolean;
|
|
8
9
|
comment: jCommentList;
|
|
@@ -26,19 +27,20 @@ export type JRCCommentProps = {
|
|
|
26
27
|
socialActionAdd: ({ targetId, targetType, type, }: AddRemoveActionParams) => ReturnType<typeof jamespot.socialAction.add>;
|
|
27
28
|
existingWidgetsWrapperComponent: (comment: Partial<jCommentList>, content: WidgetWrapperProps[], mode: WidgetDisplayMode, inplace: boolean, idComment: number, editRight?: boolean, deleteRight?: boolean) => React.ReactNode;
|
|
28
29
|
activeDrives: DriveOrFilebank[];
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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>>;
|
|
30
|
+
handlers: {
|
|
31
|
+
filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
|
|
32
|
+
file: Pick<JFileApi, 'copy'>;
|
|
33
|
+
drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
|
|
34
|
+
questionAnswer: Pick<JQuestionAnswerApi, 'selectResponse' | 'unselectResponse'>;
|
|
41
35
|
};
|
|
36
|
+
socialQuestion?: {
|
|
37
|
+
isResolved: boolean;
|
|
38
|
+
responseId?: number;
|
|
39
|
+
onSelectResponse: (responseId: number) => void;
|
|
40
|
+
onUnselectResponse: () => void;
|
|
41
|
+
canSelectResponse: boolean;
|
|
42
|
+
};
|
|
43
|
+
articleId: number;
|
|
42
44
|
};
|
|
43
45
|
export declare const DropdownButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
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,
|
|
46
|
+
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, handlers, socialQuestion, articleId, }: JRCCommentProps) => React.JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import jamespot, { AddCommentParams, AddRemoveActionParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps,
|
|
1
|
+
import jamespot, { AddCommentParams, AddRemoveActionParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jUserList, jUserView, JFilebankApi, JFileApi } 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';
|
|
5
|
-
import { DriveOrFilebank
|
|
5
|
+
import { DriveOrFilebank } from '../Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw';
|
|
6
|
+
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
7
|
+
import { JQuestionAnswerApi } from 'jamespot-user-api/lib/src/apis/questionAnswer/questionAnswer';
|
|
6
8
|
export type JRCCommentsBlocProps = {
|
|
7
9
|
comments?: jCommentList[];
|
|
8
10
|
initialCommentsNumber?: number;
|
|
@@ -33,19 +35,20 @@ export type JRCCommentsBlocProps = {
|
|
|
33
35
|
socialActionAdd: ({ targetId, targetType, type, }: AddRemoveActionParams) => ReturnType<typeof jamespot.socialAction.add>;
|
|
34
36
|
variant?: 'modal' | 'inline';
|
|
35
37
|
canComment: boolean;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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>>;
|
|
38
|
+
handlers: {
|
|
39
|
+
filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
|
|
40
|
+
file: Pick<JFileApi, 'copy'>;
|
|
41
|
+
drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
|
|
42
|
+
questionAnswer: Pick<JQuestionAnswerApi, 'selectResponse' | 'unselectResponse'>;
|
|
48
43
|
};
|
|
44
|
+
socialQuestion?: {
|
|
45
|
+
isResolved: boolean;
|
|
46
|
+
responseId?: number;
|
|
47
|
+
onSelectResponse: (responseId: number) => void;
|
|
48
|
+
onUnselectResponse: () => void;
|
|
49
|
+
canSelectResponse: boolean;
|
|
50
|
+
};
|
|
51
|
+
articleId: number;
|
|
49
52
|
};
|
|
50
53
|
export declare const AvatarWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
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,
|
|
54
|
+
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, handlers, socialQuestion, articleId, }: JRCCommentsBlocProps) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface JRCDropDownProps {
|
|
3
3
|
trigger: React.ReactNode;
|
|
4
|
-
dropdown: React.ReactNode;
|
|
4
|
+
dropdown: (collapseDropdown: () => void) => React.ReactNode;
|
|
5
5
|
align?: 'left' | 'right';
|
|
6
6
|
onToggle?: (isOpen: boolean) => void;
|
|
7
7
|
withBorder?: boolean;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { jFolderList, jArticleView } from 'jamespot-user-api';
|
|
3
3
|
import { JRCFoldersProps } from './types';
|
|
4
4
|
export type EntryType = jFolderList | jArticleView;
|
|
5
|
-
export declare const JRCFolders: ({ loadDocuments, allowMultiSelection,
|
|
5
|
+
export declare const JRCFolders: ({ loadDocuments, allowMultiSelection, initialFolders, initialDocuments, onSelectFolder, onSelectDocument, handlers, }: JRCFoldersProps) => React.JSX.Element;
|
|
6
6
|
export declare const ArticleNbSelection: ({ uris, document }: {
|
|
7
7
|
uris: string[];
|
|
8
8
|
document: jArticleView;
|
|
@@ -3,7 +3,7 @@ import { Story } from '@storybook/react';
|
|
|
3
3
|
import { JRCFoldersProps } from './types';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({ loadDocuments, allowMultiSelection,
|
|
6
|
+
component: ({ loadDocuments, allowMultiSelection, initialFolders, initialDocuments, onSelectFolder, onSelectDocument, handlers, }: JRCFoldersProps) => React.JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
export declare const Folders: Story<JRCFoldersProps>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jFolderList, jFileLittle, jArticleView, JFilebankApi } from 'jamespot-user-api';
|
|
2
2
|
export type JRCFoldersProps = {
|
|
3
3
|
loadDocuments?: boolean;
|
|
4
4
|
initialFolders?: string[];
|
|
5
5
|
initialDocuments?: string[];
|
|
6
6
|
initialBankFolder?: jFolderList;
|
|
7
7
|
allowMultiSelection?: boolean;
|
|
8
|
-
asyncBanksPromise?: () => Promise<FileBankProps[]> | undefined;
|
|
9
|
-
asyncFoldersPromise?: (uri: string) => Promise<ApiWrapper<jFolderList[]>> | undefined;
|
|
10
|
-
asyncDocumentsPromise?: (uri: string) => Promise<ApiPagingResults<jArticleView>> | undefined;
|
|
11
8
|
onSelectFolder?: (folder: jFolderList[]) => void;
|
|
12
9
|
onSelectDocument?: (document: jFileLittle[]) => void;
|
|
10
|
+
handlers?: {
|
|
11
|
+
filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
|
|
12
|
+
};
|
|
13
13
|
};
|
|
14
14
|
export interface JRCFolderProps {
|
|
15
15
|
color: string;
|
|
@@ -10,6 +10,6 @@ export declare const resolve: <T>(result: T) => Promise<{
|
|
|
10
10
|
}>;
|
|
11
11
|
export declare const mock_api_network_default: Pick<import("jamespot-user-api").Network, "token" | "postFile" | "getUrl">;
|
|
12
12
|
export declare const mock_api_network_excel: Pick<import("jamespot-user-api").Network, "token" | "postFile" | "getUrl">;
|
|
13
|
-
export declare const mock_api_datasource_excel: Omit<import("jamespot-user-api").JDatasourceApi, "
|
|
14
|
-
export declare const mock_api_datasource_studio: Omit<import("jamespot-user-api").JDatasourceApi, "
|
|
13
|
+
export declare const mock_api_datasource_excel: Omit<import("jamespot-user-api").JDatasourceApi, "jApi" | "network">;
|
|
14
|
+
export declare const mock_api_datasource_studio: Omit<import("jamespot-user-api").JDatasourceApi, "jApi" | "network">;
|
|
15
15
|
export declare const mock_api_application: Pick<import("jamespot-user-api").JApplicationApi, "get" | "list">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useAbortController: () => AbortController;
|
package/build/src/index.d.ts
CHANGED
|
@@ -28,7 +28,8 @@ 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 {
|
|
31
|
+
export { JRCDriveMSGraph } from './components/Drives/JRCDriveMSGraph';
|
|
32
|
+
export { JRCDriveDropbox } from './components/Drives/JRCDriveDropbox';
|
|
32
33
|
export { JRCConditionalWrapper } from './components/Common/JRCConditionalWrapper';
|
|
33
34
|
export { JRCDraggingPlaceholder } from './components/Common/JRCDraggingPlaceholder';
|
|
34
35
|
export { ClickAwayListener } from './components/Form/Common/ClickAwayListener';
|
|
@@ -187,6 +188,7 @@ export { useTimeout } from './hooks/UseTimeout';
|
|
|
187
188
|
export { useCancelOnUnmount } from './hooks/useCancelOnUnmount';
|
|
188
189
|
export { useRefSize } from './hooks/useRefSize';
|
|
189
190
|
export { useWindowSize } from './hooks/useWindowSize';
|
|
191
|
+
export { useAbortController } from './hooks/useAbortController';
|
|
190
192
|
export { JTinyMCEExtensionsBuilders } from './components/Form/Input/JRCInputTinyMCERaw/extensions/JTinyMCEExtensions';
|
|
191
193
|
/****
|
|
192
194
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.213",
|
|
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.191",
|
|
84
84
|
"moment": "2.29.4",
|
|
85
85
|
"react": "^17.x",
|
|
86
86
|
"react-beautiful-dnd": "^13.1.1",
|
|
@@ -1,17 +0,0 @@
|
|
|
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;
|
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
currentAccount?: DriveAccount;
|
|
29
|
-
};
|
|
30
|
-
export declare const JRCApp365: ({ initialParams, initialFolder, initialFolderColor, useDocumentFilters, useFilter, useNavigation, onSelect, onSelectDocument, onSelectMultiDocument, onError, driveRequests, handleLogin, onLogin, currentAccount, }: JRCApp365Props) => React.JSX.Element;
|
|
31
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
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;
|
|
File without changes
|
/package/build/src/components/Drives/{MicrosoftGraph/components → components}/EntityItemTitle.d.ts
RENAMED
|
File without changes
|