@atlaskit/editor-plugin-copy-button 26.0.3 → 26.0.5
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/commands.js +5 -5
- package/dist/es2019/pm-plugins/commands.js +1 -1
- package/dist/esm/pm-plugins/commands.js +1 -1
- package/dist/types/copyButtonPluginType.d.ts +6 -4
- package/dist/types/pm-plugins/commands.d.ts +4 -3
- package/dist/types/ui/toolbar.d.ts +6 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,7 @@ exports.createToolbarCopyCommandForNode = void 0;
|
|
|
8
8
|
exports.getProvideMarkVisualFeedbackForCopyButtonCommand = getProvideMarkVisualFeedbackForCopyButtonCommand;
|
|
9
9
|
exports.removeMarkVisualFeedbackForCopyButtonCommand = removeMarkVisualFeedbackForCopyButtonCommand;
|
|
10
10
|
exports.resetCopiedState = void 0;
|
|
11
|
-
var
|
|
11
|
+
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
12
|
var _clipboard = require("@atlaskit/editor-common/clipboard");
|
|
13
13
|
var _copyButton = require("@atlaskit/editor-common/copy-button");
|
|
14
14
|
var _pluginKey = require("./plugin-key");
|
|
@@ -45,10 +45,10 @@ function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
|
|
|
45
45
|
copyToClipboardTr.setMeta(_pluginKey.copyButtonPluginKey, {
|
|
46
46
|
copied: true
|
|
47
47
|
});
|
|
48
|
-
var analyticsPayload = (0, _clipboard.getAnalyticsPayload)(state,
|
|
48
|
+
var analyticsPayload = (0, _clipboard.getAnalyticsPayload)(state, _enums.ACTION.COPIED);
|
|
49
49
|
if (analyticsPayload && editorAnalyticsApi) {
|
|
50
50
|
var _editorAnalyticsApi$a;
|
|
51
|
-
analyticsPayload.attributes.inputMethod =
|
|
51
|
+
analyticsPayload.attributes.inputMethod = _enums.INPUT_METHOD.FLOATING_TB;
|
|
52
52
|
analyticsPayload.attributes.markType = markType.name;
|
|
53
53
|
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || (_editorAnalyticsApi$a = editorAnalyticsApi.attachAnalyticsEvent) === null || _editorAnalyticsApi$a === void 0 || _editorAnalyticsApi$a.call(editorAnalyticsApi, analyticsPayload)(copyToClipboardTr);
|
|
54
54
|
}
|
|
@@ -106,10 +106,10 @@ var createToolbarCopyCommandForNode = exports.createToolbarCopyCommandForNode =
|
|
|
106
106
|
copyToClipboardTr.setMeta(_pluginKey.copyButtonPluginKey, {
|
|
107
107
|
copied: true
|
|
108
108
|
});
|
|
109
|
-
var analyticsPayload = (0, _clipboard.getAnalyticsPayload)(state,
|
|
109
|
+
var analyticsPayload = (0, _clipboard.getAnalyticsPayload)(state, _enums.ACTION.COPIED);
|
|
110
110
|
if (analyticsPayload && editorAnalyticsApi) {
|
|
111
111
|
var _editorAnalyticsApi$a2;
|
|
112
|
-
analyticsPayload.attributes.inputMethod =
|
|
112
|
+
analyticsPayload.attributes.inputMethod = _enums.INPUT_METHOD.FLOATING_TB;
|
|
113
113
|
analyticsPayload.attributes.nodeType = contentNodeWithPos.node.type.name;
|
|
114
114
|
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || (_editorAnalyticsApi$a2 = editorAnalyticsApi.attachAnalyticsEvent) === null || _editorAnalyticsApi$a2 === void 0 || _editorAnalyticsApi$a2.call(editorAnalyticsApi, analyticsPayload)(copyToClipboardTr);
|
|
115
115
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { copyHTMLToClipboard, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
|
|
3
3
|
import { copyDomNode, getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
|
|
4
4
|
import { copyButtonPluginKey } from './plugin-key';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { copyHTMLToClipboard, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
|
|
3
3
|
import { copyDomNode, getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
|
|
4
4
|
import { copyButtonPluginKey } from './plugin-key';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { Command
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
2
|
+
import type { FloatingToolbarItem } from '@atlaskit/editor-common/types/floating-toolbar';
|
|
3
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
|
+
import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibility-utils/accessibilityUtilsPluginType';
|
|
5
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
|
|
6
|
+
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations/main';
|
|
5
7
|
import type { MarkType } from '@atlaskit/editor-prosemirror/model';
|
|
6
8
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
9
|
declare const processCopyButtonItemsWithAnalytics: (state: EditorState) => (items: Array<FloatingToolbarItem<Command>>, hoverDecoration: HoverDecorationHandler | undefined) => Array<FloatingToolbarItem<Command>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
2
|
+
import type { Command, CommandDispatch } from '@atlaskit/editor-common/types/command';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
|
+
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations/main';
|
|
4
5
|
import type { MarkType, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
5
6
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
6
7
|
import type { CopyButtonPlugin } from '../copyButtonPluginType';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types/command';
|
|
3
|
+
import type { MarkOptions, NodeOptions } from '@atlaskit/editor-common/types/copy-button';
|
|
4
|
+
import type { FloatingToolbarButton, FloatingToolbarItem } from '@atlaskit/editor-common/types/floating-toolbar';
|
|
5
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
6
|
+
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations/main';
|
|
4
7
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
8
|
import type { CopyButtonPlugin } from '../copyButtonPluginType';
|
|
6
9
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-copy-button",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.5",
|
|
4
4
|
"description": "editor-plugin-copy-button for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@atlaskit/editor-plugin-decorations": "^26.0.0",
|
|
25
25
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
26
26
|
"@atlaskit/icon": "^38.0.0",
|
|
27
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
27
|
+
"@atlaskit/tmp-editor-statsig": "^232.0.0",
|
|
28
28
|
"@babel/runtime": "^7.0.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|