@atlaskit/editor-plugin-paste 11.1.10 → 11.2.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 +18 -0
- package/dist/cjs/entry-points/paste-plugin-type.js +1 -0
- package/dist/cjs/entry-points/paste-plugin.js +12 -0
- package/dist/cjs/pm-plugins/analytics.js +6 -2
- package/dist/es2019/entry-points/paste-plugin-type.js +0 -0
- package/dist/es2019/entry-points/paste-plugin.js +2 -0
- package/dist/es2019/pm-plugins/analytics.js +6 -2
- package/dist/esm/entry-points/paste-plugin-type.js +0 -0
- package/dist/esm/entry-points/paste-plugin.js +2 -0
- package/dist/esm/pm-plugins/analytics.js +6 -2
- package/dist/types/entry-points/paste-plugin-type.d.ts +1 -0
- package/dist/types/entry-points/paste-plugin.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/paste-plugin-type.d.ts +1 -0
- package/dist/types-ts4.5/entry-points/paste-plugin.d.ts +1 -0
- package/package.json +6 -6
- package/paste-plugin/package.json +15 -0
- package/paste-plugin-type/package.json +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 11.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a94a013546f69`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a94a013546f69) -
|
|
8
|
+
Autofix: add explicit package exports (barrel removal)
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 11.1.11
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`a27e4893b8fa2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a27e4893b8fa2) -
|
|
19
|
+
Add sorted comma seperated list of nodes to analytics
|
|
20
|
+
|
|
3
21
|
## 11.1.10
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "pastePlugin", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _pastePlugin.pastePlugin;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _pastePlugin = require("../pastePlugin");
|
|
@@ -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
|
}
|
|
File without changes
|
|
@@ -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
|
}
|
|
File without changes
|
|
@@ -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
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { PastePlugin, PastePluginOptions, PastePluginState, LastContentPasted, PastePluginDependencies, ActiveFlag, } from '../pastePluginType';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { pastePlugin } from '../pastePlugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { PastePlugin, PastePluginOptions, PastePluginState, LastContentPasted, PastePluginDependencies, ActiveFlag, } from '../pastePluginType';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { pastePlugin } from '../pastePlugin';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"@atlaskit/editor-plugin-annotation": "^10.3.0",
|
|
35
35
|
"@atlaskit/editor-plugin-better-type-history": "^10.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-card": "^16.7.0",
|
|
37
|
-
"@atlaskit/editor-plugin-expand": "^11.
|
|
38
|
-
"@atlaskit/editor-plugin-feature-flags": "^9.
|
|
39
|
-
"@atlaskit/editor-plugin-list": "^12.
|
|
40
|
-
"@atlaskit/editor-plugin-media": "^12.
|
|
41
|
-
"@atlaskit/editor-plugin-mentions": "^12.
|
|
37
|
+
"@atlaskit/editor-plugin-expand": "^11.2.0",
|
|
38
|
+
"@atlaskit/editor-plugin-feature-flags": "^9.1.0",
|
|
39
|
+
"@atlaskit/editor-plugin-list": "^12.1.0",
|
|
40
|
+
"@atlaskit/editor-plugin-media": "^12.6.0",
|
|
41
|
+
"@atlaskit/editor-plugin-mentions": "^12.2.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
44
|
"@atlaskit/flag": "^17.11.0",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-paste/paste-plugin",
|
|
3
|
+
"main": "../dist/cjs/entry-points/paste-plugin.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/paste-plugin.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/paste-plugin.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "../dist/types/entry-points/paste-plugin.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.5 <5.9": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.5/entry-points/paste-plugin.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-paste/paste-plugin-type",
|
|
3
|
+
"main": "../dist/cjs/entry-points/paste-plugin-type.js",
|
|
4
|
+
"module": "../dist/esm/entry-points/paste-plugin-type.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-points/paste-plugin-type.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "../dist/types/entry-points/paste-plugin-type.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.5 <5.9": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.5/entry-points/paste-plugin-type.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|