1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
|
{"version":3,"file":"primeng-fieldset.mjs","sources":["../../src/app/components/fieldset/fieldset.ts","../../src/app/components/fieldset/primeng-fieldset.ts"],"sourcesContent":["import { animate, state, style, transition, trigger } from '@angular/animations';\nimport { CommonModule } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ContentChildren, ElementRef, EventEmitter, Input, NgModule, Output, QueryList, TemplateRef, ViewEncapsulation, booleanAttribute } from '@angular/core';\nimport { BlockableUI, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { MinusIcon } from 'primeng/icons/minus';\nimport { PlusIcon } from 'primeng/icons/plus';\nimport { RippleModule } from 'primeng/ripple';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { UniqueComponentId } from 'primeng/utils';\nimport { FieldsetAfterToggleEvent, FieldsetBeforeToggleEvent } from './fieldset.interface';\n\n/**\n * Fieldset is a grouping component with the optional content toggle feature.\n * @group Components\n */\n@Component({\n selector: 'p-fieldset',\n template: `\n <fieldset\n [attr.id]=\"id\"\n [ngClass]=\"{ 'p-fieldset p-component': true, 'p-fieldset-toggleable': toggleable, 'p-fieldset-expanded': !collapsed && toggleable }\"\n [ngStyle]=\"style\"\n [class]=\"styleClass\"\n [attr.data-pc-name]=\"'fieldset'\"\n [attr.data-pc-section]=\"'root'\"\n >\n <legend class=\"p-fieldset-legend\" [attr.data-pc-section]=\"'legend'\">\n <ng-container *ngIf=\"toggleable; else legendContent\">\n <a [attr.id]=\"id + '_header'\" pRipple tabindex=\"0\" role=\"button\" [attr.aria-controls]=\"id + '_content'\" [attr.aria-expanded]=\"!collapsed\" [attr.aria-label]=\"buttonAriaLabel\" (click)=\"toggle($event)\" (keydown)=\"onKeyDown($event)\">\n <ng-container *ngIf=\"collapsed\">\n <PlusIcon *ngIf=\"!expandIconTemplate\" [styleClass]=\"'p-fieldset-toggler'\" [attr.data-pc-section]=\"'togglericon'\" />\n <span *ngIf=\"expandIconTemplate\" class=\"p-fieldset-toggler\" [attr.data-pc-section]=\"'togglericon'\">\n <ng-container *ngTemplateOutlet=\"expandIconTemplate\"></ng-container>\n </span>\n </ng-container>\n <ng-container *ngIf=\"!collapsed\">\n <MinusIcon *ngIf=\"!collapseIconTemplate\" [styleClass]=\"'p-fieldset-toggler'\" [attr.aria-hidden]=\"true\" [attr.data-pc-section]=\"'togglericon'\" />\n <span *ngIf=\"collapseIconTemplate\" class=\"p-fieldset-toggler\" [attr.data-pc-section]=\"'togglericon'\">\n <ng-container *ngTemplateOutlet=\"collapseIconTemplate\"></ng-container>\n </span>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"legendContent\"></ng-container>\n </a>\n </ng-container>\n <ng-template #legendContent>\n <span class=\"p-fieldset-legend-text\" [attr.data-pc-section]=\"'legendtitle'\">{{ legend }}</span>\n <ng-content select=\"p-header\"></ng-content>\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </ng-template>\n </legend>\n <div\n [attr.id]=\"id + '_content'\"\n role=\"region\"\n class=\"p-toggleable-content\"\n [@fieldsetContent]=\"collapsed ? { value: 'hidden', params: { transitionParams: transitionOptions, height: '0' } } : { value: 'visible', params: { transitionParams: animating ? transitionOptions : '0ms', height: '*' } }\"\n [attr.aria-labelledby]=\"id + '_header'\"\n [attr.aria-hidden]=\"collapsed\"\n [attr.data-pc-section]=\"'toggleablecontent'\"\n
|