@atlaskit/editor-plugin-block-menu 0.0.17 → 0.0.18
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 0.0.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`942b7b9e97c21`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/942b7b9e97c21) -
|
|
8
|
+
Support nested block menu via selection extension config
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 0.0.17
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -52,6 +52,9 @@ var BlockMenuRenderer = exports.BlockMenuRenderer = function BlockMenuRenderer(_
|
|
|
52
52
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, menuSections.map(function (section) {
|
|
53
53
|
// Get all items for the current section, including nested menus, and sort them by rank
|
|
54
54
|
var currentSectionItemsSorted = getSortedChildren([].concat((0, _toConsumableArray2.default)(menuItems), (0, _toConsumableArray2.default)(nestedMenus)), section.key);
|
|
55
|
+
if (currentSectionItemsSorted.length === 0) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
55
58
|
|
|
56
59
|
// iterate over the current section items, if it is nested menu, get their children, sort them
|
|
57
60
|
// if they are menu items, just render as they are sorted above
|
|
@@ -31,6 +31,9 @@ export const BlockMenuRenderer = ({
|
|
|
31
31
|
return /*#__PURE__*/React.createElement(Fragment, null, menuSections.map(section => {
|
|
32
32
|
// Get all items for the current section, including nested menus, and sort them by rank
|
|
33
33
|
const currentSectionItemsSorted = getSortedChildren([...menuItems, ...nestedMenus], section.key);
|
|
34
|
+
if (currentSectionItemsSorted.length === 0) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
34
37
|
|
|
35
38
|
// iterate over the current section items, if it is nested menu, get their children, sort them
|
|
36
39
|
// if they are menu items, just render as they are sorted above
|
|
@@ -43,6 +43,9 @@ export var BlockMenuRenderer = function BlockMenuRenderer(_ref) {
|
|
|
43
43
|
return /*#__PURE__*/React.createElement(Fragment, null, menuSections.map(function (section) {
|
|
44
44
|
// Get all items for the current section, including nested menus, and sort them by rank
|
|
45
45
|
var currentSectionItemsSorted = getSortedChildren([].concat(_toConsumableArray(menuItems), _toConsumableArray(nestedMenus)), section.key);
|
|
46
|
+
if (currentSectionItemsSorted.length === 0) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
46
49
|
|
|
47
50
|
// iterate over the current section items, if it is nested menu, get their children, sort them
|
|
48
51
|
// if they are menu items, just render as they are sorted above
|