@jupyterlab/apputils
Advanced tools
Comparing version 2.0.0-rc.1 to 2.0.0-rc.2
@@ -140,3 +140,3 @@ // Copyright (c) Jupyter Development Team. | ||
label: this._widget.title.label, | ||
justify: 'right', | ||
elementPosition: 'right', | ||
height: '28px' | ||
@@ -143,0 +143,0 @@ }); |
@@ -123,2 +123,10 @@ import { Dialog } from './dialog'; | ||
function getText(options: ITextOptions): Promise<Dialog.IResult<string>>; | ||
/** | ||
* Create and show a input dialog for a password. | ||
* | ||
* @param options - The dialog setup options. | ||
* | ||
* @returns A promise that resolves with whether the dialog was accepted | ||
*/ | ||
function getPassword(options: ITextOptions): Promise<Dialog.IResult<string>>; | ||
} |
@@ -68,2 +68,16 @@ // Copyright (c) Jupyter Development Team. | ||
InputDialog.getText = getText; | ||
/** | ||
* Create and show a input dialog for a password. | ||
* | ||
* @param options - The dialog setup options. | ||
* | ||
* @returns A promise that resolves with whether the dialog was accepted | ||
*/ | ||
function getPassword(options) { | ||
return showDialog(Object.assign(Object.assign({}, options), { body: new InputPasswordDialog(options), buttons: [ | ||
Dialog.cancelButton({ label: options.cancelLabel }), | ||
Dialog.okButton({ label: options.okLabel }) | ||
], focusNodeSelector: 'input' })); | ||
} | ||
InputDialog.getPassword = getPassword; | ||
})(InputDialog || (InputDialog = {})); | ||
@@ -174,2 +188,30 @@ /** | ||
/** | ||
* Widget body for input password dialog | ||
*/ | ||
class InputPasswordDialog extends InputDialogBase { | ||
/** | ||
* InputPasswordDialog constructor | ||
* | ||
* @param options Constructor options | ||
*/ | ||
constructor(options) { | ||
super(options.label); | ||
this._input = document.createElement('input', {}); | ||
this._input.classList.add('jp-mod-styled'); | ||
this._input.type = 'password'; | ||
this._input.value = options.text ? options.text : ''; | ||
if (options.placeholder) { | ||
this._input.placeholder = options.placeholder; | ||
} | ||
// Initialize the node | ||
this.node.appendChild(this._input); | ||
} | ||
/** | ||
* Get the text specified by the user | ||
*/ | ||
getValue() { | ||
return this._input.value; | ||
} | ||
} | ||
/** | ||
* Widget body for input list dialog | ||
@@ -176,0 +218,0 @@ */ |
@@ -163,5 +163,5 @@ // Copyright (c) Jupyter Development Team. | ||
this.title.mnemonic = content.title.mnemonic; | ||
this.title.icon = content.title.icon; | ||
this.title.iconClass = content.title.iconClass; | ||
this.title.iconLabel = content.title.iconLabel; | ||
this.title.iconRenderer = content.title.iconRenderer; | ||
this.title.caption = content.title.caption; | ||
@@ -183,5 +183,5 @@ this.title.className = content.title.className; | ||
content.title.mnemonic = this.title.mnemonic; | ||
content.title.icon = this.title.icon; | ||
content.title.iconClass = this.title.iconClass; | ||
content.title.iconLabel = this.title.iconLabel; | ||
content.title.iconRenderer = this.title.iconRenderer; | ||
content.title.caption = this.title.caption; | ||
@@ -188,0 +188,0 @@ content.title.className = this.title.className; |
@@ -68,3 +68,3 @@ // Copyright (c) Jupyter Development Team. | ||
tag: 'span', | ||
kind: 'select', | ||
stylesheet: 'select', | ||
right: '8px', | ||
@@ -71,0 +71,0 @@ top: '5px', |
@@ -164,5 +164,5 @@ /// <reference types="react" /> | ||
label?: string; | ||
icon?: LabIcon.IMaybeResolvable; | ||
iconClass?: string; | ||
iconLabel?: string; | ||
icon?: LabIcon; | ||
tooltip?: string; | ||
@@ -169,0 +169,0 @@ onClick?: () => void; |
@@ -408,3 +408,3 @@ // Copyright (c) Jupyter Development Team. | ||
// add some extra classes for proper support of icons-as-css-backgorund | ||
classes(props.iconClass, 'jp-Icon', 'jp-Icon-16'), className: "jp-ToolbarButtonComponent-icon", tag: "span", justify: "center", kind: "toolbarButton" }), | ||
classes(props.iconClass, 'jp-Icon', 'jp-Icon-16'), className: "jp-ToolbarButtonComponent-icon", tag: "span", stylesheet: "toolbarButton" }), | ||
props.label && (React.createElement("span", { className: "jp-ToolbarButtonComponent-label" }, props.label)))); | ||
@@ -481,2 +481,6 @@ } | ||
const iconLabel = commands.iconLabel(id, args); | ||
// DEPRECATED: remove _icon when lumino 2.0 is adopted | ||
// if icon is aliasing iconClass, don't use it | ||
const _icon = commands.icon(id, args); | ||
const icon = _icon === iconClass ? undefined : _icon; | ||
const label = commands.label(id, args); | ||
@@ -496,3 +500,3 @@ let className = commands.className(id, args); | ||
const enabled = commands.isEnabled(id, args); | ||
return { className, iconClass, tooltip, onClick, enabled, label }; | ||
return { className, icon, iconClass, tooltip, onClick, enabled, label }; | ||
} | ||
@@ -569,4 +573,3 @@ Private.propsFromCommand = propsFromCommand; | ||
title: `Kernel ${Text.titleCase(status)}`, | ||
justify: 'center', | ||
kind: 'toolbarButton' | ||
stylesheet: 'toolbarButton' | ||
}); | ||
@@ -578,4 +581,3 @@ } | ||
title: `Kernel ${Text.titleCase(status)}`, | ||
justify: 'center', | ||
kind: 'toolbarButton' | ||
stylesheet: 'toolbarButton' | ||
}); | ||
@@ -582,0 +584,0 @@ } |
{ | ||
"name": "@jupyterlab/apputils", | ||
"version": "2.0.0-rc.1", | ||
"version": "2.0.0-rc.2", | ||
"description": "JupyterLab - Application Utilities", | ||
@@ -38,17 +38,17 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"dependencies": { | ||
"@jupyterlab/coreutils": "^4.0.0-rc.1", | ||
"@jupyterlab/services": "^5.0.0-rc.1", | ||
"@jupyterlab/settingregistry": "^2.0.0-rc.1", | ||
"@jupyterlab/statedb": "^2.0.0-rc.1", | ||
"@jupyterlab/ui-components": "^2.0.0-rc.2", | ||
"@jupyterlab/coreutils": "^4.0.0-rc.2", | ||
"@jupyterlab/services": "^5.0.0-rc.2", | ||
"@jupyterlab/settingregistry": "^2.0.0-rc.2", | ||
"@jupyterlab/statedb": "^2.0.0-rc.2", | ||
"@jupyterlab/ui-components": "^2.0.0-rc.3", | ||
"@lumino/algorithm": "^1.2.3", | ||
"@lumino/commands": "^1.9.2", | ||
"@lumino/commands": "^1.10.1", | ||
"@lumino/coreutils": "^1.4.2", | ||
"@lumino/disposable": "^1.3.4", | ||
"@lumino/disposable": "^1.3.5", | ||
"@lumino/domutils": "^1.1.7", | ||
"@lumino/messaging": "^1.3.3", | ||
"@lumino/properties": "^1.1.6", | ||
"@lumino/signaling": "^1.3.4", | ||
"@lumino/virtualdom": "^1.5.0", | ||
"@lumino/widgets": "^1.10.2", | ||
"@lumino/signaling": "^1.3.5", | ||
"@lumino/virtualdom": "^1.6.1", | ||
"@lumino/widgets": "^1.11.1", | ||
"@types/react": "~16.9.16", | ||
@@ -69,3 +69,3 @@ "react": "~16.9.0", | ||
}, | ||
"gitHead": "f63172ca32a55068f13518319ac0d871bfa582f3" | ||
"gitHead": "922e0a5e37db645c35e7cab267f888556ac56518" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
433051
8910
Updated@lumino/commands@^1.10.1
Updated@lumino/disposable@^1.3.5
Updated@lumino/signaling@^1.3.5
Updated@lumino/virtualdom@^1.6.1
Updated@lumino/widgets@^1.11.1