@microsoft/mgt
Version:
The Microsoft Graph Toolkit
93 lines (92 loc) • 3 kB
TypeScript
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { User } from '@microsoft/microsoft-graph-types';
import '../../styles/fabric-icon-font';
import { MgtBaseComponent } from '../baseComponent';
import '../mgt-person/mgt-person';
/**
* Web component button and flyout control to facilitate Microsoft identity platform authentication
*
* @export
* @class MgtLogin
* @extends {MgtBaseComponent}
*/
export declare class MgtLogin extends MgtBaseComponent {
/**
* Array of styles to apply to the element. The styles should be defined
* using the `css` tag function.
*/
static get styles(): import("lit-element").CSSResult[];
/**
* allows developer to use specific user details for login
* @type {MgtPersonDetails}
*/
userDetails: User;
private _loginButtonRect;
private _popupRect;
private _openLeft;
private _image;
/**
* determines if login menu popup should be showing
* @type {boolean}
*/
private _showMenu;
/**
* determines if login component is in loading state
* @type {boolean}
*/
private _loading;
constructor();
/**
* Invoked each time the custom element is appended into a document-connected element
*
* @memberof MgtLogin
*/
connectedCallback(): void;
/**
* Invoked each time the custom element is disconnected from the document's DOM
*
* @memberof MgtLogin
*/
disconnectedCallback(): void;
/**
* Initiate login
*
* @returns {Promise<void>}
* @memberof MgtLogin
*/
login(): Promise<void>;
/**
*
* Initiate logout
* @returns {Promise<void>}
* @memberof MgtLogin
*/
logout(): Promise<void>;
/**
* Invoked whenever the element is updated. Implement to perform
* post-updating tasks via DOM APIs, for example, focusing an element.
*
* Setting properties inside this method will trigger the element to update
* again after this update cycle completes.
*
* * @param _changedProperties Map of changed properties with old values
*/
protected updated(changedProps: any): void;
/**
* Invoked on each update to perform rendering tasks. This method must return
* a lit-html TemplateResult. Setting properties inside this method will *not*
* trigger the element to update.
*/
protected render(): import("lit-element").TemplateResult;
private handleWindowClick;
private renderLogIn;
private renderLoggedIn;
private renderMenu;
private loadState;
private onClick;
}