@atlaskit/editor-plugin-track-changes 3.0.2 → 3.0.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-track-changes
2
2
 
3
+ ## 3.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`12afb3988d02e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/12afb3988d02e) -
14
+ [EDITOR-1429] fixed bug where creating inline comment is considered as changes in editor
15
+ - Updated dependencies
16
+
3
17
  ## 3.0.2
4
18
 
5
19
  ### Patch Changes
@@ -79,7 +79,10 @@ var createTrackChangesPlugin = exports.createTrackChangesPlugin = function creat
79
79
  var isDocChanged = tr.docChanged && tr.steps.some(function (step) {
80
80
  return step instanceof _transform.ReplaceStep || step instanceof _transform.ReplaceAroundStep || step instanceof _transform.AddMarkStep || step instanceof _transform.RemoveMarkStep || step instanceof _transform.AttrStep;
81
81
  });
82
- if (!isDocChanged || tr.getMeta('isRemote') || tr.getMeta('replaceDocument')) {
82
+ var isAnnotationStep = function isAnnotationStep(step) {
83
+ return step instanceof _transform.AddMarkStep && step.mark.type.name === 'annotation';
84
+ };
85
+ if (!isDocChanged || tr.getMeta('isRemote') || tr.getMeta('replaceDocument') || tr.steps.some(isAnnotationStep)) {
83
86
  // If the transaction is remote, we need to map the steps to the current document
84
87
  return _objectSpread(_objectSpread({}, state), {}, {
85
88
  steps: state.steps.map(function (s) {
@@ -54,7 +54,8 @@ export const createTrackChangesPlugin = api => {
54
54
  };
55
55
  }
56
56
  const isDocChanged = tr.docChanged && tr.steps.some(step => step instanceof ReplaceStep || step instanceof ReplaceAroundStep || step instanceof AddMarkStep || step instanceof RemoveMarkStep || step instanceof AttrStep);
57
- if (!isDocChanged || tr.getMeta('isRemote') || tr.getMeta('replaceDocument')) {
57
+ const isAnnotationStep = step => step instanceof AddMarkStep && step.mark.type.name === 'annotation';
58
+ if (!isDocChanged || tr.getMeta('isRemote') || tr.getMeta('replaceDocument') || tr.steps.some(isAnnotationStep)) {
58
59
  // If the transaction is remote, we need to map the steps to the current document
59
60
  return {
60
61
  ...state,
@@ -72,7 +72,10 @@ export var createTrackChangesPlugin = function createTrackChangesPlugin(api) {
72
72
  var isDocChanged = tr.docChanged && tr.steps.some(function (step) {
73
73
  return step instanceof ReplaceStep || step instanceof ReplaceAroundStep || step instanceof AddMarkStep || step instanceof RemoveMarkStep || step instanceof AttrStep;
74
74
  });
75
- if (!isDocChanged || tr.getMeta('isRemote') || tr.getMeta('replaceDocument')) {
75
+ var isAnnotationStep = function isAnnotationStep(step) {
76
+ return step instanceof AddMarkStep && step.mark.type.name === 'annotation';
77
+ };
78
+ if (!isDocChanged || tr.getMeta('isRemote') || tr.getMeta('replaceDocument') || tr.steps.some(isAnnotationStep)) {
76
79
  // If the transaction is remote, we need to map the steps to the current document
77
80
  return _objectSpread(_objectSpread({}, state), {}, {
78
81
  steps: state.steps.map(function (s) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-track-changes",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "description": "ShowDiff plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,17 +32,17 @@
32
32
  "@atlaskit/editor-plugin-history": "4.0.0",
33
33
  "@atlaskit/editor-plugin-primary-toolbar": "^5.0.0",
34
34
  "@atlaskit/editor-plugin-show-diff": "1.0.1",
35
- "@atlaskit/editor-plugin-toolbar": "^1.0.0",
35
+ "@atlaskit/editor-plugin-toolbar": "^1.1.0",
36
36
  "@atlaskit/editor-prosemirror": "7.0.0",
37
- "@atlaskit/editor-toolbar": "^0.6.0",
37
+ "@atlaskit/editor-toolbar": "^0.7.0",
38
38
  "@atlaskit/editor-toolbar-model": "^0.2.0",
39
39
  "@atlaskit/icon-lab": "^5.7.0",
40
- "@atlaskit/tmp-editor-statsig": "^12.1.0",
40
+ "@atlaskit/tmp-editor-statsig": "^12.2.0",
41
41
  "@babel/runtime": "^7.0.0",
42
42
  "react-intl-next": "npm:react-intl@^5.18.1"
43
43
  },
44
44
  "peerDependencies": {
45
- "@atlaskit/editor-common": "^108.0.0",
45
+ "@atlaskit/editor-common": "^108.1.0",
46
46
  "react": "^18.2.0"
47
47
  },
48
48
  "techstack": {