@atlaskit/editor-plugin-block-menu 6.0.8 → 6.0.9
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/editor-commands/transform-node-utils/steps/applyTargetTextTypeStep.js +4 -0
- package/dist/cjs/editor-commands/transform-node-utils/transform.js +3 -1
- package/dist/es2019/editor-commands/transform-node-utils/steps/applyTargetTextTypeStep.js +4 -0
- package/dist/es2019/editor-commands/transform-node-utils/transform.js +3 -1
- package/dist/esm/editor-commands/transform-node-utils/steps/applyTargetTextTypeStep.js +4 -0
- package/dist/esm/editor-commands/transform-node-utils/transform.js +3 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 6.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c77659e594c55`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c77659e594c55) -
|
|
8
|
+
[ux] Editor-4020: Fix decision to quote and code block, fixed empty panel to code block"
|
|
9
|
+
|
|
3
10
|
## 6.0.8
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -37,6 +37,10 @@ var applyTargetTextTypeStep = exports.applyTargetTextTypeStep = function applyTa
|
|
|
37
37
|
return nodes;
|
|
38
38
|
}
|
|
39
39
|
return nodes.map(function (node) {
|
|
40
|
+
// If codeblock, return nodes as is
|
|
41
|
+
if (targetNodeTypeName === 'heading' && node.type.name === 'codeBlock') {
|
|
42
|
+
return node;
|
|
43
|
+
}
|
|
40
44
|
if (node.isTextblock) {
|
|
41
45
|
// Convert textblock nodes to the target type with content preserved
|
|
42
46
|
var attrs = {};
|
|
@@ -177,7 +177,9 @@ var TRANSFORM_STEPS_OVERRIDE = {
|
|
|
177
177
|
bulletList: [_decisionListToListStep.decisionListToListStep],
|
|
178
178
|
orderedList: [_decisionListToListStep.decisionListToListStep],
|
|
179
179
|
taskList: [_decisionListToListStep.decisionListToListStep],
|
|
180
|
-
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep]
|
|
180
|
+
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
|
|
181
|
+
blockquote: [_unwrapListStep.unwrapListStep, _wrapStep.wrapStep],
|
|
182
|
+
codeBlock: [_unwrapListStep.unwrapListStep, _wrapMixedContentStep.wrapMixedContentStep]
|
|
181
183
|
},
|
|
182
184
|
blockCard: {
|
|
183
185
|
layoutSection: [_wrapMixedContentStep.wrapMixedContentStep],
|
|
@@ -33,6 +33,10 @@ export const applyTargetTextTypeStep = (nodes, context) => {
|
|
|
33
33
|
return nodes;
|
|
34
34
|
}
|
|
35
35
|
return nodes.map(node => {
|
|
36
|
+
// If codeblock, return nodes as is
|
|
37
|
+
if (targetNodeTypeName === 'heading' && node.type.name === 'codeBlock') {
|
|
38
|
+
return node;
|
|
39
|
+
}
|
|
36
40
|
if (node.isTextblock) {
|
|
37
41
|
// Convert textblock nodes to the target type with content preserved
|
|
38
42
|
let attrs = {};
|
|
@@ -172,7 +172,9 @@ const TRANSFORM_STEPS_OVERRIDE = {
|
|
|
172
172
|
bulletList: [decisionListToListStep],
|
|
173
173
|
orderedList: [decisionListToListStep],
|
|
174
174
|
taskList: [decisionListToListStep],
|
|
175
|
-
layoutSection: [wrapMixedContentStep]
|
|
175
|
+
layoutSection: [wrapMixedContentStep],
|
|
176
|
+
blockquote: [unwrapListStep, wrapStep],
|
|
177
|
+
codeBlock: [unwrapListStep, wrapMixedContentStep]
|
|
176
178
|
},
|
|
177
179
|
blockCard: {
|
|
178
180
|
layoutSection: [wrapMixedContentStep],
|
|
@@ -31,6 +31,10 @@ export var applyTargetTextTypeStep = function applyTargetTextTypeStep(nodes, con
|
|
|
31
31
|
return nodes;
|
|
32
32
|
}
|
|
33
33
|
return nodes.map(function (node) {
|
|
34
|
+
// If codeblock, return nodes as is
|
|
35
|
+
if (targetNodeTypeName === 'heading' && node.type.name === 'codeBlock') {
|
|
36
|
+
return node;
|
|
37
|
+
}
|
|
34
38
|
if (node.isTextblock) {
|
|
35
39
|
// Convert textblock nodes to the target type with content preserved
|
|
36
40
|
var attrs = {};
|
|
@@ -172,7 +172,9 @@ var TRANSFORM_STEPS_OVERRIDE = {
|
|
|
172
172
|
bulletList: [decisionListToListStep],
|
|
173
173
|
orderedList: [decisionListToListStep],
|
|
174
174
|
taskList: [decisionListToListStep],
|
|
175
|
-
layoutSection: [wrapMixedContentStep]
|
|
175
|
+
layoutSection: [wrapMixedContentStep],
|
|
176
|
+
blockquote: [unwrapListStep, wrapStep],
|
|
177
|
+
codeBlock: [unwrapListStep, wrapMixedContentStep]
|
|
176
178
|
},
|
|
177
179
|
blockCard: {
|
|
178
180
|
layoutSection: [wrapMixedContentStep],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-menu",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.9",
|
|
4
4
|
"description": "BlockMenu plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
46
46
|
"@atlaskit/primitives": "^17.0.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^16.5.0",
|
|
48
48
|
"@atlaskit/tokens": "^9.1.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0"
|
|
50
50
|
},
|