@atlaskit/editor-plugin-paste 11.1.9 → 11.1.11

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-paste
2
2
 
3
+ ## 11.1.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a27e4893b8fa2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a27e4893b8fa2) -
8
+ Add sorted comma seperated list of nodes to analytics
9
+
10
+ ## 11.1.10
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 11.1.9
4
17
 
5
18
  ### Patch Changes
@@ -15,6 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
15
  var _analytics = require("@atlaskit/editor-common/analytics");
16
16
  var _utils = require("@atlaskit/editor-common/utils");
17
17
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
19
  var _util = require("./util");
19
20
  var _handlers = require("./util/handlers");
20
21
  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; }
@@ -227,6 +228,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
227
228
  });
228
229
  pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$m2 = pluginInjectionApi.mention) === null || _pluginInjectionApi$m2 === void 0 || (_pluginInjectionApi$m2 = _pluginInjectionApi$m2.actions) === null || _pluginInjectionApi$m2 === void 0 || _pluginInjectionApi$m2.announceMentionsInsertion(mentionsInserted);
229
230
  }
231
+ var pastedNodeTypes = (0, _platformFeatureFlags.fg)('platform_editor_paste_renderer_analytics') ? (0, _toConsumableArray2.default)(_getContentNodeTypes(slice.content)).sort().join(',') : undefined;
230
232
  if (pasteContext.type === _analytics.PasteTypes.plain) {
231
233
  return createPastePayload(actionSubjectId, {
232
234
  pasteSize: text.length,
@@ -237,7 +239,8 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
237
239
  linksInPasteCount: linkUrls.length,
238
240
  mentionIds: mentionIds,
239
241
  mentionLocalIds: mentionLocalIds,
240
- pasteSplitList: pasteContext.pasteSplitList
242
+ pasteSplitList: pasteContext.pasteSplitList,
243
+ pastedNodeTypes: pastedNodeTypes
241
244
  });
242
245
  }
243
246
  var linkDomains = linkUrls.map(_utils.getLinkDomain);
@@ -251,7 +254,8 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
251
254
  mediaTraceId: mediaTraceId,
252
255
  mentionIds: mentionIds,
253
256
  mentionLocalIds: mentionLocalIds,
254
- pasteSplitList: pasteContext.pasteSplitList
257
+ pasteSplitList: pasteContext.pasteSplitList,
258
+ pastedNodeTypes: pastedNodeTypes
255
259
  }, linkDomains);
256
260
  };
257
261
  }
@@ -1,6 +1,7 @@
1
1
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, PasteContents, PasteTypes } from '@atlaskit/editor-common/analytics';
2
2
  import { getLinkDomain, mapSlice } from '@atlaskit/editor-common/utils';
3
3
  import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { getPasteSource } from './util';
5
6
  import { handleCodeBlock, handleExpandPaste, handleMarkdown, handleMediaSingle, handlePasteAsPlainText, handlePasteIntoCaption, handlePasteIntoTaskOrDecisionOrPanel, handlePasteLinkOnSelectedText, handlePasteNonNestableBlockNodesIntoList, handlePastePanelOrDecisionContentIntoList, handlePastePreservingMarks, handleRichText, handleSelectedTable, handleNestedTablePaste } from './util/handlers';
6
7
  const contentToPasteContent = {
@@ -222,6 +223,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
222
223
  });
223
224
  pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$m3 = pluginInjectionApi.mention) === null || _pluginInjectionApi$m3 === void 0 ? void 0 : (_pluginInjectionApi$m4 = _pluginInjectionApi$m3.actions) === null || _pluginInjectionApi$m4 === void 0 ? void 0 : _pluginInjectionApi$m4.announceMentionsInsertion(mentionsInserted);
224
225
  }
226
+ const pastedNodeTypes = fg('platform_editor_paste_renderer_analytics') ? [...getContentNodeTypes(slice.content)].sort().join(',') : undefined;
225
227
  if (pasteContext.type === PasteTypes.plain) {
226
228
  return createPastePayload(actionSubjectId, {
227
229
  pasteSize: text.length,
@@ -232,7 +234,8 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
232
234
  linksInPasteCount: linkUrls.length,
233
235
  mentionIds,
234
236
  mentionLocalIds,
235
- pasteSplitList: pasteContext.pasteSplitList
237
+ pasteSplitList: pasteContext.pasteSplitList,
238
+ pastedNodeTypes
236
239
  });
237
240
  }
238
241
  const linkDomains = linkUrls.map(getLinkDomain);
