@manuscripts/article-editor 3.2.19-LEAN-3958.2 → 3.2.19-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 (75) 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/CommentCard.js +162 -0
  4. package/dist/cjs/components/comments/CommentCard.js.map +1 -0
  5. package/dist/cjs/components/comments/CommentResolveButton.js +1 -1
  6. package/dist/cjs/components/comments/CommentThread.js +77 -89
  7. package/dist/cjs/components/comments/CommentThread.js.map +1 -1
  8. package/dist/cjs/components/comments/CommentsPanel.js +33 -10
  9. package/dist/cjs/components/comments/CommentsPanel.js.map +1 -1
  10. package/dist/cjs/components/comments/DeleteCommentConfirmation.js +69 -0
  11. package/dist/cjs/components/comments/DeleteCommentConfirmation.js.map +1 -0
  12. package/dist/cjs/components/comments/ReplyBox.js +118 -0
  13. package/dist/cjs/components/comments/ReplyBox.js.map +1 -0
  14. package/dist/cjs/components/track-changes/suggestion-list/Suggestion.js +3 -3
  15. package/dist/cjs/components/track-changes/suggestion-list/Suggestion.js.map +1 -1
  16. package/dist/cjs/components/track-changes/suggestion-list/SuggestionSnippet.js +118 -26
  17. package/dist/cjs/components/track-changes/suggestion-list/SuggestionSnippet.js.map +1 -1
  18. package/dist/cjs/lib/comments.js +26 -5
  19. package/dist/cjs/lib/comments.js.map +1 -1
  20. package/dist/cjs/lib/fonts.js +0 -3
  21. package/dist/cjs/lib/fonts.js.map +1 -1
  22. package/dist/cjs/lib/footnotes.js +49 -0
  23. package/dist/cjs/lib/footnotes.js.map +1 -0
  24. package/dist/cjs/lib/tracking.js +0 -3
  25. package/dist/cjs/lib/tracking.js.map +1 -1
  26. package/dist/cjs/lib/utils.js +28 -11
  27. package/dist/cjs/lib/utils.js.map +1 -1
  28. package/dist/es/components/comments/CommentActions.js +11 -7
  29. package/dist/es/components/comments/CommentActions.js.map +1 -1
  30. package/dist/es/components/comments/CommentCard.js +132 -0
  31. package/dist/es/components/comments/CommentCard.js.map +1 -0
  32. package/dist/es/components/comments/CommentResolveButton.js +1 -1
  33. package/dist/es/components/comments/CommentThread.js +80 -92
  34. package/dist/es/components/comments/CommentThread.js.map +1 -1
  35. package/dist/es/components/comments/CommentsPanel.js +35 -12
  36. package/dist/es/components/comments/CommentsPanel.js.map +1 -1
  37. package/dist/es/components/comments/DeleteCommentConfirmation.js +62 -0
  38. package/dist/es/components/comments/DeleteCommentConfirmation.js.map +1 -0
  39. package/dist/es/components/comments/ReplyBox.js +88 -0
  40. package/dist/es/components/comments/ReplyBox.js.map +1 -0
  41. package/dist/es/components/track-changes/suggestion-list/Suggestion.js +3 -3
  42. package/dist/es/components/track-changes/suggestion-list/Suggestion.js.map +1 -1
  43. package/dist/es/components/track-changes/suggestion-list/SuggestionSnippet.js +119 -27
  44. package/dist/es/components/track-changes/suggestion-list/SuggestionSnippet.js.map +1 -1
  45. package/dist/es/lib/comments.js +23 -3
  46. package/dist/es/lib/comments.js.map +1 -1
  47. package/dist/es/lib/fonts.js +0 -3
  48. package/dist/es/lib/fonts.js.map +1 -1
  49. package/dist/es/lib/footnotes.js +43 -0
  50. package/dist/es/lib/footnotes.js.map +1 -0
  51. package/dist/es/lib/tracking.js +0 -3
  52. package/dist/es/lib/tracking.js.map +1 -1
  53. package/dist/es/lib/utils.js +25 -10
  54. package/dist/es/lib/utils.js.map +1 -1
  55. package/dist/types/{lib/change-handlers.d.ts → components/comments/CommentCard.d.ts} +12 -9
  56. package/dist/types/components/comments/CommentThread.d.ts +3 -2
  57. package/dist/{es/components/track-changes/suggestion-list/SnippetContent.js → types/components/comments/DeleteCommentConfirmation.d.ts} +7 -33
  58. package/dist/types/components/{track-changes/suggestion-list/SnippetContent.d.ts → comments/ReplyBox.d.ts} +5 -5
  59. package/dist/types/lib/comments.d.ts +4 -3
  60. package/dist/types/lib/fonts.d.ts +0 -3
  61. package/dist/types/lib/footnotes.d.ts +15 -0
  62. package/dist/types/lib/utils.d.ts +8 -1
  63. package/package.json +3 -3
  64. package/dist/cjs/components/track-changes/suggestion-list/SnippetContent.js +0 -72
  65. package/dist/cjs/components/track-changes/suggestion-list/SnippetContent.js.map +0 -1
  66. package/dist/cjs/lib/change-handlers.js +0 -123
  67. package/dist/cjs/lib/change-handlers.js.map +0 -1
  68. package/dist/cjs/lib/node-content-retriever.js +0 -130
  69. package/dist/cjs/lib/node-content-retriever.js.map +0 -1
  70. package/dist/es/components/track-changes/suggestion-list/SnippetContent.js.map +0 -1
  71. package/dist/es/lib/change-handlers.js +0 -117
  72. package/dist/es/lib/change-handlers.js.map +0 -1
  73. package/dist/es/lib/node-content-retriever.js +0 -123
  74. package/dist/es/lib/node-content-retriever.js.map +0 -1
  75. package/dist/types/lib/node-content-retriever.d.ts +0 -37
