[59329aa] | 1 | import { NgModule, Component, Input, Output, EventEmitter, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren } from '@angular/core';
|
---|
| 2 | import { CommonModule } from '@angular/common';
|
---|
| 3 | import { SharedModule, Footer, PrimeTemplate } from 'primeng/api';
|
---|
| 4 | import { RippleModule } from 'primeng/ripple';
|
---|
| 5 | import { trigger, state, style, transition, animate } from '@angular/animations';
|
---|
| 6 | import * as i0 from "@angular/core";
|
---|
| 7 | import * as i1 from "@angular/common";
|
---|
| 8 | import * as i2 from "primeng/ripple";
|
---|
| 9 | let idx = 0;
|
---|
| 10 | export class Panel {
|
---|
| 11 | constructor(el) {
|
---|
| 12 | this.el = el;
|
---|
| 13 | this.collapsed = false;
|
---|
| 14 | this.expandIcon = 'pi pi-plus';
|
---|
| 15 | this.collapseIcon = 'pi pi-minus';
|
---|
| 16 | this.showHeader = true;
|
---|
| 17 | this.toggler = "icon";
|
---|
| 18 | this.collapsedChange = new EventEmitter();
|
---|
| 19 | this.onBeforeToggle = new EventEmitter();
|
---|
| 20 | this.onAfterToggle = new EventEmitter();
|
---|
| 21 | this.transitionOptions = '400ms cubic-bezier(0.86, 0, 0.07, 1)';
|
---|
| 22 | this.id = `p-panel-${idx++}`;
|
---|
| 23 | }
|
---|
| 24 | ngAfterContentInit() {
|
---|
| 25 | this.templates.forEach((item) => {
|
---|
| 26 | switch (item.getType()) {
|
---|
| 27 | case 'header':
|
---|
| 28 | this.headerTemplate = item.template;
|
---|
| 29 | break;
|
---|
| 30 | case 'content':
|
---|
| 31 | this.contentTemplate = item.template;
|
---|
| 32 | break;
|
---|
| 33 | case 'footer':
|
---|
| 34 | this.footerTemplate = item.template;
|
---|
| 35 | break;
|
---|
| 36 | case 'icons':
|
---|
| 37 | this.iconTemplate = item.template;
|
---|
| 38 | break;
|
---|
| 39 | default:
|
---|
| 40 | this.contentTemplate = item.template;
|
---|
| 41 | break;
|
---|
| 42 | }
|
---|
| 43 | });
|
---|
| 44 | }
|
---|
| 45 | onHeaderClick(event) {
|
---|
| 46 | if (this.toggler === 'header') {
|
---|
| 47 | this.toggle(event);
|
---|
| 48 | }
|
---|
| 49 | }
|
---|
| 50 | onIconClick(event) {
|
---|
| 51 | if (this.toggler === 'icon') {
|
---|
| 52 | this.toggle(event);
|
---|
| 53 | }
|
---|
| 54 | }
|
---|
| 55 | toggle(event) {
|
---|
| 56 | if (this.animating) {
|
---|
| 57 | return false;
|
---|
| 58 | }
|
---|
| 59 | this.animating = true;
|
---|
| 60 | this.onBeforeToggle.emit({ originalEvent: event, collapsed: this.collapsed });
|
---|
| 61 | if (this.toggleable) {
|
---|
| 62 | if (this.collapsed)
|
---|
| 63 | this.expand(event);
|
---|
| 64 | else
|
---|
| 65 | this.collapse(event);
|
---|
| 66 | }
|
---|
| 67 | event.preventDefault();
|
---|
| 68 | }
|
---|
| 69 | expand(event) {
|
---|
| 70 | this.collapsed = false;
|
---|
| 71 | this.collapsedChange.emit(this.collapsed);
|
---|
| 72 | }
|
---|
| 73 | collapse(event) {
|
---|
| 74 | this.collapsed = true;
|
---|
| 75 | this.collapsedChange.emit(this.collapsed);
|
---|
| 76 | }
|
---|
| 77 | getBlockableElement() {
|
---|
| 78 | return this.el.nativeElement.children[0];
|
---|
| 79 | }
|
---|
| 80 | onToggleDone(event) {
|
---|
| 81 | this.animating = false;
|
---|
| 82 | this.onAfterToggle.emit({ originalEvent: event, collapsed: this.collapsed });
|
---|
| 83 | }
|
---|
| 84 | }
|
---|
| 85 | Panel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Panel, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
---|
| 86 | Panel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Panel, selector: "p-panel", inputs: { toggleable: "toggleable", header: "header", collapsed: "collapsed", style: "style", styleClass: "styleClass", expandIcon: "expandIcon", collapseIcon: "collapseIcon", showHeader: "showHeader", toggler: "toggler", transitionOptions: "transitionOptions" }, outputs: { collapsedChange: "collapsedChange", onBeforeToggle: "onBeforeToggle", onAfterToggle: "onAfterToggle" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "footerFacet", first: true, predicate: Footer, descendants: true }, { propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: `
|
---|
| 87 | <div [attr.id]="id" [ngClass]="{'p-panel p-component': true, 'p-panel-toggleable': toggleable}" [ngStyle]="style" [class]="styleClass">
|
---|
| 88 | <div class="p-panel-header" *ngIf="showHeader" (click)="onHeaderClick($event)" [attr.id]="id + '-titlebar'">
|
---|
| 89 | <span class="p-panel-title" *ngIf="header" [attr.id]="id + '_header'">{{header}}</span>
|
---|
| 90 | <ng-content select="p-header"></ng-content>
|
---|
| 91 | <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
|
---|
| 92 | <div class="p-panel-icons">
|
---|
| 93 | <ng-template *ngTemplateOutlet="iconTemplate"></ng-template>
|
---|
| 94 | <button *ngIf="toggleable" type="button" [attr.id]="id + '-label'" class="p-panel-header-icon p-panel-toggler p-link" pRipple
|
---|
| 95 | (click)="onIconClick($event)" (keydown.enter)="onIconClick($event)" [attr.aria-controls]="id + '-content'" role="tab" [attr.aria-expanded]="!collapsed">
|
---|
| 96 | <span [class]="collapsed ? expandIcon : collapseIcon"></span>
|
---|
| 97 | </button>
|
---|
| 98 | </div>
|
---|
| 99 | </div>
|
---|
| 100 | <div [attr.id]="id + '-content'" class="p-toggleable-content" [@panelContent]="collapsed ? {value: 'hidden', params: {transitionParams: animating ? transitionOptions : '0ms', height: '0', opacity:'0'}} : {value: 'visible', params: {transitionParams: animating ? transitionOptions : '0ms', height: '*', opacity: '1'}}" (@panelContent.done)="onToggleDone($event)"
|
---|
| 101 | role="region" [attr.aria-hidden]="collapsed" [attr.aria-labelledby]="id + '-titlebar'">
|
---|
| 102 | <div class="p-panel-content">
|
---|
| 103 | <ng-content></ng-content>
|
---|
| 104 | <ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
|
---|
| 105 | </div>
|
---|
| 106 |
|
---|
| 107 | <div class="p-panel-footer" *ngIf="footerFacet || footerTemplate">
|
---|
| 108 | <ng-content select="p-footer"></ng-content>
|
---|
| 109 | <ng-container *ngTemplateOutlet="footerTemplate"></ng-container>
|
---|
| 110 | </div>
|
---|
| 111 | </div>
|
---|
| 112 | </div>
|
---|
| 113 | `, isInline: true, styles: [".p-panel-header{display:flex;justify-content:space-between;align-items:center}.p-panel-title{line-height:1}.p-panel-header-icon{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative}\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"] }, { type: i2.Ripple, selector: "[pRipple]" }], animations: [
|
---|
| 114 | trigger('panelContent', [
|
---|
| 115 | state('hidden', style({
|
---|
| 116 | height: '0',
|
---|
| 117 | overflow: 'hidden'
|
---|
| 118 | })),
|
---|
| 119 | state('void', style({
|
---|
| 120 | height: '{{height}}'
|
---|
| 121 | }), { params: { height: '0' } }),
|
---|
| 122 | state('visible', style({
|
---|
| 123 | height: '*'
|
---|
| 124 | })),
|
---|
| 125 | transition('visible <=> hidden', [style({ overflow: 'hidden' }), animate('{{transitionParams}}')]),
|
---|
| 126 | transition('void => hidden', animate('{{transitionParams}}')),
|
---|
| 127 | transition('void => visible', animate('{{transitionParams}}'))
|
---|
| 128 | ])
|
---|
| 129 | ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
| 130 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Panel, decorators: [{
|
---|
| 131 | type: Component,
|
---|
| 132 | args: [{ selector: 'p-panel', template: `
|
---|
| 133 | <div [attr.id]="id" [ngClass]="{'p-panel p-component': true, 'p-panel-toggleable': toggleable}" [ngStyle]="style" [class]="styleClass">
|
---|
| 134 | <div class="p-panel-header" *ngIf="showHeader" (click)="onHeaderClick($event)" [attr.id]="id + '-titlebar'">
|
---|
| 135 | <span class="p-panel-title" *ngIf="header" [attr.id]="id + '_header'">{{header}}</span>
|
---|
| 136 | <ng-content select="p-header"></ng-content>
|
---|
| 137 | <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
|
---|
| 138 | <div class="p-panel-icons">
|
---|
| 139 | <ng-template *ngTemplateOutlet="iconTemplate"></ng-template>
|
---|
| 140 | <button *ngIf="toggleable" type="button" [attr.id]="id + '-label'" class="p-panel-header-icon p-panel-toggler p-link" pRipple
|
---|
| 141 | (click)="onIconClick($event)" (keydown.enter)="onIconClick($event)" [attr.aria-controls]="id + '-content'" role="tab" [attr.aria-expanded]="!collapsed">
|
---|
| 142 | <span [class]="collapsed ? expandIcon : collapseIcon"></span>
|
---|
| 143 | </button>
|
---|
| 144 | </div>
|
---|
| 145 | </div>
|
---|
| 146 | <div [attr.id]="id + '-content'" class="p-toggleable-content" [@panelContent]="collapsed ? {value: 'hidden', params: {transitionParams: animating ? transitionOptions : '0ms', height: '0', opacity:'0'}} : {value: 'visible', params: {transitionParams: animating ? transitionOptions : '0ms', height: '*', opacity: '1'}}" (@panelContent.done)="onToggleDone($event)"
|
---|
| 147 | role="region" [attr.aria-hidden]="collapsed" [attr.aria-labelledby]="id + '-titlebar'">
|
---|
| 148 | <div class="p-panel-content">
|
---|
| 149 | <ng-content></ng-content>
|
---|
| 150 | <ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
|
---|
| 151 | </div>
|
---|
| 152 |
|
---|
| 153 | <div class="p-panel-footer" *ngIf="footerFacet || footerTemplate">
|
---|
| 154 | <ng-content select="p-footer"></ng-content>
|
---|
| 155 | <ng-container *ngTemplateOutlet="footerTemplate"></ng-container>
|
---|
| 156 | </div>
|
---|
| 157 | </div>
|
---|
| 158 | </div>
|
---|
| 159 | `, animations: [
|
---|
| 160 | trigger('panelContent', [
|
---|
| 161 | state('hidden', style({
|
---|
| 162 | height: '0',
|
---|
| 163 | overflow: 'hidden'
|
---|
| 164 | })),
|
---|
| 165 | state('void', style({
|
---|
| 166 | height: '{{height}}'
|
---|
| 167 | }), { params: { height: '0' } }),
|
---|
| 168 | state('visible', style({
|
---|
| 169 | height: '*'
|
---|
| 170 | })),
|
---|
| 171 | transition('visible <=> hidden', [style({ overflow: 'hidden' }), animate('{{transitionParams}}')]),
|
---|
| 172 | transition('void => hidden', animate('{{transitionParams}}')),
|
---|
| 173 | transition('void => visible', animate('{{transitionParams}}'))
|
---|
| 174 | ])
|
---|
| 175 | ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
---|
| 176 | 'class': 'p-element'
|
---|
| 177 | }, styles: [".p-panel-header{display:flex;justify-content:space-between;align-items:center}.p-panel-title{line-height:1}.p-panel-header-icon{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;text-decoration:none;overflow:hidden;position:relative}\n"] }]
|
---|
| 178 | }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { toggleable: [{
|
---|
| 179 | type: Input
|
---|
| 180 | }], header: [{
|
---|
| 181 | type: Input
|
---|
| 182 | }], collapsed: [{
|
---|
| 183 | type: Input
|
---|
| 184 | }], style: [{
|
---|
| 185 | type: Input
|
---|
| 186 | }], styleClass: [{
|
---|
| 187 | type: Input
|
---|
| 188 | }], expandIcon: [{
|
---|
| 189 | type: Input
|
---|
| 190 | }], collapseIcon: [{
|
---|
| 191 | type: Input
|
---|
| 192 | }], showHeader: [{
|
---|
| 193 | type: Input
|
---|
| 194 | }], toggler: [{
|
---|
| 195 | type: Input
|
---|
| 196 | }], collapsedChange: [{
|
---|
| 197 | type: Output
|
---|
| 198 | }], onBeforeToggle: [{
|
---|
| 199 | type: Output
|
---|
| 200 | }], onAfterToggle: [{
|
---|
| 201 | type: Output
|
---|
| 202 | }], transitionOptions: [{
|
---|
| 203 | type: Input
|
---|
| 204 | }], footerFacet: [{
|
---|
| 205 | type: ContentChild,
|
---|
| 206 | args: [Footer]
|
---|
| 207 | }], templates: [{
|
---|
| 208 | type: ContentChildren,
|
---|
| 209 | args: [PrimeTemplate]
|
---|
| 210 | }] } });
|
---|
| 211 | export class PanelModule {
|
---|
| 212 | }
|
---|
| 213 | PanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
| 214 | PanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PanelModule, declarations: [Panel], imports: [CommonModule, SharedModule, RippleModule], exports: [Panel, SharedModule] });
|
---|
| 215 | PanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PanelModule, imports: [[CommonModule, SharedModule, RippleModule], SharedModule] });
|
---|
| 216 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: PanelModule, decorators: [{
|
---|
| 217 | type: NgModule,
|
---|
| 218 | args: [{
|
---|
| 219 | imports: [CommonModule, SharedModule, RippleModule],
|
---|
| 220 | exports: [Panel, SharedModule],
|
---|
| 221 | declarations: [Panel]
|
---|
| 222 | }]
|
---|
| 223 | }] });
|
---|
| 224 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFuZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvcGFuZWwvcGFuZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEs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Db250ZW50XT1cImNvbGxhcHNlZCA/IHt2YWx1ZTogJ2hpZGRlbicsIHBhcmFtczoge3RyYW5zaXRpb25QYXJhbXM6IGFuaW1hdGluZyA/IHRyYW5zaXRpb25PcHRpb25zIDogJzBtcycsIGhlaWdodDogJzAnLCBvcGFjaXR5OicwJ319IDoge3ZhbHVlOiAndmlzaWJsZScsIHBhcmFtczoge3RyYW5zaXRpb25QYXJhbXM6IGFuaW1hdGluZyA/IHRyYW5zaXRpb25PcHRpb25zIDogJzBtcycsIGhlaWdodDogJyonLCBvcGFjaXR5OiAnMSd9fVwiIChAcGFuZWxDb250ZW50LmRvbmUpPVwib25Ub2dnbGVEb25lKCRldmVudClcIlxuICAgICAgICAgICAgICAgIHJvbGU9XCJyZWdpb25cIiBbYXR0ci5hcmlhLWhpZGRlbl09XCJjb2xsYXBzZWRcIiBbYXR0ci5hcmlhLWxhYmVsbGVkYnldPVwiaWQgICsgJy10aXRsZWJhcidcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicC1wYW5lbC1jb250ZW50XCI+XG4gICAgICAgICAgICAgICAgICAgIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cbiAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cImNvbnRlbnRUZW1wbGF0ZVwiPjwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInAtcGFuZWwtZm9vdGVyXCIgKm5nSWY9XCJmb290ZXJGYWNldCB8fCBmb290ZXJUZW1wbGF0ZVwiPlxuICAgICAgICAgICAgICAgICAgICA8bmctY29udGVudCBzZWxlY3Q9XCJwLWZvb3RlclwiPjwvbmctY29udGVudD5cbiAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cImZvb3RlclRlbXBsYXRlXCI+PC9uZy1jb250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ICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAnaWNvbnMnOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmljb25UZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRlbnRUZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIG9uSGVhZGVyQ2xpY2soZXZlbnQ6IEV2ZW50KSB7XG4gICAgICAgIGlmICh0aGlzLnRvZ2dsZXIgPT09ICdoZWFkZXInKSB7XG4gICAgICAgICAgICB0aGlzLnRvZ2dsZShldmVudCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbkljb25DbGljayhldmVudDogRXZlbnQpIHtcbiAgICAgICAgaWYgKHRoaXMudG9nZ2xlciA9PT0gJ2ljb24nKSB7XG4gICAgICAgICAgICB0aGlzLnRvZ2dsZShldmVudCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB0b2dnbGUoZXZlbnQ6IEV2ZW50KSB7XG4gICAgICAgIGlmICh0aGlzLmFuaW1hdGluZykge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5hbmltYXRpbmcgPSB0cnVlO1xuICAgICAgICB0aGlzLm9uQmVmb3JlVG9nZ2xlLmVtaXQoe29yaWdpbmFsRXZlbnQ6IGV2ZW50LCBjb2xsYXBzZWQ6IHRoaXMuY29sbGFwc2VkfSk7XG5cbiAgICAgICAgaWYgKHRoaXMudG9nZ2xlYWJsZSkge1xuICAgICAgICAgICAgaWYgKHRoaXMuY29sbGFwc2VkKVxuICAgICAgICAgICAgICAgIHRoaXMuZXhwYW5kKGV2ZW50KTt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