@atlaskit/editor-plugin-paste 3.3.0 → 3.3.2
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,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 3.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#149435](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149435)
|
|
8
|
+
[`d65b9032b4136`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d65b9032b4136) -
|
|
9
|
+
Clean-up feature gate platform_editor_macroid_reset_for_ext_on_paste
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.3.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#148176](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/148176)
|
|
17
|
+
[`ff3d1fcb8f797`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ff3d1fcb8f797) -
|
|
18
|
+
Clean-up platform_editor_legacy_content_macro feature gate
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 3.3.0
|
|
4
22
|
|
|
5
23
|
### Minor 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);
|
|
@@ -513,9 +511,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
513
511
|
if (!(0, _experiments.editorExperiment)('single_column_layouts', true)) {
|
|
514
512
|
slice = (0, _transforms.transformSingleColumnLayout)(slice, schema);
|
|
515
513
|
}
|
|
516
|
-
|
|
517
|
-
slice = (0, _transforms.transformSliceToRemoveMacroId)(slice, schema);
|
|
518
|
-
}
|
|
514
|
+
slice = (0, _transforms.transformSliceToRemoveMacroId)(slice, schema);
|
|
519
515
|
return slice;
|
|
520
516
|
},
|
|
521
517
|
transformPastedHTML: function transformPastedHTML(html) {
|
|
@@ -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);
|
|
@@ -487,9 +485,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
487
485
|
if (!editorExperiment('single_column_layouts', true)) {
|
|
488
486
|
slice = transformSingleColumnLayout(slice, schema);
|
|
489
487
|
}
|
|
490
|
-
|
|
491
|
-
slice = transformSliceToRemoveMacroId(slice, schema);
|
|
492
|
-
}
|
|
488
|
+
slice = transformSliceToRemoveMacroId(slice, schema);
|
|
493
489
|
return slice;
|
|
494
490
|
},
|
|
495
491
|
transformPastedHTML(html) {
|
|
@@ -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);
|
|
@@ -505,9 +503,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
505
503
|
if (!editorExperiment('single_column_layouts', true)) {
|
|
506
504
|
slice = transformSingleColumnLayout(slice, schema);
|
|
507
505
|
}
|
|
508
|
-
|
|
509
|
-
slice = transformSliceToRemoveMacroId(slice, schema);
|
|
510
|
-
}
|
|
506
|
+
slice = transformSliceToRemoveMacroId(slice, schema);
|
|
511
507
|
return slice;
|
|
512
508
|
},
|
|
513
509
|
transformPastedHTML: function transformPastedHTML(html) {
|
|
@@ -29,7 +29,7 @@ export type LastContentPasted = {
|
|
|
29
29
|
pasteSource: PasteSource;
|
|
30
30
|
};
|
|
31
31
|
export type PastePluginOptions = {
|
|
32
|
-
cardOptions?:
|
|
32
|
+
cardOptions?: CardOptions;
|
|
33
33
|
sanitizePrivateContent?: boolean;
|
|
34
34
|
isFullPage?: boolean;
|
|
35
35
|
};
|
|
@@ -29,7 +29,7 @@ export type LastContentPasted = {
|
|
|
29
29
|
pasteSource: PasteSource;
|
|
30
30
|
};
|
|
31
31
|
export type PastePluginOptions = {
|
|
32
|
-
cardOptions?:
|
|
32
|
+
cardOptions?: CardOptions;
|
|
33
33
|
sanitizePrivateContent?: boolean;
|
|
34
34
|
isFullPage?: boolean;
|
|
35
35
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
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.22.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
|
-
"@atlaskit/editor-plugin-type-ahead": "^2.
|
|
65
|
-
"@atlaskit/ssr": "
|
|
66
|
-
"@atlaskit/visual-regression": "
|
|
64
|
+
"@atlaskit/editor-plugin-type-ahead": "^2.6.0",
|
|
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,12 +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
|
-
"platform_editor_macroid_reset_for_ext_on_paste": {
|
|
121
|
-
"type": "boolean"
|
|
122
|
-
},
|
|
123
117
|
"platform_editor_legacy_content_macro_insert": {
|
|
124
118
|
"type": "boolean"
|
|
125
119
|
},
|