@@ -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;
@@ -12,6 +12,3 @@
12
12
  import '@fontsource/lato';
13
13
  import '@fontsource/pt-sans';
14
14
  import '@fontsource/pt-serif';
15
- import '@fontsource/lato/300.css';
16
- import '@fontsource/lato/400.css';
17
- import '@fontsource/lato/700.css';
@@ -0,0 +1,15 @@
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) 2019 Atypon Systems LLC. All Rights Reserved.
11
+ */
12
+ import { ManuscriptEditorState, ManuscriptNode } from '@manuscripts/transform';
13
+ export declare const findFootnoteById: (doc: ManuscriptNode, id: string) => ManuscriptNode | null;
14
+ export declare const getInlineFootnoteContent: (doc: ManuscriptNode, attrs: Record<any, any>) => string;
15
+ export declare const getFootnoteText: (state: ManuscriptEditorState, node: ManuscriptNode) => string;
@@ -9,5 +9,12 @@
9
9
  *
10
10
  * All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
11
11
  */
12
- import { EditorState } from 'prosemirror-state';
12
+ import { ManuscriptEditorState, ManuscriptNode } from '@manuscripts/transform';
13
+ import { EditorState, Plugin } from 'prosemirror-state';
14
+ interface ExtendedPlugin extends Plugin {
15
+ key: string;
16
+ }
17
+ export declare const getNodeTextContent: (node: ManuscriptNode) => string;
18
+ export declare const findPluginByKey: (state: ManuscriptEditorState, keyName: string) => ExtendedPlugin | null;
13
19
  export declare const getParentNode: (state: EditorState, pos: number) => import("prosemirror-model").Node | null;
20
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/article-editor",
3
- "version": "3.2.19-LEAN-3958.2",
3
+ "version": "3.2.19-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,12 +35,12 @@
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.2.20-LEAN-3958.0",
38
+ "@manuscripts/body-editor": "2.2.20-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",
42
42
  "@manuscripts/track-changes-plugin": "1.7.23",
43
- "@manuscripts/transform": "3.0.5-LEAN-3958.0",
43
+ "@manuscripts/transform": "3.0.4",
44
44
  "@popperjs/core": "^2.11.8",
45
45
  "@reach/tabs": "^0.18.0",
