@atlaskit/editor-plugin-annotation 8.0.10 → 8.0.12

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,17 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 8.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.0.11
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 8.0.10
4
16
 
5
17
  ### Patch Changes
@@ -29,7 +29,9 @@ var useCommentButtonMount = exports.useCommentButtonMount = function useCommentB
29
29
  doc: state.doc,
30
30
  pos: (0, _utils2.resolveDraftBookmark)(state, bookmark)
31
31
  })) !== null && _getRangeInlineNodeNa !== void 0 ? _getRangeInlineNodeNa : [];
32
- var isNonTextInlineNodeInludedInComment = inlineNodeNames.filter(function (nodeName) {
32
+ var isNonTextInlineNodeInludedInComment =
33
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
34
+ inlineNodeNames.filter(function (nodeName) {
33
35
  return nodeName !== 'text';
34
36
  }).length > 0;
35
37
  (0, _utils3.fireCommentButtonViewedAnalyticsEvent)({
@@ -132,7 +132,9 @@ function InlineCommentView(_ref) {
132
132
  }, /*#__PURE__*/_react.default.createElement(CreateComponent, {
133
133
  dom: dom,
134
134
  textSelection: textSelection,
135
- wasNewAnnotationSelected: !!currentlySelectedAnnotation && isAnnotationSelectionChanged,
135
+ wasNewAnnotationSelected: !!currentlySelectedAnnotation && isAnnotationSelectionChanged
136
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
137
+ ,
136
138
  onCreate: function onCreate(id) {
137
139
  if (!isAnnotationManagerEnabled) {
138
140
  var createAnnotationResult = (0, _editorCommands.createAnnotation)(editorAnalyticsAPI, editorAPI)(id, _adfSchema.AnnotationTypes.INLINE_COMMENT, inlineCommentProvider.supportedBlockNodes)(editorView.state, editorView.dispatch);
@@ -141,7 +143,9 @@ function InlineCommentView(_ref) {
141
143
  throw new Error('Failed to create annotation');
142
144
  }
143
145
  }
144
- },
146
+ }
147
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
148
+ ,
145
149
  onClose: function onClose() {
146
150
  if (!isAnnotationManagerEnabled) {
147
151
  (0, _editorCommands.setInlineCommentDraftState)(editorAnalyticsAPI, undefined, editorAPI)(false)(editorView.state, editorView.dispatch);
@@ -155,7 +159,9 @@ function InlineCommentView(_ref) {
155
159
  }
156
160
 
157
161
  // View Component
158
- var activeAnnotations = (selectedAnnotations === null || selectedAnnotations === void 0 ? void 0 : selectedAnnotations.filter(function (mark) {
162
+ var activeAnnotations =
163
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
164
+ (selectedAnnotations === null || selectedAnnotations === void 0 ? void 0 : selectedAnnotations.filter(function (mark) {
159
165
  return annotations && annotations[mark.id] === false;
160
166
  })) || [];
161
167
  if (!ViewComponent || activeAnnotations.length === 0) {
@@ -200,13 +206,19 @@ function InlineCommentView(_ref) {
200
206
  annotationsList: annotationsList,
201
207
  annotations: activeAnnotations,
202
208
  getInlineNodeTypes: getInlineNodeTypes,
203
- dom: dom,
209
+ dom: dom
210
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
211
+ ,
204
212
  onDelete: function onDelete(id) {
205
213
  return (0, _editorCommands.removeInlineCommentNearSelection)(id, inlineCommentProvider.supportedBlockNodes)(editorView.state, dispatch);
206
- },
214
+ }
215
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
216
+ ,
207
217
  onResolve: function onResolve(id) {
208
218
  return (0, _editorCommands.updateInlineCommentResolvedState)(editorAnalyticsAPI)((0, _defineProperty2.default)({}, id, true), _analytics.RESOLVE_METHOD.COMPONENT)(editorView.state, editorView.dispatch);
209
- },
219
+ }
220
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
221
+ ,
210
222
  onClose: function onClose() {
211
223
  (0, _editorCommands.closeComponent)()(editorView.state, editorView.dispatch);
212
224
  },
@@ -24,7 +24,9 @@ export const useCommentButtonMount = ({
24
24
  doc: state.doc,
25
25
  pos: resolveDraftBookmark(state, bookmark)
26
26
  })) !== null && _getRangeInlineNodeNa !== void 0 ? _getRangeInlineNodeNa : [];
27
- const isNonTextInlineNodeInludedInComment = inlineNodeNames.filter(nodeName => nodeName !== 'text').length > 0;
27
+ const isNonTextInlineNodeInludedInComment =
28
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
29
+ inlineNodeNames.filter(nodeName => nodeName !== 'text').length > 0;
28
30
  fireCommentButtonViewedAnalyticsEvent({
29
31
  api,
30
32
  isNonTextInlineNodeInludedInComment,
@@ -130,7 +130,9 @@ export function InlineCommentView({
130
130
  }, /*#__PURE__*/React.createElement(CreateComponent, {
131
131
  dom: dom,
132
132
  textSelection: textSelection,
133
- wasNewAnnotationSelected: !!currentlySelectedAnnotation && isAnnotationSelectionChanged,
133
+ wasNewAnnotationSelected: !!currentlySelectedAnnotation && isAnnotationSelectionChanged
134
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
135
+ ,
134
136
  onCreate: id => {
135
137
  if (!isAnnotationManagerEnabled) {
136
138
  const createAnnotationResult = createAnnotation(editorAnalyticsAPI, editorAPI)(id, AnnotationTypes.INLINE_COMMENT, inlineCommentProvider.supportedBlockNodes)(editorView.state, editorView.dispatch);
@@ -139,7 +141,9 @@ export function InlineCommentView({
139
141
  throw new Error('Failed to create annotation');
140
142
  }
141
143
  }
142
- },
144
+ }
145
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
146
+ ,
143
147
  onClose: () => {
144
148
  if (!isAnnotationManagerEnabled) {
145
149
  setInlineCommentDraftState(editorAnalyticsAPI, undefined, editorAPI)(false)(editorView.state, editorView.dispatch);
@@ -153,7 +157,9 @@ export function InlineCommentView({
153
157
  }
154
158
 
155
159
  // View Component
156
- const activeAnnotations = (selectedAnnotations === null || selectedAnnotations === void 0 ? void 0 : selectedAnnotations.filter(mark => annotations && annotations[mark.id] === false)) || [];
160
+ const activeAnnotations =
161
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
162
+ (selectedAnnotations === null || selectedAnnotations === void 0 ? void 0 : selectedAnnotations.filter(mark => annotations && annotations[mark.id] === false)) || [];
157
163
  if (!ViewComponent || activeAnnotations.length === 0) {
158
164
  return null;
159
165
  }
@@ -194,11 +200,17 @@ export function InlineCommentView({
194
200
  annotationsList: annotationsList,
195
201
  annotations: activeAnnotations,
196
202
  getInlineNodeTypes: getInlineNodeTypes,
197
- dom: dom,
198
- onDelete: id => removeInlineCommentNearSelection(id, inlineCommentProvider.supportedBlockNodes)(editorView.state, dispatch),
203
+ dom: dom
204
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
205
+ ,
206
+ onDelete: id => removeInlineCommentNearSelection(id, inlineCommentProvider.supportedBlockNodes)(editorView.state, dispatch)
207
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
208
+ ,
199
209
  onResolve: id => updateInlineCommentResolvedState(editorAnalyticsAPI)({
200
210
  [id]: true
201
- }, RESOLVE_METHOD.COMPONENT)(editorView.state, editorView.dispatch),
211
+ }, RESOLVE_METHOD.COMPONENT)(editorView.state, editorView.dispatch)
212
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
213
+ ,
202
214
  onClose: () => {
203
215
  closeComponent()(editorView.state, editorView.dispatch);
204
216
  },
@@ -23,7 +23,9 @@ export var useCommentButtonMount = function useCommentButtonMount(_ref) {
23
23
  doc: state.doc,
24
24
  pos: resolveDraftBookmark(state, bookmark)
25
25
  })) !== null && _getRangeInlineNodeNa !== void 0 ? _getRangeInlineNodeNa : [];
26
- var isNonTextInlineNodeInludedInComment = inlineNodeNames.filter(function (nodeName) {
26
+ var isNonTextInlineNodeInludedInComment =
27
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
28
+ inlineNodeNames.filter(function (nodeName) {
27
29
  return nodeName !== 'text';
28
30
  }).length > 0;
29
31
  fireCommentButtonViewedAnalyticsEvent({
@@ -123,7 +123,9 @@ export function InlineCommentView(_ref) {
123
123
  }, /*#__PURE__*/React.createElement(CreateComponent, {
124
124
  dom: dom,
125
125
  textSelection: textSelection,
126
- wasNewAnnotationSelected: !!currentlySelectedAnnotation && isAnnotationSelectionChanged,
126
+ wasNewAnnotationSelected: !!currentlySelectedAnnotation && isAnnotationSelectionChanged
127
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
128
+ ,
127
129
  onCreate: function onCreate(id) {
128
130
  if (!isAnnotationManagerEnabled) {
129
131
  var createAnnotationResult = createAnnotation(editorAnalyticsAPI, editorAPI)(id, AnnotationTypes.INLINE_COMMENT, inlineCommentProvider.supportedBlockNodes)(editorView.state, editorView.dispatch);
@@ -132,7 +134,9 @@ export function InlineCommentView(_ref) {
132
134
  throw new Error('Failed to create annotation');
133
135
  }
134
136
  }
135
- },
137
+ }
138
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
139
+ ,
136
140
  onClose: function onClose() {
137
141
  if (!isAnnotationManagerEnabled) {
138
142
  setInlineCommentDraftState(editorAnalyticsAPI, undefined, editorAPI)(false)(editorView.state, editorView.dispatch);
@@ -146,7 +150,9 @@ export function InlineCommentView(_ref) {
146
150
  }
147
151
 
148
152
  // View Component
149
- var activeAnnotations = (selectedAnnotations === null || selectedAnnotations === void 0 ? void 0 : selectedAnnotations.filter(function (mark) {
153
+ var activeAnnotations =
154
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
155
+ (selectedAnnotations === null || selectedAnnotations === void 0 ? void 0 : selectedAnnotations.filter(function (mark) {
150
156
  return annotations && annotations[mark.id] === false;
151
157
  })) || [];
152
158
  if (!ViewComponent || activeAnnotations.length === 0) {
@@ -191,13 +197,19 @@ export function InlineCommentView(_ref) {
191
197
  annotationsList: annotationsList,
192
198
  annotations: activeAnnotations,
193
199
  getInlineNodeTypes: getInlineNodeTypes,
194
- dom: dom,
200
+ dom: dom
201
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
202
+ ,
195
203
  onDelete: function onDelete(id) {
196
204
  return removeInlineCommentNearSelection(id, inlineCommentProvider.supportedBlockNodes)(editorView.state, dispatch);
197
- },
205
+ }
206
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
207
+ ,
198
208
  onResolve: function onResolve(id) {
199
209
  return updateInlineCommentResolvedState(editorAnalyticsAPI)(_defineProperty({}, id, true), RESOLVE_METHOD.COMPONENT)(editorView.state, editorView.dispatch);
200
- },
210
+ }
211
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
212
+ ,
201
213
  onClose: function onClose() {
202
214
  closeComponent()(editorView.state, editorView.dispatch);
203
215
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "8.0.10",
3
+ "version": "8.0.12",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,12 +39,12 @@
39
39
  "@atlaskit/editor-toolbar-model": "^0.4.0",
40
40
  "@atlaskit/icon": "^33.0.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
- "@atlaskit/tmp-editor-statsig": "^43.0.0",
42
+ "@atlaskit/tmp-editor-statsig": "^45.0.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "react-intl-next": "npm:react-intl@^5.18.1"
45
45
  },
46
46
  "peerDependencies": {
47
- "@atlaskit/editor-common": "^112.7.0",
47
+ "@atlaskit/editor-common": "^112.8.0",
48
48
  "react": "^18.2.0",
49
49
  "react-dom": "^18.2.0"
50
50
  },