@atlaskit/editor-plugin-clipboard 1.3.12 → 1.3.14
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 +12 -0
- package/dist/cjs/pm-plugins/main.js +1 -8
- package/dist/es2019/index.js +3 -0
- package/dist/es2019/pm-plugins/main.js +5 -3
- package/dist/esm/index.js +3 -0
- package/dist/esm/pm-plugins/main.js +1 -2
- package/dist/types/pm-plugins/main.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,14 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.createPlugin = exports.createClipboardSerializer = exports.ClipboardEventType = void 0;
|
|
8
|
-
Object.defineProperty(exports, "getAnalyticsPayload", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _clipboard.getAnalyticsPayload;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
exports.setLastEventType = exports.sendClipboardAnalytics = void 0;
|
|
7
|
+
exports.setLastEventType = exports.sendClipboardAnalytics = exports.createPlugin = exports.createClipboardSerializer = exports.ClipboardEventType = void 0;
|
|
15
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
17
10
|
var _clipboard = require("@atlaskit/editor-common/clipboard");
|
package/dist/es2019/index.js
CHANGED
|
@@ -52,7 +52,10 @@ export const createClipboardSerializer = (schema, getEditorView) => {
|
|
|
52
52
|
const oldSerializer = DOMSerializer.fromSchema(schema);
|
|
53
53
|
const newSerializer = new DOMSerializer(oldSerializer.nodes, oldSerializer.marks);
|
|
54
54
|
const originalSerializeFragment = newSerializer.serializeFragment.bind(newSerializer);
|
|
55
|
-
newSerializer.serializeFragment = (content,
|
|
55
|
+
newSerializer.serializeFragment = (content,
|
|
56
|
+
// Ignored via go/ees005
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
|
+
options = {}, target) => {
|
|
56
59
|
var _content$firstChild, _content$firstChild2;
|
|
57
60
|
const editorView = getEditorView();
|
|
58
61
|
const selection = editorView.state.selection;
|
|
@@ -122,5 +125,4 @@ export const sendClipboardAnalytics = (view, dispatchAnalyticsEvent, action) =>
|
|
|
122
125
|
// from running just because we are sending an analytics event
|
|
123
126
|
return false;
|
|
124
127
|
};
|
|
125
|
-
export const setLastEventType = eventType => lastEventType = eventType;
|
|
126
|
-
export { getAnalyticsPayload };
|
|
128
|
+
export const setLastEventType = eventType => lastEventType = eventType;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
|
|
4
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
4
|
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
6
5
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -20,4 +19,3 @@ export declare const createPlugin: ({ dispatchAnalyticsEvent, schema }: PMPlugin
|
|
|
20
19
|
export declare const createClipboardSerializer: (schema: Schema, getEditorView: () => EditorView) => DOMSerializer;
|
|
21
20
|
export declare const sendClipboardAnalytics: (view: EditorView, dispatchAnalyticsEvent: DispatchAnalyticsEvent, action: ACTION.CUT | ACTION.COPIED) => boolean;
|
|
22
21
|
export declare const setLastEventType: (eventType: ClipboardEventType) => ClipboardEventType;
|
|
23
|
-
export { getAnalyticsPayload };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
|
|
4
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
4
|
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
6
5
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -20,4 +19,3 @@ export declare const createPlugin: ({ dispatchAnalyticsEvent, schema }: PMPlugin
|
|
|
20
19
|
export declare const createClipboardSerializer: (schema: Schema, getEditorView: () => EditorView) => DOMSerializer;
|
|
21
20
|
export declare const sendClipboardAnalytics: (view: EditorView, dispatchAnalyticsEvent: DispatchAnalyticsEvent, action: ACTION.CUT | ACTION.COPIED) => boolean;
|
|
22
21
|
export declare const setLastEventType: (eventType: ClipboardEventType) => ClipboardEventType;
|
|
23
|
-
export { getAnalyticsPayload };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-clipboard",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.14",
|
|
4
4
|
"description": "Clipboard plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^98.0.0",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
36
36
|
"@babel/runtime": "^7.0.0"
|
|
37
37
|
},
|