From 64e4d8ed8d602ddd763bcee022604620b955f367 Mon Sep 17 00:00:00 2001 From: mbartenev-atypon Date: Fri, 10 Apr 2026 14:18:15 +0200 Subject: [PATCH 1/6] updated to new solution --- src/utils/shared-utils.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/utils/shared-utils.ts b/src/utils/shared-utils.ts index 6564d2d..ed60f55 100644 --- a/src/utils/shared-utils.ts +++ b/src/utils/shared-utils.ts @@ -111,20 +111,24 @@ export function sanitizeAttrsChange( newAttr: T['attrs'], currentAttrs: T['attrs'] ) { - return Object.keys(newAttr).reduce((acc, attr) => { - const key = attr as keyof T['attrs'] - if (!currentAttrs[key] && currentAttrs[key] !== 0 && !newAttr[key] && newAttr[key] !== 0) { + return Object.keys(newAttr).reduce( + (acc, attr) => { + const key = attr as keyof T['attrs'] + if (!currentAttrs[key] && currentAttrs[key] !== 0 && !newAttr[key] && newAttr[key] !== 0) { + return acc + } + acc[key] = newAttr[key] return acc - } - acc[key] = newAttr[key] - return acc - }, {} as T['attrs']) + }, + {} as T['attrs'] + ) } export const addTrackChangesAttributes = (attrs: Attrs, dom: Element) => { dom.removeAttribute('data-track-id') dom.removeAttribute('data-track-op') dom.removeAttribute('data-track-status') + dom.removeAttribute('data-track-author') const changes = attrs.dataTracked as TrackedAttrs[] if (!changes || !changes.length) { @@ -134,6 +138,7 @@ export const addTrackChangesAttributes = (attrs: Attrs, dom: Element) => { dom.setAttribute('data-track-id', change.id) dom.setAttribute('data-track-op', change.operation) dom.setAttribute('data-track-status', change.status) + dom.setAttribute('data-track-author', change.authorID) } const classNames = new Map([ From af24d4af2aae3b28be161152214338ff2288e134 Mon Sep 17 00:00:00 2001 From: "zax-assistant[bot]" <103364958+zax-assistant[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 12:21:38 +0000 Subject: [PATCH 2/6] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 63e3406..d76276a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@manuscripts/track-changes-plugin", - "version": "2.3.9", + "version": "2.3.10-LEAN-5459.0", "author": "Atypon Systems LLC", "license": "Apache-2.0", "homepage": "https://github.com/Atypon-OpenSource/manuscripts-track-changes-plugin", From 943c1752ab4e96c09fda61f7a2bde9118c112a7d Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Fri, 10 Apr 2026 22:33:00 +0200 Subject: [PATCH 3/6] updates --- src/utils/shared-utils.ts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/utils/shared-utils.ts b/src/utils/shared-utils.ts index ed60f55..a813b54 100644 --- a/src/utils/shared-utils.ts +++ b/src/utils/shared-utils.ts @@ -111,19 +111,16 @@ export function sanitizeAttrsChange( newAttr: T['attrs'], currentAttrs: T['attrs'] ) { - return Object.keys(newAttr).reduce( - (acc, attr) => { - const key = attr as keyof T['attrs'] - if (!currentAttrs[key] && currentAttrs[key] !== 0 && !newAttr[key] && newAttr[key] !== 0) { - return acc - } - acc[key] = newAttr[key] + return Object.keys(newAttr).reduce((acc, attr) => { + const key = attr as keyof T['attrs'] + if (!currentAttrs[key] && currentAttrs[key] !== 0 && !newAttr[key] && newAttr[key] !== 0) { return acc - }, - {} as T['attrs'] - ) + } + acc[key] = newAttr[key] + return acc + }, {} as T['attrs']) } - +/* */ export const addTrackChangesAttributes = (attrs: Attrs, dom: Element) => { dom.removeAttribute('data-track-id') dom.removeAttribute('data-track-op') From e5318793a5f8fa6ab3e49931f831d9221332bccb Mon Sep 17 00:00:00 2001 From: "zax-assistant[bot]" <103364958+zax-assistant[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 20:42:03 +0000 Subject: [PATCH 4/6] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d76276a..9a4ee6e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@manuscripts/track-changes-plugin", - "version": "2.3.10-LEAN-5459.0", + "version": "2.3.10-LEAN-5459.1", "author": "Atypon Systems LLC", "license": "Apache-2.0", "homepage": "https://github.com/Atypon-OpenSource/manuscripts-track-changes-plugin", From 45e0ff5f03cf7258282d734b6aafdd5d8b5f2cfb Mon Sep 17 00:00:00 2001 From: Fahid Alwaisi Date: Tue, 14 Apr 2026 01:05:30 +0300 Subject: [PATCH 5/6] Remove commented-out code in shared-utils.ts --- src/utils/shared-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/shared-utils.ts b/src/utils/shared-utils.ts index a813b54..fa61db8 100644 --- a/src/utils/shared-utils.ts +++ b/src/utils/shared-utils.ts @@ -120,7 +120,7 @@ export function sanitizeAttrsChange( return acc }, {} as T['attrs']) } -/* */ + export const addTrackChangesAttributes = (attrs: Attrs, dom: Element) => { dom.removeAttribute('data-track-id') dom.removeAttribute('data-track-op') From 8773d9ef1b36c7a3d44849cdda84e7b1c4f52b49 Mon Sep 17 00:00:00 2001 From: "zax-assistant[bot]" <103364958+zax-assistant[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 22:06:19 +0000 Subject: [PATCH 6/6] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a4ee6e..84debd2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@manuscripts/track-changes-plugin", - "version": "2.3.10-LEAN-5459.1", + "version": "2.3.10-LEAN-5459.2", "author": "Atypon Systems LLC", "license": "Apache-2.0", "homepage": "https://github.com/Atypon-OpenSource/manuscripts-track-changes-plugin",