Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@lumino/widgets

Package Overview
Dependencies
Maintainers
3
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lumino/widgets - npm Package Compare versions

Comparing version 1.10.2 to 1.11.0

4

lib/commandpalette.d.ts

@@ -241,2 +241,6 @@ import { ReadonlyJSONObject } from '@lumino/coreutils';

/**
* The icon renderer for the command item.
*/
readonly icon: VirtualElement.IRenderer | undefined | string;
/**
* The icon class for the command item.

@@ -243,0 +247,0 @@ */

@@ -509,3 +509,9 @@ "use strict";

var className = this.createIconClass(data);
return virtualdom_1.h.div({ className: className }, data.item.iconLabel);
/* <DEPRECATED> */
if (typeof data.item.icon === 'string') {
return virtualdom_1.h.div({ className: className }, data.item.iconLabel);
}
/* </DEPRECATED> */
// if data.item.icon is undefined, it will be ignored
return virtualdom_1.h.div({ className: className }, data.item.icon, data.item.iconLabel);
};

@@ -1004,2 +1010,12 @@ /**

});
Object.defineProperty(CommandItem.prototype, "icon", {
/**
* The icon renderer for the command item.
*/
get: function () {
return this._commands.icon(this.command, this.args);
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommandItem.prototype, "iconClass", {

@@ -1006,0 +1022,0 @@ /**

4

lib/menu.d.ts

@@ -418,5 +418,5 @@ import { CommandRegistry } from '@lumino/commands';

/**
* @deprecated Use `iconClass` instead.
* The icon renderer for the menu item.
*/
readonly icon: string;
readonly icon: VirtualElement.IRenderer | undefined | string;
/**

@@ -423,0 +423,0 @@ * The icon class for the menu item.

@@ -884,3 +884,9 @@ "use strict";

var className = this.createIconClass(data);
return virtualdom_1.h.div({ className: className }, data.item.iconLabel);
/* <DEPRECATED> */
if (typeof data.item.icon === 'string') {
return virtualdom_1.h.div({ className: className }, data.item.iconLabel);
}
/* </DEPRECATED> */
// if data.item.icon is undefined, it will be ignored
return virtualdom_1.h.div({ className: className }, data.item.icon, data.item.iconLabel);
};

@@ -1369,6 +1375,18 @@ /**

/**
* @deprecated Use `iconClass` instead.
* The icon renderer for the menu item.
*/
get: function () {
if (this.type === 'command') {
return this._commands.icon(this.command, this.args);
}
if (this.type === 'submenu' && this.submenu) {
return this.submenu.title.icon;
}
/* <DEPRECATED> */
// alias to icon class if not otherwise defined
return this.iconClass;
/* </DEPRECATED> */
/* <FUTURE>
return undefined;
</FUTURE> */
},

@@ -1375,0 +1393,0 @@ enumerable: true,

@@ -657,3 +657,9 @@ "use strict";

var className = this.createIconClass(data);
return virtualdom_1.h.div({ className: className }, data.title.iconLabel);
/* <DEPRECATED> */
if (typeof data.title.icon === 'string') {
return virtualdom_1.h.div({ className: className }, data.title.iconLabel);
}
/* </DEPRECATED> */
// if data.title.icon is undefined, it will be ignored
return virtualdom_1.h.div({ className: className }, data.title.icon, data.title.iconLabel);
};

@@ -660,0 +666,0 @@ /**

@@ -955,3 +955,9 @@ "use strict";

var className = this.createIconClass(data);
return virtualdom_1.h.div({ className: className }, title.iconRenderer, title.iconLabel);
/* <DEPRECATED> */
if (typeof title.icon === 'string') {
return virtualdom_1.h.div({ className: className }, title.iconLabel);
}
/* </DEPRECATED> */
// if title.icon is undefined, it will be ignored
return virtualdom_1.h.div({ className: className }, title.icon, title.iconLabel);
};