@@ -246,7 +249,8 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
246
249
  mediaTraceId,
247
250
  mentionIds,
248
251
  mentionLocalIds,
249
- pasteSplitList: pasteContext.pasteSplitList
252
+ pasteSplitList: pasteContext.pasteSplitList,
253
+ pastedNodeTypes
250
254
  }, linkDomains);
251
255
  };
252
256
  }
@@ -5,6 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, PasteContents, PasteTypes } from '@atlaskit/editor-common/analytics';
6
6
  import { getLinkDomain, mapSlice } from '@atlaskit/editor-common/utils';
7
7
  import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { getPasteSource } from './util';
9
10
  import { handleCodeBlock, handleExpandPaste, handleMarkdown, handleMediaSingle, handlePasteAsPlainText, handlePasteIntoCaption, handlePasteIntoTaskOrDecisionOrPanel, handlePasteLinkOnSelectedText, handlePasteNonNestableBlockNodesIntoList, handlePastePanelOrDecisionContentIntoList, handlePastePreservingMarks, handleRichText, handleSelectedTable, handleNestedTablePaste } from './util/handlers';
10
11
  var contentToPasteContent = {
@@ -215,6 +216,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
215
216
  });
216
217
  pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$m2 = pluginInjectionApi.mention) === null || _pluginInjectionApi$m2 === void 0 || (_pluginInjectionApi$m2 = _pluginInjectionApi$m2.actions) === null || _pluginInjectionApi$m2 === void 0 || _pluginInjectionApi$m2.announceMentionsInsertion(mentionsInserted);
217
218
  }
219
+ var pastedNodeTypes = fg('platform_editor_paste_renderer_analytics') ? _toConsumableArray(_getContentNodeTypes(slice.content)).sort().join(',') : undefined;
218
220
  if (pasteContext.type === PasteTypes.plain) {
219
221
  return createPastePayload(actionSubjectId, {
220
222
  pasteSize: text.length,
@@ -225,7 +227,8 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
225
227
  linksInPasteCount: linkUrls.length,
226
228
  mentionIds: mentionIds,
227
229
  mentionLocalIds: mentionLocalIds,
228
- pasteSplitList: pasteContext.pasteSplitList
230
+ pasteSplitList: pasteContext.pasteSplitList,
231
+ pastedNodeTypes: pastedNodeTypes
229
232
  });
230
233
  }
231
234
  var linkDomains = linkUrls.map(getLinkDomain);
@@ -239,7 +242,8 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
239
242
  mediaTraceId: mediaTraceId,
240
243
  mentionIds: mentionIds,
241
244
  mentionLocalIds: mentionLocalIds,
242
- pasteSplitList: pasteContext.pasteSplitList
245
+ pasteSplitList: pasteContext.pasteSplitList,
246
+ pastedNodeTypes: pastedNodeTypes
243
247
  }, linkDomains);
244
248
  };
245
249
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "11.1.9",
3
+ "version": "11.1.11",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "@atlaskit/editor-plugin-analytics": "^10.0.0",
34
34
  "@atlaskit/editor-plugin-annotation": "^10.3.0",
35
35
  "@atlaskit/editor-plugin-better-type-history": "^10.0.0",
36
- "@atlaskit/editor-plugin-card": "^16.6.0",
36
+ "@atlaskit/editor-plugin-card": "^16.7.0",
37
37
  "@atlaskit/editor-plugin-expand": "^11.1.0",
38
38
  "@atlaskit/editor-plugin-feature-flags": "^9.0.0",
39
39
  "@atlaskit/editor-plugin-list": "^12.0.0",
@@ -48,14 +48,14 @@
48
48
  "@atlaskit/media-common": "^13.3.0",
49
49
  "@atlaskit/platform-feature-flags": "^1.1.0",
50
50
  "@atlaskit/prosemirror-history": "^0.2.0",
51
- "@atlaskit/tmp-editor-statsig": "^79.0.0",
51
+ "@atlaskit/tmp-editor-statsig": "^80.0.0",
52
52
  "@atlaskit/tokens": "^13.0.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "lodash": "^4.17.21",
55
55
  "uuid": "^3.1.0"
56
56
  },
57
57
  "peerDependencies": {
58
- "@atlaskit/editor-common": "^114.29.0",
58
+ "@atlaskit/editor-common": "^114.30.0",
59
59
  "react": "^18.2.0",
60
60
  "react-dom": "^18.2.0",
61
61
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"