jamespot-react-components 1.0.214 → 1.0.216

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.
@@ -19,7 +19,6 @@ export type JRCCommentsBlocProps = {
19
19
  token?: string;
20
20
  onCommentUpdate: (args: UpdateCommentParams) => Promise<void>;
21
21
  onCommentDelete: (idComment: number) => Promise<void>;
22
- deleteFile: (id: number) => Promise<void>;
23
22
  onError?: (message?: string) => void;
24
23
  highlightFields?: string[];
25
24
  userModel?: Model;
@@ -32,7 +31,7 @@ export type JRCCommentsBlocProps = {
32
31
  canComment: boolean;
33
32
  handlers: {
34
33
  filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
35
- file: Pick<JFileApi, 'copy'>;
34
+ file: Pick<JFileApi, 'copy' | 'deleteFile'>;
36
35
  drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
37
36
  user: Pick<JUserApi, 'get' | 'getFields'>;
38
37
  socialAction: Pick<JSocialActionApi, 'add' | 'remove' | 'getUsers'>;
@@ -48,4 +47,4 @@ export type JRCCommentsBlocProps = {
48
47
  articleId: number;
49
48
  };
50
49
  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, deleteFile, onError, highlightFields, userModel, userAccountStatus, isWedocActive, getAccessHash, onGetHashError, activeDrives, variant, canComment, handlers, socialQuestion, articleId, }: JRCCommentsBlocProps) => React.JSX.Element;
50
+ export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, onError, highlightFields, userModel, userAccountStatus, isWedocActive, getAccessHash, onGetHashError, activeDrives, variant, canComment, handlers, socialQuestion, articleId, }: JRCCommentsBlocProps) => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { jUserLittle } from 'jamespot-user-api';
3
+ export type CommentsHeaderProps = {
4
+ lastCommentUser?: jUserLittle;
5
+ variant?: 'modal' | 'inline';
6
+ displayedCommentsNumber: number;
7
+ displayMoreComments: () => void;
8
+ focusLastComment: () => void;
9
+ commentsCount?: number;
10
+ };
11
+ export declare const CommentsHeader: ({ lastCommentUser, commentsCount, variant, displayedCommentsNumber, displayMoreComments, focusLastComment, }: CommentsHeaderProps) => React.JSX.Element | null;
@@ -0,0 +1,24 @@
1
+ import { JRCInputTinyMCERawProps } from '../../Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
2
+ import { DriveOrFilebank } from '../../Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw';
3
+ import React from 'react';
4
+ import { jCommentList, JFileApi, JFilebankApi } from 'jamespot-user-api';
5
+ import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
6
+ export type EditCommentProps = {
7
+ comment: jCommentList;
8
+ activeDrives: DriveOrFilebank[];
9
+ tinyMCEConfig: Pick<JRCInputTinyMCERawProps, 'commonOptions' | 'mentionsQueries' | 'tinymceScriptSrc'>;
10
+ commentContent: string | null;
11
+ setCommentContent: (content: string) => void;
12
+ token: string;
13
+ handlers?: {
14
+ filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
15
+ file: Pick<JFileApi, 'copy'>;
16
+ drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
17
+ };
18
+ deleteFile?: (id: number) => Promise<void>;
19
+ onError?: (code?: string) => void;
20
+ closeEditMode: () => void;
21
+ updateComment: () => void;
22
+ loading: boolean;
23
+ };
24
+ export declare const EditComment: ({ comment, tinyMCEConfig, activeDrives, setCommentContent, commentContent, token, handlers, deleteFile, onError, closeEditMode, updateComment, loading, }: EditCommentProps) => React.JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { JRCInputTinyMCERawProps } from '../../Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
2
+ import { DriveOrFilebank } from '../../Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw';
3
+ import React from 'react';
4
+ import { AddCommentParams, JFileApi, JFilebankApi, jUserList } from 'jamespot-user-api';
5
+ import { JDriveApi } from 'jamespot-user-api/lib/src/apis/drive/drive';
6
+ export type NewCommentProps = {
7
+ currentUser: jUserList;
8
+ widgetListComponent: React.ReactNode;
9
+ newWidgetsWrapperComponent: React.ReactNode;
10
+ loading?: boolean;
11
+ canComment: boolean;
12
+ onComment: (params: Pick<AddCommentParams, 'content' | 'alertAuthor' | 'sendAlert'>) => Promise<void>;
13
+ token?: string;
14
+ tinyMCEConfig: Pick<JRCInputTinyMCERawProps, 'commonOptions' | 'mentionsQueries' | 'tinymceScriptSrc'>;
15
+ handlers?: {
16
+ filebank: Pick<JFilebankApi, 'getBanks' | 'getFolders' | 'getDocuments'>;
17
+ file: Pick<JFileApi, 'copy'>;
18
+ drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
19
+ };
20
+ onError?: (message?: string) => void;
21
+ activeDrives: DriveOrFilebank[];
22
+ isWidgetActive?: boolean;
23
+ socialQuestion?: boolean;
24
+ deleteFile?: (id: number) => Promise<void>;
25
+ };
26
+ export declare const NewComment: ({ newWidgetsWrapperComponent, widgetListComponent, canComment, loading, currentUser, onComment, onError, tinyMCEConfig, token, handlers, activeDrives, isWidgetActive, socialQuestion, deleteFile, }: NewCommentProps) => React.JSX.Element;
@@ -12,4 +12,4 @@ export declare const mock_api_network_default: Pick<import("jamespot-user-api").
12
12
  export declare const mock_api_network_excel: Pick<import("jamespot-user-api").Network, "token" | "postFile" | "getUrl">;
