Icard/angular-clarity-master(work.../node_modules/primeng/fesm2022/primeng-toolbar.mjs

119 lines
6.4 KiB
JavaScript
Raw Permalink Normal View History

2024-07-16 15:23:22 +00:00
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i0 from '@angular/core';
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ContentChildren, NgModule } from '@angular/core';
import { PrimeTemplate } from 'primeng/api';
/**
* Toolbar is a grouping component for buttons and other content.
* @group Components
*/
class Toolbar {
el;
/**
* Inline style of the component.
* @group Props
*/
style;
/**
* Style class of the component.
* @group Props
*/
styleClass;
/**
* Defines a string value that labels an interactive element.
* @group Props
*/
ariaLabelledBy;
templates;
startTemplate;
endTemplate;
centerTemplate;
constructor(el) {
this.el = el;
}
getBlockableElement() {
return this.el.nativeElement.children[0];
}
ngAfterContentInit() {
this.templates.forEach((item) => {
switch (item.getType()) {
case 'start':
case 'left':
this.startTemplate = item.template;
break;
case 'end':
case 'right':
this.endTemplate = item.template;
break;
case 'center':
this.centerTemplate = item.template;
break;
}
});
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: Toolbar, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: Toolbar, selector: "p-toolbar", inputs: { style: "style", styleClass: "styleClass", ariaLabelledBy: "ariaLabelledBy" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: `
<div [ngClass]="'p-toolbar p-component'" [attr.aria-labelledby]="ariaLabelledBy" [ngStyle]="style" [class]="styleClass" role="toolbar" [attr.data-pc-name]="'toolbar'">
<ng-content></ng-content>
<div class="p-toolbar-group-left p-toolbar-group-start" *ngIf="startTemplate" [attr.data-pc-section]="'start'">
<ng-container *ngTemplateOutlet="startTemplate"></ng-container>
</div>
<div class="p-toolbar-group-center" *ngIf="centerTemplate" [attr.data-pc-section]="'center'">
<ng-container *ngTemplateOutlet="centerTemplate"></ng-container>
</div>
<div class="p-toolbar-group-right p-toolbar-group-end" *ngIf="endTemplate" [attr.data-pc-section]="'end'">
<ng-container *ngTemplateOutlet="endTemplate"></ng-container>
</div>
</div>
`, isInline: true, styles: ["@layer primeng{.p-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.p-toolbar-group-start,.p-toolbar-group-center,.p-toolbar-group-end,.p-toolbar-group-left,.p-toolbar-group-right{display:flex;align-items:center}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: Toolbar, decorators: [{
type: Component,
args: [{ selector: 'p-toolbar', template: `
<div [ngClass]="'p-toolbar p-component'" [attr.aria-labelledby]="ariaLabelledBy" [ngStyle]="style" [class]="styleClass" role="toolbar" [attr.data-pc-name]="'toolbar'">
<ng-content></ng-content>
<div class="p-toolbar-group-left p-toolbar-group-start" *ngIf="startTemplate" [attr.data-pc-section]="'start'">
<ng-container *ngTemplateOutlet="startTemplate"></ng-container>
</div>
<div class="p-toolbar-group-center" *ngIf="centerTemplate" [attr.data-pc-section]="'center'">
<ng-container *ngTemplateOutlet="centerTemplate"></ng-container>
</div>
<div class="p-toolbar-group-right p-toolbar-group-end" *ngIf="endTemplate" [attr.data-pc-section]="'end'">
<ng-container *ngTemplateOutlet="endTemplate"></ng-container>
</div>
</div>
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
class: 'p-element'
}, styles: ["@layer primeng{.p-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.p-toolbar-group-start,.p-toolbar-group-center,.p-toolbar-group-end,.p-toolbar-group-left,.p-toolbar-group-right{display:flex;align-items:center}}\n"] }]
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { style: [{
type: Input
}], styleClass: [{
type: Input
}], ariaLabelledBy: [{
type: Input
}], templates: [{
type: ContentChildren,
args: [PrimeTemplate]
}] } });
class ToolbarModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: ToolbarModule, declarations: [Toolbar], imports: [CommonModule], exports: [Toolbar] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ToolbarModule, imports: [CommonModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ToolbarModule, decorators: [{
type: NgModule,
args: [{
imports: [CommonModule],
exports: [Toolbar],
declarations: [Toolbar]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { Toolbar, ToolbarModule };
//# sourceMappingURL=primeng-toolbar.mjs.map