@atlaskit/editor-plugin-synced-block 4.3.4 → 4.3.6
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 +15 -0
- package/dist/cjs/pm-plugins/utils/utils.js +6 -2
- package/dist/cjs/ui/block-menu-components.js +3 -3
- package/dist/es2019/pm-plugins/utils/utils.js +6 -2
- package/dist/es2019/ui/block-menu-components.js +4 -4
- package/dist/esm/pm-plugins/utils/utils.js +6 -2
- package/dist/esm/ui/block-menu-components.js +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 4.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`56c0427b2ab20`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/56c0427b2ab20) -
|
|
8
|
+
[ux] Use new IA for block menu items.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.3.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`a4c7ffb45fe77`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a4c7ffb45fe77) -
|
|
16
|
+
Revert PR 258977
|
|
17
|
+
|
|
3
18
|
## 4.3.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -78,8 +78,12 @@ var removeBreakoutMarks = function removeBreakoutMarks(content) {
|
|
|
78
78
|
var filteredMarks = node.marks.filter(function (mark) {
|
|
79
79
|
return mark.type.name !== 'breakout';
|
|
80
80
|
});
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
if (node.isText) {
|
|
82
|
+
nodes.push(node);
|
|
83
|
+
} else {
|
|
84
|
+
var newNode = node.type.create(node.attrs, node.content, filteredMarks);
|
|
85
|
+
nodes.push(newNode);
|
|
86
|
+
}
|
|
83
87
|
});
|
|
84
88
|
return _model.Fragment.from(nodes);
|
|
85
89
|
};
|
|
@@ -11,11 +11,11 @@ var _CreateSyncedBlockDropdownItem = require("./CreateSyncedBlockDropdownItem");
|
|
|
11
11
|
var getBlockMenuComponents = exports.getBlockMenuComponents = function getBlockMenuComponents(api) {
|
|
12
12
|
return [{
|
|
13
13
|
type: 'block-menu-item',
|
|
14
|
-
key: _blockMenu.
|
|
14
|
+
key: _blockMenu.BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM.key,
|
|
15
15
|
parent: {
|
|
16
16
|
type: 'block-menu-section',
|
|
17
|
-
key: _blockMenu.
|
|
18
|
-
rank: _blockMenu.
|
|
17
|
+
key: _blockMenu.BLOCK_ACTIONS_MENU_SECTION.key,
|
|
18
|
+
rank: _blockMenu.BLOCK_ACTIONS_MENU_SECTION_RANK[_blockMenu.BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM.key]
|
|
19
19
|
},
|
|
20
20
|
component: function component() {
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement(_CreateSyncedBlockDropdownItem.CreateOrCopySyncedBlockDropdownItem, {
|
|
@@ -72,8 +72,12 @@ const removeBreakoutMarks = content => {
|
|
|
72
72
|
// we only need to recurse at the top level, because breakout has to be on a top level
|
|
73
73
|
content.forEach(node => {
|
|
74
74
|
const filteredMarks = node.marks.filter(mark => mark.type.name !== 'breakout');
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
if (node.isText) {
|
|
76
|
+
nodes.push(node);
|
|
77
|
+
} else {
|
|
78
|
+
const newNode = node.type.create(node.attrs, node.content, filteredMarks);
|
|
79
|
+
nodes.push(newNode);
|
|
80
|
+
}
|
|
77
81
|
});
|
|
78
82
|
return Fragment.from(nodes);
|
|
79
83
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_MENU_SECTION_RANK, BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM } from '@atlaskit/editor-common/block-menu';
|
|
3
3
|
import { CreateOrCopySyncedBlockDropdownItem } from './CreateSyncedBlockDropdownItem';
|
|
4
4
|
export const getBlockMenuComponents = api => {
|
|
5
5
|
return [{
|
|
6
6
|
type: 'block-menu-item',
|
|
7
|
-
key:
|
|
7
|
+
key: BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM.key,
|
|
8
8
|
parent: {
|
|
9
9
|
type: 'block-menu-section',
|
|
10
|
-
key:
|
|
11
|
-
rank:
|
|
10
|
+
key: BLOCK_ACTIONS_MENU_SECTION.key,
|
|
11
|
+
rank: BLOCK_ACTIONS_MENU_SECTION_RANK[BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM.key]
|
|
12
12
|
},
|
|
13
13
|
component: () => /*#__PURE__*/React.createElement(CreateOrCopySyncedBlockDropdownItem, {
|
|
14
14
|
api: api
|
|
@@ -72,8 +72,12 @@ var removeBreakoutMarks = function removeBreakoutMarks(content) {
|
|
|
72
72
|
var filteredMarks = node.marks.filter(function (mark) {
|
|
73
73
|
return mark.type.name !== 'breakout';
|
|
74
74
|
});
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
if (node.isText) {
|
|
76
|
+
nodes.push(node);
|
|
77
|
+
} else {
|
|
78
|
+
var newNode = node.type.create(node.attrs, node.content, filteredMarks);
|
|
79
|
+
nodes.push(newNode);
|
|
80
|
+
}
|
|
77
81
|
});
|
|
78
82
|
return Fragment.from(nodes);
|
|
79
83
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_MENU_SECTION_RANK, BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM } from '@atlaskit/editor-common/block-menu';
|
|
3
3
|
import { CreateOrCopySyncedBlockDropdownItem } from './CreateSyncedBlockDropdownItem';
|
|
4
4
|
export var getBlockMenuComponents = function getBlockMenuComponents(api) {
|
|
5
5
|
return [{
|
|
6
6
|
type: 'block-menu-item',
|
|
7
|
-
key:
|
|
7
|
+
key: BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM.key,
|
|
8
8
|
parent: {
|
|
9
9
|
type: 'block-menu-section',
|
|
10
|
-
key:
|
|
11
|
-
rank:
|
|
10
|
+
key: BLOCK_ACTIONS_MENU_SECTION.key,
|
|
11
|
+
rank: BLOCK_ACTIONS_MENU_SECTION_RANK[BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM.key]
|
|
12
12
|
},
|
|
13
13
|
component: function component() {
|
|
14
14
|
return /*#__PURE__*/React.createElement(CreateOrCopySyncedBlockDropdownItem, {
|