@lumino/widgets
Advanced tools
Comparing version 1.9.4 to 1.9.5
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -576,3 +576,3 @@ extendStatics(d, b); | ||
Renderer.prototype.createItemDataset = function (data) { | ||
return __assign({}, data.item.dataset, { command: data.item.command }); | ||
return __assign(__assign({}, data.item.dataset), { command: data.item.command }); | ||
}; | ||
@@ -579,0 +579,0 @@ /** |
@@ -113,3 +113,3 @@ "use strict"; | ||
var rank = options.rank !== undefined ? options.rank : Infinity; | ||
return __assign({}, options, { selector: selector, rank: rank, id: id }); | ||
return __assign(__assign({}, options), { selector: selector, rank: rank, id: id }); | ||
} | ||
@@ -116,0 +116,0 @@ Private.createItem = createItem; |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -61,2 +61,9 @@ import { IIterator } from '@lumino/algorithm'; | ||
/** | ||
* Whether the tabs can be dragged / moved at runtime. | ||
*/ | ||
/** | ||
* Enable / Disable draggable / movable tabs. | ||
*/ | ||
tabsMovable: boolean; | ||
/** | ||
* Whether the dock panel is empty. | ||
@@ -262,2 +269,3 @@ */ | ||
private _renderer; | ||
private _tabsMovable; | ||
private _pressData; | ||
@@ -303,2 +311,8 @@ private _layoutModified; | ||
edges?: IEdges; | ||
/** | ||
* Allow tabs to be draggable / movable by user. | ||
* | ||
* The default is `'true'`. | ||
*/ | ||
tabsMovable?: boolean; | ||
} | ||
@@ -305,0 +319,0 @@ /** |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -50,2 +50,3 @@ extendStatics(d, b); | ||
_this._drag = null; | ||
_this._tabsMovable = true; | ||
_this._pressData = null; | ||
@@ -57,2 +58,5 @@ _this._layoutModified = new signaling_1.Signal(_this); | ||
_this._edges = options.edges || Private.DEFAULT_EDGES; | ||
if (options.tabsMovable !== undefined) { | ||
_this._tabsMovable = options.tabsMovable; | ||
} | ||
// Toggle the CSS mode attribute. | ||
@@ -62,3 +66,3 @@ _this.dataset['mode'] = _this._mode; | ||
var renderer = { | ||
createTabBar: function () { return _this._createTabBar(); }, | ||
createTabBar: function () { return _this._createTabBar(_this._tabsMovable); }, | ||
createHandle: function () { return _this._createHandle(); } | ||
@@ -175,2 +179,19 @@ }; | ||
}); | ||
Object.defineProperty(DockPanel.prototype, "tabsMovable", { | ||
/** | ||
* Whether the tabs can be dragged / moved at runtime. | ||
*/ | ||
get: function () { | ||
return this._tabsMovable; | ||
}, | ||
/** | ||
* Enable / Disable draggable / movable tabs. | ||
*/ | ||
set: function (value) { | ||
this._tabsMovable = value; | ||
algorithm_1.each(this.tabBars(), function (tabbar) { return tabbar.tabsMovable = value; }); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(DockPanel.prototype, "isEmpty", { | ||
@@ -745,3 +766,3 @@ /** | ||
*/ | ||
DockPanel.prototype._createTabBar = function () { | ||
DockPanel.prototype._createTabBar = function (tabsMovable) { | ||
// Create the tab bar. | ||
@@ -757,3 +778,3 @@ var tabBar = this._renderer.createTabBar(); | ||
// TODO do we really want to enforce *all* of these? | ||
tabBar.tabsMovable = true; | ||
tabBar.tabsMovable = tabsMovable; | ||
tabBar.allowDeselect = false; | ||
@@ -760,0 +781,0 @@ tabBar.removeBehavior = 'select-previous-tab'; |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -961,6 +961,6 @@ extendStatics(d, b); | ||
if (type === 'command') { | ||
result = __assign({}, dataset, { type: type, command: command }); | ||
result = __assign(__assign({}, dataset), { type: type, command: command }); | ||
} | ||
else { | ||
result = __assign({}, dataset, { type: type }); | ||
result = __assign(__assign({}, dataset), { type: type }); | ||
} | ||
@@ -967,0 +967,0 @@ return result; |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
import { Message } from '@lumino/messaging'; | ||
import { ISignal } from '@lumino/signaling'; | ||
import { ElementDataset, ElementInlineStyle, VirtualElement } from '@lumino/virtualdom'; | ||
import { ElementDataset, ElementInlineStyle, VirtualElement, VirtualElementPass } from '@lumino/virtualdom'; | ||
import { Title } from './title'; | ||
@@ -526,3 +526,3 @@ import { Widget } from './widget'; | ||
*/ | ||
readonly closeIconSelector: string; | ||
readonly closeIconSelector = ".p-TabBar-tabCloseIcon"; | ||
/** | ||
@@ -543,3 +543,3 @@ * Render the virtual element for a tab. | ||
*/ | ||
renderIcon(data: IRenderData<any>): VirtualElement; | ||
renderIcon(data: IRenderData<any>): VirtualElement | VirtualElementPass; | ||
/** | ||
@@ -546,0 +546,0 @@ * Render the label element for a tab. |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -937,4 +937,10 @@ extendStatics(d, b); | ||
Renderer.prototype.renderIcon = function (data) { | ||
var title = data.title; | ||
var className = this.createIconClass(data); | ||
return virtualdom_1.h.div({ className: className }, data.title.iconLabel); | ||
if (title.iconRenderer) { | ||
return virtualdom_1.hpass('div', title.iconRenderer); | ||
} | ||
else { | ||
return virtualdom_1.h.div({ className: className }, data.title.iconLabel); | ||
} | ||
}; | ||
@@ -941,0 +947,0 @@ /** |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
import { ISignal } from '@lumino/signaling'; | ||
import { VirtualElementPass } from "@lumino/virtualdom"; | ||
/** | ||
@@ -79,2 +80,15 @@ * An object which holds data related to an object's title. | ||
/** | ||
* Get the icon renderer for the title. | ||
* | ||
* #### Notes | ||
* The default value is undefined. | ||
*/ | ||
/** | ||
* Set the icon renderer for the title. | ||
* | ||
* #### Notes | ||
* A renderer is an object that supplies a render and unrender function. | ||
*/ | ||
iconRenderer: VirtualElementPass.IRenderer; | ||
/** | ||
* Get the caption for the title. | ||
@@ -133,2 +147,3 @@ * | ||
private _iconLabel; | ||
private _iconRenderer; | ||
private _className; | ||
@@ -178,2 +193,7 @@ private _closable; | ||
/** | ||
* An object that supplies render and unrender functions used | ||
* to create and cleanup the icon of the title. | ||
*/ | ||
iconRenderer?: VirtualElementPass.IRenderer; | ||
/** | ||
* The caption for the title. | ||
@@ -180,0 +200,0 @@ */ |
@@ -52,2 +52,5 @@ "use strict"; | ||
} | ||
if (options.iconRenderer !== undefined) { | ||
this._iconRenderer = options.iconRenderer; | ||
} | ||
if (options.caption !== undefined) { | ||
@@ -188,2 +191,28 @@ this._caption = options.caption; | ||
}); | ||
Object.defineProperty(Title.prototype, "iconRenderer", { | ||
/** | ||
* Get the icon renderer for the title. | ||
* | ||
* #### Notes | ||
* The default value is undefined. | ||
*/ | ||
get: function () { | ||
return this._iconRenderer; | ||
}, | ||
/** | ||
* Set the icon renderer for the title. | ||
* | ||
* #### Notes | ||
* A renderer is an object that supplies a render and unrender function. | ||
*/ | ||
set: function (value) { | ||
if (this._iconRenderer === value) { | ||
return; | ||
} | ||
this._iconRenderer = value; | ||
this._changed.emit(undefined); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(Title.prototype, "caption", { | ||
@@ -190,0 +219,0 @@ /** |
@@ -8,3 +8,3 @@ "use strict"; | ||
return extendStatics(d, b); | ||
} | ||
}; | ||
return function (d, b) { | ||
@@ -11,0 +11,0 @@ extendStatics(d, b); |
{ | ||
"name": "@lumino/widgets", | ||
"version": "1.9.4", | ||
"version": "1.9.5", | ||
"description": "Lumino Widgets", | ||
@@ -9,2 +9,6 @@ "homepage": "https://github.com/jupyterlab/lumino", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jupyterlab/lumino.git" | ||
}, | ||
"license": "BSD-3-Clause", | ||
@@ -29,6 +33,2 @@ "author": "S. Chris Colbert <sccolbert@gmail.com>", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jupyterlab/lumino.git" | ||
}, | ||
"scripts": { | ||
@@ -38,3 +38,3 @@ "api": "api-extractor run --local --verbose", | ||
"build:test": "tsc --build tests && cd tests && webpack", | ||
"clean": "rimraf lib", | ||
"clean": "rimraf lib && rimraf *.tsbuildinfo", | ||
"clean:test": "rimraf tests/build", | ||
@@ -44,2 +44,7 @@ "docs": "typedoc --options tdoptions.json src", | ||
"test:chrome": "cd tests && karma start --browsers=Chrome", | ||
"test:chrome-headless": "cd tests && karma start --browsers=ChromeHeadless", | ||
"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", | ||
@@ -50,13 +55,13 @@ "test:ie": "cd tests && karma start --browsers=IE", | ||
"dependencies": { | ||
"@lumino/algorithm": "^1.2.1", | ||
"@lumino/commands": "^1.8.0", | ||
"@lumino/coreutils": "^1.4.0", | ||
"@lumino/disposable": "^1.3.2", | ||
"@lumino/domutils": "^1.1.5", | ||
"@lumino/dragdrop": "^1.4.2", | ||
"@lumino/keyboard": "^1.1.4", | ||
"@lumino/messaging": "^1.3.1", | ||
"@lumino/properties": "^1.1.4", | ||
"@lumino/signaling": "^1.3.2", | ||
"@lumino/virtualdom": "^1.2.1" | ||
"@lumino/algorithm": "^1.2.2", | ||
"@lumino/commands": "^1.8.1", | ||
"@lumino/coreutils": "^1.4.1", | ||
"@lumino/disposable": "^1.3.3", | ||
"@lumino/domutils": "^1.1.6", | ||
"@lumino/dragdrop": "^1.4.3", | ||
"@lumino/keyboard": "^1.1.5", | ||
"@lumino/messaging": "^1.3.2", | ||
"@lumino/properties": "^1.1.5", | ||
"@lumino/signaling": "^1.3.3", | ||
"@lumino/virtualdom": "^1.3.0" | ||
}, | ||
@@ -68,5 +73,5 @@ "devDependencies": { | ||
"chai": "^3.5.0", | ||
"css-loader": "^0.26.1", | ||
"css-loader": "^3.4.0", | ||
"es6-promise": "^4.0.5", | ||
"karma": "^1.5.0", | ||
"karma": "^4.4.1", | ||
"karma-chrome-launcher": "^2.0.0", | ||
@@ -77,9 +82,10 @@ "karma-firefox-launcher": "^1.0.0", | ||
"karma-mocha-reporter": "^2.2.2", | ||
"mocha": "^3.2.0", | ||
"mocha": "^6.2.2", | ||
"rimraf": "^2.5.2", | ||
"simulate-event": "^1.4.0", | ||
"style-loader": "^0.13.1", | ||
"typedoc": "~0.12.0", | ||
"typescript": "~3.0.3", | ||
"webpack": "^2.2.1" | ||
"style-loader": "^1.0.2", | ||
"typedoc": "~0.15.0", | ||
"typescript": "~3.6.4", | ||
"webpack": "^4.41.3", | ||
"webpack-cli": "^3.3.10" | ||
}, | ||
@@ -89,3 +95,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "15fff95b04349ef7247e8e2e7a5f54c61171d613" | ||
"gitHead": "53ec13d322579e356862268970649f9c1213a7ac" | ||
} |
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
757725
21983
20
Updated@lumino/algorithm@^1.2.2
Updated@lumino/commands@^1.8.1
Updated@lumino/coreutils@^1.4.1
Updated@lumino/disposable@^1.3.3
Updated@lumino/domutils@^1.1.6
Updated@lumino/dragdrop@^1.4.3
Updated@lumino/keyboard@^1.1.5
Updated@lumino/messaging@^1.3.2
Updated@lumino/properties@^1.1.5
Updated@lumino/signaling@^1.3.3
Updated@lumino/virtualdom@^1.3.0