@atlaskit/editor-plugin-track-changes 12.1.1 → 12.1.3
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,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-track-changes
|
|
2
2
|
|
|
3
|
+
## 12.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 12.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`496cbddbb046d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/496cbddbb046d) -
|
|
14
|
+
Show diff indicators for tracked changes when `platform_editor_diff_plugin_show_indicators` and
|
|
15
|
+
`platform_editor_diff_plugin_extended` are enabled.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 12.1.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -10,6 +10,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
10
10
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
12
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
13
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
13
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _filterSteps2 = require("./filterSteps");
|
|
15
16
|
var _invertableStep = require("./invertableStep");
|
|
@@ -150,7 +151,8 @@ var createTrackChangesPlugin = exports.createTrackChangesPlugin = function creat
|
|
|
150
151
|
steps: steps.map(function (s) {
|
|
151
152
|
return s.step;
|
|
152
153
|
}),
|
|
153
|
-
diffType: (0, _platformFeatureFlags.fg)('platform_editor_ai_smart_diff') ? 'smart' : 'inline'
|
|
154
|
+
diffType: (0, _platformFeatureFlags.fg)('platform_editor_ai_smart_diff') ? 'smart' : 'inline',
|
|
155
|
+
showIndicators: (0, _platformFeatureFlags.fg)('platform_editor_diff_plugin_show_indicators') && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_diff_plugin_extended')
|
|
154
156
|
}));
|
|
155
157
|
}
|
|
156
158
|
} else if (currentShouldChangesBeDisplayed === false && prevShouldChangesBeDisplayed === true) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { ReplaceAroundStep, ReplaceStep, AddMarkStep, RemoveMarkStep, AttrStep } from '@atlaskit/editor-prosemirror/transform';
|
|
4
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { filterSteps } from './filterSteps';
|
|
6
7
|
import { InvertableStep } from './invertableStep';
|
|
@@ -121,7 +122,8 @@ export const createTrackChangesPlugin = api => {
|
|
|
121
122
|
api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$showDiff = api.showDiff) === null || _api$showDiff === void 0 ? void 0 : (_api$showDiff$command = _api$showDiff.commands) === null || _api$showDiff$command === void 0 ? void 0 : _api$showDiff$command.showDiff({
|
|
122
123
|
originalDoc,
|
|
123
124
|
steps: steps.map(s => s.step),
|
|
124
|
-
diffType: fg('platform_editor_ai_smart_diff') ? 'smart' : 'inline'
|
|
125
|
+
diffType: fg('platform_editor_ai_smart_diff') ? 'smart' : 'inline',
|
|
126
|
+
showIndicators: fg('platform_editor_diff_plugin_show_indicators') && isExperimentEnabled('platform_editor_diff_plugin_extended')
|
|
125
127
|
}));
|
|
126
128
|
}
|
|
127
129
|
} else if (currentShouldChangesBeDisplayed === false && prevShouldChangesBeDisplayed === true) {
|
|
@@ -8,6 +8,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
8
8
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
9
9
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import { ReplaceAroundStep, ReplaceStep, AddMarkStep, RemoveMarkStep, AttrStep } from '@atlaskit/editor-prosemirror/transform';
|
|
11
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
11
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import { filterSteps } from './filterSteps';
|
|
13
14
|
import { InvertableStep } from './invertableStep';
|
|
@@ -143,7 +144,8 @@ export var createTrackChangesPlugin = function createTrackChangesPlugin(api) {
|
|
|
143
144
|
steps: steps.map(function (s) {
|
|
144
145
|
return s.step;
|
|
145
146
|
}),
|
|
146
|
-
diffType: fg('platform_editor_ai_smart_diff') ? 'smart' : 'inline'
|
|
147
|
+
diffType: fg('platform_editor_ai_smart_diff') ? 'smart' : 'inline',
|
|
148
|
+
showIndicators: fg('platform_editor_diff_plugin_show_indicators') && isExperimentEnabled('platform_editor_diff_plugin_extended')
|
|
147
149
|
}));
|
|
148
150
|
}
|
|
149
151
|
} else if (currentShouldChangesBeDisplayed === false && prevShouldChangesBeDisplayed === true) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-track-changes",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.3",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,22 +23,26 @@
|
|
|
23
23
|
"@atlaskit/button": "^25.0.0",
|
|
24
24
|
"@atlaskit/editor-plugin-history": "13.0.0",
|
|
25
25
|
"@atlaskit/editor-plugin-primary-toolbar": "^14.0.0",
|
|
26
|
-
"@atlaskit/editor-plugin-show-diff": "11.0.
|
|
26
|
+
"@atlaskit/editor-plugin-show-diff": "11.0.5",
|
|
27
27
|
"@atlaskit/editor-plugin-toolbar": "^10.1.0",
|
|
28
28
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
29
29
|
"@atlaskit/editor-toolbar": "^2.4.0",
|
|
30
30
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
31
|
+
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
31
32
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
32
33
|
"@babel/runtime": "^7.0.0"
|
|
33
34
|
},
|
|
34
35
|
"peerDependencies": {
|
|
35
|
-
"@atlaskit/editor-common": "^117.
|
|
36
|
+
"@atlaskit/editor-common": "^117.5.0",
|
|
36
37
|
"react": "^18.2.0 || ^19.2.0",
|
|
37
38
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
38
39
|
},
|
|
39
40
|
"platform-feature-flags": {
|
|
40
41
|
"platform_editor_ai_smart_diff": {
|
|
41
42
|
"type": "boolean"
|
|
43
|
+
},
|
|
44
|
+
"platform_editor_diff_plugin_show_indicators": {
|
|
45
|
+
"type": "boolean"
|
|
42
46
|
}
|
|
43
47
|
},
|
|
44
48
|
"techstack": {
|