@manuscripts/article-editor 3.5.30-LEAN-4192.0 → 3.5.31-LEAN-4100.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.
- package/dist/cjs/components/projects/EditorElement.js +2 -0
- package/dist/cjs/components/projects/EditorElement.js.map +1 -1
- package/dist/cjs/hooks/use-watch-title.js +42 -0
- package/dist/cjs/hooks/use-watch-title.js.map +1 -0
- package/dist/cjs/lib/get-node-without-tc.js +61 -0
- package/dist/cjs/lib/get-node-without-tc.js.map +1 -0
- package/dist/cjs/store/Store.js.map +1 -1
- package/dist/es/components/projects/EditorElement.js +2 -0
- package/dist/es/components/projects/EditorElement.js.map +1 -1
- package/dist/es/hooks/use-watch-title.js +38 -0
- package/dist/es/hooks/use-watch-title.js.map +1 -0
- package/dist/es/lib/get-node-without-tc.js +56 -0
- package/dist/es/lib/get-node-without-tc.js.map +1 -0
- package/dist/es/store/Store.js.map +1 -1
- package/dist/types/hooks/use-watch-title.d.ts +12 -0
- package/dist/types/lib/get-node-without-tc.d.ts +14 -0
- package/dist/types/store/Store.d.ts +1 -0
- package/package.json +3 -3
@@ -42,6 +42,7 @@ const prosemirror_utils_1 = require("prosemirror-utils");
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
43
43
|
const react_dnd_1 = require("react-dnd");
|
44
44
|
const use_connect_editor_1 = require("../../hooks/use-connect-editor");
|
45
|
+
const use_watch_title_1 = require("../../hooks/use-watch-title");
|
45
46
|
const node_attrs_1 = require("../../lib/node-attrs");
|
46
47
|
const store_1 = require("../../store");
|
47
48
|
const Icons_1 = require("../track-changes/suggestion-list/Icons");
|
@@ -51,6 +52,7 @@ const EditorElement = () => {
|
|
51
52
|
editor: store.editor,
|
52
53
|
}));
|
53
54
|
const { onRender, view, dispatch } = (0, use_connect_editor_1.useConnectEditor)();
|
55
|
+
(0, use_watch_title_1.useWatchTitle)();
|
54
56
|
const [, drop] = (0, react_dnd_1.useDrop)({
|
55
57
|
accept: 'file',
|
56
58
|
drop: async (item, monitor) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EditorElement.js","sourceRoot":"","sources":["../../../../src/components/projects/EditorElement.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,0DAMiC;AACjC,0DAA2D;AAC3D,sDAM+B;AAE/B,yDAA8D;AAC9D,yDAAuE;AACvE,+CAAuC;AACvC,yCAAmC;AAEnC,uEAAiE;AACjE,qDAAmD;AACnD,uCAAsC;AACtC,kEAAkE;AAElE,MAAM,aAAa,GAAa,GAAG,EAAE;IACnC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAA;IACtC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACxC,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC,CAAC,CAAA;IAEH,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAA,qCAAgB,GAAE,CAAA;
|
1
|
+
{"version":3,"file":"EditorElement.js","sourceRoot":"","sources":["../../../../src/components/projects/EditorElement.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,0DAMiC;AACjC,0DAA2D;AAC3D,sDAM+B;AAE/B,yDAA8D;AAC9D,yDAAuE;AACvE,+CAAuC;AACvC,yCAAmC;AAEnC,uEAAiE;AACjE,iEAA2D;AAC3D,qDAAmD;AACnD,uCAAsC;AACtC,kEAAkE;AAElE,MAAM,aAAa,GAAa,GAAG,EAAE;IACnC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAA;IACtC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,IAAA,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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) 2021 Atypon Systems LLC. All Rights Reserved.
|
12
|
+
*/
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
+
exports.useWatchTitle = void 0;
|
15
|
+
const react_1 = require("react");
|
16
|
+
const get_node_without_tc_1 = require("../lib/get-node-without-tc");
|
17
|
+
const store_1 = require("../store");
|
18
|
+
function useWatchTitle() {
|
19
|
+
const [doc, dispatch] = (0, store_1.useStore)((state) => state.doc);
|
20
|
+
const [prevText] = (0, store_1.useStore)((state) => state.titleText);
|
21
|
+
(0, react_1.useEffect)(() => {
|
22
|
+
let newTitleNode = null;
|
23
|
+
doc.descendants((node, pos) => {
|
24
|
+
if (newTitleNode) {
|
25
|
+
return false;
|
26
|
+
}
|
27
|
+
if (node.type === node.type.schema.nodes.title) {
|
28
|
+
newTitleNode = node;
|
29
|
+
}
|
30
|
+
});
|
31
|
+
if (newTitleNode) {
|
32
|
+
const node = newTitleNode;
|
33
|
+
const newRealText = (0, get_node_without_tc_1.getNodeRealText)(node);
|
34
|
+
if (newRealText !== prevText) {
|
35
|
+
dispatch({ titleText: (0, get_node_without_tc_1.getNodeRealText)(node) });
|
36
|
+
}
|
37
|
+
}
|
38
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
39
|
+
}, [doc]);
|
40
|
+
}
|
41
|
+
exports.useWatchTitle = useWatchTitle;
|
42
|
+
//# sourceMappingURL=use-watch-title.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use-watch-title.js","sourceRoot":"","sources":["../../../src/hooks/use-watch-title.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAGH,iCAAiC;AAEjC,oEAA4D;AAC5D,oCAAmC;AAEnC,SAAgB,aAAa;IAC3B,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACtD,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAEvD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,YAAY,GAA0B,IAAI,CAAA;QAE9C,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YAC5B,IAAI,YAAY,EAAE;gBAChB,OAAO,KAAK,CAAA;aACb;YACD,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE;gBAC9C,YAAY,GAAG,IAAI,CAAA;aACpB;QACH,CAAC,CAAC,CAAA;QAEF,IAAI,YAAY,EAAE;YAChB,MAAM,IAAI,GAAG,YAA8B,CAAA;YAE3C,MAAM,WAAW,GAAG,IAAA,qCAAe,EAAC,IAAI,CAAC,CAAA;YAEzC,IAAI,WAAW,KAAK,QAAQ,EAAE;gBAC5B,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAA,qCAAe,EAAC,IAAI,CAAC,EAAE,CAAC,CAAA;aAC/C;SACF;QACD,uDAAuD;IACzD,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;AACX,CAAC;AA3BD,sCA2BC"}
|
@@ -0,0 +1,61 @@
|
|
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) 2019 Atypon Systems LLC. All Rights Reserved.
|
12
|
+
*/
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
+
exports.getNodeRealText = exports.checkSuggestionsFor = void 0;
|
15
|
+
function checkSuggestionsFor(node, onNodeReal) {
|
16
|
+
let textString = '';
|
17
|
+
if (node.content?.length) {
|
18
|
+
const newContent = [];
|
19
|
+
nodesLoop: for (let i = 0; i < node.content?.length; i++) {
|
20
|
+
const child = node.content[i];
|
21
|
+
const newMarks = [];
|
22
|
+
if (child.type === 'text' && child.marks) {
|
23
|
+
for (let i = 0; i < child.marks?.length; i++) {
|
24
|
+
if (child.marks[i].type === 'tracked_insert') {
|
25
|
+
// skipping the entire node as it's unconfirmed
|
26
|
+
continue nodesLoop;
|
27
|
+
}
|
28
|
+
if (child.marks[i].type === 'tracked_delete') {
|
29
|
+
// drop marks and treat deleted content as normal
|
30
|
+
continue;
|
31
|
+
}
|
32
|
+
newMarks.push(child.marks[i]);
|
33
|
+
}
|
34
|
+
textString += child.text;
|
35
|
+
}
|
36
|
+
if (child.attrs && child.attrs.dataTracked) {
|
37
|
+
const changes = node.attrs.dataTracked;
|
38
|
+
if (changes.some(({ operation }) => operation === 'insert')) {
|
39
|
+
continue;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
checkSuggestionsFor(child, onNodeReal);
|
43
|
+
onNodeReal(child);
|
44
|
+
newContent.push(child);
|
45
|
+
}
|
46
|
+
node.content = newContent;
|
47
|
+
}
|
48
|
+
return textString;
|
49
|
+
}
|
50
|
+
exports.checkSuggestionsFor = checkSuggestionsFor;
|
51
|
+
function getNodeRealText(node) {
|
52
|
+
let text = '';
|
53
|
+
checkSuggestionsFor(node.toJSON(), (jsonNode) => {
|
54
|
+
if (jsonNode.text) {
|
55
|
+
text += jsonNode.text;
|
56
|
+
}
|
57
|
+
});
|
58
|
+
return text;
|
59
|
+
}
|
60
|
+
exports.getNodeRealText = getNodeRealText;
|
61
|
+
//# sourceMappingURL=get-node-without-tc.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"get-node-without-tc.js","sourceRoot":"","sources":["../../../src/lib/get-node-without-tc.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAKH,SAAgB,mBAAmB,CACjC,IAAc,EACd,UAAoC;IAEpC,IAAI,UAAU,GAAG,EAAE,CAAA;IACnB,IAAI,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE;QACxB,MAAM,UAAU,GAAG,EAAE,CAAA;QAErB,SAAS,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;YACxD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;YAC7B,MAAM,QAAQ,GAAG,EAAE,CAAA;YACnB,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE;gBACxC,KAA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AAC,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC;AARD,0CAQC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../../src/store/Store.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAkBH,wBAAkE;
|
1
|
+
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../../src/store/Store.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAkBH,wBAAkE;AA4DlE,MAAM,cAAc,GAAG,GAAG,CAAA,CAAC,0BAA0B;AAErD,MAAM,cAAc,GAAG,CAAC,OAAY,EAAE,KAAY,EAAE,MAAe,EAAE,EAAE;IACrE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,OAAO,EAAE,CAAA;AACjC,CAAC,CAAA;AAqBD,MAAa,YAAY;IAWvB,YACE,OAAO,GAAG,cAAc,EACxB,cAAuC,EACvC,KAAK,GAAG,EAAE;QAiBZ,UAAK,GAA6C,IAAI,GAAG,EAAE,CAAA;QAa3D,SAAI,GAAG,KAAK,EAAE,OAAkC,EAAE,EAAE;YAClD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;YAEtB,MAAM,KAAK,GAAG,MAAM,IAAA,wBAAqB,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;YACjE,IAAI,CAAC,QAAQ,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,GAAI,KAAe,EAAE,CAAC,CAAA;YACrD,4CAA4C;YAC5C,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;gBACvD,qEAAqE;gBACrE,0DAA0D;gBAC1D,IAAI,CAAC,OAAO,CAAC,GAAG,CACd,CAAC,MAAM,EAAE,EAAE,CACT,MAAM,CAAC,YAAY;oBACnB,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,Q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C;IACD,OAAO;QACL,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAM,CAAC,CAAA;SACjC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC,CAAA;SACrE;QACD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,CAAC,KAAK,GAAG,EAAW,CAAA;QACxB,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAA;IACxB,CAAC;CACF;AAlHD,oCAkHC"}
|
@@ -17,6 +17,7 @@ import { findParentNodeClosestToPos, flatten } from 'prosemirror-utils';
|
|
17
17
|
import React, { useState } from 'react';
|
18
18
|
import { useDrop } from 'react-dnd';
|
19
19
|
import { useConnectEditor } from '../../hooks/use-connect-editor';
|
20
|
+
import { useWatchTitle } from '../../hooks/use-watch-title';
|
20
21
|
import { setNodeAttrs } from '../../lib/node-attrs';
|
21
22
|
import { useStore } from '../../store';
|
22
23
|
import { SpriteMap } from '../track-changes/suggestion-list/Icons';
|
@@ -26,6 +27,7 @@ const EditorElement = () => {
|
|
26
27
|
editor: store.editor,
|
27
28
|
}));
|
28
29
|
const { onRender, view, dispatch } = useConnectEditor();
|
30
|
+
useWatchTitle();
|
29
31
|
const [, drop] = useDrop({
|
30
32
|
accept: 'file',
|
31
33
|
drop: async (item, monitor) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EditorElement.js","sourceRoot":"","sources":["../../../../src/components/projects/EditorElement.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAEL,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,GAEb,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,0BAA0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B,EAC1B,QAAmC,EACnC,KAA8B,EAC9B,GAAW,EACX,EAAE;IACF,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC;QAC/C,GAAG,KAAK;QACR,EAAE,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;KACxC,CAAe,CAAA;IAChB,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IAC5C,QAAQ,CAAC,EAAE,CAAC,CAAA;AACd,CAAC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
@@ -0,0 +1,38 @@
|
|
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) 2021 Atypon Systems LLC. All Rights Reserved.
|
11
|
+
*/
|
12
|
+
import { useEffect } from 'react';
|
13
|
+
import { getNodeRealText } from '../lib/get-node-without-tc';
|
14
|
+
import { useStore } from '../store';
|
15
|
+
export function useWatchTitle() {
|
16
|
+
const [doc, dispatch] = useStore((state) => state.doc);
|
17
|
+
const [prevText] = useStore((state) => state.titleText);
|
18
|
+
useEffect(() => {
|
19
|
+
let newTitleNode = null;
|
20
|
+
doc.descendants((node, pos) => {
|
21
|
+
if (newTitleNode) {
|
22
|
+
return false;
|
23
|
+
}
|
24
|
+
if (node.type === node.type.schema.nodes.title) {
|
25
|
+
newTitleNode = node;
|
26
|
+
}
|
27
|
+
});
|
28
|
+
if (newTitleNode) {
|
29
|
+
const node = newTitleNode;
|
30
|
+
const newRealText = getNodeRealText(node);
|
31
|
+
if (newRealText !== prevText) {
|
32
|
+
dispatch({ titleText: getNodeRealText(node) });
|
33
|
+
}
|
34
|
+
}
|
35
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
36
|
+
}, [doc]);
|
37
|
+
}
|
38
|
+
//# sourceMappingURL=use-watch-title.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use-watch-title.js","sourceRoot":"","sources":["../../../src/hooks/use-watch-title.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACtD,MAAM,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAEvD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,GAA0B,IAAI,CAAA;QAE9C,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;YAC5B,IAAI,YAAY,EAAE;gBAChB,OAAO,KAAK,CAAA;aACb;YACD,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE;gBAC9C,YAAY,GAAG,IAAI,CAAA;aACpB;QACH,CAAC,CAAC,CAAA;QAEF,IAAI,YAAY,EAAE;YAChB,MAAM,IAAI,GAAG,YAA8B,CAAA;YAE3C,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,CAAA;YAEzC,IAAI,WAAW,KAAK,QAAQ,EAAE;gBAC5B,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;aAC/C;SACF;QACD,uDAAuD;IACzD,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;AACX,CAAC"}
|
@@ -0,0 +1,56 @@
|
|
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
|
+
export function checkSuggestionsFor(node, onNodeReal) {
|
13
|
+
let textString = '';
|
14
|
+
if (node.content?.length) {
|
15
|
+
const newContent = [];
|
16
|
+
nodesLoop: for (let i = 0; i < node.content?.length; i++) {
|
17
|
+
const child = node.content[i];
|
18
|
+
const newMarks = [];
|
19
|
+
if (child.type === 'text' && child.marks) {
|
20
|
+
for (let i = 0; i < child.marks?.length; i++) {
|
21
|
+
if (child.marks[i].type === 'tracked_insert') {
|
22
|
+
// skipping the entire node as it's unconfirmed
|
23
|
+
continue nodesLoop;
|
24
|
+
}
|
25
|
+
if (child.marks[i].type === 'tracked_delete') {
|
26
|
+
// drop marks and treat deleted content as normal
|
27
|
+
continue;
|
28
|
+
}
|
29
|
+
newMarks.push(child.marks[i]);
|
30
|
+
}
|
31
|
+
textString += child.text;
|
32
|
+
}
|
33
|
+
if (child.attrs && child.attrs.dataTracked) {
|
34
|
+
const changes = node.attrs.dataTracked;
|
35
|
+
if (changes.some(({ operation }) => operation === 'insert')) {
|
36
|
+
continue;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
checkSuggestionsFor(child, onNodeReal);
|
40
|
+
onNodeReal(child);
|
41
|
+
newContent.push(child);
|
42
|
+
}
|
43
|
+
node.content = newContent;
|
44
|
+
}
|
45
|
+
return textString;
|
46
|
+
}
|
47
|
+
export function getNodeRealText(node) {
|
48
|
+
let text = '';
|
49
|
+
checkSuggestionsFor(node.toJSON(), (jsonNode) => {
|
50
|
+
if (jsonNode.text) {
|
51
|
+
text += jsonNode.text;
|
52
|
+
}
|
53
|
+
});
|
54
|
+
return text;
|
55
|
+
}
|
56
|
+
//# sourceMappingURL=get-node-without-tc.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"get-node-without-tc.js","sourceRoot":"","sources":["../../../src/lib/get-node-without-tc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,MAAM,UAAU,mBAAmB,CACjC,IAAc,EACd,UAAoC;IAEpC,IAAI,UAAU,GAAG,EAAE,CAAA;IACnB,IAAI,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE;QACxB,MAAM,UAAU,GAAG,EAAE,CAAA;QAErB,SAAS,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;YACxD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AA;IACb,mBAAmB,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE;QAC9C,IAAI,QAAQ,CAAC,IAAI,EAAE;YACjB,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAA;SACtB;IACH,CAAC,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../../src/store/Store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAkBH,OAAO,EAAE,qBAAqB,EAA2B,MAAM,GAAG,CAAA;
|
1
|
+
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../../src/store/Store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAkBH,OAAO,EAAE,qBAAqB,EAA2B,MAAM,GAAG,CAAA;AA4DlE,MAAM,cAAc,GAAG,GAAG,CAAA,CAAC,0BAA0B;AAErD,MAAM,cAAc,GAAG,CAAC,OAAY,EAAE,KAAY,EAAE,MAAe,EAAE,EAAE;IACrE,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,OAAO,EAAE,CAAA;AACjC,CAAC,CAAA;AAqBD,MAAM,OAAO,YAAY;IAWvB,YACE,OAAO,GAAG,cAAc,EACxB,cAAuC,EACvC,KAAK,GAAG,EAAE;QAiBZ,UAAK,GAA6C,IAAI,GAAG,EAAE,CAAA;QAa3D,SAAI,GAAG,KAAK,EAAE,OAAkC,EAAE,EAAE;YAClD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;YAEtB,MAAM,KAAK,GAAG,MAAM,qBAAqB,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;YACjE,IAAI,CAAC,QAAQ,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,GAAI,KAAe,EAAE,CAAC,CAAA;YACrD,4CAA4C;YAC5C,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,EAAE,OAA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AM,EACX,IAAI,CAAC,QAAQ,CACd,CAAA;QACD,IAAI,kBAAkB,EAAE;YACtB,IAAI,CAAC,QAAQ,CACX,IAAI,CAAC,OAAO,CACV,kBAAkB,CAAC,OAAO,EAC1B,IAAI,CAAC,KAAM,EACX,kBAAkB,CAAC,MAAM,IAAI,EAAE,CAChC,CACF,CAAA;SACF;IACH,CAAC;IACD,OAAO;QACL,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAM,CAAC,CAAA;SACjC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC,CAAA;SACrE;QACD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,CAAC,KAAK,GAAG,EAAW,CAAA;QACxB,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAA;IACxB,CAAC;CACF"}
|
@@ -0,0 +1,12 @@
|
|
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) 2021 Atypon Systems LLC. All Rights Reserved.
|
11
|
+
*/
|
12
|
+
export declare function useWatchTitle(): void;
|
@@ -0,0 +1,14 @@
|
|
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 { JSONNode, ManuscriptNode } from '@manuscripts/transform';
|
13
|
+
export declare function checkSuggestionsFor(node: JSONNode, onNodeReal: (node: JSONNode) => void): string;
|
14
|
+
export declare function getNodeRealText(node: ManuscriptNode): string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@manuscripts/article-editor",
|
3
|
-
"version": "3.5.
|
3
|
+
"version": "3.5.31-LEAN-4100.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.6.
|
38
|
+
"@manuscripts/body-editor": "2.6.24",
|
39
39
|
"@manuscripts/json-schema": "2.2.11",
|
40
40
|
"@manuscripts/library": "1.3.11",
|
41
41
|
"@manuscripts/style-guide": "2.0.24",
|
42
42
|
"@manuscripts/track-changes-plugin": "1.8.4",
|
43
|
-
"@manuscripts/transform": "3.0.22
|
43
|
+
"@manuscripts/transform": "3.0.22",
|
44
44
|
"@popperjs/core": "^2.11.8",
|
45
45
|
"@types/use-sync-external-store": "^0.0.6",
|
46
46
|
"autotrack": "^2.4.1",
|