@atlaskit/editor-plugin-paste 3.2.3 → 3.3.1
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,27 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 3.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#148176](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/148176)
|
|
8
|
+
[`ff3d1fcb8f797`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ff3d1fcb8f797) -
|
|
9
|
+
Clean-up platform_editor_legacy_content_macro feature gate
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.3.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#145252](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145252)
|
|
17
|
+
[`bd0fd2a956be7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd0fd2a956be7) -
|
|
18
|
+
[https://product-fabric.atlassian.net/browse/ED-27653](ED-27653) move the `paste`, `hyperlink`,
|
|
19
|
+
`card` plugins configuration to `@atlassian/confluence-presets` package
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 3.2.3
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -157,9 +157,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
// Strip Legacy Content Macro (LCM) extensions on paste
|
|
160
|
-
if (
|
|
161
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
162
|
-
(0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro') && !(0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro_insert')) {
|
|
160
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro_insert')) {
|
|
163
161
|
slice = (0, _transforms.transformSliceToRemoveLegacyContentMacro)(slice, schema);
|
|
164
162
|
}
|
|
165
163
|
var isPastedFile = (0, _paste.isPastedFile)(event);
|
|
@@ -6,7 +6,7 @@ import { getExtensionAutoConvertersFromProvider } from '@atlaskit/editor-common/
|
|
|
6
6
|
import { isPastedFile as isPastedFileFromEvent, md } from '@atlaskit/editor-common/paste';
|
|
7
7
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
8
8
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
9
|
-
import {
|
|
9
|
+
import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId } from '@atlaskit/editor-common/transforms';
|
|
10
10
|
import { containsAnyAnnotations, extractSliceFromStep, linkifyContent, mapChildren } from '@atlaskit/editor-common/utils';
|
|
11
11
|
import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
|
|
12
12
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -17,7 +17,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
17
17
|
import { PastePluginActionTypes } from '../editor-actions/actions';
|
|
18
18
|
import { splitParagraphs, upgradeTextToLists } from '../editor-commands/commands';
|
|
19
19
|
import { transformSliceForMedia, transformSliceToCorrectMediaWrapper, transformSliceToMediaSingleWithNewExperience, unwrapNestedMediaElements } from '../pm-plugins/media';
|
|
20
|
-
import { createPasteMeasurePayload, getContentNodeTypes, handleCodeBlockWithAnalytics, handleExpandWithAnalytics, handleMarkdownWithAnalytics, handleMediaSingleWithAnalytics, handlePasteAsPlainTextWithAnalytics, handlePasteIntoCaptionWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, handlePasteNonNestableBlockNodesIntoListWithAnalytics, handlePastePanelOrDecisionIntoListWithAnalytics, handlePastePreservingMarksWithAnalytics, handleRichTextWithAnalytics, handleSelectedTableWithAnalytics, sendPasteAnalyticsEvent
|
|
20
|
+
import { createPasteMeasurePayload, getContentNodeTypes, handleCodeBlockWithAnalytics, handleExpandWithAnalytics, handleMarkdownWithAnalytics, handleMediaSingleWithAnalytics, handleNestedTablePasteWithAnalytics, handlePasteAsPlainTextWithAnalytics, handlePasteIntoCaptionWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, handlePasteNonNestableBlockNodesIntoListWithAnalytics, handlePastePanelOrDecisionIntoListWithAnalytics, handlePastePreservingMarksWithAnalytics, handleRichTextWithAnalytics, handleSelectedTableWithAnalytics, sendPasteAnalyticsEvent } from './analytics';
|
|
21
21
|
import { clipboardTextSerializer } from './clipboard-text-serializer';
|
|
22
22
|
import { createPluginState, pluginKey as stateKey } from './plugin-factory';
|
|
23
23
|
import { escapeLinks, getPasteSource, htmlContainsSingleFile, htmlHasInvalidLinkTags, isPastedFromExcel, isPastedFromWord, removeDuplicateInvalidLinks, transformUnsupportedBlockCardToInline } from './util';
|
|
@@ -126,9 +126,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
// Strip Legacy Content Macro (LCM) extensions on paste
|
|
129
|
-
if (
|
|
130
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
131
|
-
fg('platform_editor_legacy_content_macro') && !fg('platform_editor_legacy_content_macro_insert')) {
|
|
129
|
+
if (!fg('platform_editor_legacy_content_macro_insert')) {
|
|
132
130
|
slice = transformSliceToRemoveLegacyContentMacro(slice, schema);
|
|
133
131
|
}
|
|
134
132
|
const isPastedFile = isPastedFileFromEvent(event);
|
|
@@ -8,7 +8,7 @@ import { getExtensionAutoConvertersFromProvider } from '@atlaskit/editor-common/
|
|
|
8
8
|
import { isPastedFile as isPastedFileFromEvent, md } from '@atlaskit/editor-common/paste';
|
|
9
9
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
10
10
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
11
|
-
import {
|
|
11
|
+
import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId } from '@atlaskit/editor-common/transforms';
|
|
12
12
|
import { containsAnyAnnotations, extractSliceFromStep, linkifyContent, mapChildren } from '@atlaskit/editor-common/utils';
|
|
13
13
|
import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
|
|
14
14
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -19,7 +19,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
19
19
|
import { PastePluginActionTypes } from '../editor-actions/actions';
|
|
20
20
|
import { splitParagraphs, upgradeTextToLists } from '../editor-commands/commands';
|
|
21
21
|
import { transformSliceForMedia, transformSliceToCorrectMediaWrapper, transformSliceToMediaSingleWithNewExperience, unwrapNestedMediaElements } from '../pm-plugins/media';
|
|
22
|
-
import { createPasteMeasurePayload, getContentNodeTypes, handleCodeBlockWithAnalytics, handleExpandWithAnalytics, handleMarkdownWithAnalytics, handleMediaSingleWithAnalytics, handlePasteAsPlainTextWithAnalytics, handlePasteIntoCaptionWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, handlePasteNonNestableBlockNodesIntoListWithAnalytics, handlePastePanelOrDecisionIntoListWithAnalytics, handlePastePreservingMarksWithAnalytics, handleRichTextWithAnalytics, handleSelectedTableWithAnalytics, sendPasteAnalyticsEvent
|
|
22
|
+
import { createPasteMeasurePayload, getContentNodeTypes, handleCodeBlockWithAnalytics, handleExpandWithAnalytics, handleMarkdownWithAnalytics, handleMediaSingleWithAnalytics, handleNestedTablePasteWithAnalytics, handlePasteAsPlainTextWithAnalytics, handlePasteIntoCaptionWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, handlePasteNonNestableBlockNodesIntoListWithAnalytics, handlePastePanelOrDecisionIntoListWithAnalytics, handlePastePreservingMarksWithAnalytics, handleRichTextWithAnalytics, handleSelectedTableWithAnalytics, sendPasteAnalyticsEvent } from './analytics';
|
|
23
23
|
import { clipboardTextSerializer } from './clipboard-text-serializer';
|
|
24
24
|
import { createPluginState, pluginKey as stateKey } from './plugin-factory';
|
|
25
25
|
import { escapeLinks, getPasteSource, htmlContainsSingleFile, htmlHasInvalidLinkTags, isPastedFromExcel, isPastedFromWord, removeDuplicateInvalidLinks, transformUnsupportedBlockCardToInline } from './util';
|
|
@@ -149,9 +149,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// Strip Legacy Content Macro (LCM) extensions on paste
|
|
152
|
-
if (
|
|
153
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
154
|
-
fg('platform_editor_legacy_content_macro') && !fg('platform_editor_legacy_content_macro_insert')) {
|
|
152
|
+
if (!fg('platform_editor_legacy_content_macro_insert')) {
|
|
155
153
|
slice = transformSliceToRemoveLegacyContentMacro(slice, schema);
|
|
156
154
|
}
|
|
157
155
|
var isPastedFile = isPastedFileFromEvent(event);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
35
|
-
"@atlaskit/code": "^17.
|
|
36
|
-
"@atlaskit/editor-common": "^103.
|
|
35
|
+
"@atlaskit/code": "^17.1.0",
|
|
36
|
+
"@atlaskit/editor-common": "^103.21.0",
|
|
37
37
|
"@atlaskit/editor-markdown-transformer": "^5.16.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-annotation": "^2.7.0",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"@atlaskit/editor-plugin-card": "^5.4.0",
|
|
42
42
|
"@atlaskit/editor-plugin-feature-flags": "^1.4.0",
|
|
43
43
|
"@atlaskit/editor-plugin-list": "^4.2.0",
|
|
44
|
-
"@atlaskit/editor-plugin-media": "^2.
|
|
45
|
-
"@atlaskit/editor-plugin-mentions": "^4.
|
|
44
|
+
"@atlaskit/editor-plugin-media": "^2.7.0",
|
|
45
|
+
"@atlaskit/editor-plugin-mentions": "^4.5.0",
|
|
46
46
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
47
47
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
48
48
|
"@atlaskit/media-client": "^32.0.0",
|
|
49
49
|
"@atlaskit/media-common": "^12.0.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^4.15.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"lodash": "^4.17.21",
|
|
54
54
|
"uuid": "^3.1.0"
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"react-dom": "^18.2.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@af/visual-regression": "
|
|
61
|
+
"@af/visual-regression": "workspace:^",
|
|
62
62
|
"@atlaskit/editor-plugin-block-type": "^5.1.0",
|
|
63
63
|
"@atlaskit/editor-plugin-history": "^2.0.0",
|
|
64
64
|
"@atlaskit/editor-plugin-type-ahead": "^2.5.0",
|
|
65
|
-
"@atlaskit/ssr": "
|
|
66
|
-
"@atlaskit/visual-regression": "
|
|
65
|
+
"@atlaskit/ssr": "workspace:^",
|
|
66
|
+
"@atlaskit/visual-regression": "workspace:^",
|
|
67
67
|
"@testing-library/react": "^13.4.0",
|
|
68
68
|
"typescript": "~5.4.2",
|
|
69
69
|
"wait-for-expect": "^1.2.0"
|
|
@@ -114,9 +114,6 @@
|
|
|
114
114
|
"platform_editor_fix_captions_on_copy": {
|
|
115
115
|
"type": "boolean"
|
|
116
116
|
},
|
|
117
|
-
"platform_editor_legacy_content_macro": {
|
|
118
|
-
"type": "boolean"
|
|
119
|
-
},
|
|
120
117
|
"platform_editor_macroid_reset_for_ext_on_paste": {
|
|
121
118
|
"type": "boolean"
|
|
122
119
|
},
|