13
13
  export declare const mock_api_datasource_excel: Omit<import("jamespot-user-api").JDatasourceApi, "jApi" | "network">;
14
14
  export declare const mock_api_datasource_studio: Omit<import("jamespot-user-api").JDatasourceApi, "jApi" | "network">;
15
- export declare const mock_api_application: Pick<import("jamespot-user-api").JApplicationApi, "get" | "list">;
15
+ export declare const mock_api_application: Pick<import("jamespot-user-api").JApplicationApi, "list" | "get">;
@@ -1,8 +1,8 @@
1
1
  import { DefaultTheme } from 'styled-components';
2
2
  export interface ITheme {
3
- config: DefaultTheme;
3
+ config: DefaultTheme | undefined;
4
4
  get: () => DefaultTheme;
5
- initTheme: (options?: ThemeConfigOptions) => void;
5
+ initTheme: (options?: ThemeConfigOptions) => DefaultTheme;
6
6
  }
7
7
  export type ThemeConfigOptions = {
8
8
  fontFamily?: string;
@@ -18,7 +18,7 @@ export type ThemeConfigOptions = {
18
18
  navTextColor: string;
19
19
  bgColorNotLogged: string;
20
20
  };
21
- export type Colors = 'primary' | 'secondary' | 'headerColor' | 'headerTextColor' | 'headerUserBackground' | 'headerUserTextColor' | 'headerSearchBarTextColor' | 'headerSearchBarBackgroundColor' | 'lavender' | 'orange' | 'yellow' | 'green' | 'navy' | 'overseas' | 'night1' | 'night2' | 'sandLight' | 'sky' | 'sky15' | 'sand' | 'grey0' | 'grey1' | 'grey2' | 'grey3' | 'grey4' | 'grey5' | 'grey6' | 'black' | 'black10' | 'black15' | 'black20' | 'white';
21
+ export type Colors = 'primary' | 'secondary' | 'headerColor' | 'headerTextColor' | 'headerUserBackground' | 'headerUserTextColor' | 'headerSearchBarTextColor' | 'headerSearchBarBackgroundColor' | 'navBackground' | 'navTextColor' | 'lavender' | 'orange' | 'yellow' | 'green' | 'navy' | 'overseas' | 'night1' | 'night2' | 'sandLight' | 'sky' | 'sky15' | 'sand' | 'grey0' | 'grey1' | 'grey2' | 'grey3' | 'grey4' | 'grey5' | 'grey6' | 'black' | 'black10' | 'black15' | 'black20' | 'white';
22
22
  type ThemeConfigColorType = {
23
23
  [color in Colors]: string;
24
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.0.214",
3
+ "version": "1.0.216",
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.193",
83
+ "jamespot-user-api": "^1.0.196",
84
84
  "moment": "2.29.4",
85
85
  "react": "^17.x",
86
86
  "react-beautiful-dnd": "^13.1.1",