@manuscripts/article-editor 3.4.1 → 3.4.2-LEAN-3894.0

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.
Files changed (40) hide show
  1. package/dist/cjs/components/comments/CommentActions.js +11 -7
  2. package/dist/cjs/components/comments/CommentActions.js.map +1 -1
  3. package/dist/cjs/components/comments/CommentBody.js +10 -6
  4. package/dist/cjs/components/comments/CommentBody.js.map +1 -1
  5. package/dist/cjs/components/comments/CommentCard.js +165 -0
  6. package/dist/cjs/components/comments/CommentCard.js.map +1 -0
  7. package/dist/cjs/components/comments/CommentResolveButton.js +1 -1
  8. package/dist/cjs/components/comments/CommentThread.js +83 -89
  9. package/dist/cjs/components/comments/CommentThread.js.map +1 -1
  10. package/dist/cjs/components/comments/CommentsPanel.js +33 -10
  11. package/dist/cjs/components/comments/CommentsPanel.js.map +1 -1
  12. package/dist/cjs/components/comments/DeleteCommentConfirmation.js +74 -0
  13. package/dist/cjs/components/comments/DeleteCommentConfirmation.js.map +1 -0
  14. package/dist/cjs/components/comments/ReplyBox.js +121 -0
  15. package/dist/cjs/components/comments/ReplyBox.js.map +1 -0
  16. package/dist/cjs/lib/comments.js +26 -5
  17. package/dist/cjs/lib/comments.js.map +1 -1
  18. package/dist/es/components/comments/CommentActions.js +11 -7
  19. package/dist/es/components/comments/CommentActions.js.map +1 -1
  20. package/dist/es/components/comments/CommentBody.js +11 -7
  21. package/dist/es/components/comments/CommentBody.js.map +1 -1
  22. package/dist/es/components/comments/CommentCard.js +135 -0
  23. package/dist/es/components/comments/CommentCard.js.map +1 -0
  24. package/dist/es/components/comments/CommentResolveButton.js +1 -1
  25. package/dist/es/components/comments/CommentThread.js +86 -92
  26. package/dist/es/components/comments/CommentThread.js.map +1 -1
  27. package/dist/es/components/comments/CommentsPanel.js +35 -12
  28. package/dist/es/components/comments/CommentsPanel.js.map +1 -1
  29. package/dist/es/components/comments/DeleteCommentConfirmation.js +67 -0
  30. package/dist/es/components/comments/DeleteCommentConfirmation.js.map +1 -0
  31. package/dist/es/components/comments/ReplyBox.js +91 -0
  32. package/dist/es/components/comments/ReplyBox.js.map +1 -0
  33. package/dist/es/lib/comments.js +23 -3
  34. package/dist/es/lib/comments.js.map +1 -1
  35. package/dist/types/components/comments/CommentCard.d.ts +27 -0
  36. package/dist/types/components/comments/CommentThread.d.ts +3 -2
  37. package/dist/types/components/comments/DeleteCommentConfirmation.d.ts +19 -0
  38. package/dist/types/components/comments/ReplyBox.d.ts +18 -0
  39. package/dist/types/lib/comments.d.ts +4 -3
  40. package/package.json +2 -2
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
3
+ *
4
+ * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
5
+ *
6
+ * The Original Code is manuscripts-frontend.
7
+ *
8
+ * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
9
+ *
10
+ * All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
11
+ */
12
+ import React from 'react';
13
+ interface DeleteCommentConfirmationProps {
14
+ isReply: boolean;
15
+ onCancel: () => void;
16
+ onConfirm: () => void;
17
+ }
18
+ export declare const DeleteCommentConfirmation: React.FC<DeleteCommentConfirmationProps>;
19
+ export {};
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
3
+ *
4
+ * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
5
+ *
6
+ * The Original Code is manuscripts-frontend.
7
+ *
8
+ * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
9
+ *
10
+ * All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
11
+ */
12
+ import React from 'react';
13
+ interface ReplyBoxProps {
14
+ insertCommentReply: (target: string, contents: string) => void;
15
+ commentID: string;
16
+ }
17
+ export declare const ReplyBox: React.FC<ReplyBoxProps>;
18
+ export {};
@@ -11,11 +11,12 @@
11
11
  */
12
12
  import { Comment } from '@manuscripts/body-editor';
13
13
  import { UserProfile } from '@manuscripts/json-schema';
14
- export type CommentTree = {
14
+ export type Thread = {
15
15
  comment: Comment;
16
16
  isNew: boolean;
17
- children: CommentTree[];
17
+ replies: Comment[];
18
18
  };
19
19
  export declare const getAuthorID: (comment: Comment) => string | undefined;
20
- export declare const buildCommentTrees: (comments: Comment[], newCommentID?: string) => CommentTree[];
20
+ export declare const buildThreads: (comments: Comment[], newCommentID?: string) => Thread[];
21
21
  export declare const buildAuthorName: (user: UserProfile | undefined) => string;
22
+ export declare const commentsByTime: (a: Comment, b: Comment) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/article-editor",
3
- "version": "3.4.1",
3
+ "version": "3.4.2-LEAN-3894.0",
4
4
  "license": "CPAL-1.0",
5
5
  "description": "React components for editing and viewing manuscripts",
6
6
  "repository": "github:Atypon-OpenSource/manuscripts-article-editor",
@@ -35,7 +35,7 @@
35
35
  "@fontsource/lato": "^4.5.10",
36
36
  "@fontsource/pt-sans": "^4.5.11",
37
37
  "@fontsource/pt-serif": "^4.5.11",
38
- "@manuscripts/body-editor": "2.5.1",
38
+ "@manuscripts/body-editor": "2.5.2-LEAN-3894.0",
39
39
  "@manuscripts/json-schema": "2.2.11",
40
40
  "@manuscripts/library": "1.3.11",
41
41
  "@manuscripts/style-guide": "2.0.21",