@atlaskit/editor-plugin-paste 1.4.2 → 1.5.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,21 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 1.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0d2247352e10e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0d2247352e10e) -
8
+ Adds mentionLocalIds to the pasted analytics event.
9
+
10
+ ## 1.4.3
11
+
12
+ ### Patch Changes
13
+
14
+ - [#114548](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114548)
15
+ [`8b2d47bffb50e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8b2d47bffb50e) -
16
+ bump adf-schema version
17
+ - Updated dependencies
18
+
3
19
  ## 1.4.2
4
20
 
5
21
  ### Patch Changes
@@ -189,9 +189,11 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
189
189
  }
190
190
  var source = (0, _util.getPasteSource)(event);
191
191
  var mentionIds = [];
192
+ var mentionLocalIds = [];
192
193
  slice.content.descendants(function (node) {
193
194
  if (node.type.name === 'mention') {
194
195
  mentionIds.push(node.attrs.id);
196
+ mentionLocalIds.push(node.attrs.localId);
195
197
  }
196
198
  });
197
199
  if (pasteContext.type === _analytics.PasteTypes.plain) {
@@ -203,6 +205,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
203
205
  hyperlinkPasteOnText: false,
204
206
  linksInPasteCount: linkUrls.length,
205
207
  mentionIds: mentionIds,
208
+ mentionLocalIds: mentionLocalIds,
206
209
  pasteSplitList: pasteContext.pasteSplitList
207
210
  });
208
211
  }
@@ -216,6 +219,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
216
219
  linksInPasteCount: linkUrls.length,
217
220
  mediaTraceId: mediaTraceId,
218
221
  mentionIds: mentionIds,
222
+ mentionLocalIds: mentionLocalIds,
219
223
  pasteSplitList: pasteContext.pasteSplitList
220
224
  }, linkDomains);
221
225
  };
@@ -184,9 +184,11 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
184
184
  }
185
185
  const source = getPasteSource(event);
186
186
  const mentionIds = [];
187
+ const mentionLocalIds = [];
187
188
  slice.content.descendants(node => {
188
189
  if (node.type.name === 'mention') {
189
190
  mentionIds.push(node.attrs.id);
191
+ mentionLocalIds.push(node.attrs.localId);
190
192
  }
191
193
  });
192
194
  if (pasteContext.type === PasteTypes.plain) {
@@ -198,6 +200,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
198
200
  hyperlinkPasteOnText: false,
199
201
  linksInPasteCount: linkUrls.length,
200
202
  mentionIds,
203
+ mentionLocalIds,
201
204
  pasteSplitList: pasteContext.pasteSplitList
202
205
  });
203
206
  }
@@ -211,6 +214,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
211
214
  linksInPasteCount: linkUrls.length,
212
215
  mediaTraceId,
213
216
  mentionIds,
217
+ mentionLocalIds,
214
218
  pasteSplitList: pasteContext.pasteSplitList
215
219
  }, linkDomains);
216
220
  };
@@ -177,9 +177,11 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
177
177
  }
178
178
  var source = getPasteSource(event);
179
179
  var mentionIds = [];
180
+ var mentionLocalIds = [];
180
181
  slice.content.descendants(function (node) {
181
182
  if (node.type.name === 'mention') {
182
183
  mentionIds.push(node.attrs.id);
184
+ mentionLocalIds.push(node.attrs.localId);
183
185
  }
184
186
  });
185
187
  if (pasteContext.type === PasteTypes.plain) {
@@ -191,6 +193,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
191
193
  hyperlinkPasteOnText: false,
192
194
  linksInPasteCount: linkUrls.length,
193
195
  mentionIds: mentionIds,
196
+ mentionLocalIds: mentionLocalIds,
194
197
  pasteSplitList: pasteContext.pasteSplitList
195
198
  });
196
199
  }
@@ -204,6 +207,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
204
207
  linksInPasteCount: linkUrls.length,
205
208
  mediaTraceId: mediaTraceId,
206
209
  mentionIds: mentionIds,
210
+ mentionLocalIds: mentionLocalIds,
207
211
  pasteSplitList: pasteContext.pasteSplitList
208
212
  }, linkDomains);
209
213
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,10 +33,10 @@
33
33
  ".": "./src/index.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/editor-common": "^83.4.0",
36
+ "@atlaskit/editor-common": "^83.6.0",
37
37
  "@atlaskit/editor-markdown-transformer": "^5.8.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^1.4.0",
39
- "@atlaskit/editor-plugin-annotation": "^1.13.0",
39
+ "@atlaskit/editor-plugin-annotation": "^1.14.0",
40
40
  "@atlaskit/editor-plugin-better-type-history": "^1.4.0",
41
41
  "@atlaskit/editor-plugin-card": "^2.3.0",
42
42
  "@atlaskit/editor-plugin-feature-flags": "^1.1.0",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "@af/visual-regression": "*",
59
- "@atlaskit/adf-schema": "^38.0.0",
59
+ "@atlaskit/adf-schema": "^39.0.3",
60
60
  "@atlaskit/editor-plugin-block-type": "^3.8.0",
61
61
  "@atlaskit/editor-plugin-history": "^1.1.0",
62
62
  "@atlaskit/editor-plugin-type-ahead": "^1.4.0",