[59329aa] | 1 | import { NgModule, Component, Input, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren } from '@angular/core';
|
---|
| 2 | import { CommonModule } from '@angular/common';
|
---|
| 3 | import { PrimeTemplate } from 'primeng/api';
|
---|
| 4 | import * as i0 from "@angular/core";
|
---|
| 5 | import * as i1 from "@angular/common";
|
---|
| 6 | export class Toolbar {
|
---|
| 7 | constructor(el) {
|
---|
| 8 | this.el = el;
|
---|
| 9 | }
|
---|
| 10 | getBlockableElement() {
|
---|
| 11 | return this.el.nativeElement.children[0];
|
---|
| 12 | }
|
---|
| 13 | ngAfterContentInit() {
|
---|
| 14 | this.templates.forEach((item) => {
|
---|
| 15 | switch (item.getType()) {
|
---|
| 16 | case 'left':
|
---|
| 17 | this.leftTemplate = item.template;
|
---|
| 18 | break;
|
---|
| 19 | case 'right':
|
---|
| 20 | this.rightTemplate = item.template;
|
---|
| 21 | break;
|
---|
| 22 | }
|
---|
| 23 | });
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
| 26 | Toolbar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Toolbar, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
---|
| 27 | Toolbar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Toolbar, selector: "p-toolbar", inputs: { style: "style", styleClass: "styleClass" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: `
|
---|
| 28 | <div [ngClass]="'p-toolbar p-component'" [ngStyle]="style" [class]="styleClass" role="toolbar">
|
---|
| 29 | <ng-content></ng-content>
|
---|
| 30 | <div class="p-toolbar-group-left" *ngIf="leftTemplate">
|
---|
| 31 | <ng-container *ngTemplateOutlet="leftTemplate"></ng-container>
|
---|
| 32 | </div>
|
---|
| 33 | <div class="p-toolbar-group-right" *ngIf="rightTemplate">
|
---|
| 34 | <ng-container *ngTemplateOutlet="rightTemplate"></ng-container>
|
---|
| 35 | </div>
|
---|
| 36 | </div>
|
---|
| 37 | `, isInline: true, styles: [".p-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.p-toolbar-group-left,.p-toolbar-group-right{display:flex;align-items:center}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
| 38 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Toolbar, decorators: [{
|
---|
| 39 | type: Component,
|
---|
| 40 | args: [{ selector: 'p-toolbar', template: `
|
---|
| 41 | <div [ngClass]="'p-toolbar p-component'" [ngStyle]="style" [class]="styleClass" role="toolbar">
|
---|
| 42 | <ng-content></ng-content>
|
---|
| 43 | <div class="p-toolbar-group-left" *ngIf="leftTemplate">
|
---|
| 44 | <ng-container *ngTemplateOutlet="leftTemplate"></ng-container>
|
---|
| 45 | </div>
|
---|
| 46 | <div class="p-toolbar-group-right" *ngIf="rightTemplate">
|
---|
| 47 | <ng-container *ngTemplateOutlet="rightTemplate"></ng-container>
|
---|
| 48 | </div>
|
---|
| 49 | </div>
|
---|
| 50 | `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
---|
| 51 | 'class': 'p-element'
|
---|
| 52 | }, styles: [".p-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.p-toolbar-group-left,.p-toolbar-group-right{display:flex;align-items:center}\n"] }]
|
---|
| 53 | }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { style: [{
|
---|
| 54 | type: Input
|
---|
| 55 | }], styleClass: [{
|
---|
| 56 | type: Input
|
---|
| 57 | }], templates: [{
|
---|
| 58 | type: ContentChildren,
|
---|
| 59 | args: [PrimeTemplate]
|
---|
| 60 | }] } });
|
---|
| 61 | export class ToolbarModule {
|
---|
| 62 | }
|
---|
| 63 | ToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
| 64 | ToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ToolbarModule, declarations: [Toolbar], imports: [CommonModule], exports: [Toolbar] });
|
---|
| 65 | ToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ToolbarModule, imports: [[CommonModule]] });
|
---|
| 66 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ToolbarModule, decorators: [{
|
---|
| 67 | type: NgModule,
|
---|
| 68 | args: [{
|
---|
| 69 | imports: [CommonModule],
|
---|
| 70 | exports: [Toolbar],
|
---|
| 71 | declarations: [Toolbar]
|
---|
| 72 | }]
|
---|
| 73 | }] });
|
---|
| 74 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9vbGJhci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy90b29sYmFyL3Rvb2xiYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFFBQVEsRUFBQyxTQUFTLEVBQUMsS0FBSyxFQUFZLHVCQUF1QixFQUFFLGlCQUFpQixFQUFvQixlQUFlLEVBQXlCLE1BQU0sZUFBZSxDQUFDO0FBQ3hL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