primeng
Version:
PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB
896 lines (858 loc) • 31.6 kB
JavaScript
import { animation, style, animate, trigger, transition, useAnimation } from '@angular/animations';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i0 from '@angular/core';
import { Injectable, EventEmitter, inject, booleanAttribute, numberAttribute, ContentChildren, ContentChild, ViewChild, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
import { setAttribute, addClass, blockBodyScroll, unblockBodyScroll, appendChild } from '@primeuix/utils';
import { SharedModule, PrimeTemplate } from 'primeng/api';
import { BaseComponent } from 'primeng/basecomponent';
import { Button } from 'primeng/button';
import { TimesIcon } from 'primeng/icons';
import { ZIndexUtils } from 'primeng/utils';
import { BaseStyle } from 'primeng/base';
const theme = ({ dt }) => `
.p-drawer {
display: flex;
flex-direction: column;
pointer-events: auto;
transform: translate3d(0px, 0px, 0px);
position: fixed;
transition: transform 0.3s;
background: ${dt('drawer.background')};
color: ${dt('drawer.color')};
border: 1px solid ${dt('drawer.border.color')};
box-shadow: ${dt('drawer.shadow')};
}
.p-drawer-content {
overflow-y: auto;
flex-grow: 1;
padding: ${dt('drawer.content.padding')};
}
.p-drawer-header {
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
padding: ${dt('drawer.header.padding')};
}
.p-drawer-footer {
padding: ${dt('drawer.header.padding')};
}
.p-drawer-title {
font-weight: ${dt('drawer.title.font.weight')};
font-size: ${dt('drawer.title.font.size')};
}
.p-drawer-full .p-drawer {
transition: none;
transform: none;
width: 100vw !important;
height: 100vh !important;
max-height: 100%;
top: 0px !important;
left: 0px !important;
border-width: 1px;
}
.p-drawer-left .p-drawer {
align-self: start;
width: 20rem;
height: 100%;
border-right-width: 1px;
}
.p-drawer-right .p-drawer {
align-self: end;
width: 20rem;
height: 100%;
border-left-width: 1px;
}
.p-drawer-top .p-drawer {
height: 10rem;
width: 100%;
border-bottom-width: 1px;
}
.p-drawer-bottom .p-drawer {
height: 10rem;
width: 100%;
border-top-width: 1px;
}
.p-drawer-left .p-drawer-content,
.p-drawer-right .p-drawer-content,
.p-drawer-top .p-drawer-content,
.p-drawer-bottom .p-drawer-content {
width: 100%;
height: 100%;
}
.p-drawer-open {
display: flex;
}
.p-drawer-top {
justify-content: flex-start;
}
.p-drawer-bottom {
justify-content: flex-end;
}
.p-drawer {
position: fixed;
transition: transform 0.3s;
display: flex;
flex-direction: column;
}
.p-drawer-content {
position: relative;
overflow-y: auto;
flex-grow: 1;
}
.p-drawer-header {
display: flex;
align-items: center;
}
.p-drawer-footer {
margin-top: auto;
}
.p-drawer-icon {
display: flex;
align-items: center;
justify-content: center;
margin-left: auto;
}
.p-drawer-left {
top: 0;
left: 0;
width: 20rem;
height: 100%;
}
.p-drawer-right {
top: 0;
right: 0;
width: 20rem;
height: 100%;
}
.p-drawer-top {
top: 0;
left: 0;
width: 100%;
height: 10rem;
}
.p-drawer-bottom {
bottom: 0;
left: 0;
width: 100%;
height: 10rem;
}
.p-drawer-full {
width: 100%;
height: 100%;
top: 0;
left: 0;
-webkit-transition: none;
transition: none;
}
.p-drawer-mask {
background-color: rgba(0, 0, 0, 0.4);
transition-duration: 0.2s;
}
.p-overlay-mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.p-overlay-mask:dir(rtl) {
flex-direction: row-reverse;
}
.p-overlay-mask-enter {
animation: p-overlay-mask-enter-animation 150ms forwards;
}
.p-overlay-mask-leave {
animation: p-overlay-mask-leave-animation 150ms forwards;
}
@keyframes p-overlay-mask-enter-animation {
from {
background-color: transparent;
}
to {
background-color: rgba(0, 0, 0, 0.4);
}
}
@keyframes p-overlay-mask-leave-animation {
from {
background-color: rgba(0, 0, 0, 0.4);
}
to {
background-color: transparent;
}
}
`;
const inlineStyles = {
mask: ({ instance }) => ({
position: 'fixed',
height: '100%',
width: '100%',
left: 0,
top: 0,
display: 'flex',
flexDirection: 'column',
alignItems: instance.position === 'top' ? 'flex-start' : instance.position === 'bottom' ? 'flex-end' : 'center'
})
};
const classes = {
mask: ({ instance }) => ({
'p-drawer-mask': true,
'p-overlay-mask p-overlay-mask-enter': instance.modal,
'p-drawer-open': instance.containerVisible,
'p-drawer-full': instance.fullScreen,
[`p-drawer-${instance.position}`]: !!instance.position
}),
root: ({ instance }) => ({
'p-drawer p-component': true,
'p-drawer-full': instance.fullScreen
}),
header: 'p-drawer-header',
title: 'p-drawer-title',
pcCloseButton: 'p-drawer-close-button',
content: 'p-drawer-content',
footer: 'p-drawer-footer'
};
class DrawerStyle extends BaseStyle {
name = 'drawer';
theme = theme;
classes = classes;
inlineStyles = inlineStyles;
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DrawerStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DrawerStyle });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DrawerStyle, decorators: [{
type: Injectable
}] });
/**
*
* Drawer is a panel component displayed as an overlay at the edges of the screen.
*
* [Live Demo](https://www.primeng.org/drawer)
*
* @module drawerstyle
*
*/
var DrawerClasses;
(function (DrawerClasses) {
/**
* Class name of the mask element
*/
DrawerClasses["mask"] = "p-drawer-mask";
/**
* Class name of the root element
*/
DrawerClasses["root"] = "p-drawer";
/**
* Class name of the header element
*/
DrawerClasses["header"] = "p-drawer-header";
/**
* Class name of the title element
*/
DrawerClasses["title"] = "p-drawer-title";
/**
* Class name of the close button element
*/
DrawerClasses["pcCloseButton"] = "p-drawer-close-button";
/**
* Class name of the content element
*/
DrawerClasses["content"] = "p-drawer-content";
})(DrawerClasses || (DrawerClasses = {}));
const showAnimation = animation([style({ transform: '{{transform}}', opacity: 0 }), animate('{{transition}}')]);
const hideAnimation = animation([animate('{{transition}}', style({ transform: '{{transform}}', opacity: 0 }))]);
/**
* Sidebar is a panel component displayed as an overlay at the edges of the screen.
* @group Components
*/
class Drawer extends BaseComponent {
/**
* Target element to attach the dialog, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
* @group Props
*/
appendTo = 'body';
/**
* Whether to block scrolling of the document when drawer is active.
* @group Props
*/
blockScroll = false;
/**
* Inline style of the component.
* @group Props
*/
style;
/**
* Style class of the component.
* @group Props
*/
styleClass;
/**
* Aria label of the close icon.
* @group Props
*/
ariaCloseLabel;
/**
* Whether to automatically manage layering.
* @group Props
*/
autoZIndex = true;
/**
* Base zIndex value to use in layering.
* @group Props
*/
baseZIndex = 0;
/**
* Whether an overlay mask is displayed behind the drawer.
* @group Props
*/
modal = true;
/**
* Used to pass all properties of the ButtonProps to the Button component.
* @group Props
*/
closeButtonProps = { severity: 'secondary', text: true, rounded: true };
/**
* Whether to dismiss drawer on click of the mask.
* @group Props
*/
dismissible = true;
/**
* Whether to display the close icon.
* @group Props
* @deprecated use 'closable' instead.
*/
showCloseIcon = true;
/**
* Specifies if pressing escape key should hide the drawer.
* @group Props
*/
closeOnEscape = true;
/**
* Transition options of the animation.
* @group Props
*/
transitionOptions = '150ms cubic-bezier(0, 0, 0.2, 1)';
/**
* Specifies the visibility of the dialog.
* @group Props
*/
get visible() {
return this._visible;
}
set visible(val) {
this._visible = val;
}
/**
* Specifies the position of the drawer, valid values are "left", "right", "bottom" and "top".
* @group Props
*/
get position() {
return this._position;
}
set position(value) {
this._position = value;
if (value === 'full') {
this.transformOptions = 'none';
return;
}
switch (value) {
case 'left':
this.transformOptions = 'translate3d(-100%, 0px, 0px)';
break;
case 'right':
this.transformOptions = 'translate3d(100%, 0px, 0px)';
break;
case 'bottom':
this.transformOptions = 'translate3d(0px, 100%, 0px)';
break;
case 'top':
this.transformOptions = 'translate3d(0px, -100%, 0px)';
break;
}
}
/**
* Adds a close icon to the header to hide the dialog.
* @group Props
*/
get fullScreen() {
return this._fullScreen;
}
set fullScreen(value) {
this._fullScreen = value;
if (value)
this.transformOptions = 'none';
}
/**
* Title content of the dialog.
* @group Props
*/
header;
/**
* Style of the mask.
* @group Props
*/
maskStyle;
/**
* Whether to display close button.
* @group Props
* @defaultValue true
*/
closable = true;
/**
* Callback to invoke when dialog is shown.
* @group Emits
*/
onShow = new EventEmitter();
/**
* Callback to invoke when dialog is hidden.
* @group Emits
*/
onHide = new EventEmitter();
/**
* Callback to invoke when dialog visibility is changed.
* @param {boolean} value - Visible value.
* @group Emits
*/
visibleChange = new EventEmitter();
maskRef;
containerViewChild;
closeButtonViewChild;
initialized;
_visible;
_position = 'left';
_fullScreen = false;
container;
transformOptions = 'translate3d(-100%, 0px, 0px)';
mask;
maskClickListener;
documentEscapeListener;
animationEndListener;
_componentStyle = inject(DrawerStyle);
ngAfterViewInit() {
super.ngAfterViewInit();
this.initialized = true;
}
/**
* Content template for the content of the drawer.
* @group Templates
*/
headerTemplate;
/**
* Header template for the header of the drawer.
* @group Templates
*/
footerTemplate;
/**
* Content template for the footer of the drawer.
* @group Templates
*/
contentTemplate;
/**
* Close icon template for the close icon of the drawer.
* @group Templates
*/
closeIconTemplate;
/**
* Headless template for the headless drawer.
* @group Templates
*/
headlessTemplate;
_headerTemplate;
_footerTemplate;
_contentTemplate;
_closeIconTemplate;
_headlessTemplate;
templates;
ngAfterContentInit() {
this.templates?.forEach((item) => {
switch (item.getType()) {
case 'content':
this._contentTemplate = item.template;
break;
case 'header':
this._headerTemplate = item.template;
break;
case 'footer':
this._footerTemplate = item.template;
break;
case 'closeicon':
this._closeIconTemplate = item.template;
break;
case 'headless':
this._headlessTemplate = item.template;
break;
default:
this._contentTemplate = item.template;
break;
}
});
}
onKeyDown(event) {
if (event.code === 'Escape') {
this.hide(false);
}
}
show() {
this.container.setAttribute(this.attrSelector, '');
if (this.autoZIndex) {
ZIndexUtils.set('modal', this.container, this.baseZIndex || this.config.zIndex.modal);
}
if (this.modal) {
this.enableModality();
}
this.onShow.emit({});
this.visibleChange.emit(true);
}
hide(emit = true) {
if (emit) {
this.onHide.emit({});
}
if (this.modal) {
this.disableModality();
}
}
close(event) {
this.hide();
this.visibleChange.emit(false);
event.preventDefault();
}
enableModality() {
const activeDrawers = this.document.querySelectorAll('.p-drawer-active');
const activeDrawersLength = activeDrawers.length;
const zIndex = activeDrawersLength == 1 ? String(parseInt(this.container.style.zIndex) - 1) : String(parseInt(activeDrawers[activeDrawersLength - 1].style.zIndex) - 1);
if (!this.mask) {
this.mask = this.renderer.createElement('div');
this.renderer.setStyle(this.mask, 'zIndex', zIndex);
setAttribute(this.mask, 'style', this.maskStyle);
addClass(this.mask, 'p-overlay-mask p-drawer-mask p-overlay-mask-enter');
if (this.dismissible) {
this.maskClickListener = this.renderer.listen(this.mask, 'click', (event) => {
if (this.dismissible) {
this.close(event);
}
});
}
this.renderer.appendChild(this.document.body, this.mask);
if (this.blockScroll) {
blockBodyScroll();
}
}
}
disableModality() {
if (this.mask) {
addClass(this.mask, 'p-overlay-mask-leave');
this.animationEndListener = this.renderer.listen(this.mask, 'animationend', this.destroyModal.bind(this));
}
}
destroyModal() {
this.unbindMaskClickListener();
if (this.mask) {
this.renderer.removeChild(this.document.body, this.mask);
}
if (this.blockScroll) {
unblockBodyScroll();
}
this.unbindAnimationEndListener();
this.mask = null;
}
onAnimationStart(event) {
switch (event.toState) {
case 'visible':
this.container = event.element;
this.appendContainer();
this.show();
if (this.closeOnEscape) {
this.bindDocumentEscapeListener();
}
break;
}
}
onAnimationEnd(event) {
switch (event.toState) {
case 'void':
this.hide(false);
ZIndexUtils.clear(this.container);
this.unbindGlobalListeners();
break;
}
}
appendContainer() {
if (this.appendTo) {
if (this.appendTo === 'body')
this.renderer.appendChild(this.document.body, this.container);
else
appendChild(this.appendTo, this.container);
}
}
bindDocumentEscapeListener() {
const documentTarget = this.el ? this.el.nativeElement.ownerDocument : this.document;
this.documentEscapeListener = this.renderer.listen(documentTarget, 'keydown', (event) => {
if (event.which == 27) {
if (parseInt(this.container.style.zIndex) === ZIndexUtils.get(this.container)) {
this.close(event);
}
}
});
}
unbindDocumentEscapeListener() {
if (this.documentEscapeListener) {
this.documentEscapeListener();
this.documentEscapeListener = null;
}
}
unbindMaskClickListener() {
if (this.maskClickListener) {
this.maskClickListener();
this.maskClickListener = null;
}
}
unbindGlobalListeners() {
this.unbindMaskClickListener();
this.unbindDocumentEscapeListener();
}
unbindAnimationEndListener() {
if (this.animationEndListener && this.mask) {
this.animationEndListener();
this.animationEndListener = null;
}
}
ngOnDestroy() {
this.initialized = false;
if (this.visible && this.modal) {
this.destroyModal();
}
if (this.appendTo && this.container) {
this.renderer.appendChild(this.el.nativeElement, this.container);
}
if (this.container && this.autoZIndex) {
ZIndexUtils.clear(this.container);
}
this.container = null;
this.unbindGlobalListeners();
this.unbindAnimationEndListener();
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: Drawer, deps: null, target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: Drawer, isStandalone: true, selector: "p-drawer", inputs: { appendTo: "appendTo", blockScroll: ["blockScroll", "blockScroll", booleanAttribute], style: "style", styleClass: "styleClass", ariaCloseLabel: "ariaCloseLabel", autoZIndex: ["autoZIndex", "autoZIndex", booleanAttribute], baseZIndex: ["baseZIndex", "baseZIndex", numberAttribute], modal: ["modal", "modal", booleanAttribute], closeButtonProps: "closeButtonProps", dismissible: ["dismissible", "dismissible", booleanAttribute], showCloseIcon: ["showCloseIcon", "showCloseIcon", booleanAttribute], closeOnEscape: ["closeOnEscape", "closeOnEscape", booleanAttribute], transitionOptions: "transitionOptions", visible: "visible", position: "position", fullScreen: "fullScreen", header: "header", maskStyle: "maskStyle", closable: ["closable", "closable", booleanAttribute] }, outputs: { onShow: "onShow", onHide: "onHide", visibleChange: "visibleChange" }, providers: [DrawerStyle], queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"] }, { propertyName: "footerTemplate", first: true, predicate: ["footer"] }, { propertyName: "contentTemplate", first: true, predicate: ["content"] }, { propertyName: "closeIconTemplate", first: true, predicate: ["closeicon"] }, { propertyName: "headlessTemplate", first: true, predicate: ["headless"] }, { propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "maskRef", first: true, predicate: ["maskRef"], descendants: true }, { propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }, { propertyName: "closeButtonViewChild", first: true, predicate: ["closeButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
<div
#container
[ngClass]="{
'p-drawer': true,
'p-drawer-active': visible,
'p-drawer-left': position === 'left' && !fullScreen,
'p-drawer-right': position === 'right' && !fullScreen,
'p-drawer-top': position === 'top' && !fullScreen,
'p-drawer-bottom': position === 'bottom' && !fullScreen,
'p-drawer-full': fullScreen || position === 'full'
}"
*ngIf="visible"
[@panelState]="{ value: 'visible', params: { transform: transformOptions, transition: transitionOptions } }"
(@panelState.start)="onAnimationStart($event)"
(@panelState.done)="onAnimationEnd($event)"
[style]="style"
[class]="styleClass"
role="complementary"
[attr.data-pc-name]="'sidebar'"
[attr.data-pc-section]="'root'"
(keydown)="onKeyDown($event)"
>
@if (headlessTemplate || _headlessTemplate) {
<ng-container *ngTemplateOutlet="headlessTemplate || _headlessTemplate"></ng-container>
} @else {
<div [ngClass]="cx('header')" [attr.data-pc-section]="'header'">
<ng-container *ngTemplateOutlet="headerTemplate || _headerTemplate"></ng-container>
<div *ngIf="header" [class]="cx('title')">{{ header }}</div>
<p-button
*ngIf="showCloseIcon && closable"
[ngClass]="cx('closeButton')"
(onClick)="close($event)"
(keydown.enter)="close($event)"
[buttonProps]="closeButtonProps"
[ariaLabel]="ariaCloseLabel"
[attr.data-pc-section]="'closebutton'"
[attr.data-pc-group-section]="'iconcontainer'"
>
<ng-template #icon>
<TimesIcon *ngIf="!closeIconTemplate && !_closeIconTemplate" [attr.data-pc-section]="'closeicon'" />
<ng-template *ngTemplateOutlet="closeIconTemplate || _closeIconTemplate"></ng-template>
</ng-template>
</p-button>
</div>
<div [ngClass]="cx('content')" [attr.data-pc-section]="'content'">
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="contentTemplate || _contentTemplate"></ng-container>
</div>
<ng-container *ngIf="footerTemplate || _footerTemplate">
<div [ngClass]="cx('footer')" [attr.data-pc-section]="'footer'">
<ng-container *ngTemplateOutlet="footerTemplate || _footerTemplate"></ng-container>
</div>
</ng-container>
}
</div>
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }, { kind: "ngmodule", type: SharedModule }], animations: [trigger('panelState', [transition('void => visible', [useAnimation(showAnimation)]), transition('visible => void', [useAnimation(hideAnimation)])])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: Drawer, decorators: [{
type: Component,
args: [{
selector: 'p-drawer',
standalone: true,
imports: [CommonModule, Button, TimesIcon, SharedModule],
template: `
<div
#container
[ngClass]="{
'p-drawer': true,
'p-drawer-active': visible,
'p-drawer-left': position === 'left' && !fullScreen,
'p-drawer-right': position === 'right' && !fullScreen,
'p-drawer-top': position === 'top' && !fullScreen,
'p-drawer-bottom': position === 'bottom' && !fullScreen,
'p-drawer-full': fullScreen || position === 'full'
}"
*ngIf="visible"
[@panelState]="{ value: 'visible', params: { transform: transformOptions, transition: transitionOptions } }"
(@panelState.start)="onAnimationStart($event)"
(@panelState.done)="onAnimationEnd($event)"
[style]="style"
[class]="styleClass"
role="complementary"
[attr.data-pc-name]="'sidebar'"
[attr.data-pc-section]="'root'"
(keydown)="onKeyDown($event)"
>
@if (headlessTemplate || _headlessTemplate) {
<ng-container *ngTemplateOutlet="headlessTemplate || _headlessTemplate"></ng-container>
} @else {
<div [ngClass]="cx('header')" [attr.data-pc-section]="'header'">
<ng-container *ngTemplateOutlet="headerTemplate || _headerTemplate"></ng-container>
<div *ngIf="header" [class]="cx('title')">{{ header }}</div>
<p-button
*ngIf="showCloseIcon && closable"
[ngClass]="cx('closeButton')"
(onClick)="close($event)"
(keydown.enter)="close($event)"
[buttonProps]="closeButtonProps"
[ariaLabel]="ariaCloseLabel"
[attr.data-pc-section]="'closebutton'"
[attr.data-pc-group-section]="'iconcontainer'"
>
<ng-template #icon>
<TimesIcon *ngIf="!closeIconTemplate && !_closeIconTemplate" [attr.data-pc-section]="'closeicon'" />
<ng-template *ngTemplateOutlet="closeIconTemplate || _closeIconTemplate"></ng-template>
</ng-template>
</p-button>
</div>
<div [ngClass]="cx('content')" [attr.data-pc-section]="'content'">
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="contentTemplate || _contentTemplate"></ng-container>
</div>
<ng-container *ngIf="footerTemplate || _footerTemplate">
<div [ngClass]="cx('footer')" [attr.data-pc-section]="'footer'">
<ng-container *ngTemplateOutlet="footerTemplate || _footerTemplate"></ng-container>
</div>
</ng-container>
}
</div>
`,
animations: [trigger('panelState', [transition('void => visible', [useAnimation(showAnimation)]), transition('visible => void', [useAnimation(hideAnimation)])])],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
providers: [DrawerStyle]
}]
}], propDecorators: { appendTo: [{
type: Input
}], blockScroll: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], style: [{
type: Input
}], styleClass: [{
type: Input
}], ariaCloseLabel: [{
type: Input
}], autoZIndex: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], baseZIndex: [{
type: Input,
args: [{ transform: numberAttribute }]
}], modal: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], closeButtonProps: [{
type: Input
}], dismissible: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], showCloseIcon: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], closeOnEscape: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], transitionOptions: [{
type: Input
}], visible: [{
type: Input
}], position: [{
type: Input
}], fullScreen: [{
type: Input
}], header: [{
type: Input
}], maskStyle: [{
type: Input
}], closable: [{
type: Input,
args: [{ transform: booleanAttribute }]
}], onShow: [{
type: Output
}], onHide: [{
type: Output
}], visibleChange: [{
type: Output
}], maskRef: [{
type: ViewChild,
args: ['maskRef']
}], containerViewChild: [{
type: ViewChild,
args: ['container']
}], closeButtonViewChild: [{
type: ViewChild,
args: ['closeButton']
}], headerTemplate: [{
type: ContentChild,
args: ['header', { descendants: false }]
}], footerTemplate: [{
type: ContentChild,
args: ['footer', { descendants: false }]
}], contentTemplate: [{
type: ContentChild,
args: ['content', { descendants: false }]
}], closeIconTemplate: [{
type: ContentChild,
args: ['closeicon', { descendants: false }]
}], headlessTemplate: [{
type: ContentChild,
args: ['headless', { descendants: false }]
}], templates: [{
type: ContentChildren,
args: [PrimeTemplate]
}] } });
class DrawerModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: DrawerModule, imports: [Drawer, SharedModule], exports: [Drawer, SharedModule] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DrawerModule, imports: [Drawer, SharedModule, SharedModule] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DrawerModule, decorators: [{
type: NgModule,
args: [{
imports: [Drawer, SharedModule],
exports: [Drawer, SharedModule]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { Drawer, DrawerClasses, DrawerModule, DrawerStyle };
//# sourceMappingURL=primeng-drawer.mjs.map