@@ -958,0 +964,0 @@ /**

@@ -47,8 +47,20 @@ import { ISignal } from '@lumino/signaling';

/**
* @deprecated Use `iconClass` instead.
* Get the icon renderer for the title.
*
* #### Notes
* The default value is undefined.
*
* DEPRECATED: if set to a string value, the .icon field will function as
* an alias for the .iconClass field, for backwards compatibility
*/
/**
* @deprecated Use `iconClass` instead.
* Set the icon renderer for the title.
*
* #### Notes
* A renderer is an object that supplies a render and unrender function.
*
* DEPRECATED: if set to a string value, the .icon field will function as
* an alias for the .iconClass field, for backwards compatibility
*/
icon: string;
icon: VirtualElement.IRenderer | undefined | string;
/**

@@ -81,14 +93,8 @@ * Get the icon class name for the title.

/**
* Get the icon renderer for the title.
*
* #### Notes
* The default value is undefined.
* @deprecated Use `icon` instead.
*/
/**
* Set the icon renderer for the title.
*
* #### Notes
* A renderer is an object that supplies a render and unrender function.
* @deprecated Use `icon` instead.
*/
iconRenderer: VirtualElement.IRenderer;
iconRenderer: VirtualElement.IRenderer | undefined;
/**

@@ -146,5 +152,5 @@ * Get the caption for the title.

private _mnemonic;
private _icon;
private _iconClass;
private _iconLabel;
private _iconRenderer;
private _className;

@@ -182,5 +188,8 @@ private _closable;

/**
* @deprecated Use `iconClass` instead.
* The icon renderer for the title.
*
* DEPRECATED: if set to a string value, the .icon field will function as
* an alias for the .iconClass field, for backwards compatibility
*/
icon?: string;
icon?: VirtualElement.IRenderer | string;
/**

@@ -195,4 +204,3 @@ * The icon class name for the title.

/**
* An object that supplies render and unrender functions used
* to create and cleanup the icon of the title.
* @deprecated Use `icon` instead.
*/

@@ -199,0 +207,0 @@ iconRenderer?: VirtualElement.IRenderer;

@@ -44,4 +44,21 @@ "use strict";

