1 | {"version":3,"file":"covalent-core-dynamic-menu.mjs","sources":["../../../../libs/angular/dynamic-menu/src/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.ts","../../../../libs/angular/dynamic-menu/src/dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component.html","../../../../libs/angular/dynamic-menu/src/dynamic-menu-item/dynamic-menu-item.component.ts","../../../../libs/angular/dynamic-menu/src/dynamic-menu-item/dynamic-menu-item.component.html","../../../../libs/angular/dynamic-menu/src/dynamic-menu.component.ts","../../../../libs/angular/dynamic-menu/src/dynamic-menu.component.html","../../../../libs/angular/dynamic-menu/src/dynamic-menu.module.ts","../../../../libs/angular/dynamic-menu/src/covalent-core-dynamic-menu.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport {\n IMenuItem,\n ITdDynamicMenuLinkClickEvent,\n} from '../../dynamic-menu.menu';\n\n@Component({\n selector: 'td-dynamic-menu-link',\n templateUrl: './dynamic-menu-link.component.html',\n styleUrls: ['./dynamic-menu-link.component.scss'],\n})\nexport class TdDynamicMenuLinkComponent {\n @Input() item!: IMenuItem;\n\n @Output() itemClicked: EventEmitter<ITdDynamicMenuLinkClickEvent> =\n new EventEmitter<ITdDynamicMenuLinkClickEvent>();\n\n emitClicked(): void {\n this.itemClicked.emit({ text: this.item.text, action: this.item.action });\n }\n}\n","<a\n *ngIf=\"item.link\"\n class=\"new-tab\"\n mat-menu-item\n [id]=\"item.id\"\n [href]=\"item.link\"\n [target]=\"item.newTab ? '_blank' : '_self'\"\n (click)=\"emitClicked()\"\n>\n <mat-icon\n *ngIf=\"item.svgIcon\"\n [class]=\"item.iconClasses\"\n [svgIcon]=\"item.svgIcon\"\n ></mat-icon>\n <mat-icon *ngIf=\"item.icon\" [class]=\"item.iconClasses\">{{\n item.icon\n }}</mat-icon>\n <span>{{ item.text }}</span>\n <mat-icon *ngIf=\"item.newTab\" class=\"new-tab-icon\">launch</mat-icon>\n</a>\n<button\n *ngIf=\"item.action\"\n mat-menu-item\n [id]=\"item.id\"\n (click)=\"emitClicked()\"\n>\n <mat-icon\n *ngIf=\"item.svgIcon\"\n [class]=\"item.iconClasses\"\n [svgIcon]=\"item.svgIcon\"\n ></mat-icon>\n <mat-icon *ngIf=\"item.icon\" [class]=\"item.iconClasses\">{{\n item.icon\n }}</mat-icon>\n <span>{{ item.text }}</span>\n</button>\n","import {\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { MatMenu } from '@angular/material/menu';\nimport { IMenuItem, ITdDynamicMenuLinkClickEvent } from '../dynamic-menu.menu';\n\n@Component({\n selector: 'td-dynamic-menu-item',\n templateUrl: './dynamic-menu-item.component.html',\n styleUrls: ['./dynamic-menu-item.component.scss'],\n})\nexport class TdDynamicMenuItemComponent {\n @Input() items!: IMenuItem[];\n\n @Output() itemClicked: EventEmitter<ITdDynamicMenuLinkClickEvent> =\n new EventEmitter<ITdDynamicMenuLinkClickEvent>();\n\n @ViewChild('childMenu', { static: true }) public childMenu!: MatMenu;\n\n emitClicked(event: ITdDynamicMenuLinkClickEvent): void {\n this.itemClicked.emit(event);\n }\n}\n","<mat-menu #childMenu=\"matMenu\" [overlapTrigger]=\"false\">\n <ng-template let-item let-index=\"index\" ngFor [ngForOf]=\"items\">\n <ng-container *ngIf=\"item.children && item.children.length > 0\">\n <button mat-menu-item [id]=\"item.id\" [matMenuTriggerFor]=\"menu.childMenu\">\n <mat-icon\n *ngIf=\"item.svgIcon\"\n [class]=\"item.iconClasses\"\n [svgIcon]=\"item.svgIcon\"\n ></mat-icon>\n <mat-icon *ngIf=\"item.icon\" [class]=\"item.iconClasses\">{{\n item.icon\n }}</mat-icon>\n <span *ngIf=\"item.text\">\n {{ item.text }}\n </span>\n </button>\n <td-dynamic-menu-item\n #menu\n [items]=\"item.children\"\n ></td-dynamic-menu-item>\n </ng-container>\n <ng-container *ngIf=\"!item.children || item.children.length === 0\">\n <ng-container *ngIf=\"!item.link && !item.action\">\n <mat-divider class=\"group-divider\" *ngIf=\"index > 0\"></mat-divider>\n <div class=\"group-label tc-td-secondary text-sm\">{{ item.text }}</div>\n </ng-container>\n <ng-container *ngIf=\"item.link || item.action\">\n <div mat-menu-item class=\"pad-none\">\n <td-dynamic-menu-link\n [item]=\"item\"\n (itemClicked)=\"emitClicked($event)\"\n ></td-dynamic-menu-link>\n </div>\n </ng-container>\n </ng-container>\n </ng-template>\n</mat-menu>\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport {\n IMenuItem,\n IMenuTrigger,\n ITdDynamicMenuLinkClickEvent,\n} from './dynamic-menu.menu';\n\n@Component({\n selector: 'td-dynamic-menu',\n styleUrls: ['dynamic-menu.component.scss'],\n templateUrl: './dynamic-menu.component.html',\n})\nexport class TdDynamicMenuComponent {\n @Input() trigger!: IMenuTrigger;\n @Input() items!: IMenuItem[];\n\n @Output() itemClicked: EventEmitter<ITdDynamicMenuLinkClickEvent> =\n new EventEmitter<ITdDynamicMenuLinkClickEvent>();\n\n emitClicked(event: ITdDynamicMenuLinkClickEvent): void {\n this.itemClicked.emit(event);\n }\n}\n","<button\n *ngIf=\"!trigger.text\"\n mat-icon-button\n id=\"{{ trigger.id }}\"\n [matMenuTriggerFor]=\"menu.childMenu\"\n>\n <mat-icon\n *ngIf=\"trigger.svgIcon\"\n [class]=\"trigger.iconClasses\"\n [svgIcon]=\"trigger.svgIcon\"\n ></mat-icon>\n <mat-icon *ngIf=\"trigger.icon\" [class]=\"trigger.iconClasses\">{{\n trigger.icon\n }}</mat-icon>\n</button>\n<button\n *ngIf=\"trigger.text\"\n mat-button\n id=\"{{ trigger.id }}\"\n [matMenuTriggerFor]=\"menu.childMenu\"\n>\n <mat-icon\n *ngIf=\"trigger.svgIcon\"\n [class]=\"trigger.iconClasses\"\n [svgIcon]=\"trigger.svgIcon\"\n ></mat-icon>\n <mat-icon *ngIf=\"trigger.icon\" [class]=\"trigger.iconClasses\">{{\n trigger.icon\n }}</mat-icon>\n <span *ngIf=\"trigger.text\">\n {{ trigger.text }}\n </span>\n</button>\n\n<td-dynamic-menu-item\n #menu\n [items]=\"items\"\n (itemClicked)=\"emitClicked($event)\"\n></td-dynamic-menu-item>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { TdDynamicMenuComponent } from './dynamic-menu.component';\nimport { TdDynamicMenuItemComponent } from './dynamic-menu-item/dynamic-menu-item.component';\nimport { TdDynamicMenuLinkComponent } from './dynamic-menu-item/dynamic-menu-link/dynamic-menu-link.component';\n\n@NgModule({\n declarations: [\n TdDynamicMenuComponent,\n TdDynamicMenuItemComponent,\n TdDynamicMenuLinkComponent,\n ],\n imports: [\n CommonModule,\n MatButtonModule,\n MatIconModule,\n MatListModule,\n MatMenuModule,\n MatTooltipModule,\n ],\n providers: [],\n exports: [\n TdDynamicMenuComponent,\n TdDynamicMenuItemComponent,\n TdDynamicMenuLinkComponent,\n ],\n})\nexport class CovalentDynamicMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i3","i5.TdDynamicMenuLinkComponent","i2","i5.TdDynamicMenuItemComponent"],"mappings":";;;;;;;;;;;;;;MAWa,0BAA0B,CAAA;AAC5B,IAAA,IAAI,CAAa;AAEhB,IAAA,WAAW,GACnB,IAAI,YAAY,EAAgC,CAAC;IAEnD,WAAW,GAAA;QACT,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;KAC3E;uGARU,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CA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