@lumino/widgets
Advanced tools
Comparing version 2.0.0-rc.0 to 2.0.0-rc.1
{ | ||
"name": "@lumino/widgets", | ||
"version": "2.0.0-rc.0", | ||
"version": "2.0.0-rc.1", | ||
"description": "Lumino Widgets", | ||
@@ -57,16 +57,16 @@ "homepage": "https://github.com/jupyterlab/lumino", | ||
"dependencies": { | ||
"@lumino/algorithm": "^2.0.0-rc.0", | ||
"@lumino/commands": "^2.0.0-rc.0", | ||
"@lumino/coreutils": "^2.0.0-rc.0", | ||
"@lumino/disposable": "^2.0.0-rc.0", | ||
"@lumino/domutils": "^2.0.0-rc.0", | ||
"@lumino/dragdrop": "^2.0.0-rc.0", | ||
"@lumino/keyboard": "^2.0.0-rc.0", | ||
"@lumino/messaging": "^2.0.0-rc.0", | ||
"@lumino/properties": "^2.0.0-rc.0", | ||
"@lumino/signaling": "^2.0.0-rc.0", | ||
"@lumino/virtualdom": "^2.0.0-rc.0" | ||
"@lumino/algorithm": "^2.0.0-rc.1", | ||
"@lumino/commands": "^2.0.0-rc.1", | ||
"@lumino/coreutils": "^2.0.0-rc.1", | ||
"@lumino/disposable": "^2.0.0-rc.1", | ||
"@lumino/domutils": "^2.0.0-rc.1", | ||
"@lumino/dragdrop": "^2.0.0-rc.1", | ||
"@lumino/keyboard": "^2.0.0-rc.1", | ||
"@lumino/messaging": "^2.0.0-rc.1", | ||
"@lumino/properties": "^2.0.0-rc.1", | ||
"@lumino/signaling": "^2.0.0-rc.1", | ||
"@lumino/virtualdom": "^2.0.0-rc.1" | ||
}, | ||
"devDependencies": { | ||
"@lumino/buildutils": "^2.0.0-rc.0", | ||
"@lumino/buildutils": "^2.0.0-rc.1", | ||
"@microsoft/api-extractor": "^7.6.0", | ||
@@ -73,0 +73,0 @@ "@rollup/plugin-commonjs": "^24.0.0", |
@@ -53,4 +53,3 @@ // Copyright (c) Jupyter Development Team. | ||
this._overflowMenuOptions = options.overflowMenuOptions || { | ||
overflowMenuVisible: true, | ||
title: '...' | ||
isVisible: true | ||
}; | ||
@@ -438,3 +437,3 @@ } | ||
let totalMenuSize = 0; | ||
let overflowMenuVisible = false; | ||
let isVisible = false; | ||
@@ -459,3 +458,3 @@ // Check that the overflow menu doesn't count | ||
if (menus[i].title.label === this._overflowMenuOptions.title) { | ||
overflowMenuVisible = true; | ||
isVisible = true; | ||
length--; | ||
@@ -465,8 +464,9 @@ } | ||
// Render overflow menu if needed and active | ||
if (this._overflowMenuOptions.overflowMenuVisible) { | ||
if (this._overflowIndex > -1 && !overflowMenuVisible) { | ||
if (this._overflowMenuOptions.isVisible) { | ||
if (this._overflowIndex > -1 && !isVisible) { | ||
// Create overflow menu | ||
if (this._overflowMenu === null) { | ||
const overflowMenuTitle = this._overflowMenuOptions.title ?? '...'; | ||
this._overflowMenu = new Menu({ commands: new CommandRegistry() }); | ||
this._overflowMenu.title.label = this._overflowMenuOptions.title; | ||
this._overflowMenu.title.label = overflowMenuTitle; | ||
this._overflowMenu.title.mnemonic = 0; | ||
@@ -532,2 +532,6 @@ this.addMenu(this._overflowMenu, false); | ||
private _updateOverflowIndex(): void { | ||
if (!this._overflowMenuOptions.isVisible) { | ||
return; | ||
} | ||
// Get elements visible in the main menu bar | ||
@@ -707,3 +711,4 @@ const itemMenus = this.contentNode.childNodes; | ||
// Get position for the new menu >before< updating active index. | ||
const position = this._positionForMenu(index); | ||
const position = | ||
index >= 0 && this._childMenu ? this._positionForMenu(index) : null; | ||
@@ -719,3 +724,3 @@ // Before any modification, update window data. | ||
// Open the new menu if a menu is already open. | ||
if (this._childMenu) { | ||
if (position) { | ||
this._openChildMenu(position); | ||
@@ -1120,4 +1125,6 @@ } | ||
* Determines if a overflow menu appears when the menu items overflow. | ||
* | ||
* Defaults to `true`. | ||
*/ | ||
overflowMenuVisible: boolean; | ||
isVisible: boolean; | ||
/** | ||
@@ -1128,3 +1135,3 @@ * Determines the title of the overflow menu. | ||
*/ | ||
title: string; | ||
title?: string; | ||
} | ||
@@ -1131,0 +1138,0 @@ |
@@ -373,4 +373,6 @@ import { Message } from '@lumino/messaging'; | ||
* Determines if a overflow menu appears when the menu items overflow. | ||
* | ||
* Defaults to `true`. | ||
*/ | ||
overflowMenuVisible: boolean; | ||
isVisible: boolean; | ||
/** | ||
@@ -381,3 +383,3 @@ * Determines the title of the overflow menu. | ||
*/ | ||
title: string; | ||
title?: string; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
4577440
57067
1
Updated@lumino/commands@^2.0.0-rc.1
Updated@lumino/domutils@^2.0.0-rc.1
Updated@lumino/dragdrop@^2.0.0-rc.1
Updated@lumino/keyboard@^2.0.0-rc.1