46
46
  "@types/use-sync-external-store": "^0.0.6",
@@ -1,72 +0,0 @@
1
- "use strict";
2
- /*!
3
- * 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.
4
- *
5
- * 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.
6
- *
7
- * The Original Code is manuscripts-frontend.
8
- *
9
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
10
- *
11
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
12
- */
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- var __importDefault = (this && this.__importDefault) || function (mod) {
37
- return (mod && mod.__esModule) ? mod : { "default": mod };
38
- };
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- const body_editor_1 = require("@manuscripts/body-editor");
41
- const dompurify_1 = __importDefault(require("dompurify"));
42
- const react_1 = __importStar(require("react"));
43
- const styled_components_1 = __importDefault(require("styled-components"));
44
- const SnippetContent = ({ content, isEquation }) => {
45
- const contentRef = (0, react_1.useRef)(null);
46
- (0, react_1.useEffect)(() => {
47
- if (contentRef.current && content) {
48
- contentRef.current.innerHTML = dompurify_1.default.sanitize(': ' + content) || '';
49
- if (isEquation) {
50
- (0, body_editor_1.renderMath)(contentRef.current);
51
- }
52
- }
53
- }, [content, isEquation]);
54
- return react_1.default.createElement(StyledContent, { ref: contentRef, "data-mathjax": isEquation });
55
- };
56
- exports.default = SnippetContent;
57
- const StyledContent = styled_components_1.default.span `
58
- color: #353535;
59
- font-family: Lato, sans-serif;
60
- font-size: 12px;
61
- font-weight: 400;
62
- line-height: 16px;
63
-
64
- &[data-mathjax='true'] {
65
- text-overflow: unset;
66
- }
67
-
68
- .inspector-list-item::after {
69
- content: '...';
70
- }
71
- `;
72
- //# sourceMappingURL=SnippetContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SnippetContent.js","sourceRoot":"","sources":["../../../../../src/components/track-changes/suggestion-list/SnippetContent.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0DAAqD;AACrD,0DAA8B;AAC9B,+CAAgD;AAChD,0EAAsC;AAOtC,MAAM,cAAc,GAA2B,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;IACzE,MAAM,UAAU,GAAG,IAAA,cAAM,EAAkB,IAAI,CAAC,CAAA;IAEhD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,UAAU,CAAC,OAAO,IAAI,OAAO,EAAE;YACjC,UAAU,CAAC,OAAO,CAAC,SAAS,GAAG,mBAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;YACpE,IAAI,UAAU,EAAE;gBACd,IAAA,wBAAU,EAAC,UAAU,CAAC,OAAO,CAAC,CAAA;aAC/B;SACF;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAA;IAEzB,OAAO,8BAAC,aAAa,IAAC,GAAG,EAAE,UAAU,kBAAgB,UAAU,GAAI,CAAA;AACrE,CAAC,CAAA;AAED,kBAAe,cAAc,CAAA;AAE7B,MAAM,aAAa,GAAG,2BAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;;;CAchC,CAAA"}
@@ -1,123 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleUnknownChange = exports.handleNodeChange = exports.handleTextChange = void 0;
4
- const transform_1 = require("@manuscripts/transform");
5
- const node_content_retriever_1 = require("./node-content-retriever");
6
- const tracking_1 = require("./tracking");
7
- const utils_1 = require("./utils");
8
- const handleTextChange = (suggestion, view, dataTracked) => {
9
- const parentNodeType = (0, utils_1.getParentNode)(view.state, suggestion.from)?.type;
10
- let nodeName;
11
- if (parentNodeType) {
12
- const parentNodeName = transform_1.nodeNames.get(parentNodeType) || parentNodeType?.name;
13
- nodeName =
14
- parentNodeType === transform_1.schema.nodes.paragraph
15
- ? 'text'
16
- : parentNodeName + ' text';
17
- }
18
- return {
19
- operation: (0, tracking_1.changeOperationAlias)(dataTracked.operation),
20
- nodeName: nodeName || suggestion.nodeType.name,
21
- content: suggestion.text,
22
- };
23
- };
24
- exports.handleTextChange = handleTextChange;
25
- const handleNodeChange = (suggestion, view, doc, dataTracked) => {
26
- const nodeContentRetriever = new node_content_retriever_1.NodeTextContentRetriever(view.state);
27
- const { node } = suggestion;
28
- const operation = (0, tracking_1.changeOperationAlias)(dataTracked.operation);
29
- const nodeName = transform_1.nodeNames.get(node.type) || node.type.name;
30
- switch (node.type) {
31
- case transform_1.schema.nodes.inline_footnote: {
32
- return {
33
- operation,
34
- nodeName,
35
- content: nodeContentRetriever.getInlineFootnoteContent(doc, node.attrs),
36
- };
37
- }
38
- case transform_1.schema.nodes.footnote: {
39
- return {
40
- operation,
41
- nodeName,
42
- content: nodeContentRetriever.getFootnoteContent(node),
43
- };
44
- }
45
- case transform_1.schema.nodes.contributor: {
46
- const contributorTextContent = `${node.attrs.bibliographicName.given} ${node.attrs.bibliographicName.family}`;
47
- return {
48
- operation,
49
- nodeName,
50
- content: contributorTextContent,
51
- };
52
- }
53
- case transform_1.schema.nodes.affiliation: {
54
- const affiliationTextContent = node.attrs.institution;
55
- return {
56
- operation,
57
- nodeName,
58
- content: affiliationTextContent,
59
- };
60
- }
61
- case transform_1.schema.nodes.citation: {
62
- return {
63
- operation,
64
- nodeName,
65
- content: nodeContentRetriever.getContentFromBibliography(node.attrs.id, node),
66
- };
67
- }
68
- case transform_1.schema.nodes.bibliography_item: {
69
- return {
70
- operation,
71
- nodeName,
72
- content: nodeContentRetriever.getContentFromBibliography(node.attrs.id, node),
73
- };
74
- }
75
- case transform_1.schema.nodes.figure_element:
76
- case transform_1.schema.nodes.table_element:
77
- return {
78
- operation,
79
- nodeName,
80
- content: nodeContentRetriever.getFigureLabel(node),
81
- };
82
- case transform_1.schema.nodes.inline_equation:
83
- case transform_1.schema.nodes.equation_element:
84
- return {
85
- operation,
86
- nodeName,
87
- content: nodeContentRetriever.getEquationContent(node),
88
- isEquation: true,
89
- };
90
- case transform_1.schema.nodes.section: {
91
- const nodeName = node.attrs.category === 'MPSectionCategory:subsection'
92
- ? 'Subsection'
93
- : 'Section';
94
- return {
95
- operation,
96
- nodeName,
97
- content: nodeContentRetriever.getFirstChildContent(node),
98
- };
99
- }
100
- case transform_1.schema.nodes.list:
101
- return {
102
- operation,
103
- nodeName,
104
- content: `<span class="inspector-list-item">${nodeContentRetriever.getFirstChildContent(node)}</span>`,
105
- };
106
- default:
107
- return {
108
- operation,
109
- nodeName,
110
- content: nodeContentRetriever.getNodeTextContent(node),
111
- };
112
- }
113
- };
114
- exports.handleNodeChange = handleNodeChange;
115
- const handleUnknownChange = () => {
116
- return {
117
- operation: '',
118
- nodeName: '',
119
- content: 'Unknown change!',
120
- };
121
- };
122
- exports.handleUnknownChange = handleUnknownChange;
123
- //# sourceMappingURL=change-handlers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-handlers.js","sourceRoot":"","sources":["../../../src/lib/change-handlers.ts"],"names":[],"mappings":";;;AAgBA,sDAA0D;AAE1D,qEAAmE;AACnE,yCAAiD;AACjD,mCAAuC;AAShC,MAAM,gBAAgB,GAAG,CAC9B,UAAsB,EACtB,IAAS,EACT,WAAgB,EACI,EAAE;IACtB,MAAM,cAAc,GAAG,IAAA,qBAAa,EAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;IACvE,IAAI,QAAQ,CAAA;IACZ,IAAI,cAAc,EAAE;QAClB,MAAM,cAAc,GAAG,qBAAS,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,cAAc,EAAE,IAAI,CAAA;QAC5E,QAAQ;YACN,cAAc,KAAK,kBAAM,CAAC,KAAK,CAAC,SAAS;gBACvC,CAAC,CAAC,MAAM;gBACR,CAAC,CAA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CAAC,KAAK,CAAC,QAAQ,KAAK,8BAA8B;gBACpD,CAAC,CAAC,YAAY;gBACd,CAAC,CAAC,SAAS,CAAA;YACf,OAAO;gBACL,SAAS;gBACT,QAAQ;gBACR,OAAO,EAAE,oBAAoB,CAAC,oBAAoB,CAAC,IAAI,CAAC;aACzD,CAAA;SACF;QACD,KAAK,kBAAM,CAAC,KAAK,CAAC,IAAI;YACpB,OAAO;gBACL,SAAS;gBACT,QAAQ;gBACR,OAAO,EAAE,qCAAqC,oBAAoB,CAAC,oBAAoB,CACrF,IAAI,CACL,SAAS;aACX,CAAA;QACH;YACE,OAAO;gBACL,SAAS;gBACT,QAAQ;gBACR,OAAO,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,IAAI,CAAC;aACvD,CAAA;KACJ;AACH,CAAC,CAAA;AAvGY,QAAA,gBAAgB,oBAuG5B;AAEM,MAAM,mBAAmB,GAAG,GAAgB,EAAE;IACnD,OAAO;QACL,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,iBAAiB;KAC3B,CAAA;AACH,CAAC,CAAA;AANY,QAAA,mBAAmB,uBAM/B"}
@@ -1,130 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.NodeTextContentRetriever = void 0;
7
- /*!
8
- * 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.
9
- *
10
- * 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.
11
- *
12
- * The Original Code is manuscripts-frontend.
13
- *
14
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
15
- *
16
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
17
- */
18
- const body_editor_1 = require("@manuscripts/body-editor");
19
- const transform_1 = require("@manuscripts/transform");
20
- const dompurify_1 = __importDefault(require("dompurify"));
21
- class NodeTextContentRetriever {
22
- constructor(state) {
23
- this.state = state;
24
- }
25
- /**
26
- * Recursively retrieves text content from a ManuscriptNode.
27
- */
28
- getNodeTextContent(node) {
29
- let textContent = '';
30
- if (!(0, transform_1.isElementNodeType)(node.type)) {
31
- node.forEach((child) => {
32
- if (child.isText) {
33
- textContent += child.text;
34
- }
35
- else {
36
- textContent += this.getNodeTextContent(child);
37
- }
38
- });
39
- }
40
- return textContent;
41
- }
42
- /**
43
- * Retrieves the text content of the first child node.
44
- */
45
- getFirstChildContent(node) {
46
- return node.firstChild ? node.firstChild.textContent : '';
47
- }
48
- /**
49
- * Retrieves the text content from a bibliography node.
50
- */
51
- getContentFromBibliography(id, node) {
52
- const bibPlugin = body_editor_1.bibliographyPluginKey.get(this.state);
53
- const bib = bibPlugin?.getState(this.state);
54
- if (!bib) {
55
- return '';
56
- }
57
- if (node.type === transform_1.schema.nodes.citation) {
58
- const text = bib?.renderedCitations.get(id);
59
- const citation = dompurify_1.default.sanitize(text && text !== '[NO_PRINTED_FORM]' ? text : ' ', {
60
- ALLOWED_TAGS: ['i', 'b', 'span', 'sup', 'sub', '#text'],
61
- });
62
- return citation ? citation.replace(/<[^>]*>/g, '') : '';
63
- }
64
- else {
65
- const [meta, bibliography] = bib.provider.makeBibliography();
66
- const selectedBib = meta.entry_ids.findIndex((entry) => entry[0] === id);
67
- if (selectedBib === -1) {
68
- return `<span> ${node.attrs.title || 'untitled'} </span> ${(0, body_editor_1.metadata)(node.attrs)}`;
69
- }
70
- const parser = new DOMParser();
71
- const textContent = parser.parseFromString(bibliography[selectedBib], 'text/html').body.textContent;
72
- return textContent || '';
73
- }
74
- }
75
- /**
76
- * Retrieves the content of an equation node.
77
- */
78
- getEquationContent(node) {
79
- if (node.firstChild && node.type === transform_1.schema.nodes.equation_element) {
80
- return node.firstChild.attrs.contents;
81
- }
82
- else if (node) {
83
- return node.attrs.contents;
84
- }
85
- return '';
86
- }
87
- /**
88
- * Retrieves the label of a figure node.
89
- */
90
- getFigureLabel(node) {
91
- const objectsPlugin = body_editor_1.objectsPluginKey.get(this.state);
92
- const pluginState = objectsPlugin?.getState(this.state);
93
- const target = pluginState?.get(node.attrs.id);
94
- return target?.label || '';
95
- }
96
- /**
97
- * Finds a footnote node by its ID.
98
- */
99
- findFootnoteById(doc, id) {
100
- let footnoteNode = null;
101
- doc.descendants((node) => {
102
- if (node.type === transform_1.schema.nodes.footnote && node.attrs.id === id) {
103
- footnoteNode = node;
104
- return false;
105
- }
106
- return !footnoteNode;
107
- });
108
- return footnoteNode;
109
- }
110
- /**
111
- * Retrieves the inline footnote content.
112
- */
113
- getInlineFootnoteContent(doc, attrs) {
114
- const footnote = attrs.rids && attrs.rids.length > 0
115
- ? this.findFootnoteById(doc, attrs.rids[0])
116
- : null;
117
- return `<sup class="footnote-decoration">${attrs.contents || ''}</sup>${footnote ? footnote.textContent : ''}`;
118
- }
119
- /**
120
- * Retrieves the text content of a footnote node with decoration.
121
- */
122
- getFootnoteContent(node) {
123
- const footnotesPlugin = body_editor_1.footnotesPluginKey.get(this.state);
124
- const pluginState = footnotesPlugin?.getState(this.state);
125
- const decorationText = pluginState?.labels.get(node.attrs.id) || '';
126
- return `<sup class="footnote-decoration">${decorationText}</sup>${this.getNodeTextContent(node)}`;
127
- }
128
- }
129
- exports.NodeTextContentRetriever = NodeTextContentRetriever;
130
- //# sourceMappingURL=node-content-retriever.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"node-content-retriever.js","sourceRoot":"","sources":["../../../src/lib/node-content-retriever.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;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ACI,kBAAkB,CAAC,IAAoB;QAC5C,MAAM,eAAe,GAAG,gCAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC1D,MAAM,WAAW,GAAG,eAAe,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACzD,MAAM,cAAc,GAAG,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAA;QAEnE,OAAO,oCAAoC,cAAc,SAAS,IAAI,CAAC,kBAAkB,CACvF,IAAI,CACL,EAAE,CAAA;IACL,CAAC;CACF;AA5ID,4DA4IC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SnippetContent.js","sourceRoot":"","sources":["../../../../../src/components/track-changes/suggestion-list/SnippetContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAOtC,MAAM,cAAc,GAA2B,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;IACzE,MAAM,UAAU,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAA;IAEhD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,UAAU,CAAC,OAAO,IAAI,OAAO,EAAE;YACjC,UAAU,CAAC,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;YACpE,IAAI,UAAU,EAAE;gBACd,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;aAC/B;SACF;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAA;IAEzB,OAAO,oBAAC,aAAa,IAAC,GAAG,EAAE,UAAU,kBAAgB,UAAU,GAAI,CAAA;AACrE,CAAC,CAAA;AAED,eAAe,cAAc,CAAA;AAE7B,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;;;CAchC,CAAA"}
@@ -1,117 +0,0 @@
1
- import { nodeNames, schema } from '@manuscripts/transform';
2
- import { NodeTextContentRetriever } from './node-content-retriever';
3
- import { changeOperationAlias } from './tracking';
4
- import { getParentNode } from './utils';
5
- export const handleTextChange = (suggestion, view, dataTracked) => {
6
- const parentNodeType = getParentNode(view.state, suggestion.from)?.type;
7
- let nodeName;
8
- if (parentNodeType) {
9
- const parentNodeName = nodeNames.get(parentNodeType) || parentNodeType?.name;
10
- nodeName =
11
- parentNodeType === schema.nodes.paragraph
12
- ? 'text'
13
- : parentNodeName + ' text';
14
- }
15
- return {
16
- operation: changeOperationAlias(dataTracked.operation),
17
- nodeName: nodeName || suggestion.nodeType.name,
18
- content: suggestion.text,
19
- };
20
- };
21
- export const handleNodeChange = (suggestion, view, doc, dataTracked) => {
22
- const nodeContentRetriever = new NodeTextContentRetriever(view.state);
23
- const { node } = suggestion;
24
- const operation = changeOperationAlias(dataTracked.operation);
25
- const nodeName = nodeNames.get(node.type) || node.type.name;
26
- switch (node.type) {
27
- case schema.nodes.inline_footnote: {
28
- return {
29
- operation,
30
- nodeName,
31
- content: nodeContentRetriever.getInlineFootnoteContent(doc, node.attrs),
32
- };
33
- }
34
- case schema.nodes.footnote: {
35
- return {
36
- operation,
37
- nodeName,
38
- content: nodeContentRetriever.getFootnoteContent(node),
39
- };
40
- }
41
- case schema.nodes.contributor: {
42
- const contributorTextContent = `${node.attrs.bibliographicName.given} ${node.attrs.bibliographicName.family}`;
43
- return {
44
- operation,
45
- nodeName,
46
- content: contributorTextContent,
47
- };
48
- }
49
- case schema.nodes.affiliation: {
50
- const affiliationTextContent = node.attrs.institution;
51
- return {
52
- operation,
53
- nodeName,
54
- content: affiliationTextContent,
55
- };
56
- }
57
- case schema.nodes.citation: {
58
- return {
59
- operation,
60
- nodeName,
61
- content: nodeContentRetriever.getContentFromBibliography(node.attrs.id, node),
62
- };
63
- }
64
- case schema.nodes.bibliography_item: {
65
- return {
66
- operation,
67
- nodeName,
68
- content: nodeContentRetriever.getContentFromBibliography(node.attrs.id, node),
69
- };
70
- }
71
- case schema.nodes.figure_element:
72
- case schema.nodes.table_element:
73
- return {
74
- operation,
75
- nodeName,
76
- content: nodeContentRetriever.getFigureLabel(node),
77
- };
78
- case schema.nodes.inline_equation:
79
- case schema.nodes.equation_element:
80
- return {
81
- operation,
82
- nodeName,
83
- content: nodeContentRetriever.getEquationContent(node),
84
- isEquation: true,
85
- };
86
- case schema.nodes.section: {
87
- const nodeName = node.attrs.category === 'MPSectionCategory:subsection'
88
- ? 'Subsection'
89
- : 'Section';
90
- return {
91
- operation,
92
- nodeName,
93
- content: nodeContentRetriever.getFirstChildContent(node),
94
- };
95
- }
96
- case schema.nodes.list:
97
- return {
98
- operation,
99
- nodeName,
100
- content: `<span class="inspector-list-item">${nodeContentRetriever.getFirstChildContent(node)}</span>`,
101
- };
102
- default:
103
- return {
104
- operation,
105
- nodeName,
106
- content: nodeContentRetriever.getNodeTextContent(node),
107
- };
108
- }
109
- };
110
- export const handleUnknownChange = () => {
111
- return {
112
- operation: '',
113
- nodeName: '',
114
- content: 'Unknown change!',
115
- };
116
- };
117
- //# sourceMappingURL=change-handlers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-handlers.js","sourceRoot":"","sources":["../../../src/lib/change-handlers.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AASvC,MAAM,CAAC,MAAM,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