@manuscripts/track-changes-plugin 0.4.6 → 1.0.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/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +8 -6
package/dist/index.cjs
CHANGED
|
@@ -1395,7 +1395,7 @@ function processChangeSteps(changes, startPos, newTr, emptyAttrs, schema) {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
else if (c.type === 'update-node-attrs') {
|
|
1397
1397
|
const oldDataTracked = getBlockInlineTrackedData(c.node) || [];
|
|
1398
|
-
const oldUpdate = oldDataTracked.find((d) => d.operation === exports.CHANGE_OPERATION.set_node_attributes);
|
|
1398
|
+
const oldUpdate = oldDataTracked.find((d) => d.operation === exports.CHANGE_OPERATION.set_node_attributes && d.status === exports.CHANGE_STATUS.pending);
|
|
1399
1399
|
const { dataTracked, ...oldAttrs } = (oldUpdate === null || oldUpdate === void 0 ? void 0 : oldUpdate.oldAttrs) || c.node.attrs;
|
|
1400
1400
|
const newDataTracked = [...oldDataTracked.filter((d) => !oldUpdate || d.id !== oldUpdate.id)];
|
|
1401
1401
|
const newUpdate = oldUpdate
|
package/dist/index.js
CHANGED
|
@@ -1387,7 +1387,7 @@ function processChangeSteps(changes, startPos, newTr, emptyAttrs, schema) {
|
|
|
1387
1387
|
}
|
|
1388
1388
|
else if (c.type === 'update-node-attrs') {
|
|
1389
1389
|
const oldDataTracked = getBlockInlineTrackedData(c.node) || [];
|
|
1390
|
-
const oldUpdate = oldDataTracked.find((d) => d.operation === CHANGE_OPERATION.set_node_attributes);
|
|
1390
|
+
const oldUpdate = oldDataTracked.find((d) => d.operation === CHANGE_OPERATION.set_node_attributes && d.status === CHANGE_STATUS.pending);
|
|
1391
1391
|
const { dataTracked, ...oldAttrs } = (oldUpdate === null || oldUpdate === void 0 ? void 0 : oldUpdate.oldAttrs) || c.node.attrs;
|
|
1392
1392
|
const newDataTracked = [...oldDataTracked.filter((d) => !oldUpdate || d.id !== oldUpdate.id)];
|
|
1393
1393
|
const newUpdate = oldUpdate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/track-changes-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"author": "Atypon Systems LLC",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/Atypon-OpenSource/manuscripts-quarterback/tree/main/quarterback-packages/track-changes-plugin",
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@manuscripts/
|
|
27
|
+
"@manuscripts/data": "^0.1.12",
|
|
28
|
+
"@manuscripts/json-schema": "^1.1.0",
|
|
29
|
+
"@manuscripts/transform": "^1.0.1",
|
|
28
30
|
"@rollup/plugin-commonjs": "^22.0.2",
|
|
29
31
|
"@types/debug": "^4.1.7",
|
|
30
32
|
"@types/jest": "27.5.1",
|
|
@@ -32,15 +34,15 @@
|
|
|
32
34
|
"jest": "27.5.1",
|
|
33
35
|
"jest-environment-jsdom": "27.5.1",
|
|
34
36
|
"jsdom": "^20.0.0",
|
|
35
|
-
"prosemirror-commands": "^1.
|
|
37
|
+
"prosemirror-commands": "^1.5.0",
|
|
36
38
|
"prosemirror-example-setup": "^1.2.1",
|
|
37
39
|
"prosemirror-history": "^1.3.0",
|
|
38
40
|
"prosemirror-keymap": "^1.2.0",
|
|
39
|
-
"prosemirror-model": "^1.18.
|
|
41
|
+
"prosemirror-model": "^1.18.3",
|
|
40
42
|
"prosemirror-schema-list": "^1.2.2",
|
|
41
|
-
"prosemirror-state": "^1.4.
|
|
43
|
+
"prosemirror-state": "^1.4.2",
|
|
42
44
|
"prosemirror-transform": "^1.7.0",
|
|
43
|
-
"prosemirror-view": "^1.
|
|
45
|
+
"prosemirror-view": "^1.29.1",
|
|
44
46
|
"rollup": "^2.79.0",
|
|
45
47
|
"rollup-plugin-typescript2": "^0.34.0",
|
|
46
48
|
"ts-jest": "27.1.4",
|