@covalent/core
Version:
Core Teradata UI Platform for layouts, icons, custom components and themes. This should be added as a dependency for any project that wants to use layouts, icons and themes for Angular Material.
88 lines (82 loc) • 9.75 kB
JavaScript
import * as i0 from '@angular/core';
import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i1$1 from '@angular/material/menu';
import { MatMenuModule } from '@angular/material/menu';
import * as i2 from '@angular/material/icon';
import { MatIconModule } from '@angular/material/icon';
import * as i3$1 from '@angular/material/button';
import { MatButtonModule } from '@angular/material/button';
import * as i3 from '@angular/material/list';
import { MatListModule } from '@angular/material/list';
import * as i4 from '@covalent/core/menu';
import { CovalentMenuModule } from '@covalent/core/menu';
class TdUserProfileMenuComponent {
email;
name;
_blockEvent(event) {
event.preventDefault();
event.stopPropagation();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TdUserProfileMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: TdUserProfileMenuComponent, selector: "td-user-profile-menu", inputs: { email: "email", name: "name" }, ngImport: i0, template: "<td-menu class=\"user-profile-menu\">\n <!--header-->\n <mat-list td-menu-header>\n <mat-list-item *ngIf=\"name || email\" (click)=\"_blockEvent($event)\">\n <mat-icon matListItemAvatar>person</mat-icon>\n <span matListItemLine *ngIf=\"name\" class=\"mat-body-1\">{{ name }}</span>\n <span matListItemLine *ngIf=\"email\">{{ email }}</span>\n </mat-list-item>\n <ng-content select=\"[td-user-info-list]\"></ng-content>\n </mat-list>\n <!--content-->\n <mat-action-list>\n <ng-content select=\"[td-user-action-list]\"></ng-content>\n </mat-action-list>\n</td-menu>\n", styles: [".user-profile-menu [td-menu-header]{text-align:left;padding-bottom:0}::ng-deep mat-list-item:not(:first-child) .mat-list-item-content .mat-icon[matListItemAvatar],::ng-deep [mat-list-item] .mat-list-item-content .mat-icon[matListItemAvatar]{background:none}.mat-action-list{padding-top:0}:host ::ng-deep .mat-action-list .mat-divider,:host ::ng-deep .mat-divider{margin:8px 0}:host ::ng-deep mat-divider:last-child{display:none}:host ::ng-deep mat-list .mat-list-item.mat-2-line .mat-list-item-content{height:inherit}:host ::ng-deep mat-list .mat-list-item .mat-list-item-content{padding:8px}td-menu{margin-bottom:0}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i3.MatActionList, selector: "mat-action-list", exportAs: ["matActionList"] }, { kind: "component", type: i3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i3.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i3.MatListItemLine, selector: "[matListItemLine]" }, { kind: "component", type: i4.TdMenuComponent, selector: "td-menu" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TdUserProfileMenuComponent, decorators: [{
type: Component,
args: [{ selector: 'td-user-profile-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<td-menu class=\"user-profile-menu\">\n <!--header-->\n <mat-list td-menu-header>\n <mat-list-item *ngIf=\"name || email\" (click)=\"_blockEvent($event)\">\n <mat-icon matListItemAvatar>person</mat-icon>\n <span matListItemLine *ngIf=\"name\" class=\"mat-body-1\">{{ name }}</span>\n <span matListItemLine *ngIf=\"email\">{{ email }}</span>\n </mat-list-item>\n <ng-content select=\"[td-user-info-list]\"></ng-content>\n </mat-list>\n <!--content-->\n <mat-action-list>\n <ng-content select=\"[td-user-action-list]\"></ng-content>\n </mat-action-list>\n</td-menu>\n", styles: [".user-profile-menu [td-menu-header]{text-align:left;padding-bottom:0}::ng-deep mat-list-item:not(:first-child) .mat-list-item-content .mat-icon[matListItemAvatar],::ng-deep [mat-list-item] .mat-list-item-content .mat-icon[matListItemAvatar]{background:none}.mat-action-list{padding-top:0}:host ::ng-deep .mat-action-list .mat-divider,:host ::ng-deep .mat-divider{margin:8px 0}:host ::ng-deep mat-divider:last-child{display:none}:host ::ng-deep mat-list .mat-list-item.mat-2-line .mat-list-item-content{height:inherit}:host ::ng-deep mat-list .mat-list-item .mat-list-item-content{padding:8px}td-menu{margin-bottom:0}\n"] }]
}], propDecorators: { email: [{
type: Input
}], name: [{
type: Input
}] } });
class TdUserProfileComponent {
name;
email;
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TdUserProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: TdUserProfileComponent, selector: "td-user-profile", inputs: { name: "name", email: "email" }, ngImport: i0, template: "<button mat-icon-button [matMenuTriggerFor]=\"accountMenu\">\n <mat-icon>person</mat-icon>\n</button>\n\n<mat-menu #accountMenu=\"matMenu\" [overlapTrigger]=\"false\">\n <td-user-profile-menu [name]=\"name\" [email]=\"email\">\n <ng-content select=\"[td-user-info-list]\" td-user-info-list></ng-content>\n <ng-content select=\"[td-user-action-list]\" td-user-action-list></ng-content>\n </td-user-profile-menu>\n</mat-menu>\n", dependencies: [{ kind: "component", type: i1$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i1$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: TdUserProfileMenuComponent, selector: "td-user-profile-menu", inputs: ["email", "name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TdUserProfileComponent, decorators: [{
type: Component,
args: [{ selector: 'td-user-profile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button mat-icon-button [matMenuTriggerFor]=\"accountMenu\">\n <mat-icon>person</mat-icon>\n</button>\n\n<mat-menu #accountMenu=\"matMenu\" [overlapTrigger]=\"false\">\n <td-user-profile-menu [name]=\"name\" [email]=\"email\">\n <ng-content select=\"[td-user-info-list]\" td-user-info-list></ng-content>\n <ng-content select=\"[td-user-action-list]\" td-user-action-list></ng-content>\n </td-user-profile-menu>\n</mat-menu>\n" }]
}], propDecorators: { name: [{
type: Input
}], email: [{
type: Input
}] } });
class CovalentUserProfileModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CovalentUserProfileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.2", ngImport: i0, type: CovalentUserProfileModule, declarations: [TdUserProfileComponent, TdUserProfileMenuComponent], imports: [CommonModule,
MatMenuModule,
MatIconModule,
MatButtonModule,
MatListModule,
CovalentMenuModule], exports: [TdUserProfileComponent, TdUserProfileMenuComponent] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CovalentUserProfileModule, imports: [CommonModule,
MatMenuModule,
MatIconModule,
MatButtonModule,
MatListModule,
CovalentMenuModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CovalentUserProfileModule, decorators: [{
type: NgModule,
args: [{
declarations: [TdUserProfileComponent, TdUserProfileMenuComponent],
imports: [
CommonModule,
MatMenuModule,
MatIconModule,
MatButtonModule,
MatListModule,
CovalentMenuModule,
],
providers: [],
exports: [TdUserProfileComponent, TdUserProfileMenuComponent],
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { CovalentUserProfileModule, TdUserProfileComponent, TdUserProfileMenuComponent };
//# sourceMappingURL=covalent-core-user-profile.mjs.map