@neovici/cosmoz-bottom-bar
Advanced tools
Comparing version 6.2.0 to 6.3.0
@@ -293,6 +293,21 @@ /* eslint-disable max-lines */ | ||
_getElements() { | ||
return FlattenedNodesObserver.getFlattenedNodes(this) | ||
.filter(this._isActionNode) | ||
.filter((element) => !element.hidden) | ||
.sort((a, b) => (a.dataset.index ?? 0) - (b.dataset.index ?? 0)); | ||
const elements = FlattenedNodesObserver.getFlattenedNodes(this) | ||
.filter(this._isActionNode) | ||
.filter((element) => !element.hidden) | ||
.sort((a, b) => (a.dataset.index ?? 0) - (b.dataset.index ?? 0)), | ||
topPriorityAction = elements.reduce( | ||
(top, element) => { | ||
return parseInt(top.dataset.priority ?? 0, 10) >= | ||
parseInt(element.dataset.priority ?? 0, 10) | ||
? top | ||
: element; | ||
}, | ||
{ dataset: { priority: '-1000' } }, | ||
[] | ||
); | ||
return [ | ||
topPriorityAction, | ||
...elements.filter((e) => e !== topPriorityAction), | ||
]; | ||
} | ||
@@ -299,0 +314,0 @@ /** |
{ | ||
"name": "@neovici/cosmoz-bottom-bar", | ||
"version": "6.2.0", | ||
"version": "6.3.0", | ||
"description": "A responsive bottom-bar that can house buttons/actions and a menu for the buttons that won't fit the available width.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29810
447