@atlaskit/editor-plugin-annotation 3.3.2 → 3.3.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,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 3.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.3.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`b669aaff72559`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b669aaff72559) -
|
|
14
|
+
Add additional logging to create-inline-comment experience for Confluence
|
|
15
|
+
|
|
3
16
|
## 3.3.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.shouldSuppressFloatingToolbar = exports.getValidNodes = exports.buildToolbar = exports.buildSuppressedToolbar = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
11
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
@@ -16,6 +17,8 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
16
17
|
var _editorCommands = require("../editor-commands");
|
|
17
18
|
var _types = require("../types");
|
|
18
19
|
var _utils2 = require("./utils");
|
|
20
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
22
|
var getValidNodes = exports.getValidNodes = function getValidNodes(state) {
|
|
20
23
|
var schema = state.schema;
|
|
21
24
|
var annotation = schema.marks.annotation;
|
|
@@ -146,10 +149,12 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
|
|
|
146
149
|
annotationManager.checkPreemptiveGate().then(function (canStartDraft) {
|
|
147
150
|
if (canStartDraft) {
|
|
148
151
|
createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.start({
|
|
149
|
-
attributes: {
|
|
152
|
+
attributes: _objectSpread({
|
|
150
153
|
pageClass: 'editor',
|
|
151
154
|
commentType: 'inline'
|
|
152
|
-
}
|
|
155
|
+
}, (0, _platformFeatureFlags.fg)('cc_comments_create_inline_experience_entry_point') ? {
|
|
156
|
+
entryPoint: 'highlightActions'
|
|
157
|
+
} : {})
|
|
153
158
|
});
|
|
154
159
|
createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.initExperience.start();
|
|
155
160
|
var result = annotationManager.startDraft();
|
|
@@ -181,10 +186,12 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
|
|
|
181
186
|
return true;
|
|
182
187
|
} else {
|
|
183
188
|
createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.start({
|
|
184
|
-
attributes: {
|
|
189
|
+
attributes: _objectSpread({
|
|
185
190
|
pageClass: 'editor',
|
|
186
191
|
commentType: 'inline'
|
|
187
|
-
}
|
|
192
|
+
}, (0, _platformFeatureFlags.fg)('cc_comments_create_inline_experience_entry_point') ? {
|
|
193
|
+
entryPoint: 'highlightActions'
|
|
194
|
+
} : {})
|
|
188
195
|
});
|
|
189
196
|
createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.initExperience.start();
|
|
190
197
|
return (0, _editorCommands.setInlineCommentDraftState)(editorAnalyticsAPI)(true)(state, dispatch);
|
|
@@ -141,7 +141,10 @@ export const buildToolbar = editorAnalyticsAPI => ({
|
|
|
141
141
|
createCommentExperience === null || createCommentExperience === void 0 ? void 0 : createCommentExperience.start({
|
|
142
142
|
attributes: {
|
|
143
143
|
pageClass: 'editor',
|
|
144
|
-
commentType: 'inline'
|
|
144
|
+
commentType: 'inline',
|
|
145
|
+
...(fg('cc_comments_create_inline_experience_entry_point') ? {
|
|
146
|
+
entryPoint: 'highlightActions'
|
|
147
|
+
} : {})
|
|
145
148
|
}
|
|
146
149
|
});
|
|
147
150
|
createCommentExperience === null || createCommentExperience === void 0 ? void 0 : createCommentExperience.initExperience.start();
|
|
@@ -176,7 +179,10 @@ export const buildToolbar = editorAnalyticsAPI => ({
|
|
|
176
179
|
createCommentExperience === null || createCommentExperience === void 0 ? void 0 : createCommentExperience.start({
|
|
177
180
|
attributes: {
|
|
178
181
|
pageClass: 'editor',
|
|
179
|
-
commentType: 'inline'
|
|
182
|
+
commentType: 'inline',
|
|
183
|
+
...(fg('cc_comments_create_inline_experience_entry_point') ? {
|
|
184
|
+
entryPoint: 'highlightActions'
|
|
185
|
+
} : {})
|
|
180
186
|
}
|
|
181
187
|
});
|
|
182
188
|
createCommentExperience === null || createCommentExperience === void 0 ? void 0 : createCommentExperience.initExperience.start();
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, MODE } from '@atlaskit/editor-common/analytics';
|
|
3
6
|
import { ToolTipContent, addInlineComment } from '@atlaskit/editor-common/keymaps';
|
|
@@ -139,10 +142,12 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
|
|
|
139
142
|
annotationManager.checkPreemptiveGate().then(function (canStartDraft) {
|
|
140
143
|
if (canStartDraft) {
|
|
141
144
|
createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.start({
|
|
142
|
-
attributes: {
|
|
145
|
+
attributes: _objectSpread({
|
|
143
146
|
pageClass: 'editor',
|
|
144
147
|
commentType: 'inline'
|
|
145
|
-
}
|
|
148
|
+
}, fg('cc_comments_create_inline_experience_entry_point') ? {
|
|
149
|
+
entryPoint: 'highlightActions'
|
|
150
|
+
} : {})
|
|
146
151
|
});
|
|
147
152
|
createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.initExperience.start();
|
|
148
153
|
var result = annotationManager.startDraft();
|
|
@@ -174,10 +179,12 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
|
|
|
174
179
|
return true;
|
|
175
180
|
} else {
|
|
176
181
|
createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.start({
|
|
177
|
-
attributes: {
|
|
182
|
+
attributes: _objectSpread({
|
|
178
183
|
pageClass: 'editor',
|
|
179
184
|
commentType: 'inline'
|
|
180
|
-
}
|
|
185
|
+
}, fg('cc_comments_create_inline_experience_entry_point') ? {
|
|
186
|
+
entryPoint: 'highlightActions'
|
|
187
|
+
} : {})
|
|
181
188
|
});
|
|
182
189
|
createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.initExperience.start();
|
|
183
190
|
return setInlineCommentDraftState(editorAnalyticsAPI)(true)(state, dispatch);
|
|
@@ -118,11 +118,13 @@ export interface AnnotationProviders {
|
|
|
118
118
|
pageClass: 'editor';
|
|
119
119
|
commentType: 'inline';
|
|
120
120
|
annotationId?: undefined;
|
|
121
|
+
entryPoint?: 'highlightActions';
|
|
121
122
|
} | {
|
|
122
123
|
pageClass: 'editor';
|
|
123
124
|
commentType: 'block';
|
|
124
125
|
blockType: 'media';
|
|
125
126
|
annotationId?: undefined;
|
|
127
|
+
entryPoint?: 'highlightActions';
|
|
126
128
|
};
|
|
127
129
|
}) => void;
|
|
128
130
|
initExperience: {
|
|
@@ -118,11 +118,13 @@ export interface AnnotationProviders {
|
|
|
118
118
|
pageClass: 'editor';
|
|
119
119
|
commentType: 'inline';
|
|
120
120
|
annotationId?: undefined;
|
|
121
|
+
entryPoint?: 'highlightActions';
|
|
121
122
|
} | {
|
|
122
123
|
pageClass: 'editor';
|
|
123
124
|
commentType: 'block';
|
|
124
125
|
blockType: 'media';
|
|
125
126
|
annotationId?: undefined;
|
|
127
|
+
entryPoint?: 'highlightActions';
|
|
126
128
|
};
|
|
127
129
|
}) => void;
|
|
128
130
|
initExperience: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/icon": "^27.12.0",
|
|
44
44
|
"@atlaskit/onboarding": "^14.3.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^11.0.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
49
49
|
},
|
|
@@ -123,6 +123,9 @@
|
|
|
123
123
|
},
|
|
124
124
|
"confluence_frontend_preload_inline_comment_editor": {
|
|
125
125
|
"type": "boolean"
|
|
126
|
+
},
|
|
127
|
+
"cc_comments_create_inline_experience_entry_point": {
|
|
128
|
+
"type": "boolean"
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
131
|
}
|