@neovici/cosmoz-bottom-bar 6.3.0 → 6.3.1
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/cosmoz-bottom-bar.js +18 -13
- package/package.json +1 -1
package/cosmoz-bottom-bar.js
CHANGED
|
@@ -291,19 +291,24 @@ class CosmozBottomBar extends PolymerElement {
|
|
|
291
291
|
|
|
292
292
|
_getElements() {
|
|
293
293
|
const elements = FlattenedNodesObserver.getFlattenedNodes(this)
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
294
|
+
.filter(this._isActionNode)
|
|
295
|
+
.filter((element) => !element.hidden)
|
|
296
|
+
.sort((a, b) => (a.dataset.index ?? 0) - (b.dataset.index ?? 0));
|
|
297
|
+
|
|
298
|
+
if (elements.length === 0) {
|
|
299
|
+
return elements;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const topPriorityAction = elements.reduce(
|
|
303
|
+
(top, element) => {
|
|
304
|
+
return parseInt(top.dataset.priority ?? 0, 10) >=
|
|
305
|
+
parseInt(element.dataset.priority ?? 0, 10)
|
|
306
|
+
? top
|
|
307
|
+
: element;
|
|
308
|
+
},
|
|
309
|
+
{ dataset: { priority: '-1000' } },
|
|
310
|
+
[]
|
|
311
|
+
);
|
|
307
312
|
|
|
308
313
|
return [
|
|
309
314
|
topPriorityAction,
|
package/package.json
CHANGED