if (options.icon !== undefined) {
this._iconClass = options.icon;
/* <DEPRECATED> */
if (typeof options.icon === "string") {
// when ._icon is null, the .icon getter will alias .iconClass
this._icon = null;
this._iconClass = options.icon;
}
else {
/* </DEPRECATED> */
this._icon = options.icon;
/* <DEPRECATED> */
}
/* </DEPRECATED> */
}
/* <DEPRECATED> */
else {
// if unset, default to aliasing .iconClass
this._icon = null;
}
/* </DEPRECATED> */
if (options.iconClass !== undefined) {

@@ -54,3 +71,3 @@ this._iconClass = options.iconClass;

if (options.iconRenderer !== undefined) {
this._iconRenderer = options.iconRenderer;
this._icon = options.iconRenderer;
}

@@ -126,12 +143,45 @@ if (options.caption !== undefined) {

/**
* @deprecated Use `iconClass` instead.
* Get the icon renderer for the title.
*
* #### Notes
* The default value is undefined.
*
* DEPRECATED: if set to a string value, the .icon field will function as
* an alias for the .iconClass field, for backwards compatibility
*/
get: function () {
return this.iconClass;
/* <DEPRECATED> */
if (this._icon === null) {
// only alias .iconClass if ._icon has been explicitly nulled
return this.iconClass;
}
/* </DEPRECATED> */
return this._icon;
},
/**
* @deprecated Use `iconClass` instead.
* Set the icon renderer for the title.
*
* #### Notes
* A renderer is an object that supplies a render and unrender function.
*
* DEPRECATED: if set to a string value, the .icon field will function as
* an alias for the .iconClass field, for backwards compatibility
*/
set: function (value) {
this.iconClass = value;
set: function (value /* </DEPRECATED> */) {
/* <DEPRECATED> */
if (typeof value === "string") {
// when ._icon is null, the .icon getter will alias .iconClass
this._icon = null;
this.iconClass = value;
}
else {
/* </DEPRECATED> */
if (this._icon === value) {
return;
}
this._icon = value;
this._changed.emit(undefined);
/* <DEPRECATED> */
}
/* </DEPRECATED> */
},

@@ -195,22 +245,12 @@ enumerable: true,

/**
* Get the icon renderer for the title.
*
* #### Notes
* The default value is undefined.
* @deprecated Use `icon` instead.
*/
get: function () {
return this._iconRenderer;
return this._icon || undefined;
},
/**
* Set the icon renderer for the title.
*
* #### Notes
* A renderer is an object that supplies a render and unrender function.
* @deprecated Use `icon` instead.
*/
set: function (value) {
if (this._iconRenderer === value) {
return;
}
this._iconRenderer = value;
this._changed.emit(undefined);
this.icon = value;
},

@@ -217,0 +257,0 @@ enumerable: true,

{
"name": "@lumino/widgets",
"version": "1.10.2",
"version": "1.11.0",
"description": "Lumino Widgets",

@@ -40,10 +40,12 @@ "homepage": "https://github.com/jupyterlab/lumino",

"test": "npm run test:firefox",
"test:chrome": "cd tests && karma start --browsers=Chrome",
"test:chrome-headless": "cd tests && karma start --browsers=ChromeHeadless",
"test:chrome": "npm run test:nobrowser -- --browsers=Chrome",
"test:chrome-headless": "npm run test:nobrowser -- --browsers=ChromeHeadless",
"test:ie": "npm run test:nobrowser -- --browsers=IE",
"test:firefox": "npm run test:nobrowser -- --browsers=Firefox",
"test:nobrowser": "cd tests && karma start",
"test:debug": "npm run test:debug:firefox",
"test:debug:chrome": "cd tests && karma start --browsers=Chrome --singleRun=false --debug=true --browserNoActivityTimeout=10000000 --browserDisconnectTimeout=10000000",
"test:debug:chrome-headless": "cd tests && karma start --browsers=ChromeHeadless --singleRun=false --debug=true --browserNoActivityTimeout=10000000 --browserDisconnectTimeout=10000000",
"test:debug:firefox": "cd tests && karma start --browsers=Firefox --singleRun=false --debug=true --browserNoActivityTimeout=10000000 --browserDisconnectTimeout=10000000",
"test:firefox": "cd tests && karma start --browsers=Firefox",
"test:ie": "cd tests && karma start --browsers=IE",
"test:debug:chrome-headless": "npm run test:debug:nobrowser -- --browsers=ChromeHeadless",
"test:debug:chrome": "npm run test:debug:nobrowser -- --browsers=Chrome",
"test:debug:firefox": "npm run test:debug:nobrowser -- --browsers=Firefox",
"test:debug:nobrowser": "cd tests && karma start --singleRun=false --debug=true --browserNoActivityTimeout=10000000 --browserDisconnectTimeout=10000000",
"watch": "tsc --build --watch"

@@ -53,3 +55,3 @@ },

"@lumino/algorithm": "^1.2.3",
"@lumino/commands": "^1.9.2",
"@lumino/commands": "^1.10.0",
"@lumino/coreutils": "^1.4.2",

@@ -63,3 +65,3 @@ "@lumino/disposable": "^1.3.4",

"@lumino/signaling": "^1.3.4",
"@lumino/virtualdom": "^1.5.0"
"@lumino/virtualdom": "^1.6.0"
},

@@ -91,3 +93,3 @@ "devDependencies": {

},
"gitHead": "1beb8b36878dc0b1c4a75ab627b3938808eef0ca"
"gitHead": "5e8427c9769e8ba3c961ea62e22cae5e696f52ea"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc