@atlaskit/editor-plugin-annotation 5.4.0 → 5.6.0

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,24 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 5.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`687c1b8fa7801`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/687c1b8fa7801) -
8
+ EDITOR-1566 bump adf-schema + update validator
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 5.5.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`1f2b3dfa14308`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1f2b3dfa14308) -
19
+ Clean up fg cc_comments_create_inline_experience_entry_point as true so that create comment
20
+ experience tracking logs always include the entryPoint
21
+
3
22
  ## 5.4.0
4
23
 
5
24
  ### Minor Changes
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.shouldSuppressFloatingToolbar = exports.buildToolbar = exports.buildSuppressedToolbar = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _analytics = require("@atlaskit/editor-common/analytics");
11
10
  var _keymaps = require("@atlaskit/editor-common/keymaps");
@@ -17,8 +16,6 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
16
  var _editorCommands = require("../editor-commands");
18
17
  var _types = require("../types");
19
18
  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; }
22
19
  var getValidNodes = function getValidNodes(state) {
23
20
  var schema = state.schema;
24
21
  var annotation = schema.marks.annotation;
@@ -149,12 +146,11 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
149
146
  annotationManager.checkPreemptiveGate().then(function (canStartDraft) {
150
147
  if (canStartDraft) {
151
148
  createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.start({
152
- attributes: _objectSpread({
149
+ attributes: {
153
150
  pageClass: 'editor',
154
- commentType: 'inline'
155
- }, (0, _platformFeatureFlags.fg)('cc_comments_create_inline_experience_entry_point') ? {
151
+ commentType: 'inline',
156
152
  entryPoint: 'highlightActions'
157
- } : {})
153
+ }
158
154
  });
159
155
  createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.initExperience.start();
160
156
  var result = annotationManager.startDraft();
@@ -186,12 +182,11 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
186
182
  return true;
187
183
  } else {
188
184
  createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.start({
189
- attributes: _objectSpread({
185
+ attributes: {
190
186
  pageClass: 'editor',
191
- commentType: 'inline'
192
- }, (0, _platformFeatureFlags.fg)('cc_comments_create_inline_experience_entry_point') ? {
187
+ commentType: 'inline',
193
188
  entryPoint: 'highlightActions'
194
- } : {})
189
+ }
195
190
  });
196
191
  createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.initExperience.start();
197
192
  return (0, _editorCommands.setInlineCommentDraftState)(editorAnalyticsAPI)(true)(state, dispatch);
@@ -1,20 +1,15 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.startCommentExperience = exports.shouldShowCommentButton = exports.isButtonDisabled = exports.fireOnClickAnalyticsEvent = exports.fireCommentButtonViewedAnalyticsEvent = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
7
  var _analytics = require("@atlaskit/editor-common/analytics");
10
8
  var _mediaSingle = require("@atlaskit/editor-common/media-single");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
9
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
10
  var _editorCommands = require("../../editor-commands");
14
11
  var _utils = require("../../pm-plugins/utils");
15
12
  var _types = require("../../types");
16
- 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; }
17
- 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; }
18
13
  var isButtonDisabled = exports.isButtonDisabled = function isButtonDisabled(_ref) {
19
14
  var _api$connectivity;
20
15
  var state = _ref.state,
@@ -97,12 +92,11 @@ var startCommentExperience = exports.startCommentExperience = function startComm
97
92
  if (canStartDraft) {
98
93
  var _annotationProviders$, _annotationProviders$2;
99
94
  (_annotationProviders$ = annotationProviders.createCommentExperience) === null || _annotationProviders$ === void 0 || _annotationProviders$.start({
100
- attributes: _objectSpread({
95
+ attributes: {
101
96
  pageClass: 'editor',
102
- commentType: 'inline'
103
- }, (0, _platformFeatureFlags.fg)('cc_comments_create_inline_experience_entry_point') ? {
97
+ commentType: 'inline',
104
98
  entryPoint: 'highlightActions'
105
- } : {})
99
+ }
106
100
  });
107
101
  (_annotationProviders$2 = annotationProviders.createCommentExperience) === null || _annotationProviders$2 === void 0 || _annotationProviders$2.initExperience.start();
108
102
  var result = annotationManager.startDraft();
@@ -125,12 +119,11 @@ var startCommentExperience = exports.startCommentExperience = function startComm
125
119
  } else {
126
120
  var _annotationProviders$3, _annotationProviders$4, _api$analytics4;
127
121
  annotationProviders === null || annotationProviders === void 0 || (_annotationProviders$3 = annotationProviders.createCommentExperience) === null || _annotationProviders$3 === void 0 || _annotationProviders$3.start({
128
- attributes: _objectSpread({
122
+ attributes: {
129
123
  pageClass: 'editor',
130
- commentType: 'inline'
131
- }, (0, _platformFeatureFlags.fg)('cc_comments_create_inline_experience_entry_point') ? {
124
+ commentType: 'inline',
132
125
  entryPoint: 'highlightActions'
133
- } : {})
126
+ }
134
127
  });
135
128
  annotationProviders === null || annotationProviders === void 0 || (_annotationProviders$4 = annotationProviders.createCommentExperience) === null || _annotationProviders$4 === void 0 || _annotationProviders$4.initExperience.start();
136
129
  return (0, _editorCommands.setInlineCommentDraftState)(api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions, undefined, api)(true)(state, dispatch);
@@ -142,9 +142,7 @@ export const buildToolbar = editorAnalyticsAPI => ({
142
142
  attributes: {
143
143
  pageClass: 'editor',
144
144
  commentType: 'inline',
145
- ...(fg('cc_comments_create_inline_experience_entry_point') ? {
146
- entryPoint: 'highlightActions'
147
- } : {})
145
+ entryPoint: 'highlightActions'
148
146
  }
149
147
  });
150
148
  createCommentExperience === null || createCommentExperience === void 0 ? void 0 : createCommentExperience.initExperience.start();
@@ -180,9 +178,7 @@ export const buildToolbar = editorAnalyticsAPI => ({
180
178
  attributes: {
181
179
  pageClass: 'editor',
182
180
  commentType: 'inline',
183
- ...(fg('cc_comments_create_inline_experience_entry_point') ? {
184
- entryPoint: 'highlightActions'
185
- } : {})
181
+ entryPoint: 'highlightActions'
186
182
  }
187
183
  });
188
184
  createCommentExperience === null || createCommentExperience === void 0 ? void 0 : createCommentExperience.initExperience.start();
@@ -1,6 +1,5 @@
1
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, MODE } from '@atlaskit/editor-common/analytics';
2
2
  import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { setInlineCommentDraftState } from '../../editor-commands';
6
5
  import { inlineCommentPluginKey, isSelectionValid } from '../../pm-plugins/utils';
@@ -96,9 +95,7 @@ export const startCommentExperience = ({
96
95
  attributes: {
97
96
  pageClass: 'editor',
98
97
  commentType: 'inline',
99
- ...(fg('cc_comments_create_inline_experience_entry_point') ? {
100
- entryPoint: 'highlightActions'
101
- } : {})
98
+ entryPoint: 'highlightActions'
102
99
  }
103
100
  });
104
101
  (_annotationProviders$2 = annotationProviders.createCommentExperience) === null || _annotationProviders$2 === void 0 ? void 0 : _annotationProviders$2.initExperience.start();
@@ -125,9 +122,7 @@ export const startCommentExperience = ({
125
122
  attributes: {
126
123
  pageClass: 'editor',
127
124
  commentType: 'inline',
128
- ...(fg('cc_comments_create_inline_experience_entry_point') ? {
129
- entryPoint: 'highlightActions'
130
- } : {})
125
+ entryPoint: 'highlightActions'
131
126
  }
132
127
  });
133
128
  annotationProviders === null || annotationProviders === void 0 ? void 0 : (_annotationProviders$4 = annotationProviders.createCommentExperience) === null || _annotationProviders$4 === void 0 ? void 0 : _annotationProviders$4.initExperience.start();
@@ -1,6 +1,3 @@
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; }
4
1
  import React from 'react';
5
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, MODE } from '@atlaskit/editor-common/analytics';
6
3
  import { ToolTipContent, addInlineComment } from '@atlaskit/editor-common/keymaps';
@@ -142,12 +139,11 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
142
139
  annotationManager.checkPreemptiveGate().then(function (canStartDraft) {
143
140
  if (canStartDraft) {
144
141
  createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.start({
145
- attributes: _objectSpread({
142
+ attributes: {
146
143
  pageClass: 'editor',
147
- commentType: 'inline'
148
- }, fg('cc_comments_create_inline_experience_entry_point') ? {
144
+ commentType: 'inline',
149
145
  entryPoint: 'highlightActions'
150
- } : {})
146
+ }
151
147
  });
152
148
  createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.initExperience.start();
153
149
  var result = annotationManager.startDraft();
@@ -179,12 +175,11 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
179
175
  return true;
180
176
  } else {
181
177
  createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.start({
182
- attributes: _objectSpread({
178
+ attributes: {
183
179
  pageClass: 'editor',
184
- commentType: 'inline'
185
- }, fg('cc_comments_create_inline_experience_entry_point') ? {
180
+ commentType: 'inline',
186
181
  entryPoint: 'highlightActions'
187
- } : {})
182
+ }
188
183
  });
189
184
  createCommentExperience === null || createCommentExperience === void 0 || createCommentExperience.initExperience.start();
190
185
  return setInlineCommentDraftState(editorAnalyticsAPI)(true)(state, dispatch);
@@ -1,9 +1,5 @@
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; }
4
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, MODE } from '@atlaskit/editor-common/analytics';
5
2
  import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
4
  import { setInlineCommentDraftState } from '../../editor-commands';
9
5
  import { inlineCommentPluginKey, isSelectionValid } from '../../pm-plugins/utils';
@@ -90,12 +86,11 @@ export var startCommentExperience = function startCommentExperience(_ref6) {
90
86
  if (canStartDraft) {
91
87
  var _annotationProviders$, _annotationProviders$2;
92
88
  (_annotationProviders$ = annotationProviders.createCommentExperience) === null || _annotationProviders$ === void 0 || _annotationProviders$.start({
93
- attributes: _objectSpread({
89
+ attributes: {
94
90
  pageClass: 'editor',
95
- commentType: 'inline'
96
- }, fg('cc_comments_create_inline_experience_entry_point') ? {
91
+ commentType: 'inline',
97
92
  entryPoint: 'highlightActions'
98
- } : {})
93
+ }
99
94
  });
100
95
  (_annotationProviders$2 = annotationProviders.createCommentExperience) === null || _annotationProviders$2 === void 0 || _annotationProviders$2.initExperience.start();
101
96
  var result = annotationManager.startDraft();
@@ -118,12 +113,11 @@ export var startCommentExperience = function startCommentExperience(_ref6) {
118
113
  } else {
119
114
  var _annotationProviders$3, _annotationProviders$4, _api$analytics4;
120
115
  annotationProviders === null || annotationProviders === void 0 || (_annotationProviders$3 = annotationProviders.createCommentExperience) === null || _annotationProviders$3 === void 0 || _annotationProviders$3.start({
121
- attributes: _objectSpread({
116
+ attributes: {
122
117
  pageClass: 'editor',
123
- commentType: 'inline'
124
- }, fg('cc_comments_create_inline_experience_entry_point') ? {
118
+ commentType: 'inline',
125
119
  entryPoint: 'highlightActions'
126
- } : {})
120
+ }
127
121
  });
128
122
  annotationProviders === null || annotationProviders === void 0 || (_annotationProviders$4 = annotationProviders.createCommentExperience) === null || _annotationProviders$4 === void 0 || _annotationProviders$4.initExperience.start();
129
123
  return setInlineCommentDraftState(api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions, undefined, api)(true)(state, dispatch);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "5.4.0",
3
+ "version": "5.6.0",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -27,9 +27,9 @@
27
27
  "sideEffects": false,
28
28
  "atlaskit:src": "src/index.ts",
29
29
  "dependencies": {
30
- "@atlaskit/adf-schema": "^51.1.2",
30
+ "@atlaskit/adf-schema": "^51.2.0",
31
31
  "@atlaskit/analytics-next": "^11.1.0",
32
- "@atlaskit/editor-plugin-analytics": "^5.2.0",
32
+ "@atlaskit/editor-plugin-analytics": "^5.3.0",
33
33
  "@atlaskit/editor-plugin-connectivity": "^5.0.0",
34
34
  "@atlaskit/editor-plugin-editor-viewmode-effects": "^5.0.0",
35
35
  "@atlaskit/editor-plugin-feature-flags": "^4.0.0",
@@ -38,15 +38,15 @@
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
39
39
  "@atlaskit/editor-toolbar": "^0.9.0",
40
40
  "@atlaskit/editor-toolbar-model": "^0.2.0",
41
- "@atlaskit/icon": "^28.2.0",
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": "^12.27.0",
44
+ "@atlaskit/tmp-editor-statsig": "^12.30.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "react-intl-next": "npm:react-intl@^5.18.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@atlaskit/editor-common": "^109.11.0",
49
+ "@atlaskit/editor-common": "^109.16.0",
50
50
  "react": "^18.2.0",
51
51
  "react-dom": "^18.2.0"
52
52
  },
@@ -108,9 +108,6 @@
108
108
  },
109
109
  "confluence_frontend_preload_inline_comment_editor": {
110
110
  "type": "boolean"
111
- },
112
- "cc_comments_create_inline_experience_entry_point": {
113
- "type": "boolean"
114
111
  }
115
112
  }
116
113
  }