jamespot-react-components 1.3.127 → 1.3.129
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/dist/jamespot-react-components.cjs +1519 -1519
- package/dist/jamespot-react-components.js +14215 -14098
- package/dist/src/components/JRCCommentsBloc/JRCComment.d.ts +3 -1
- package/dist/src/components/JRCCommentsBloc/JRCCommentsBloc.d.ts +9 -1
- package/dist/src/components/JRCCommentsBloc/JRCCommentsBloc.stories.d.ts +3 -0
- package/dist/src/components/JRCCommentsBloc/components/EditComment.d.ts +2 -4
- package/dist/src/components/JRCCommentsBloc/components/JRCNewComment.d.ts +3 -1
- package/dist/src/translation/lang.json.d.ts +0 -1
- package/package.json +3 -3
|
@@ -29,6 +29,8 @@ type JRCCommentProps = {
|
|
|
29
29
|
};
|
|
30
30
|
articleId: number;
|
|
31
31
|
socialActionsSlot?: ReactNode;
|
|
32
|
+
/** Lets the container defer work that only writing needs. */
|
|
33
|
+
onEditorOpen?: () => void;
|
|
32
34
|
};
|
|
33
|
-
export declare const JRCComment: ({ isFocused, comment, token, tinyMCEConfig, onCommentUpdate, onCommentDelete, onError, highlightFields, userModel, userAccountStatus, isWidgetActive, onGetHashError, deleteFile, existingWidgetsWrapperComponent, activeDrives, socialQuestion, articleId, socialActionsSlot, }: JRCCommentProps) => import("react").JSX.Element;
|
|
35
|
+
export declare const JRCComment: ({ isFocused, comment, token, tinyMCEConfig, onCommentUpdate, onCommentDelete, onError, highlightFields, userModel, userAccountStatus, isWidgetActive, onGetHashError, deleteFile, existingWidgetsWrapperComponent, activeDrives, socialQuestion, articleId, socialActionsSlot, onEditorOpen, }: JRCCommentProps) => import("react").JSX.Element;
|
|
34
36
|
export {};
|
|
@@ -38,5 +38,13 @@ export type JRCCommentsBlocProps = {
|
|
|
38
38
|
articleId: number;
|
|
39
39
|
additionalExtensions: Array<TinyMCEExtension>;
|
|
40
40
|
renderSocialActions?: (comment: CommentWithExtensions<jCommentList, ['actions', 'quarantine']>) => ReactNode;
|
|
41
|
+
/** Server-side total. Falls back to the loaded length when the whole thread is in `comments`. */
|
|
42
|
+
commentsCount?: number;
|
|
43
|
+
/** Called when the reader asks for more, so the container can load the next page. */
|
|
44
|
+
onDisplayMore?: () => void;
|
|
45
|
+
/** Opens the new-comment editor on mount instead of showing the placeholder first. */
|
|
46
|
+
newCommentDefaultExpanded?: boolean;
|
|
47
|
+
/** Lets the container defer work that only writing needs. */
|
|
48
|
+
onEditorOpen?: () => void;
|
|
41
49
|
};
|
|
42
|
-
export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, canCreateWidget, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, onError, highlightFields, userModel, userAccountStatus, onGetHashError, activeDrives, variant, canComment, socialQuestion, articleId, additionalExtensions, renderSocialActions, }: JRCCommentsBlocProps) => import("react").JSX.Element;
|
|
50
|
+
export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, canCreateWidget, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, onError, highlightFields, userModel, userAccountStatus, onGetHashError, activeDrives, variant, canComment, socialQuestion, articleId, additionalExtensions, renderSocialActions, commentsCount, onDisplayMore, newCommentDefaultExpanded, onEditorOpen, }: JRCCommentsBlocProps) => import("react").JSX.Element;
|
|
@@ -3,3 +3,6 @@ import { JRCCommentsBlocProps } from './JRCCommentsBloc';
|
|
|
3
3
|
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, JRCCommentsBlocProps>;
|
|
6
|
+
export declare const NoComment: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, JRCCommentsBlocProps>;
|
|
7
|
+
export declare const FewerCommentsThanTheWindow: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, JRCCommentsBlocProps>;
|
|
8
|
+
export declare const PartiallyLoadedThread: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, JRCCommentsBlocProps>;
|
|
@@ -5,14 +5,12 @@ type EditCommentProps = {
|
|
|
5
5
|
comment: jCommentList;
|
|
6
6
|
activeDrives: DriveOrFilebank[];
|
|
7
7
|
tinyMCEConfig: Pick<JRCInputTinyMCERawProps, 'commonOptions' | 'mentionsQueries' | 'tinymceScriptSrc'>;
|
|
8
|
-
commentContent: string | null;
|
|
9
|
-
setCommentContent: (content: string) => void;
|
|
10
8
|
token: string;
|
|
11
9
|
deleteFile?: (id: number) => Promise<void>;
|
|
12
10
|
onError?: (code?: string) => void;
|
|
13
11
|
closeEditMode: () => void;
|
|
14
|
-
updateComment: () => void;
|
|
12
|
+
updateComment: (description: string) => void;
|
|
15
13
|
loading: boolean;
|
|
16
14
|
};
|
|
17
|
-
export declare const EditComment: ({ comment, tinyMCEConfig, activeDrives,
|
|
15
|
+
export declare const EditComment: ({ comment, tinyMCEConfig, activeDrives, token, deleteFile, onError, closeEditMode, updateComment, loading, }: EditCommentProps) => import("react").JSX.Element;
|
|
18
16
|
export {};
|
|
@@ -22,5 +22,7 @@ export type JRCNewCommentProps = {
|
|
|
22
22
|
defaultExpanded?: boolean;
|
|
23
23
|
/** When false, the publish button is enabled even with empty content. Default true. */
|
|
24
24
|
requireContent?: boolean;
|
|
25
|
+
/** Lets the container defer work that only writing needs. */
|
|
26
|
+
onEditorOpen?: () => void;
|
|
25
27
|
};
|
|
26
|
-
export declare const JRCNewComment: ({ newWidgetsWrapperComponent, widgetListComponent, canComment, loading, currentUser, onComment, onError, tinyMCEConfig, token, activeDrives, canCreateWidget, socialQuestion, deleteFile, additionalExtensions, defaultExpanded, requireContent, }: JRCNewCommentProps) => import("react").JSX.Element;
|
|
28
|
+
export declare const JRCNewComment: ({ newWidgetsWrapperComponent, widgetListComponent, canComment, loading, currentUser, onComment, onError, tinyMCEConfig, token, activeDrives, canCreateWidget, socialQuestion, deleteFile, additionalExtensions, defaultExpanded, requireContent, onEditorOpen, }: JRCNewCommentProps) => import("react").JSX.Element;
|
|
@@ -62,7 +62,6 @@ declare const _default: {
|
|
|
62
62
|
"WIDGET_METEO": "Weather",
|
|
63
63
|
"WIDGET_METEO_TEXT": "Display the weather in real time",
|
|
64
64
|
"WIDGET_METEO_Iframe": "Weather by Météo France",
|
|
65
|
-
"ACTIVITY_Can_Not_comment": "You cannot comment on this content",
|
|
66
65
|
"ACTIVITY_Can_Not_comment_Desc": "You cannot comment on this content. Several reasons are possible:<p>- You are not part of the audience of the content</p><p>- You do not have sufficient rights according to the group settings</p><p>- A solar storm creates interference (less likely, but you never know)",
|
|
67
66
|
"ADD_FAVORITE": "Add to favorites",
|
|
68
67
|
"APP_Animated_Meeting": "Diapazone",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.129",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/jamespot-react-components.cjs",
|
|
6
6
|
"module": "dist/jamespot-react-components.js",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"eslint-plugin-storybook": "10.3.6",
|
|
61
61
|
"globals": "^16.5.0",
|
|
62
62
|
"html2canvas": "^1.4.1",
|
|
63
|
-
"jamespot-front-business": "^1.3.
|
|
64
|
-
"jamespot-user-api": "^1.3.
|
|
63
|
+
"jamespot-front-business": "^1.3.129",
|
|
64
|
+
"jamespot-user-api": "^1.3.129",
|
|
65
65
|
"jsdom": "^26.1.0",
|
|
66
66
|
"knip": "^5.88.1",
|
|
67
67
|
"lint-staged": "^16.4.0",
|