@atlaskit/editor-plugin-paste 31.0.3 → 31.0.4
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,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 31.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4cbba92673860`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4cbba92673860) -
|
|
8
|
+
Preserve legacy content macros on paste when the dynamic config
|
|
9
|
+
`platform_editor_legacy_content_macro_insert_config` is enabled.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 31.0.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -37,6 +37,7 @@ var _handlePaste = require("@atlaskit/editor-tables/utils/handle-paste");
|
|
|
37
37
|
var _api = require("@atlaskit/insm/api");
|
|
38
38
|
var _clientIdCache = require("@atlaskit/media-common/clientIdCache");
|
|
39
39
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
40
|
+
var _dynamicConfigBooleanValue = require("@atlaskit/tmp-editor-statsig/dynamic-config-boolean-value");
|
|
40
41
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
41
42
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
42
43
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
@@ -202,7 +203,8 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
202
203
|
}
|
|
203
204
|
|
|
204
205
|
// Strip Legacy Content Macro (LCM) extensions on paste
|
|
205
|
-
|
|
206
|
+
var preserveLegacyContentMacroOnPaste = (0, _dynamicConfigBooleanValue.dynamicConfigBooleanValue)('platform_editor_legacy_content_macro_insert_config', false);
|
|
207
|
+
if (!preserveLegacyContentMacroOnPaste) {
|
|
206
208
|
slice = (0, _extension.transformSliceToRemoveLegacyContentMacro)(slice, schema);
|
|
207
209
|
}
|
|
208
210
|
var isPastedFile = (0, _clipboard.isPastedFile)(event);
|
|
@@ -27,6 +27,7 @@ import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils/h
|
|
|
27
27
|
import { insm } from '@atlaskit/insm/api';
|
|
28
28
|
import { extractClientIdsFromHtml } from '@atlaskit/media-common/clientIdCache';
|
|
29
29
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
30
|
+
import { dynamicConfigBooleanValue } from '@atlaskit/tmp-editor-statsig/dynamic-config-boolean-value';
|
|
30
31
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
31
32
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
32
33
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
@@ -167,7 +168,8 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
// Strip Legacy Content Macro (LCM) extensions on paste
|
|
170
|
-
|
|
171
|
+
const preserveLegacyContentMacroOnPaste = dynamicConfigBooleanValue('platform_editor_legacy_content_macro_insert_config', false);
|
|
172
|
+
if (!preserveLegacyContentMacroOnPaste) {
|
|
171
173
|
slice = transformSliceToRemoveLegacyContentMacro(slice, schema);
|
|
172
174
|
}
|
|
173
175
|
const isPastedFile = isPastedFileFromEvent(event);
|
|
@@ -32,6 +32,7 @@ import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils/h
|
|
|
32
32
|
import { insm } from '@atlaskit/insm/api';
|
|
33
33
|
import { extractClientIdsFromHtml } from '@atlaskit/media-common/clientIdCache';
|
|
34
34
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
35
|
+
import { dynamicConfigBooleanValue } from '@atlaskit/tmp-editor-statsig/dynamic-config-boolean-value';
|
|
35
36
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
36
37
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
37
38
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
@@ -194,7 +195,8 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
194
195
|
}
|
|
195
196
|
|
|
196
197
|
// Strip Legacy Content Macro (LCM) extensions on paste
|
|
197
|
-
|
|
198
|
+
var preserveLegacyContentMacroOnPaste = dynamicConfigBooleanValue('platform_editor_legacy_content_macro_insert_config', false);
|
|
199
|
+
if (!preserveLegacyContentMacroOnPaste) {
|
|
198
200
|
slice = transformSliceToRemoveLegacyContentMacro(slice, schema);
|
|
199
201
|
}
|
|
200
202
|
var isPastedFile = isPastedFileFromEvent(event);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "31.0.
|
|
3
|
+
"version": "31.0.4",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,21 +51,17 @@
|
|
|
51
51
|
"uuid": "^11.1.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^134.
|
|
54
|
+
"@atlaskit/editor-common": "^134.2.0",
|
|
55
55
|
"react": "^18.2.0 || ^19.2.0",
|
|
56
56
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
57
57
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@testing-library/react": "^16.3.0",
|
|
61
60
|
"react": "^19.2.0",
|
|
62
61
|
"react-dom": "^19.2.0",
|
|
63
62
|
"react-intl": "^7.0.0"
|
|
64
63
|
},
|
|
65
64
|
"platform-feature-flags": {
|
|
66
|
-
"platform_editor_legacy_content_macro_insert": {
|
|
67
|
-
"type": "boolean"
|
|
68
|
-
},
|
|
69
65
|
"platform_editor_sharepoint_url_smart_card_fallback": {
|
|
70
66
|
"type": "boolean"
|
|
71
67
|
},
|