@atlaskit/editor-plugin-annotation 1.26.2 → 1.26.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 +9 -0
- package/dist/cjs/pm-plugins/toolbar.js +3 -1
- package/dist/es2019/pm-plugins/toolbar.js +3 -1
- package/dist/esm/pm-plugins/toolbar.js +3 -1
- package/dist/types/annotationPluginType.d.ts +2 -0
- package/dist/types/editor-commands/transform.d.ts +12 -1
- package/dist/types-ts4.5/annotationPluginType.d.ts +2 -0
- package/dist/types-ts4.5/editor-commands/transform.d.ts +13 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 1.26.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#177132](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/177132)
|
|
8
|
+
[`089d1f8b617d7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/089d1f8b617d7) -
|
|
9
|
+
[ux] Shows title next to comment icon on the Selection toolbar when page is in View only mode and
|
|
10
|
+
Contextual toolbar is enabled
|
|
11
|
+
|
|
3
12
|
## 1.26.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -51,6 +51,7 @@ var createSpotlightConfig = function createSpotlightConfig(_ref) {
|
|
|
51
51
|
};
|
|
52
52
|
var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsAPI) {
|
|
53
53
|
return function (_ref2) {
|
|
54
|
+
var _api$editorViewMode;
|
|
54
55
|
var state = _ref2.state,
|
|
55
56
|
intl = _ref2.intl,
|
|
56
57
|
_ref2$isToolbarAbove = _ref2.isToolbarAbove,
|
|
@@ -68,9 +69,10 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
|
|
|
68
69
|
}
|
|
69
70
|
var createCommentMessage = intl.formatMessage(_messages.annotationMessages.createComment);
|
|
70
71
|
var commentDisabledMessage = intl.formatMessage((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? _messages.annotationMessages.createCommentDisabled : _messages.annotationMessages.createCommentInvalid);
|
|
72
|
+
var isViewMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view';
|
|
71
73
|
var createComment = {
|
|
72
74
|
type: 'button',
|
|
73
|
-
showTitle: (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
|
|
75
|
+
showTitle: !isViewMode && (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
|
|
74
76
|
exposure: true
|
|
75
77
|
}) ? false : true,
|
|
76
78
|
disabled: selectionValid === _types.AnnotationSelectionType.DISABLED,
|
|
@@ -48,6 +48,7 @@ export const buildToolbar = editorAnalyticsAPI => ({
|
|
|
48
48
|
_supportedNodes = [],
|
|
49
49
|
api
|
|
50
50
|
}) => {
|
|
51
|
+
var _api$editorViewMode, _api$editorViewMode$s;
|
|
51
52
|
const {
|
|
52
53
|
schema
|
|
53
54
|
} = state;
|
|
@@ -60,9 +61,10 @@ export const buildToolbar = editorAnalyticsAPI => ({
|
|
|
60
61
|
}
|
|
61
62
|
const createCommentMessage = intl.formatMessage(annotationMessages.createComment);
|
|
62
63
|
const commentDisabledMessage = intl.formatMessage(fg('editor_inline_comments_on_inline_nodes') ? annotationMessages.createCommentDisabled : annotationMessages.createCommentInvalid);
|
|
64
|
+
const isViewMode = (api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) === 'view';
|
|
63
65
|
const createComment = {
|
|
64
66
|
type: 'button',
|
|
65
|
-
showTitle: editorExperiment('contextual_formatting_toolbar', true, {
|
|
67
|
+
showTitle: !isViewMode && editorExperiment('contextual_formatting_toolbar', true, {
|
|
66
68
|
exposure: true
|
|
67
69
|
}) ? false : true,
|
|
68
70
|
disabled: selectionValid === AnnotationSelectionType.DISABLED,
|
|
@@ -44,6 +44,7 @@ var createSpotlightConfig = function createSpotlightConfig(_ref) {
|
|
|
44
44
|
};
|
|
45
45
|
export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
|
|
46
46
|
return function (_ref2) {
|
|
47
|
+
var _api$editorViewMode;
|
|
47
48
|
var state = _ref2.state,
|
|
48
49
|
intl = _ref2.intl,
|
|
49
50
|
_ref2$isToolbarAbove = _ref2.isToolbarAbove,
|
|
@@ -61,9 +62,10 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
|
|
|
61
62
|
}
|
|
62
63
|
var createCommentMessage = intl.formatMessage(annotationMessages.createComment);
|
|
63
64
|
var commentDisabledMessage = intl.formatMessage(fg('editor_inline_comments_on_inline_nodes') ? annotationMessages.createCommentDisabled : annotationMessages.createCommentInvalid);
|
|
65
|
+
var isViewMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'view';
|
|
64
66
|
var createComment = {
|
|
65
67
|
type: 'button',
|
|
66
|
-
showTitle: editorExperiment('contextual_formatting_toolbar', true, {
|
|
68
|
+
showTitle: !isViewMode && editorExperiment('contextual_formatting_toolbar', true, {
|
|
67
69
|
exposure: true
|
|
68
70
|
}) ? false : true,
|
|
69
71
|
disabled: selectionValid === AnnotationSelectionType.DISABLED,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Command, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
3
4
|
import type { EditorViewModeEffectsPlugin } from '@atlaskit/editor-plugin-editor-viewmode-effects';
|
|
4
5
|
import type { EngagementPlatformPlugin } from '@atlaskit/editor-plugin-engagement-platform';
|
|
5
6
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
@@ -18,6 +19,7 @@ export type AnnotationPlugin = NextEditorPlugin<'annotation', {
|
|
|
18
19
|
dependencies: [
|
|
19
20
|
OptionalPlugin<AnalyticsPlugin>,
|
|
20
21
|
OptionalPlugin<EditorViewModeEffectsPlugin>,
|
|
22
|
+
OptionalPlugin<EditorViewModePlugin>,
|
|
21
23
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
22
24
|
OptionalPlugin<EngagementPlatformPlugin>
|
|
23
25
|
];
|
|
@@ -86,7 +86,18 @@ declare const _default: {
|
|
|
86
86
|
actions: {
|
|
87
87
|
applyViewModeStepAt: (tr: Transaction) => boolean;
|
|
88
88
|
};
|
|
89
|
-
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"
|
|
89
|
+
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
90
|
+
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
91
|
+
dependencies: [];
|
|
92
|
+
pluginConfiguration?: {
|
|
93
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
94
|
+
} | undefined;
|
|
95
|
+
commands: {
|
|
96
|
+
updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
97
|
+
};
|
|
98
|
+
}, {
|
|
99
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
100
|
+
} | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
90
101
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
91
102
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
92
103
|
}, import("@atlaskit/editor-common/types").FeatureFlags>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"engagementPlatform", {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Command, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
3
4
|
import type { EditorViewModeEffectsPlugin } from '@atlaskit/editor-plugin-editor-viewmode-effects';
|
|
4
5
|
import type { EngagementPlatformPlugin } from '@atlaskit/editor-plugin-engagement-platform';
|
|
5
6
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
@@ -18,6 +19,7 @@ export type AnnotationPlugin = NextEditorPlugin<'annotation', {
|
|
|
18
19
|
dependencies: [
|
|
19
20
|
OptionalPlugin<AnalyticsPlugin>,
|
|
20
21
|
OptionalPlugin<EditorViewModeEffectsPlugin>,
|
|
22
|
+
OptionalPlugin<EditorViewModePlugin>,
|
|
21
23
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
22
24
|
OptionalPlugin<EngagementPlatformPlugin>
|
|
23
25
|
];
|
|
@@ -102,6 +102,19 @@ declare const _default: {
|
|
|
102
102
|
applyViewModeStepAt: (tr: Transaction) => boolean;
|
|
103
103
|
};
|
|
104
104
|
}, undefined>>,
|
|
105
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
106
|
+
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
107
|
+
dependencies: [
|
|
108
|
+
];
|
|
109
|
+
pluginConfiguration?: {
|
|
110
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
111
|
+
} | undefined;
|
|
112
|
+
commands: {
|
|
113
|
+
updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
114
|
+
};
|
|
115
|
+
}, {
|
|
116
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
117
|
+
} | undefined>>,
|
|
105
118
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
106
119
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
107
120
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.3",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
|
-
"@atlaskit/editor-common": "^96.
|
|
35
|
+
"@atlaskit/editor-common": "^96.4.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-viewmode-effects": "^1.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-engagement-platform": "^2.1.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/icon": "^23.1.0",
|
|
42
42
|
"@atlaskit/onboarding": "^12.2.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^2.25.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|