@atlaskit/editor-plugin-annotation 6.1.2 → 6.1.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 +14 -0
- package/dist/cjs/editor-commands/index.js +2 -3
- package/dist/cjs/pm-plugins/inline-comment.js +1 -2
- package/dist/es2019/editor-commands/index.js +2 -3
- package/dist/es2019/pm-plugins/inline-comment.js +1 -2
- package/dist/esm/editor-commands/index.js +2 -3
- package/dist/esm/pm-plugins/inline-comment.js +1 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-annotation
|
|
2
2
|
|
|
3
|
+
## 6.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a3254a75cdfb7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a3254a75cdfb7) -
|
|
8
|
+
[ED-29448] clean up experiment platform_editor_toolbar_aifc_patch_2
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 6.1.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.1.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
13
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
15
14
|
var _types = require("../pm-plugins/types");
|
|
@@ -248,7 +247,7 @@ var setInlineCommentDraftState = exports.setInlineCommentDraftState = function s
|
|
|
248
247
|
var targetNodeId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
|
|
249
248
|
var isOpeningMediaCommentFromToolbar = arguments.length > 4 ? arguments[4] : undefined;
|
|
250
249
|
var commandAction = getDraftCommandAction(drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar);
|
|
251
|
-
if ((0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)
|
|
250
|
+
if ((0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)) {
|
|
252
251
|
return function (state, dispatch) {
|
|
253
252
|
var tr = _transform.default.handleDraftState(editorAnalyticsAPI)(drafting, inputMethod)(state.tr, state);
|
|
254
253
|
var newPluginState = commandAction(state);
|
|
@@ -290,7 +289,7 @@ var addInlineComment = exports.addInlineComment = function addInlineComment(edit
|
|
|
290
289
|
}
|
|
291
290
|
};
|
|
292
291
|
};
|
|
293
|
-
if ((0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)
|
|
292
|
+
if ((0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)) {
|
|
294
293
|
return function (state, dispatch) {
|
|
295
294
|
var tr = _transform.default.addInlineComment(editorAnalyticsAPI, editorAPI)(id, supportedBlockNodes)(state.tr, state);
|
|
296
295
|
tr.setMeta(_utils.inlineCommentPluginKey, commandAction(state));
|
|
@@ -14,7 +14,6 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
15
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
19
18
|
var _editorCommands = require("../editor-commands");
|
|
20
19
|
var _utils2 = require("../editor-commands/utils");
|
|
@@ -274,7 +273,7 @@ var inlineCommentPlugin = exports.inlineCommentPlugin = function inlineCommentPl
|
|
|
274
273
|
(_options$viewInlineCo = options.viewInlineCommentTraceUFOPress) === null || _options$viewInlineCo === void 0 || _options$viewInlineCo.call(options);
|
|
275
274
|
}
|
|
276
275
|
var api = options.api;
|
|
277
|
-
if (isDrafting && !view.state.selection.eq(_prevState.selection) && (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)
|
|
276
|
+
if (isDrafting && !view.state.selection.eq(_prevState.selection) && (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)) {
|
|
278
277
|
// It is possible that user update selection while having a active draft,
|
|
279
278
|
// so we need to reset the user intent to allow inline text toolbar to be visible
|
|
280
279
|
api === null || api === void 0 || api.core.actions.execute(function (_ref7) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
2
|
import { INPUT_METHOD, RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
5
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
7
6
|
import { ACTIONS } from '../pm-plugins/types';
|
|
@@ -203,7 +202,7 @@ export const showInlineCommentForBlockNode = (supportedBlockNodes = []) => (node
|
|
|
203
202
|
};
|
|
204
203
|
export const setInlineCommentDraftState = (editorAnalyticsAPI, supportedBlockNodes = [], api) => (drafting, inputMethod = INPUT_METHOD.TOOLBAR, targetType = 'inline', targetNodeId = undefined, isOpeningMediaCommentFromToolbar) => {
|
|
205
204
|
const commandAction = getDraftCommandAction(drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar);
|
|
206
|
-
if (editorExperiment('platform_editor_toolbar_aifc', true)
|
|
205
|
+
if (editorExperiment('platform_editor_toolbar_aifc', true)) {
|
|
207
206
|
return (state, dispatch) => {
|
|
208
207
|
const tr = transform.handleDraftState(editorAnalyticsAPI)(drafting, inputMethod)(state.tr, state);
|
|
209
208
|
const newPluginState = commandAction(state);
|
|
@@ -243,7 +242,7 @@ export const addInlineComment = (editorAnalyticsAPI, editorAPI) => (id, supporte
|
|
|
243
242
|
editorState
|
|
244
243
|
}
|
|
245
244
|
});
|
|
246
|
-
if (editorExperiment('platform_editor_toolbar_aifc', true)
|
|
245
|
+
if (editorExperiment('platform_editor_toolbar_aifc', true)) {
|
|
247
246
|
return (state, dispatch) => {
|
|
248
247
|
const tr = transform.addInlineComment(editorAnalyticsAPI, editorAPI)(id, supportedBlockNodes)(state.tr, state);
|
|
249
248
|
tr.setMeta(inlineCommentPluginKey, commandAction(state));
|
|
@@ -4,7 +4,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
4
4
|
import { getAnnotationInlineNodeTypes } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
8
|
import { clearDirtyMark, closeComponent, setHoveredAnnotation, setInlineCommentsVisibility, setSelectedAnnotation, flushPendingSelections, updateInlineCommentResolvedState, updateMouseState, setPendingSelectedAnnotation, setInlineCommentDraftState, setInlineCommentsFetched } from '../editor-commands';
|
|
10
9
|
import { resetUserIntent, setUserIntent } from '../editor-commands/utils';
|
|
@@ -216,7 +215,7 @@ export const inlineCommentPlugin = options => {
|
|
|
216
215
|
const {
|
|
217
216
|
api
|
|
218
217
|
} = options;
|
|
219
|
-
if (isDrafting && !view.state.selection.eq(_prevState.selection) && editorExperiment('platform_editor_toolbar_aifc', true)
|
|
218
|
+
if (isDrafting && !view.state.selection.eq(_prevState.selection) && editorExperiment('platform_editor_toolbar_aifc', true)) {
|
|
220
219
|
// It is possible that user update selection while having a active draft,
|
|
221
220
|
// so we need to reset the user intent to allow inline text toolbar to be visible
|
|
222
221
|
api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
3
|
import { INPUT_METHOD, RESOLVE_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
8
7
|
import { ACTIONS } from '../pm-plugins/types';
|
|
@@ -241,7 +240,7 @@ export var setInlineCommentDraftState = function setInlineCommentDraftState(edit
|
|
|
241
240
|
var targetNodeId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
|
|
242
241
|
var isOpeningMediaCommentFromToolbar = arguments.length > 4 ? arguments[4] : undefined;
|
|
243
242
|
var commandAction = getDraftCommandAction(drafting, targetType, targetNodeId, supportedBlockNodes, isOpeningMediaCommentFromToolbar);
|
|
244
|
-
if (editorExperiment('platform_editor_toolbar_aifc', true)
|
|
243
|
+
if (editorExperiment('platform_editor_toolbar_aifc', true)) {
|
|
245
244
|
return function (state, dispatch) {
|
|
246
245
|
var tr = transform.handleDraftState(editorAnalyticsAPI)(drafting, inputMethod)(state.tr, state);
|
|
247
246
|
var newPluginState = commandAction(state);
|
|
@@ -283,7 +282,7 @@ export var addInlineComment = function addInlineComment(editorAnalyticsAPI, edit
|
|
|
283
282
|
}
|
|
284
283
|
};
|
|
285
284
|
};
|
|
286
|
-
if (editorExperiment('platform_editor_toolbar_aifc', true)
|
|
285
|
+
if (editorExperiment('platform_editor_toolbar_aifc', true)) {
|
|
287
286
|
return function (state, dispatch) {
|
|
288
287
|
var tr = transform.addInlineComment(editorAnalyticsAPI, editorAPI)(id, supportedBlockNodes)(state.tr, state);
|
|
289
288
|
tr.setMeta(inlineCommentPluginKey, commandAction(state));
|
|
@@ -7,7 +7,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
7
7
|
import { getAnnotationInlineNodeTypes } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
11
|
import { clearDirtyMark, closeComponent, setHoveredAnnotation, setInlineCommentsVisibility, setSelectedAnnotation, flushPendingSelections, updateInlineCommentResolvedState, updateMouseState, setPendingSelectedAnnotation, setInlineCommentDraftState, setInlineCommentsFetched } from '../editor-commands';
|
|
13
12
|
import { resetUserIntent, setUserIntent } from '../editor-commands/utils';
|
|
@@ -267,7 +266,7 @@ export var inlineCommentPlugin = function inlineCommentPlugin(options) {
|
|
|
267
266
|
(_options$viewInlineCo = options.viewInlineCommentTraceUFOPress) === null || _options$viewInlineCo === void 0 || _options$viewInlineCo.call(options);
|
|
268
267
|
}
|
|
269
268
|
var api = options.api;
|
|
270
|
-
if (isDrafting && !view.state.selection.eq(_prevState.selection) && editorExperiment('platform_editor_toolbar_aifc', true)
|
|
269
|
+
if (isDrafting && !view.state.selection.eq(_prevState.selection) && editorExperiment('platform_editor_toolbar_aifc', true)) {
|
|
271
270
|
// It is possible that user update selection while having a active draft,
|
|
272
271
|
// so we need to reset the user intent to allow inline text toolbar to be visible
|
|
273
272
|
api === null || api === void 0 || api.core.actions.execute(function (_ref7) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-annotation",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.4",
|
|
4
4
|
"description": "Annotation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"@atlaskit/editor-plugin-toolbar": "^3.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-user-intent": "^4.0.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
39
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
39
|
+
"@atlaskit/editor-toolbar": "^0.12.0",
|
|
40
40
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
41
41
|
"@atlaskit/icon": "^28.3.0",
|
|
42
42
|
"@atlaskit/onboarding": "^14.4.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^13.2.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
47
47
|
},
|