@atlaskit/editor-plugin-paste 17.1.3 → 17.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 17.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d8ceccbefb264`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d8ceccbefb264) -
8
+ Clean up experiment `platform_editor_paste_renderer_analytics`.
9
+ - Updated dependencies
10
+
3
11
  ## 17.1.3
4
12
 
5
13
  ### Patch Changes
@@ -15,7 +15,6 @@ 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 _fg = require("@atlaskit/platform-feature-flags/fg");
19
18
  var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
20
19
  var _util = require("./util");
21
20
  var _handlers = require("./util/handlers");
@@ -239,7 +238,6 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
239
238
  });
240
239
  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);
241
240
  }
242
- var pastedNodeTypes = (0, _fg.fg)('platform_editor_paste_renderer_analytics') ? (0, _toConsumableArray2.default)(_getContentNodeTypes(slice.content)).sort().join(',') : undefined;
243
241
  if (pasteContext.type === _analytics.PasteTypes.plain) {
244
242
  return createPastePayload(actionSubjectId, {
245
243
  pasteSize: text.length,
@@ -250,8 +248,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
250
248
  linksInPasteCount: linkUrls.length,
251
249
  mentionIds: mentionIds,
252
250
  mentionLocalIds: mentionLocalIds,
253
- pasteSplitList: pasteContext.pasteSplitList,
254
- pastedNodeTypes: pastedNodeTypes
251
+ pasteSplitList: pasteContext.pasteSplitList
255
252
  });
256
253
  }
257
254
  var linkDomains = linkUrls.map(_utils.getLinkDomain);
@@ -265,8 +262,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
265
262
  mediaTraceId: mediaTraceId,
266
263
  mentionIds: mentionIds,
267
264
  mentionLocalIds: mentionLocalIds,
268
- pasteSplitList: pasteContext.pasteSplitList,
269
- pastedNodeTypes: pastedNodeTypes
265
+ pasteSplitList: pasteContext.pasteSplitList
270
266
  }, linkDomains);
271
267
  };
272
268
  }
@@ -29,7 +29,6 @@ var _state = require("@atlaskit/editor-prosemirror/state");
29
29
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
30
30
  var _utils3 = require("@atlaskit/editor-tables/utils");
31
31
  var _mediaClient = require("@atlaskit/media-client");
32
- var _fg = require("@atlaskit/platform-feature-flags/fg");
33
32
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
34
33
  // Ignored via go/ees005
35
34
  // eslint-disable-next-line require-unicode-regexp
@@ -75,9 +74,6 @@ function isPastedFromPages(html) {
75
74
  function isPastedFromFabricEditor(html) {
76
75
  return !!html && html.indexOf('data-pm-slice="') >= 0;
77
76
  }
78
- function isPastedFromFabricRenderer(html) {
79
- return !!html && html.indexOf('data-renderer-start-pos="') >= 0 && (0, _fg.fg)('platform_editor_paste_renderer_analytics');
80
- }
81
77
  var isSingleLine = exports.isSingleLine = function isSingleLine(text) {
82
78
  return !!text && text.trim().split('\n').length === 1;
83
79
  };
@@ -102,8 +98,6 @@ function getPasteSource(event) {
102
98
  return 'apple-pages';
103
99
  } else if (isPastedFromFabricEditor(html)) {
104
100
  return 'fabric-editor';
105
- } else if (isPastedFromFabricRenderer(html)) {
106
- return 'fabric-renderer';
107
101
  }
108
102
  return 'uncategorized';
109
103
  }
@@ -1,7 +1,6 @@
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/fg';
5
4
  import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
6
5
  import { getPasteSource } from './util';
7
6
  import { handleCodeBlock, handleExpandPaste, handleMarkdown, handleMediaSingle, handlePasteAsPlainText, handlePasteIntoCaption, handlePasteIntoTaskOrDecisionOrPanel, handlePasteLinkOnSelectedText, handlePasteNonNestableBlockNodesIntoList, handlePastePanelOrDecisionContentIntoList, handlePastePreservingMarks, handleRichText, handleSelectedTable, handleNestedTablePaste } from './util/handlers';
@@ -232,7 +231,6 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
232
231
  });
233
232
  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);
234
233
  }
235
- const pastedNodeTypes = fg('platform_editor_paste_renderer_analytics') ? [...getContentNodeTypes(slice.content)].sort().join(',') : undefined;
236
234
  if (pasteContext.type === PasteTypes.plain) {
237
235
  return createPastePayload(actionSubjectId, {
238
236
  pasteSize: text.length,
@@ -243,8 +241,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
243
241
  linksInPasteCount: linkUrls.length,
244
242
  mentionIds,
245
243
  mentionLocalIds,
246
- pasteSplitList: pasteContext.pasteSplitList,
247
- pastedNodeTypes
244
+ pasteSplitList: pasteContext.pasteSplitList
248
245
  });
249
246
  }
250
247
  const linkDomains = linkUrls.map(getLinkDomain);
@@ -258,8 +255,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
258
255
  mediaTraceId,
259
256
  mentionIds,
260
257
  mentionLocalIds,
261
- pasteSplitList: pasteContext.pasteSplitList,
262
- pastedNodeTypes
258
+ pasteSplitList: pasteContext.pasteSplitList
263
259
  }, linkDomains);
264
260
  };
265
261
  }
@@ -7,7 +7,6 @@ import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state
7
7
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
8
8
  import { getSelectedTableInfo, isTableSelected } from '@atlaskit/editor-tables/utils';
9
9
  import { isMediaBlobUrl } from '@atlaskit/media-client';
10
- import { fg } from '@atlaskit/platform-feature-flags/fg';
11
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
12
11
 
13
12
  // Ignored via go/ees005
@@ -54,9 +53,6 @@ function isPastedFromPages(html) {
54
53
  function isPastedFromFabricEditor(html) {
55
54
  return !!html && html.indexOf('data-pm-slice="') >= 0;
56
55
  }
57
- function isPastedFromFabricRenderer(html) {
58
- return !!html && html.indexOf('data-renderer-start-pos="') >= 0 && fg('platform_editor_paste_renderer_analytics');
59
- }
60
56
  export const isSingleLine = text => {
61
57
  return !!text && text.trim().split('\n').length === 1;
62
58
  };
@@ -81,8 +77,6 @@ export function getPasteSource(event) {
81
77
  return 'apple-pages';
82
78
  } else if (isPastedFromFabricEditor(html)) {
83
79
  return 'fabric-editor';
84
- } else if (isPastedFromFabricRenderer(html)) {
85
- return 'fabric-renderer';
86
80
  }
87
81
  return 'uncategorized';
88
82
  }
@@ -5,7 +5,6 @@ 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/fg';
9
8
  import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
10
9
  import { getPasteSource } from './util';
11
10
  import { handleCodeBlock, handleExpandPaste, handleMarkdown, handleMediaSingle, handlePasteAsPlainText, handlePasteIntoCaption, handlePasteIntoTaskOrDecisionOrPanel, handlePasteLinkOnSelectedText, handlePasteNonNestableBlockNodesIntoList, handlePastePanelOrDecisionContentIntoList, handlePastePreservingMarks, handleRichText, handleSelectedTable, handleNestedTablePaste } from './util/handlers';
@@ -227,7 +226,6 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
227
226
  });
228
227
  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
228
  }
230
- var pastedNodeTypes = fg('platform_editor_paste_renderer_analytics') ? _toConsumableArray(_getContentNodeTypes(slice.content)).sort().join(',') : undefined;
231
229
  if (pasteContext.type === PasteTypes.plain) {
232
230
  return createPastePayload(actionSubjectId, {
233
231
  pasteSize: text.length,
@@ -238,8 +236,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
238
236
  linksInPasteCount: linkUrls.length,
239
237
  mentionIds: mentionIds,
240
238
  mentionLocalIds: mentionLocalIds,
241
- pasteSplitList: pasteContext.pasteSplitList,
242
- pastedNodeTypes: pastedNodeTypes
239
+ pasteSplitList: pasteContext.pasteSplitList
243
240
  });
244
241
  }
245
242
  var linkDomains = linkUrls.map(getLinkDomain);
@@ -253,8 +250,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext, plug
253
250
  mediaTraceId: mediaTraceId,
254
251
  mentionIds: mentionIds,
255
252
  mentionLocalIds: mentionLocalIds,
256
- pasteSplitList: pasteContext.pasteSplitList,
257
- pastedNodeTypes: pastedNodeTypes
253
+ pasteSplitList: pasteContext.pasteSplitList
258
254
  }, linkDomains);
259
255
  };
260
256
  }
@@ -8,7 +8,6 @@ import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state
8
8
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
9
9
  import { getSelectedTableInfo, isTableSelected } from '@atlaskit/editor-tables/utils';
10
10
  import { isMediaBlobUrl } from '@atlaskit/media-client';
11
- import { fg } from '@atlaskit/platform-feature-flags/fg';
12
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
 
14
13
  // Ignored via go/ees005
@@ -55,9 +54,6 @@ function isPastedFromPages(html) {
55
54
  function isPastedFromFabricEditor(html) {
56
55
  return !!html && html.indexOf('data-pm-slice="') >= 0;
57
56
  }
58
- function isPastedFromFabricRenderer(html) {
59
- return !!html && html.indexOf('data-renderer-start-pos="') >= 0 && fg('platform_editor_paste_renderer_analytics');
60
- }
61
57
  export var isSingleLine = function isSingleLine(text) {
62
58
  return !!text && text.trim().split('\n').length === 1;
63
59
  };
@@ -82,8 +78,6 @@ export function getPasteSource(event) {
82
78
  return 'apple-pages';
83
79
  } else if (isPastedFromFabricEditor(html)) {
84
80
  return 'fabric-editor';
85
- } else if (isPastedFromFabricRenderer(html)) {
86
- return 'fabric-renderer';
87
81
  }
88
82
  return 'uncategorized';
89
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "17.1.3",
3
+ "version": "17.1.4",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -63,42 +63,6 @@
63
63
  "react-intl": "^7.0.0",
64
64
  "wait-for-expect": "^1.2.0"
65
65
  },
66
- "techstack": {
67
- "@atlassian/frontend": {
68
- "code-structure": [
69
- "editor-plugin"
70
- ],
71
- "import-structure": [
72
- "atlassian-conventions"
73
- ],
74
- "circular-dependencies": [
75
- "file-and-folder-level"
76
- ]
77
- },
78
- "@repo/internal": {
79
- "dom-events": "use-bind-event-listener",
80
- "analytics": [
81
- "analytics-next"
82
- ],
83
- "design-tokens": [
84
- "color"
85
- ],
86
- "theming": [
87
- "react-context"
88
- ],
89
- "ui-components": [
90
- "lite-mode"
91
- ],
92
- "deprecation": "no-deprecated-imports",
93
- "styling": [
94
- "emotion",
95
- "emotion"
96
- ],
97
- "imports": [
98
- "import-no-extraneous-disable-for-examples-and-docs"
99
- ]
100
- }
101
- },
102
66
  "platform-feature-flags": {
103
67
  "platform_editor_legacy_content_macro_insert": {
104
68
  "type": "boolean"
@@ -115,9 +79,6 @@
115
79
  "platform_media_cross_client_copy_with_auth": {
116
80
  "type": "boolean"
117
81
  },
118
- "platform_editor_paste_renderer_analytics": {
119
- "type": "boolean"
120
- },
121
82
  "platform_editor_flexible_list_kill_switch_1": {
122
83
  "type": "boolean"
123
84
  }