@atlaskit/editor-plugin-paste 1.0.9 → 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,17 @@
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
+
9
+ ## 1.0.10
10
+
11
+ ### Patch Changes
12
+
13
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
14
+
3
15
  ## 1.0.9
4
16
 
5
17
  ### 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
  };
@@ -1,3 +1,3 @@
1
1
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
2
  export declare const pluginKey: PluginKey<any>;
3
- export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: import("..").PastePluginState | ((state: import("prosemirror-state").EditorState) => import("..").PastePluginState)) => import("prosemirror-state").SafeStateField<import("..").PastePluginState>, createCommand: <A = import("../actions").PastePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("..").PastePluginState;
3
+ export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("..").PastePluginState | ((state: import("prosemirror-state").EditorState) => import("..").PastePluginState)) => import("prosemirror-state").SafeStateField<import("..").PastePluginState>, createCommand: <A = import("../actions").PastePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("..").PastePluginState;
@@ -1,3 +1,3 @@
1
1
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
2
  export declare const pluginKey: PluginKey<any>;
3
- export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: import("..").PastePluginState | ((state: import("prosemirror-state").EditorState) => import("..").PastePluginState)) => import("prosemirror-state").SafeStateField<import("..").PastePluginState>, createCommand: <A = import("../actions").PastePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("..").PastePluginState;
3
+ export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("..").PastePluginState | ((state: import("prosemirror-state").EditorState) => import("..").PastePluginState)) => import("prosemirror-state").SafeStateField<import("..").PastePluginState>, createCommand: <A = import("../actions").PastePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("..").PastePluginState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "1.0.9",
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,19 +33,19 @@
33
33
  ".": "./src/index.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/editor-common": "^78.12.0",
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
- "@atlaskit/editor-plugin-annotation": "^1.3.0",
39
+ "@atlaskit/editor-plugin-annotation": "^1.4.0",
40
40
  "@atlaskit/editor-plugin-better-type-history": "^1.0.0",
41
- "@atlaskit/editor-plugin-card": "^1.1.0",
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.9.0",
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",
48
- "@atlaskit/media-common": "^11.0.0",
48
+ "@atlaskit/media-common": "^11.1.0",
49
49
  "@atlaskit/platform-feature-flags": "^0.2.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "lodash": "^4.17.21",
@@ -66,7 +66,7 @@
66
66
  "@atlassian/feature-flags-test-utils": "^0.2.0",
67
67
  "@testing-library/react": "^12.1.5",
68
68
  "react-dom": "^16.8.0",
69
- "typescript": "~4.9.5",
69
+ "typescript": "~5.4.2",
70
70
  "wait-for-expect": "^1.2.0"
71
71
  },
72
72
  "techstack": {
@@ -95,11 +95,9 @@
95
95
  "ui-components": [
96
96
  "lite-mode"
97
97
  ],
98
- "deprecation": [
99
- "no-deprecated-imports"
100
- ],
98
+ "deprecation": "no-deprecated-imports",
101
99
  "styling": [
102
- "static",
100
+ "emotion",
103
101
  "emotion"
104
102
  ],
105
103
  "imports": [
@@ -136,4 +134,4 @@
136
134
  "type": "boolean"
137
135
  }
138
136
  }
139
- }
137
+ }