@atlaskit/editor-plugin-show-diff 14.2.2 → 14.2.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 +20 -0
- package/dist/cjs/pm-plugins/decorations/colorSchemes/attributions.js +7 -3
- package/dist/cjs/pm-plugins/isExtendedEnabled.js +1 -1
- package/dist/es2019/pm-plugins/decorations/colorSchemes/attributions.js +7 -1
- package/dist/es2019/pm-plugins/isExtendedEnabled.js +1 -1
- package/dist/esm/pm-plugins/decorations/colorSchemes/attributions.js +7 -3
- package/dist/esm/pm-plugins/isExtendedEnabled.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 14.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 14.2.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`e3b2afdd0a76a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e3b2afdd0a76a) -
|
|
14
|
+
[ux] Preserve the configured colour scheme for attributed diffs with zero or one distinct
|
|
15
|
+
contributor behind `confluence_ncs_step_diffing_version_history` and
|
|
16
|
+
`platform_editor_show_diff_color_scheme_refactor`.
|
|
17
|
+
- [`ee583927e98cc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ee583927e98cc) -
|
|
18
|
+
[ux] Gate Post Stream Review smart diff behavior behind `platform_editor_ai_smart_diff` and its
|
|
19
|
+
diff indicators behind `platform_editor_diff_plugin_show_indicators`. Require the smart diff gate
|
|
20
|
+
when selecting the show-diff plugin's default diff type.
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 14.2.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -27,9 +27,13 @@ var areAttributionColorGatesEnabled = exports.areAttributionColorGatesEnabled =
|
|
|
27
27
|
return (0, _fg.fg)('confluence_ncs_step_diffing_version_history') && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_show_diff_color_scheme_refactor');
|
|
28
28
|
};
|
|
29
29
|
var isAttributionColoringEnabled = exports.isAttributionColoringEnabled = function isAttributionColoringEnabled(stepAttributions) {
|
|
30
|
-
|
|
31
|
-
return
|
|
32
|
-
}
|
|
30
|
+
if (!areAttributionColorGatesEnabled() || !(stepAttributions !== null && stepAttributions !== void 0 && stepAttributions.length)) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
var attributionKeys = new Set(stepAttributions.map(getAttributionKey).filter(function (key) {
|
|
34
|
+
return key !== undefined;
|
|
35
|
+
}));
|
|
36
|
+
return attributionKeys.size > 1;
|
|
33
37
|
};
|
|
34
38
|
var createAttributionColorMap = exports.createAttributionColorMap = function createAttributionColorMap(stepAttributions) {
|
|
35
39
|
var keys = Array.from(new Set(stepAttributions.map(getAttributionKey).filter(function (key) {
|
|
@@ -19,5 +19,5 @@ var isExtendedEnabled = exports.isExtendedEnabled = function isExtendedEnabled(d
|
|
|
19
19
|
return (0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true) || diffType === 'smart' && (0, _fg.fg)('platform_editor_ai_smart_diff');
|
|
20
20
|
};
|
|
21
21
|
var getDefaultDiffType = exports.getDefaultDiffType = function getDefaultDiffType() {
|
|
22
|
-
return (0, _fg.fg)('
|
|
22
|
+
return (0, _fg.fg)('platform_editor_ai_smart_diff') ? 'smart' : 'inline';
|
|
23
23
|
};
|
|
@@ -15,7 +15,13 @@ export const getAttributionKey = attribution => {
|
|
|
15
15
|
return `user:${userId !== null && userId !== void 0 ? userId : ''}|agent:${agentIdentity}`;
|
|
16
16
|
};
|
|
17
17
|
export const areAttributionColorGatesEnabled = () => fg('confluence_ncs_step_diffing_version_history') && isExperimentEnabled('platform_editor_show_diff_color_scheme_refactor');
|
|
18
|
-
export const isAttributionColoringEnabled = stepAttributions =>
|
|
18
|
+
export const isAttributionColoringEnabled = stepAttributions => {
|
|
19
|
+
if (!areAttributionColorGatesEnabled() || !(stepAttributions !== null && stepAttributions !== void 0 && stepAttributions.length)) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
const attributionKeys = new Set(stepAttributions.map(getAttributionKey).filter(key => key !== undefined));
|
|
23
|
+
return attributionKeys.size > 1;
|
|
24
|
+
};
|
|
19
25
|
export const createAttributionColorMap = stepAttributions => {
|
|
20
26
|
const keys = Array.from(new Set(stepAttributions.map(getAttributionKey).filter(key => key !== undefined))).sort();
|
|
21
27
|
return new Map(keys.map((key, index) => [key, ATTRIBUTION_COLOR_PALETTE[index % ATTRIBUTION_COLOR_PALETTE.length]]));
|
|
@@ -10,4 +10,4 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
10
10
|
* when `smart` is active even if `platform_editor_diff_plugin_extended` is off.
|
|
11
11
|
*/
|
|
12
12
|
export const isExtendedEnabled = diffType => expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true) || diffType === 'smart' && fg('platform_editor_ai_smart_diff');
|
|
13
|
-
export const getDefaultDiffType = () => fg('
|
|
13
|
+
export const getDefaultDiffType = () => fg('platform_editor_ai_smart_diff') ? 'smart' : 'inline';
|
|
@@ -20,9 +20,13 @@ export var areAttributionColorGatesEnabled = function areAttributionColorGatesEn
|
|
|
20
20
|
return fg('confluence_ncs_step_diffing_version_history') && isExperimentEnabled('platform_editor_show_diff_color_scheme_refactor');
|
|
21
21
|
};
|
|
22
22
|
export var isAttributionColoringEnabled = function isAttributionColoringEnabled(stepAttributions) {
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
}
|
|
23
|
+
if (!areAttributionColorGatesEnabled() || !(stepAttributions !== null && stepAttributions !== void 0 && stepAttributions.length)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
var attributionKeys = new Set(stepAttributions.map(getAttributionKey).filter(function (key) {
|
|
27
|
+
return key !== undefined;
|
|
28
|
+
}));
|
|
29
|
+
return attributionKeys.size > 1;
|
|
26
30
|
};
|
|
27
31
|
export var createAttributionColorMap = function createAttributionColorMap(stepAttributions) {
|
|
28
32
|
var keys = Array.from(new Set(stepAttributions.map(getAttributionKey).filter(function (key) {
|
|
@@ -13,5 +13,5 @@ export var isExtendedEnabled = function isExtendedEnabled(diffType) {
|
|
|
13
13
|
return expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true) || diffType === 'smart' && fg('platform_editor_ai_smart_diff');
|
|
14
14
|
};
|
|
15
15
|
export var getDefaultDiffType = function getDefaultDiffType() {
|
|
16
|
-
return fg('
|
|
16
|
+
return fg('platform_editor_ai_smart_diff') ? 'smart' : 'inline';
|
|
17
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.4",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@atlaskit/editor-tables": "^3.0.0",
|
|
29
29
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
31
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
31
|
+
"@atlaskit/tmp-editor-statsig": "^166.0.0",
|
|
32
32
|
"@atlaskit/tokens": "^16.8.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
34
|
"@compiled/react": "^1.0.2",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/css": "^1.1.0",
|
|
43
43
|
"@atlaskit/dropdown-menu": "^18.2.0",
|
|
44
44
|
"@atlaskit/editor-core": "^226.1.0",
|
|
45
|
-
"@atlaskit/editor-json-transformer": "^9.
|
|
45
|
+
"@atlaskit/editor-json-transformer": "^9.7.0",
|
|
46
46
|
"@atlaskit/editor-plugins": "^16.1.0",
|
|
47
47
|
"@atlaskit/form": "^17.1.0",
|
|
48
48
|
"@atlaskit/primitives": "^22.4.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"react-intl": "^7.0.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@atlaskit/editor-common": "^120.
|
|
62
|
+
"@atlaskit/editor-common": "^120.6.0",
|
|
63
63
|
"react": "^18.2.0 || ^19.2.0"
|
|
64
64
|
},
|
|
65
65
|
"techstack": {
|