@atlaskit/editor-plugin-paste 11.0.11 → 11.0.12
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 +7 -0
- package/dist/cjs/pastePlugin.js +2 -1
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/pm-plugins/reducer.js +2 -1
- package/dist/es2019/pastePlugin.js +2 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/pm-plugins/reducer.js +2 -1
- package/dist/esm/pastePlugin.js +2 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/pm-plugins/reducer.js +2 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 11.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c5778756509ab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c5778756509ab) -
|
|
8
|
+
EDITOR-5011 Show paste warning for synced blocks in unsupported products
|
|
9
|
+
|
|
3
10
|
## 11.0.11
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/cjs/pastePlugin.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.pastePlugin = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
10
11
|
var _main = require("./pm-plugins/main");
|
|
11
12
|
var _plugin = require("./pm-plugins/move-analytics/plugin");
|
|
@@ -43,7 +44,7 @@ var pastePlugin = exports.pastePlugin = function pastePlugin(_ref) {
|
|
|
43
44
|
}
|
|
44
45
|
}];
|
|
45
46
|
},
|
|
46
|
-
contentComponent: !(0, _experiments.editorExperiment)('platform_synced_block', true) ? undefined : function () {
|
|
47
|
+
contentComponent: !(0, _experiments.editorExperiment)('platform_synced_block', true) && !(0, _platformFeatureFlags.fg)('platform_synced_block_unsupported_products') ? undefined : function () {
|
|
47
48
|
if (!pasteWarningOptions) {
|
|
48
49
|
return null;
|
|
49
50
|
}
|
|
@@ -363,7 +363,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
363
363
|
event: event,
|
|
364
364
|
text: text
|
|
365
365
|
});
|
|
366
|
-
if ((0, _experiments.editorExperiment)('platform_synced_block', true)) {
|
|
366
|
+
if ((0, _experiments.editorExperiment)('platform_synced_block', true) || (0, _platformFeatureFlags.fg)('platform_synced_block_unsupported_products')) {
|
|
367
367
|
slice = (0, _syncBlock2.handleSyncBlocksPaste)(slice, schema, (0, _util.getPasteSource)(event), html, pasteWarningOptions, pluginInjectionApi);
|
|
368
368
|
}
|
|
369
369
|
var plainTextPasteSlice = (0, _utils.linkifyContent)(state.schema)(slice);
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.reducer = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
12
|
var _actions = require("../editor-actions/actions");
|
|
12
13
|
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; }
|
|
@@ -38,7 +39,7 @@ var reducer = exports.reducer = function reducer(state, action) {
|
|
|
38
39
|
}
|
|
39
40
|
case _actions.PastePluginActionTypes.SET_ACTIVE_FLAG:
|
|
40
41
|
{
|
|
41
|
-
if (!(0, _experiments.editorExperiment)('platform_synced_block', true)) {
|
|
42
|
+
if (!(0, _experiments.editorExperiment)('platform_synced_block', true) && !(0, _platformFeatureFlags.fg)('platform_synced_block_unsupported_products')) {
|
|
42
43
|
return state;
|
|
43
44
|
}
|
|
44
45
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
import { createPlugin } from './pm-plugins/main';
|
|
4
5
|
import { createPlugin as createMoveAnalyticsPlugin } from './pm-plugins/move-analytics/plugin';
|
|
@@ -38,7 +39,7 @@ export const pastePlugin = ({
|
|
|
38
39
|
}
|
|
39
40
|
}];
|
|
40
41
|
},
|
|
41
|
-
contentComponent: !editorExperiment('platform_synced_block', true) ? undefined : () => {
|
|
42
|
+
contentComponent: !editorExperiment('platform_synced_block', true) && !fg('platform_synced_block_unsupported_products') ? undefined : () => {
|
|
42
43
|
if (!pasteWarningOptions) {
|
|
43
44
|
return null;
|
|
44
45
|
}
|
|
@@ -323,7 +323,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
323
323
|
event,
|
|
324
324
|
text
|
|
325
325
|
});
|
|
326
|
-
if (editorExperiment('platform_synced_block', true)) {
|
|
326
|
+
if (editorExperiment('platform_synced_block', true) || fg('platform_synced_block_unsupported_products')) {
|
|
327
327
|
slice = handleSyncBlocksPaste(slice, schema, getPasteSource(event), html, pasteWarningOptions, pluginInjectionApi);
|
|
328
328
|
}
|
|
329
329
|
const plainTextPasteSlice = linkifyContent(state.schema)(slice);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
2
3
|
import { PastePluginActionTypes as ActionTypes } from '../editor-actions/actions';
|
|
3
4
|
export const reducer = (state, action) => {
|
|
@@ -29,7 +30,7 @@ export const reducer = (state, action) => {
|
|
|
29
30
|
}
|
|
30
31
|
case ActionTypes.SET_ACTIVE_FLAG:
|
|
31
32
|
{
|
|
32
|
-
if (!editorExperiment('platform_synced_block', true)) {
|
|
33
|
+
if (!editorExperiment('platform_synced_block', true) && !fg('platform_synced_block_unsupported_products')) {
|
|
33
34
|
return state;
|
|
34
35
|
}
|
|
35
36
|
return {
|
package/dist/esm/pastePlugin.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
import { createPlugin } from './pm-plugins/main';
|
|
4
5
|
import { createPlugin as createMoveAnalyticsPlugin } from './pm-plugins/move-analytics/plugin';
|
|
@@ -36,7 +37,7 @@ export var pastePlugin = function pastePlugin(_ref) {
|
|
|
36
37
|
}
|
|
37
38
|
}];
|
|
38
39
|
},
|
|
39
|
-
contentComponent: !editorExperiment('platform_synced_block', true) ? undefined : function () {
|
|
40
|
+
contentComponent: !editorExperiment('platform_synced_block', true) && !fg('platform_synced_block_unsupported_products') ? undefined : function () {
|
|
40
41
|
if (!pasteWarningOptions) {
|
|
41
42
|
return null;
|
|
42
43
|
}
|
|
@@ -355,7 +355,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
355
355
|
event: event,
|
|
356
356
|
text: text
|
|
357
357
|
});
|
|
358
|
-
if (editorExperiment('platform_synced_block', true)) {
|
|
358
|
+
if (editorExperiment('platform_synced_block', true) || fg('platform_synced_block_unsupported_products')) {
|
|
359
359
|
slice = handleSyncBlocksPaste(slice, schema, getPasteSource(event), html, pasteWarningOptions, pluginInjectionApi);
|
|
360
360
|
}
|
|
361
361
|
var plainTextPasteSlice = linkifyContent(state.schema)(slice);
|
|
@@ -2,6 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
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; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
7
|
import { PastePluginActionTypes as ActionTypes } from '../editor-actions/actions';
|
|
7
8
|
export var reducer = function reducer(state, action) {
|
|
@@ -31,7 +32,7 @@ export var reducer = function reducer(state, action) {
|
|
|
31
32
|
}
|
|
32
33
|
case ActionTypes.SET_ACTIVE_FLAG:
|
|
33
34
|
{
|
|
34
|
-
if (!editorExperiment('platform_synced_block', true)) {
|
|
35
|
+
if (!editorExperiment('platform_synced_block', true) && !fg('platform_synced_block_unsupported_products')) {
|
|
35
36
|
return state;
|
|
36
37
|
}
|
|
37
38
|
return _objectSpread(_objectSpread({}, state), {}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.12",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^10.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-annotation": "^10.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-better-type-history": "^10.0.0",
|
|
36
|
-
"@atlaskit/editor-plugin-card": "^16.
|
|
36
|
+
"@atlaskit/editor-plugin-card": "^16.4.0",
|
|
37
37
|
"@atlaskit/editor-plugin-expand": "^11.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-feature-flags": "^9.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-list": "^12.0.0",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"@atlaskit/icon": "^34.3.0",
|
|
46
46
|
"@atlaskit/insm": "^0.4.0",
|
|
47
47
|
"@atlaskit/media-client": "^36.0.0",
|
|
48
|
-
"@atlaskit/media-common": "^13.
|
|
48
|
+
"@atlaskit/media-common": "^13.1.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
50
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^70.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^70.6.0",
|
|
52
52
|
"@atlaskit/tokens": "^13.0.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"lodash": "^4.17.21",
|
|
55
55
|
"uuid": "^3.1.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@atlaskit/editor-common": "^114.
|
|
58
|
+
"@atlaskit/editor-common": "^114.12.0",
|
|
59
59
|
"react": "^18.2.0",
|
|
60
60
|
"react-dom": "^18.2.0",
|
|
61
61
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
},
|
|
123
123
|
"platform_editor_inline_media_copy_paste_fix": {
|
|
124
124
|
"type": "boolean"
|
|
125
|
+
},
|
|
126
|
+
"platform_synced_block_unsupported_products": {
|
|
127
|
+
"type": "boolean"
|
|
125
128
|
}
|
|
126
129
|
}
|
|
127
130
|
}
|