@atlaskit/editor-plugin-paste 31.0.3 → 31.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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 31.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 31.0.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [`4cbba92673860`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4cbba92673860) -
14
+ Preserve legacy content macros on paste when the dynamic config
15
+ `platform_editor_legacy_content_macro_insert_config` is enabled.
16
+ - Updated dependencies
17
+
3
18
  ## 31.0.3
4
19
 
5
20
  ### 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
- if (!(0, _fg.fg)('platform_editor_legacy_content_macro_insert')) {
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
- if (!fg('platform_editor_legacy_content_macro_insert')) {
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
- if (!fg('platform_editor_legacy_content_macro_insert')) {
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",
3
+ "version": "31.0.5",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/editor-plugin-extension": "^33.0.0",
32
32
  "@atlaskit/editor-plugin-feature-flags": "^29.0.0",
33
33
  "@atlaskit/editor-plugin-list": "^32.0.0",
34
- "@atlaskit/editor-plugin-media": "^32.1.0",
34
+ "@atlaskit/editor-plugin-media": "^32.2.0",
35
35
  "@atlaskit/editor-plugin-mentions": "^32.0.0",
36
36
  "@atlaskit/editor-prosemirror": "^9.0.0",
37
37
  "@atlaskit/editor-tables": "^3.2.0",
@@ -44,28 +44,24 @@
44
44
  "@atlaskit/platform-feature-experiments": "^0.3.0",
45
45
  "@atlaskit/platform-feature-flags": "^2.2.0",
46
46
  "@atlaskit/prosemirror-history": "^1.3.0",
47
- "@atlaskit/tmp-editor-statsig": "^248.0.0",
47
+ "@atlaskit/tmp-editor-statsig": "^249.0.0",
48
48
  "@atlaskit/tokens": "^20.8.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "lodash": "^4.17.21",
51
51
  "uuid": "^11.1.1"
52
52
  },
53
53
  "peerDependencies": {
54
- "@atlaskit/editor-common": "^134.1.0",
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
  },