jamespot-react-components 1.2.13 → 1.2.14
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 +1649 -1199
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Drives/hooks.d.ts +1 -1
- package/build/src/components/Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw.d.ts +3 -3
- package/build/src/components/Form/Input/JRCSelect/JRCInputAutocompleteViews.d.ts +12 -3
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.style.d.ts +1 -0
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.types.d.ts +11 -1
- package/build/src/components/JRCAvatars/JRCAvatars.d.ts +6 -0
- package/build/src/components/JRCAvatars/JRCAvatars.stories.d.ts +6 -0
- package/build/src/components/JRCBusinessContactList/JRCBusinessContactList.d.ts +5 -0
- package/build/src/components/JRCBusinessContactList/JRCBusinessContactList.stories.d.ts +4 -0
- package/build/src/components/JRCBusinessContacts/JRCBusinessContacts.d.ts +11 -0
- package/build/src/components/JRCBusinessContacts/JRCBusinessContacts.stories.d.ts +6 -0
- package/build/src/components/JRCCalendar/CalendarStyle.d.ts +3 -0
- package/build/src/components/JRCCalendar/JRCCalendar.d.ts +10 -0
- package/build/src/components/JRCCalendar/JRCCalendar.stories.d.ts +6 -0
- package/build/src/components/JRCCalendar/JRCCalendarEvent.d.ts +17 -0
- package/build/src/components/JRCCommentsBloc/JRCComment.d.ts +3 -3
- package/build/src/components/JRCCommentsBloc/JRCCommentsBloc.d.ts +3 -3
- package/build/src/components/JRCCommentsBloc/components/EditComment.d.ts +3 -3
- package/build/src/components/JRCCommentsBloc/components/NewComment.d.ts +3 -3
- 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/styles.d.ts +1 -1
- package/build/src/components/JRCFolders/types.d.ts +7 -3
- package/build/src/components/JRCGroupList/JRCGroupList.d.ts +5 -0
- package/build/src/components/JRCGroupList/JRCGroupList.stories.d.ts +4 -0
- package/build/src/components/JRCGroups/JRCGroups.d.ts +12 -0
- package/build/src/components/JRCGroups/JRCGroups.stories.d.ts +6 -0
- package/build/src/components/JRCModal/JRCModal.styles.d.ts +3 -3
- package/build/src/components/JRCObjectList/JRCObjectList.d.ts +16 -0
- package/build/src/components/JRCTooltip/JRCTooltip.d.ts +1 -0
- package/build/src/components/JRCTooltip/JRCTooltip.stories.d.ts +1 -0
- package/build/src/components/JRCUserList/JRCUserList.d.ts +5 -0
- package/build/src/components/JRCUserList/JRCUserList.stories.d.ts +4 -0
- package/build/src/components/JRCUsers/JRCUsers.d.ts +11 -0
- package/build/src/components/JRCUsers/JRCUsers.stories.d.ts +6 -0
- package/build/src/components/Widgets/JRCWidgetTable/JRCWidgetExcelDatasourceTableEditor.d.ts +3 -3
- package/build/src/index.d.ts +1 -0
- package/build/src/styles/theme.d.ts +1 -1
- package/build/src/styles/utils.d.ts +14 -0
- package/build/src/types.d.ts +1 -0
- package/build/src/utils/utils.array.d.ts +1 -0
- package/package.json +7 -2
- package/build/src/components/JRCFolders/JRCFolder.d.ts +0 -4
|
@@ -21,7 +21,7 @@ export declare function useTenants({ handlers, id }: {
|
|
|
21
21
|
entities: {
|
|
22
22
|
type: string;
|
|
23
23
|
title: string;
|
|
24
|
-
name?: "group" | "
|
|
24
|
+
name?: "group" | "documents" | "groups" | "sites" | "onedrive" | "me" | undefined;
|
|
25
25
|
}[];
|
|
26
26
|
error: ErrorType | undefined;
|
|
27
27
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Drive, JFileApi,
|
|
1
|
+
import { Drive, JFileApi, jFileLittle, Network } from 'jamespot-user-api';
|
|
2
2
|
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { WrappedFieldInputProps } from 'redux-form';
|
|
5
|
+
import { FoldersHandlers } from '../../../JRCFolders/types';
|
|
5
6
|
export type FileWithId = File & {
|
|
6
7
|
id?: string;
|
|
7
8
|
};
|
|
@@ -25,8 +26,7 @@ export interface JRCInputFileAdavancedProps extends React.ComponentPropsWithoutR
|
|
|
25
26
|
deleteFile?: (id: number) => Promise<void>;
|
|
26
27
|
activeDrives?: DriveOrFilebank[];
|
|
27
28
|
dispatchOnError?: (code?: string) => void;
|
|
28
|
-
handlers?: {
|
|
29
|
-
filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
|
|
29
|
+
handlers?: FoldersHandlers & {
|
|
30
30
|
file: Pick<JFileApi, 'copy'>;
|
|
31
31
|
drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
|
|
32
32
|
};
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AudienceAutocomplete } from 'jamespot-user-api';
|
|
2
|
+
import { AudienceAutocomplete, JGroupApi, JUserApi } from 'jamespot-user-api';
|
|
3
|
+
import { FoldersHandlers } from '../../../JRCFolders/types';
|
|
3
4
|
export declare const CSSViewsWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export type AutocompleteView = 'folder' | 'user' | 'group' | 'businessContact';
|
|
4
6
|
export type AVProps = {
|
|
5
|
-
views: Array<
|
|
7
|
+
views: Array<AutocompleteView>;
|
|
6
8
|
initialValues: AudienceAutocomplete[];
|
|
7
9
|
onConfirm: (values: any) => void;
|
|
10
|
+
open: boolean;
|
|
11
|
+
closeHandler: () => void;
|
|
12
|
+
handlers: FoldersHandlers & {
|
|
13
|
+
user: Pick<JUserApi, 'userQueryList' | 'userBusinessContactQueryList'>;
|
|
14
|
+
group: Pick<JGroupApi, 'list'>;
|
|
15
|
+
};
|
|
16
|
+
onError?: (message?: string) => void;
|
|
8
17
|
};
|
|
9
|
-
declare const JRCInputAutocompleteViews: ({ views, initialValues, onConfirm }: AVProps) => React.JSX.Element;
|
|
18
|
+
declare const JRCInputAutocompleteViews: ({ views, initialValues, onConfirm, open, closeHandler, handlers, onError, }: AVProps) => React.JSX.Element;
|
|
10
19
|
export { JRCInputAutocompleteViews };
|
|
@@ -314,6 +314,7 @@ export declare const IconBefore: import("styled-components").StyledComponent<({
|
|
|
314
314
|
left?: number | undefined;
|
|
315
315
|
top?: number | undefined;
|
|
316
316
|
height?: number | undefined;
|
|
317
|
+
width?: number | undefined;
|
|
317
318
|
}, never>;
|
|
318
319
|
export declare const TimesIndicator: ({ onClick }: {
|
|
319
320
|
onClick?: (() => void) | undefined;
|
|
@@ -5,6 +5,9 @@ import { FieldValues } from 'react-hook-form';
|
|
|
5
5
|
import { Colors, Shades } from 'styles/theme';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { PartialBy } from '../../../../types/utils';
|
|
8
|
+
import { JGroupApi, JUserApi } from 'jamespot-user-api';
|
|
9
|
+
import { AutocompleteView } from './JRCInputAutocompleteViews';
|
|
10
|
+
import { FoldersHandlers } from '../../../JRCFolders/types';
|
|
8
11
|
/**
|
|
9
12
|
* Select
|
|
10
13
|
*/
|
|
@@ -32,7 +35,14 @@ export type SelectProps<T = any> = DataCy & {
|
|
|
32
35
|
getSearch?: ((option: T) => string) | string;
|
|
33
36
|
group?: boolean;
|
|
34
37
|
getGroup?: ((option: T) => string) | string;
|
|
35
|
-
views?:
|
|
38
|
+
views?: {
|
|
39
|
+
activeViews: Array<AutocompleteView>;
|
|
40
|
+
handlers: FoldersHandlers & {
|
|
41
|
+
user: Pick<JUserApi, 'userQueryList' | 'userBusinessContactQueryList'>;
|
|
42
|
+
group: Pick<JGroupApi, 'list'>;
|
|
43
|
+
};
|
|
44
|
+
onError?: (message?: string) => void;
|
|
45
|
+
};
|
|
36
46
|
onConfirm?: (values: any) => void;
|
|
37
47
|
hideSelectedOption?: boolean;
|
|
38
48
|
hideDeleteIcon?: boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { JRCAvatars } from './JRCAvatars';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const _default: import("@storybook/core/csf").ComponentAnnotations<import("@storybook/react/dist/types-5617c98e").R, import("@storybook/core/csf").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
type Story = StoryObj<typeof JRCAvatars>;
|
|
6
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { JRCObjectListProps } from '../JRCObjectList/JRCObjectList';
|
|
3
|
+
import { jBusinessContactLittle } from 'jamespot-user-api';
|
|
4
|
+
export type JRCBusinessContactListProps = JRCObjectListProps<jBusinessContactLittle>;
|
|
5
|
+
export declare const JRCBusinessContactList: (props: JRCBusinessContactListProps) => React.JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { JRCBusinessContactListProps } from './JRCBusinessContactList';
|
|
2
|
+
declare const _default: import("@storybook/core/csf").ComponentAnnotations<import("@storybook/react/dist/types-5617c98e").R, import("@storybook/core/csf").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-5617c98e").R, JRCBusinessContactListProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AudienceAutocomplete, JUserApi } from 'jamespot-user-api';
|
|
3
|
+
export type JRCBusinessContactsProps = {
|
|
4
|
+
handlers: {
|
|
5
|
+
user: Pick<JUserApi, 'userBusinessContactQueryList'>;
|
|
6
|
+
};
|
|
7
|
+
onError?: (message?: string) => void;
|
|
8
|
+
initialBusinessContacts: AudienceAutocomplete[];
|
|
9
|
+
onSelectBusinessContact?: (users: AudienceAutocomplete[]) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const JRCBusinessContacts: ({ handlers, onError, initialBusinessContacts, onSelectBusinessContact, }: JRCBusinessContactsProps) => React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { JRCBusinessContacts } from './JRCBusinessContacts';
|
|
3
|
+
declare const _default: import("@storybook/core/csf").ComponentAnnotations<import("@storybook/react/dist/types-5617c98e").R, import("@storybook/core/csf").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
type Story = StoryObj<typeof JRCBusinessContacts>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CalendarEventListAbstractType, CalendarEventWithExtensions } from 'jamespot-user-api';
|
|
3
|
+
export type JRCCalendarProps = {
|
|
4
|
+
events?: CalendarEventWithExtensions<CalendarEventListAbstractType, ['socialEventRecord']>[];
|
|
5
|
+
onClickEvent?: (id: number) => void;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
onChangeDates?: (start: Date, end: Date) => void;
|
|
8
|
+
};
|
|
9
|
+
export type CalendarView = 'dayGridMonth' | 'timeGridWeek' | 'timeGridDay' | 'listWeek';
|
|
10
|
+
export declare const JRCCalendar: ({ events, onClickEvent, loading, onChangeDates }: JRCCalendarProps) => React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { JRCCalendar } from './JRCCalendar';
|
|
3
|
+
declare const _default: import("@storybook/core/csf").ComponentAnnotations<import("@storybook/react/dist/types-5617c98e").R, import("@storybook/core/csf").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
type Story = StoryObj<typeof JRCCalendar>;
|
|
6
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CalendarView } from './JRCCalendar';
|
|
3
|
+
import { Audience, UserResponseStatus } from 'jamespot-user-api';
|
|
4
|
+
export type JRCCalendarMonthEventProps = {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
start: Date | null;
|
|
8
|
+
end: Date | null;
|
|
9
|
+
status: UserResponseStatus | null;
|
|
10
|
+
display: CalendarView;
|
|
11
|
+
onClick?: (id: number) => void;
|
|
12
|
+
audience: Pick<Audience, '_url' | 'title' | 'uri'>[];
|
|
13
|
+
allDay?: boolean;
|
|
14
|
+
textColor?: string;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const JRCCalendarEvent: ({ status, title, start, end, display, id: stringId, onClick, audience, allDay, textColor, backgroundColor, }: JRCCalendarMonthEventProps) => React.JSX.Element | null;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps,
|
|
1
|
+
import { Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, JFileApi, JSocialActionApi, JUserApi, CommentWithExtensions } 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
5
|
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
6
6
|
import { JQuestionAnswerApi } from 'jamespot-user-api/lib/src/apis/questionAnswer/questionAnswer';
|
|
7
|
+
import { FoldersHandlers } from '../JRCFolders/types';
|
|
7
8
|
export type JRCCommentProps = {
|
|
8
9
|
isFocused: boolean;
|
|
9
10
|
comment: CommentWithExtensions<jCommentList, ['actions']> & {
|
|
@@ -24,8 +25,7 @@ export type JRCCommentProps = {
|
|
|
24
25
|
onGetHashError: (message?: string) => void;
|
|
25
26
|
existingWidgetsWrapperComponent: (comment: jCommentList, widgets: WidgetWrapperProps[], mode: WidgetDisplayMode, inplace: boolean) => React.ReactNode;
|
|
26
27
|
activeDrives: DriveOrFilebank[];
|
|
27
|
-
handlers: {
|
|
28
|
-
filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
|
|
28
|
+
handlers: FoldersHandlers & {
|
|
29
29
|
file: Pick<JFileApi, 'copy'>;
|
|
30
30
|
drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
|
|
31
31
|
user: Pick<JUserApi, 'get' | 'getFields'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddCommentParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jUserList,
|
|
1
|
+
import { AddCommentParams, Model, UpdateCommentParams, WidgetDisplayMode, WidgetWrapperProps, jUserList, JFileApi, JSocialActionApi, JUserApi, CommentWithExtensions } 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';
|
|
@@ -6,6 +6,7 @@ import { DriveOrFilebank } from '../Form/Input/JRCInputFileAdvanced/JRCInputFile
|
|
|
6
6
|
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
7
7
|
import { JQuestionAnswerApi } from 'jamespot-user-api/lib/src/apis/questionAnswer/questionAnswer';
|
|
8
8
|
import { TinyMCEExtension } from '../Form/Input/JRCInputTinyMCERaw/extensions/JTinyMCEExtensions';
|
|
9
|
+
import { FoldersHandlers } from '../JRCFolders/types';
|
|
9
10
|
export type JRCCommentsBlocProps = {
|
|
10
11
|
comments?: Array<CommentWithExtensions<jCommentList, ['actions']> & {
|
|
11
12
|
pending?: boolean;
|
|
@@ -33,8 +34,7 @@ export type JRCCommentsBlocProps = {
|
|
|
33
34
|
activeDrives: DriveOrFilebank[];
|
|
34
35
|
variant?: 'modal' | 'inline';
|
|
35
36
|
canComment: boolean;
|
|
36
|
-
handlers: {
|
|
37
|
-
filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
|
|
37
|
+
handlers: FoldersHandlers & {
|
|
38
38
|
file: Pick<JFileApi, 'copy' | 'deleteFile'>;
|
|
39
39
|
drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
|
|
40
40
|
user: Pick<JUserApi, 'get' | 'getFields'>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { JRCInputTinyMCERawProps } from '../../Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
|
|
2
2
|
import { DriveOrFilebank } from '../../Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { jCommentList, JFileApi
|
|
4
|
+
import { jCommentList, JFileApi } from 'jamespot-user-api';
|
|
5
5
|
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
6
|
+
import { FoldersHandlers } from '../../JRCFolders/types';
|
|
6
7
|
export type EditCommentProps = {
|
|
7
8
|
comment: jCommentList;
|
|
8
9
|
activeDrives: DriveOrFilebank[];
|
|
@@ -10,8 +11,7 @@ export type EditCommentProps = {
|
|
|
10
11
|
commentContent: string | null;
|
|
11
12
|
setCommentContent: (content: string) => void;
|
|
12
13
|
token: string;
|
|
13
|
-
handlers?: {
|
|
14
|
-
filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
|
|
14
|
+
handlers?: FoldersHandlers & {
|
|
15
15
|
file: Pick<JFileApi, 'copy'>;
|
|
16
16
|
drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
|
|
17
17
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { JRCInputTinyMCERawProps } from '../../Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
|
|
2
2
|
import { DriveOrFilebank } from '../../Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { AddCommentParams, JFileApi,
|
|
4
|
+
import { AddCommentParams, JFileApi, jUserList } from 'jamespot-user-api';
|
|
5
5
|
import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
|
|
6
6
|
import { TinyMCEExtension } from '../../Form/Input/JRCInputTinyMCERaw/extensions/JTinyMCEExtensions';
|
|
7
|
+
import { FoldersHandlers } from '../../JRCFolders/types';
|
|
7
8
|
export type NewCommentProps = {
|
|
8
9
|
currentUser: jUserList;
|
|
9
10
|
widgetListComponent: React.ReactNode;
|
|
@@ -13,8 +14,7 @@ export type NewCommentProps = {
|
|
|
13
14
|
onComment: (params: Pick<AddCommentParams, 'content' | 'alertAuthor' | 'sendAlert'>) => Promise<void>;
|
|
14
15
|
token?: string;
|
|
15
16
|
tinyMCEConfig: Pick<JRCInputTinyMCERawProps, 'commonOptions' | 'mentionsQueries' | 'tinymceScriptSrc'>;
|
|
16
|
-
handlers?: {
|
|
17
|
-
filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
|
|
17
|
+
handlers?: FoldersHandlers & {
|
|
18
18
|
file: Pick<JFileApi, 'copy'>;
|
|
19
19
|
drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
|
|
20
20
|
};
|
|
@@ -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, initialFolders, initialDocuments, onSelectFolder, onSelectDocument, handlers, }: JRCFoldersProps) => React.JSX.Element;
|
|
5
|
+
export declare const JRCFolders: ({ loadDocuments, allowMultiSelection, initialFolders, initialDocuments, onSelectFolder, onSelectDocument, handlers, onError, searchable, }: JRCFoldersProps) => React.JSX.Element;
|
|
6
6
|
export declare const ArticleNbSelection: ({ uris, document }: {
|
|
7
7
|
uris: string[];
|
|
8
8
|
document: jArticleView;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { JRCFoldersProps } from './types';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ loadDocuments, allowMultiSelection, initialFolders, initialDocuments, onSelectFolder, onSelectDocument, handlers, }: JRCFoldersProps) => React.JSX.Element;
|
|
5
|
+
component: ({ loadDocuments, allowMultiSelection, initialFolders, initialDocuments, onSelectFolder, onSelectDocument, handlers, onError, searchable, }: JRCFoldersProps) => React.JSX.Element;
|
|
6
6
|
};
|
|
7
7
|
export default _default;
|
|
8
8
|
export declare const Folders: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-5617c98e").R, JRCFoldersProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const CSSTitleAccessor: import("styled-components").StyledComponent<"
|
|
1
|
+
export declare const CSSTitleAccessor: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
|
|
2
2
|
export declare const CSSTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
3
|
export declare const CSSSubTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
4
|
export declare const CSSDocument: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { jFolderList, jFileLittle, jArticleView, JFilebankApi } from 'jamespot-user-api';
|
|
2
|
+
export type FoldersHandlers = {
|
|
3
|
+
filebank: Pick<JFilebankApi, 'getFolders' | 'getDocuments' | 'getRootFolders' | 'searchContent'>;
|
|
4
|
+
};
|
|
2
5
|
export type JRCFoldersProps = {
|
|
3
6
|
loadDocuments?: boolean;
|
|
4
7
|
initialFolders?: string[];
|
|
@@ -7,13 +10,14 @@ export type JRCFoldersProps = {
|
|
|
7
10
|
allowMultiSelection?: boolean;
|
|
8
11
|
onSelectFolder?: (folder: jFolderList[]) => void;
|
|
9
12
|
onSelectDocument?: (document: jFileLittle[]) => void;
|
|
10
|
-
handlers?:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
handlers?: FoldersHandlers;
|
|
14
|
+
onError?: (message?: string) => void;
|
|
15
|
+
searchable?: boolean;
|
|
13
16
|
};
|
|
14
17
|
export interface JRCFolderProps {
|
|
15
18
|
color: string;
|
|
16
19
|
size: 'sm' | 'md' | 'lg';
|
|
20
|
+
empty?: boolean;
|
|
17
21
|
}
|
|
18
22
|
export type FolderProps = {
|
|
19
23
|
id: number | string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { JRCObjectListProps } from '../JRCObjectList/JRCObjectList';
|
|
3
|
+
import { jGroupLittle } from 'jamespot-user-api';
|
|
4
|
+
export type JRCGroupListProps = JRCObjectListProps<jGroupLittle>;
|
|
5
|
+
export declare const JRCGroupList: (props: JRCGroupListProps) => React.JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { JRCGroupListProps } from './JRCGroupList';
|
|
2
|
+
declare const _default: import("@storybook/core/csf").ComponentAnnotations<import("@storybook/react/dist/types-5617c98e").R, import("@storybook/core/csf").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-5617c98e").R, JRCGroupListProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AudienceAutocomplete, JGroupApi } from 'jamespot-user-api';
|
|
3
|
+
export type JRCGroupsProps = {
|
|
4
|
+
handlers: {
|
|
5
|
+
group: Pick<JGroupApi, 'list'>;
|
|
6
|
+
};
|
|
7
|
+
onError?: (message?: string) => void;
|
|
8
|
+
initialGroups: AudienceAutocomplete[];
|
|
9
|
+
onSelectGroup?: (group: AudienceAutocomplete[]) => void;
|
|
10
|
+
publicOnly?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const JRCGroups: ({ handlers, onError, initialGroups, onSelectGroup, publicOnly }: JRCGroupsProps) => React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { JRCGroups } from './JRCGroups';
|
|
3
|
+
declare const _default: import("@storybook/core/csf").ComponentAnnotations<import("@storybook/react/dist/types-5617c98e").R, import("@storybook/core/csf").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
type Story = StoryObj<typeof JRCGroups>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -18,13 +18,13 @@ export declare const JRCModalContainer: import("styled-components").StyledCompon
|
|
|
18
18
|
export declare const JRCModalTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
19
|
export declare const JRCModalOptions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
20
|
export declare const JRCModalBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
21
|
-
modalOverflow?: "hidden" | "auto" | "
|
|
21
|
+
modalOverflow?: "hidden" | "auto" | "visible" | "scroll" | undefined;
|
|
22
22
|
}, never>;
|
|
23
23
|
export declare const JRCModalContentFull: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
24
24
|
export declare const JRCModalHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
25
|
-
modalOverflow?: "hidden" | "auto" | "
|
|
25
|
+
modalOverflow?: "hidden" | "auto" | "visible" | "scroll" | undefined;
|
|
26
26
|
}, never>;
|
|
27
27
|
export declare const JRCModalFooter: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
28
|
-
modalOverflow?: "hidden" | "
|
|
28
|
+
modalOverflow?: "hidden" | "visible" | "scroll" | undefined;
|
|
29
29
|
}, never>;
|
|
30
30
|
export declare const JRCModalClose: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { jObjectLittle } from 'jamespot-user-api';
|
|
3
|
+
export type JRCObjectListProps<T extends jObjectLittle = jObjectLittle> = {
|
|
4
|
+
list?: {
|
|
5
|
+
data: T[];
|
|
6
|
+
cnt?: number;
|
|
7
|
+
limit?: number;
|
|
8
|
+
page?: number;
|
|
9
|
+
};
|
|
10
|
+
onPageChange: (page: number) => void;
|
|
11
|
+
actionComponent?: (obj: T) => React.ReactNode;
|
|
12
|
+
onClick?: (obj: T) => void;
|
|
13
|
+
onSearch?: (query: string) => void;
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const JRCObjectList: <T extends jObjectLittle = jObjectLittle>({ list, onPageChange, onClick, actionComponent, onSearch, isLoading, }: JRCObjectListProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { JRCObjectListProps } from '../JRCObjectList/JRCObjectList';
|
|
3
|
+
import { jUserLittle } from 'jamespot-user-api';
|
|
4
|
+
export type JRCUserListProps = JRCObjectListProps<jUserLittle>;
|
|
5
|
+
export declare const JRCUserList: (props: JRCUserListProps) => React.JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { JRCUserListProps } from './JRCUserList';
|
|
2
|
+
declare const _default: import("@storybook/core/csf").ComponentAnnotations<import("@storybook/react/dist/types-5617c98e").R, import("@storybook/core/csf").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react/dist/types-5617c98e").R, JRCUserListProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AudienceAutocomplete, JUserApi } from 'jamespot-user-api';
|
|
3
|
+
export type JRCUsersProps = {
|
|
4
|
+
handlers: {
|
|
5
|
+
user: Pick<JUserApi, 'userQueryList'>;
|
|
6
|
+
};
|
|
7
|
+
onError?: (message?: string) => void;
|
|
8
|
+
initialUsers: AudienceAutocomplete[];
|
|
9
|
+
onSelectUser?: (users: AudienceAutocomplete[]) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const JRCUsers: ({ handlers, onError, initialUsers, onSelectUser }: JRCUsersProps) => React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { JRCUsers } from './JRCUsers';
|
|
3
|
+
declare const _default: import("@storybook/core/csf").ComponentAnnotations<import("@storybook/react/dist/types-5617c98e").R, import("@storybook/core/csf").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
type Story = StoryObj<typeof JRCUsers>;
|
|
6
|
+
export declare const Default: Story;
|
package/build/src/components/Widgets/JRCWidgetTable/JRCWidgetExcelDatasourceTableEditor.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { JDatasourceApi,
|
|
2
|
+
import { JDatasourceApi, JWedocApi, Network, WidgetEditorActions, WidgetEditorErrorActions, WidgetExcelDatasourceTableContent } from 'jamespot-user-api';
|
|
3
3
|
import { EditorBaseContext, Handlers, HookIsActive } from '../context/provider';
|
|
4
|
+
import { FoldersHandlers } from '../../JRCFolders/types';
|
|
4
5
|
export type WidgetExcelDatasourceHandlers = Handlers & {
|
|
5
|
-
jamespot: {
|
|
6
|
+
jamespot: FoldersHandlers & {
|
|
6
7
|
datasource: Omit<JDatasourceApi, 'jApi' | 'network'>;
|
|
7
8
|
network: Pick<Network, 'token' | 'postFile' | 'getUrl'>;
|
|
8
|
-
filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
|
|
9
9
|
wedoc: Pick<JWedocApi, 'getFiles'>;
|
|
10
10
|
};
|
|
11
11
|
};
|
package/build/src/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ 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
31
|
export { DashedFocusBorder } from './components/Common/DashedFocusBorder';
|
|
32
|
+
export { JRCCalendar } from './components/JRCCalendar/JRCCalendar';
|
|
32
33
|
export { JRCConditionalWrapper } from './components/Common/JRCConditionalWrapper';
|
|
33
34
|
export { JRCDraggingPlaceholder } from './components/Common/JRCDraggingPlaceholder';
|
|
34
35
|
export { JRCDriveDropbox } from './components/Drives/JRCDriveDropbox';
|
|
@@ -23,7 +23,7 @@ export type Colors = 'primary' | 'secondary' | 'headerColor' | 'headerTextColor'
|
|
|
23
23
|
type ThemeConfigColorType = {
|
|
24
24
|
[color in Colors]: string;
|
|
25
25
|
};
|
|
26
|
-
export type Shades = 'primaryL15' | 'primaryL80' | 'primaryL90' | 'primaryD20' | 'secondaryL15' | 'secondaryL80' | 'secondaryL90' | 'secondaryD20' | 'greenL20' | 'greenL80' | 'greenL90' | 'greenD20' | 'raspberryL95' | 'orangeL15' | 'orangeL80' | 'orangeL90' | 'orangeD20';
|
|
26
|
+
export type Shades = 'primaryL15' | 'primaryL80' | 'primaryL90' | 'primaryD20' | 'secondaryL15' | 'secondaryL80' | 'secondaryL90' | 'secondaryD20' | 'greenL20' | 'greenL80' | 'greenL90' | 'greenD20' | 'raspberryL95' | 'orangeL15' | 'orangeL80' | 'orangeL90' | 'orangeD20' | 'yellowL80' | 'yellowL90';
|
|
27
27
|
type ThemeConfigShadeType = {
|
|
28
28
|
[color in Shades]: string;
|
|
29
29
|
};
|
|
@@ -3,6 +3,20 @@ export declare const hexToRgb: (hex: string) => {
|
|
|
3
3
|
g: number;
|
|
4
4
|
b: number;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* Darkens the color following a linear distorsion
|
|
8
|
+
* @param hex Color in hexadecimal format, beginning with the # character
|
|
9
|
+
* @param darkPercentage dark percentage (bewteen 0 and 1, 0 beeing the same color, 1 beeing black)
|
|
10
|
+
* @returns hexadecimal color
|
|
11
|
+
*/
|
|
12
|
+
export declare const getDarkShade: (hex: string, darkPercentage: number) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Lightens the color following a linear distorsion
|
|
15
|
+
* @param hex Color in hexadecimal format, beginning with the # character
|
|
16
|
+
* @param lightPercentage light percentage (bewteen 0 and 1, 0 beeing the same color, 1 beeing white)
|
|
17
|
+
* @returns hexadecimal color
|
|
18
|
+
*/
|
|
19
|
+
export declare const getLightShade: (hex: string, lightPercentage: number) => string;
|
|
6
20
|
/**
|
|
7
21
|
* @param hexColor a color in the format #XXX or #XXXXXX
|
|
8
22
|
* @param adjustPercent a number between -1 and 1, <0 for darkening, >0 for lightening
|
package/build/src/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { AutocompleteView } from './components/Form/Input/JRCSelect/JRCInputAutocompleteViews';
|
|
1
2
|
export type { Editor } from 'tinymce';
|
|
2
3
|
export type { JRCDragAndDropProps } from './components/Beta/BETA_JRCDragAndDrop/BETA_JRCDragAndDrop';
|
|
3
4
|
export type { JRCConditionalWrapperProps } from './components/Common/JRCConditionalWrapper';
|
|
@@ -20,4 +20,5 @@ export declare const arrayUniqueByUri: <T extends {
|
|
|
20
20
|
}>(arr1: T[], arr2: T[]) => T[];
|
|
21
21
|
export declare const arraySwapElements: <T>(arr: T[], index1: number, index2: number) => T[];
|
|
22
22
|
export declare function strArrayToggle(str: string, array: string[]): string[];
|
|
23
|
+
export declare function noNull<T>(value: T | null): value is T;
|
|
23
24
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -91,11 +91,16 @@
|
|
|
91
91
|
"webpack-dev-server": "^4.4.0"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
|
+
"@fullcalendar/core": "^6.1.17",
|
|
95
|
+
"@fullcalendar/daygrid": "^6.1.17",
|
|
96
|
+
"@fullcalendar/list": "^6.1.17",
|
|
97
|
+
"@fullcalendar/react": "^6.1.17",
|
|
98
|
+
"@fullcalendar/timegrid": "^6.1.17",
|
|
94
99
|
"@tinymce/tinymce-react": "^5.1.1",
|
|
95
100
|
"chroma-js": "^2.1.1",
|
|
96
101
|
"classnames": "^2.3.1",
|
|
97
102
|
"dompurify": "^3.0.5",
|
|
98
|
-
"jamespot-user-api": "^1.2.
|
|
103
|
+
"jamespot-user-api": "^1.2.14",
|
|
99
104
|
"react": "^17.x",
|
|
100
105
|
"react-beautiful-dnd": "^13.1.1",
|
|
101
106
|
"react-dnd": "^14.0.4",
|