@atlaskit/editor-plugin-copy-button 8.0.9 → 8.0.10
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-copy-button
|
|
2
2
|
|
|
3
|
+
## 8.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9ed32aea2c1d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ed32aea2c1d3) -
|
|
8
|
+
Replace feature experiment util with cross platform alternative for platform_editor_block_menu
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 8.0.9
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -14,7 +14,7 @@ var _clipboard = require("@atlaskit/editor-common/clipboard");
|
|
|
14
14
|
var _copyButton = require("@atlaskit/editor-common/copy-button");
|
|
15
15
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
|
-
var
|
|
17
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
18
|
var _pluginKey = require("./plugin-key");
|
|
19
19
|
function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
|
|
20
20
|
function command(state, dispatch) {
|
|
@@ -122,7 +122,7 @@ var createToolbarCopyCommandForNode = exports.createToolbarCopyCommandForNode =
|
|
|
122
122
|
// dispatch is provided -- as otherwise the consumer is only testing to see if
|
|
123
123
|
// the action is availble.
|
|
124
124
|
var domNode = (0, _copyButton.toDOM)(contentNodeWithPos.node, schema);
|
|
125
|
-
if ((0,
|
|
125
|
+
if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
|
|
126
126
|
(0, _copyButton.copyDomNode)(domNode, contentNodeWithPos.node.type, tr.selection);
|
|
127
127
|
} else {
|
|
128
128
|
if (domNode) {
|
|
@@ -4,7 +4,7 @@ import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill, getAnalyticsPayload }
|
|
|
4
4
|
import { copyDomNode, getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
|
-
import {
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
8
|
import { copyButtonPluginKey } from './plugin-key';
|
|
9
9
|
export function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
|
|
10
10
|
function command(state, dispatch) {
|
|
@@ -113,7 +113,7 @@ export const createToolbarCopyCommandForNode = (nodeType, editorAnalyticsApi, ap
|
|
|
113
113
|
// dispatch is provided -- as otherwise the consumer is only testing to see if
|
|
114
114
|
// the action is availble.
|
|
115
115
|
const domNode = toDOM(contentNodeWithPos.node, schema);
|
|
116
|
-
if (
|
|
116
|
+
if (editorExperiment('platform_editor_block_menu', true)) {
|
|
117
117
|
copyDomNode(domNode, contentNodeWithPos.node.type, tr.selection);
|
|
118
118
|
} else {
|
|
119
119
|
if (domNode) {
|
|
@@ -4,7 +4,7 @@ import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill, getAnalyticsPayload }
|
|
|
4
4
|
import { copyDomNode, getSelectedNodeOrNodeParentByNodeType, toDOM } from '@atlaskit/editor-common/copy-button';
|
|
5
5
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
|
-
import {
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
8
|
import { copyButtonPluginKey } from './plugin-key';
|
|
9
9
|
export function createToolbarCopyCommandForMark(markType, editorAnalyticsApi) {
|
|
10
10
|
function command(state, dispatch) {
|
|
@@ -112,7 +112,7 @@ export var createToolbarCopyCommandForNode = function createToolbarCopyCommandFo
|
|
|
112
112
|
// dispatch is provided -- as otherwise the consumer is only testing to see if
|
|
113
113
|
// the action is availble.
|
|
114
114
|
var domNode = toDOM(contentNodeWithPos.node, schema);
|
|
115
|
-
if (
|
|
115
|
+
if (editorExperiment('platform_editor_block_menu', true)) {
|
|
116
116
|
copyDomNode(domNode, contentNodeWithPos.node.type, tr.selection);
|
|
117
117
|
} else {
|
|
118
118
|
if (domNode) {
|