@atlaskit/editor-plugin-paste 1.0.10 → 1.0.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,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 1.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#82819](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82819) [`4d110826a9d6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4d110826a9d6) - [ED-22608] Adds mentionIds to the pasted analytics event.
|
|
8
|
+
|
|
3
9
|
## 1.0.10
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -188,6 +188,12 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
|
|
|
188
188
|
return createPasteAsPlainPayload(actionSubjectId, text, linkUrls.length);
|
|
189
189
|
}
|
|
190
190
|
var source = (0, _util.getPasteSource)(event);
|
|
191
|
+
var mentionIds = [];
|
|
192
|
+
slice.content.descendants(function (node) {
|
|
193
|
+
if (node.type.name === 'mention') {
|
|
194
|
+
mentionIds.push(node.attrs.id);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
191
197
|
if (pasteContext.type === _analytics.PasteTypes.plain) {
|
|
192
198
|
return createPastePayload(actionSubjectId, {
|
|
193
199
|
pasteSize: text.length,
|
|
@@ -196,6 +202,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
|
|
|
196
202
|
source: source,
|
|
197
203
|
hyperlinkPasteOnText: false,
|
|
198
204
|
linksInPasteCount: linkUrls.length,
|
|
205
|
+
mentionIds: mentionIds,
|
|
199
206
|
pasteSplitList: pasteContext.pasteSplitList
|
|
200
207
|
});
|
|
201
208
|
}
|
|
@@ -208,6 +215,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
|
|
|
208
215
|
hyperlinkPasteOnText: !!pasteContext.hyperlinkPasteOnText,
|
|
209
216
|
linksInPasteCount: linkUrls.length,
|
|
210
217
|
mediaTraceId: mediaTraceId,
|
|
218
|
+
mentionIds: mentionIds,
|
|
211
219
|
pasteSplitList: pasteContext.pasteSplitList
|
|
212
220
|
}, linkDomains);
|
|
213
221
|
};
|
|
@@ -183,6 +183,12 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
|
|
|
183
183
|
return createPasteAsPlainPayload(actionSubjectId, text, linkUrls.length);
|
|
184
184
|
}
|
|
185
185
|
const source = getPasteSource(event);
|
|
186
|
+
const mentionIds = [];
|
|
187
|
+
slice.content.descendants(node => {
|
|
188
|
+
if (node.type.name === 'mention') {
|
|
189
|
+
mentionIds.push(node.attrs.id);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
186
192
|
if (pasteContext.type === PasteTypes.plain) {
|
|
187
193
|
return createPastePayload(actionSubjectId, {
|
|
188
194
|
pasteSize: text.length,
|
|
@@ -191,6 +197,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
|
|
|
191
197
|
source,
|
|
192
198
|
hyperlinkPasteOnText: false,
|
|
193
199
|
linksInPasteCount: linkUrls.length,
|
|
200
|
+
mentionIds,
|
|
194
201
|
pasteSplitList: pasteContext.pasteSplitList
|
|
195
202
|
});
|
|
196
203
|
}
|
|
@@ -203,6 +210,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
|
|
|
203
210
|
hyperlinkPasteOnText: !!pasteContext.hyperlinkPasteOnText,
|
|
204
211
|
linksInPasteCount: linkUrls.length,
|
|
205
212
|
mediaTraceId,
|
|
213
|
+
mentionIds,
|
|
206
214
|
pasteSplitList: pasteContext.pasteSplitList
|
|
207
215
|
}, linkDomains);
|
|
208
216
|
};
|
|
@@ -176,6 +176,12 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
|
|
|
176
176
|
return createPasteAsPlainPayload(actionSubjectId, text, linkUrls.length);
|
|
177
177
|
}
|
|
178
178
|
var source = getPasteSource(event);
|
|
179
|
+
var mentionIds = [];
|
|
180
|
+
slice.content.descendants(function (node) {
|
|
181
|
+
if (node.type.name === 'mention') {
|
|
182
|
+
mentionIds.push(node.attrs.id);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
179
185
|
if (pasteContext.type === PasteTypes.plain) {
|
|
180
186
|
return createPastePayload(actionSubjectId, {
|
|
181
187
|
pasteSize: text.length,
|
|
@@ -184,6 +190,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
|
|
|
184
190
|
source: source,
|
|
185
191
|
hyperlinkPasteOnText: false,
|
|
186
192
|
linksInPasteCount: linkUrls.length,
|
|
193
|
+
mentionIds: mentionIds,
|
|
187
194
|
pasteSplitList: pasteContext.pasteSplitList
|
|
188
195
|
});
|
|
189
196
|
}
|
|
@@ -196,6 +203,7 @@ function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
|
|
|
196
203
|
hyperlinkPasteOnText: !!pasteContext.hyperlinkPasteOnText,
|
|
197
204
|
linksInPasteCount: linkUrls.length,
|
|
198
205
|
mediaTraceId: mediaTraceId,
|
|
206
|
+
mentionIds: mentionIds,
|
|
199
207
|
pasteSplitList: pasteContext.pasteSplitList
|
|
200
208
|
}, linkDomains);
|
|
201
209
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.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
|
".": "./src/index.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/editor-common": "^78.
|
|
36
|
+
"@atlaskit/editor-common": "^78.18.0",
|
|
37
37
|
"@atlaskit/editor-markdown-transformer": "^5.4.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-annotation": "^1.4.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/editor-plugin-card": "^1.2.0",
|
|
42
42
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-list": "^3.1.0",
|
|
44
|
-
"@atlaskit/editor-plugin-media": "^1.
|
|
44
|
+
"@atlaskit/editor-plugin-media": "^1.11.0",
|
|
45
45
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
46
46
|
"@atlaskit/editor-tables": "^2.5.0",
|
|
47
47
|
"@atlaskit/media-client": "^26.2.0",
|