674 lines
72 KiB
JavaScript
674 lines
72 KiB
JavaScript
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
import { ChangeDetectionStrategy, Component, ContentChildren, Directive, EventEmitter, Inject, Input, NgModule, Output, ViewEncapsulation, booleanAttribute, numberAttribute } from '@angular/core';
|
|
import { PrimeTemplate, SharedModule } from 'primeng/api';
|
|
import { DomHandler } from 'primeng/dom';
|
|
import { SpinnerIcon } from 'primeng/icons/spinner';
|
|
import { RippleModule } from 'primeng/ripple';
|
|
import { ObjectUtils } from 'primeng/utils';
|
|
import { AutoFocusModule } from 'primeng/autofocus';
|
|
import * as i0 from "@angular/core";
|
|
import * as i1 from "@angular/common";
|
|
import * as i2 from "primeng/ripple";
|
|
import * as i3 from "primeng/autofocus";
|
|
const INTERNAL_BUTTON_CLASSES = {
|
|
button: 'p-button',
|
|
component: 'p-component',
|
|
iconOnly: 'p-button-icon-only',
|
|
disabled: 'p-disabled',
|
|
loading: 'p-button-loading',
|
|
labelOnly: 'p-button-loading-label-only'
|
|
};
|
|
/**
|
|
* Button directive is an extension to button component.
|
|
* @group Components
|
|
*/
|
|
export class ButtonDirective {
|
|
el;
|
|
document;
|
|
/**
|
|
* Position of the icon.
|
|
* @group Props
|
|
*/
|
|
iconPos = 'left';
|
|
/**
|
|
* Uses to pass attributes to the loading icon's DOM element.
|
|
* @group Props
|
|
*/
|
|
loadingIcon;
|
|
/**
|
|
* Text of the button.
|
|
* @group Props
|
|
*/
|
|
get label() {
|
|
return this._label;
|
|
}
|
|
set label(val) {
|
|
this._label = val;
|
|
if (this.initialized) {
|
|
this.updateLabel();
|
|
this.updateIcon();
|
|
this.setStyleClass();
|
|
}
|
|
}
|
|
/**
|
|
* Name of the icon.
|
|
* @group Props
|
|
*/
|
|
get icon() {
|
|
return this._icon;
|
|
}
|
|
set icon(val) {
|
|
this._icon = val;
|
|
if (this.initialized) {
|
|
this.updateIcon();
|
|
this.setStyleClass();
|
|
}
|
|
}
|
|
/**
|
|
* Whether the button is in loading state.
|
|
* @group Props
|
|
*/
|
|
get loading() {
|
|
return this._loading;
|
|
}
|
|
set loading(val) {
|
|
this._loading = val;
|
|
if (this.initialized) {
|
|
this.updateIcon();
|
|
this.setStyleClass();
|
|
}
|
|
}
|
|
/**
|
|
* Defines the style of the button.
|
|
* @group Props
|
|
*/
|
|
severity;
|
|
/**
|
|
* Add a shadow to indicate elevation.
|
|
* @group Props
|
|
*/
|
|
raised = false;
|
|
/**
|
|
* Add a circular border radius to the button.
|
|
* @group Props
|
|
*/
|
|
rounded = false;
|
|
/**
|
|
* Add a textual class to the button without a background initially.
|
|
* @group Props
|
|
*/
|
|
text = false;
|
|
/**
|
|
* Add a border class without a background initially.
|
|
* @group Props
|
|
*/
|
|
outlined = false;
|
|
/**
|
|
* Defines the size of the button.
|
|
* @group Props
|
|
*/
|
|
size = null;
|
|
/**
|
|
* Add a plain textual class to the button without a background initially.
|
|
* @group Props
|
|
*/
|
|
plain = false;
|
|
_label;
|
|
_icon;
|
|
_loading = false;
|
|
initialized;
|
|
get htmlElement() {
|
|
return this.el.nativeElement;
|
|
}
|
|
_internalClasses = Object.values(INTERNAL_BUTTON_CLASSES);
|
|
spinnerIcon = `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" class="p-icon-spin">
|
|
<g clip-path="url(#clip0_417_21408)">
|
|
<path
|
|
d="M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z"
|
|
fill="currentColor"
|
|
/>
|
|
</g>
|
|
<defs>
|
|
<clipPath id="clip0_417_21408">
|
|
<rect width="14" height="14" fill="white" />
|
|
</clipPath>
|
|
</defs>
|
|
</svg>`;
|
|
constructor(el, document) {
|
|
this.el = el;
|
|
this.document = document;
|
|
}
|
|
ngAfterViewInit() {
|
|
DomHandler.addMultipleClasses(this.htmlElement, this.getStyleClass().join(' '));
|
|
this.createIcon();
|
|
this.createLabel();
|
|
this.initialized = true;
|
|
}
|
|
getStyleClass() {
|
|
const styleClass = [INTERNAL_BUTTON_CLASSES.button, INTERNAL_BUTTON_CLASSES.component];
|
|
if (this.icon && !this.label && ObjectUtils.isEmpty(this.htmlElement.textContent)) {
|
|
styleClass.push(INTERNAL_BUTTON_CLASSES.iconOnly);
|
|
}
|
|
if (this.loading) {
|
|
styleClass.push(INTERNAL_BUTTON_CLASSES.disabled, INTERNAL_BUTTON_CLASSES.loading);
|
|
if (!this.icon && this.label) {
|
|
styleClass.push(INTERNAL_BUTTON_CLASSES.labelOnly);
|
|
}
|
|
if (this.icon && !this.label && !ObjectUtils.isEmpty(this.htmlElement.textContent)) {
|
|
styleClass.push(INTERNAL_BUTTON_CLASSES.iconOnly);
|
|
}
|
|
}
|
|
if (this.text) {
|
|
styleClass.push('p-button-text');
|
|
}
|
|
if (this.severity) {
|
|
styleClass.push(`p-button-${this.severity}`);
|
|
}
|
|
if (this.plain) {
|
|
styleClass.push('p-button-plain');
|
|
}
|
|
if (this.raised) {
|
|
styleClass.push('p-button-raised');
|
|
}
|
|
if (this.size) {
|
|
styleClass.push(`p-button-${this.size}`);
|
|
}
|
|
if (this.outlined) {
|
|
styleClass.push('p-button-outlined');
|
|
}
|
|
if (this.rounded) {
|
|
styleClass.push('p-button-rounded');
|
|
}
|
|
if (this.size === 'small') {
|
|
styleClass.push('p-button-sm');
|
|
}
|
|
if (this.size === 'large') {
|
|
styleClass.push('p-button-lg');
|
|
}
|
|
return styleClass;
|
|
}
|
|
setStyleClass() {
|
|
const styleClass = this.getStyleClass();
|
|
this.htmlElement.classList.remove(...this._internalClasses);
|
|
this.htmlElement.classList.add(...styleClass);
|
|
}
|
|
createLabel() {
|
|
const created = DomHandler.findSingle(this.htmlElement, '.p-button-label');
|
|
if (!created && this.label) {
|
|
let labelElement = this.document.createElement('span');
|
|
if (this.icon && !this.label) {
|
|
labelElement.setAttribute('aria-hidden', 'true');
|
|
}
|
|
labelElement.className = 'p-button-label';
|
|
labelElement.appendChild(this.document.createTextNode(this.label));
|
|
this.htmlElement.appendChild(labelElement);
|
|
}
|
|
}
|
|
createIcon() {
|
|
const created = DomHandler.findSingle(this.htmlElement, '.p-button-icon');
|
|
if (!created && (this.icon || this.loading)) {
|
|
let iconElement = this.document.createElement('span');
|
|
iconElement.className = 'p-button-icon';
|
|
iconElement.setAttribute('aria-hidden', 'true');
|
|
let iconPosClass = this.label ? 'p-button-icon-' + this.iconPos : null;
|
|
if (iconPosClass) {
|
|
DomHandler.addClass(iconElement, iconPosClass);
|
|
}
|
|
let iconClass = this.getIconClass();
|
|
if (iconClass) {
|
|
DomHandler.addMultipleClasses(iconElement, iconClass);
|
|
}
|
|
if (!this.loadingIcon && this.loading) {
|
|
iconElement.innerHTML = this.spinnerIcon;
|
|
}
|
|
this.htmlElement.insertBefore(iconElement, this.htmlElement.firstChild);
|
|
}
|
|
}
|
|
updateLabel() {
|
|
let labelElement = DomHandler.findSingle(this.htmlElement, '.p-button-label');
|
|
if (!this.label) {
|
|
labelElement && this.htmlElement.removeChild(labelElement);
|
|
return;
|
|
}
|
|
labelElement ? (labelElement.textContent = this.label) : this.createLabel();
|
|
}
|
|
updateIcon() {
|
|
let iconElement = DomHandler.findSingle(this.htmlElement, '.p-button-icon');
|
|
let labelElement = DomHandler.findSingle(this.htmlElement, '.p-button-label');
|
|
if (this.loading && !this.loadingIcon && iconElement) {
|
|
iconElement.innerHTML = this.spinnerIcon;
|
|
}
|
|
else if (iconElement?.innerHTML) {
|
|
iconElement.innerHTML = '';
|
|
}
|
|
if (iconElement) {
|
|
if (this.iconPos) {
|
|
iconElement.className = 'p-button-icon ' + (labelElement ? 'p-button-icon-' + this.iconPos : '') + ' ' + this.getIconClass();
|
|
}
|
|
else {
|
|
iconElement.className = 'p-button-icon ' + this.getIconClass();
|
|
}
|
|
}
|
|
else {
|
|
this.createIcon();
|
|
}
|
|
}
|
|
getIconClass() {
|
|
return this.loading ? 'p-button-loading-icon ' + (this.loadingIcon ? this.loadingIcon : 'p-icon') : this.icon || 'p-hidden';
|
|
}
|
|
ngOnDestroy() {
|
|
this.initialized = false;
|
|
}
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ButtonDirective, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.7", type: ButtonDirective, selector: "[pButton]", inputs: { iconPos: "iconPos", loadingIcon: "loadingIcon", label: "label", icon: "icon", loading: "loading", severity: "severity", raised: ["raised", "raised", booleanAttribute], rounded: ["rounded", "rounded", booleanAttribute], text: ["text", "text", booleanAttribute], outlined: ["outlined", "outlined", booleanAttribute], size: "size", plain: ["plain", "plain", booleanAttribute] }, host: { classAttribute: "p-element" }, ngImport: i0 });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ButtonDirective, decorators: [{
|
|
type: Directive,
|
|
args: [{
|
|
selector: '[pButton]',
|
|
host: {
|
|
class: 'p-element'
|
|
}
|
|
}]
|
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: Document, decorators: [{
|
|
type: Inject,
|
|
args: [DOCUMENT]
|
|
}] }], propDecorators: { iconPos: [{
|
|
type: Input
|
|
}], loadingIcon: [{
|
|
type: Input
|
|
}], label: [{
|
|
type: Input
|
|
}], icon: [{
|
|
type: Input
|
|
}], loading: [{
|
|
type: Input
|
|
}], severity: [{
|
|
type: Input
|
|
}], raised: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], rounded: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], text: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], outlined: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], size: [{
|
|
type: Input
|
|
}], plain: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}] } });
|
|
/**
|
|
* Button is an extension to standard button element with icons and theming.
|
|
* @group Components
|
|
*/
|
|
export class Button {
|
|
el;
|
|
/**
|
|
* Type of the button.
|
|
* @group Props
|
|
*/
|
|
type = 'button';
|
|
/**
|
|
* Position of the icon.
|
|
* @group Props
|
|
*/
|
|
iconPos = 'left';
|
|
/**
|
|
* Name of the icon.
|
|
* @group Props
|
|
*/
|
|
icon;
|
|
/**
|
|
* Value of the badge.
|
|
* @group Props
|
|
*/
|
|
badge;
|
|
/**
|
|
* Uses to pass attributes to the label's DOM element.
|
|
* @group Props
|
|
*/
|
|
label;
|
|
/**
|
|
* When present, it specifies that the component should be disabled.
|
|
* @group Props
|
|
*/
|
|
disabled;
|
|
/**
|
|
* Whether the button is in loading state.
|
|
* @group Props
|
|
*/
|
|
loading = false;
|
|
/**
|
|
* Icon to display in loading state.
|
|
* @group Props
|
|
*/
|
|
loadingIcon;
|
|
/**
|
|
* Add a shadow to indicate elevation.
|
|
* @group Props
|
|
*/
|
|
raised = false;
|
|
/**
|
|
* Add a circular border radius to the button.
|
|
* @group Props
|
|
*/
|
|
rounded = false;
|
|
/**
|
|
* Add a textual class to the button without a background initially.
|
|
* @group Props
|
|
*/
|
|
text = false;
|
|
/**
|
|
* Add a plain textual class to the button without a background initially.
|
|
* @group Props
|
|
*/
|
|
plain = false;
|
|
/**
|
|
* Defines the style of the button.
|
|
* @group Props
|
|
*/
|
|
severity;
|
|
/**
|
|
* Add a border class without a background initially.
|
|
* @group Props
|
|
*/
|
|
outlined = false;
|
|
/**
|
|
* Add a link style to the button.
|
|
* @group Props
|
|
*/
|
|
link = false;
|
|
/**
|
|
* Add a tabindex to the button.
|
|
* @group Props
|
|
*/
|
|
tabindex;
|
|
/**
|
|
* Defines the size of the button.
|
|
* @group Props
|
|
*/
|
|
size;
|
|
/**
|
|
* Inline style of the element.
|
|
* @group Props
|
|
*/
|
|
style;
|
|
/**
|
|
* Class of the element.
|
|
* @group Props
|
|
*/
|
|
styleClass;
|
|
/**
|
|
* Style class of the badge.
|
|
* @group Props
|
|
*/
|
|
badgeClass;
|
|
/**
|
|
* Used to define a string that autocomplete attribute the current element.
|
|
* @group Props
|
|
*/
|
|
ariaLabel;
|
|
/**
|
|
* When present, it specifies that the component should automatically get focus on load.
|
|
* @group Props
|
|
*/
|
|
autofocus;
|
|
/**
|
|
* Callback to execute when button is clicked.
|
|
* This event is intended to be used with the <p-button> component. Using a regular <button> element, use (click).
|
|
* @param {MouseEvent} event - Mouse event.
|
|
* @group Emits
|
|
*/
|
|
onClick = new EventEmitter();
|
|
/**
|
|
* Callback to execute when button is focused.
|
|
* This event is intended to be used with the <p-button> component. Using a regular <button> element, use (focus).
|
|
* @param {FocusEvent} event - Focus event.
|
|
* @group Emits
|
|
*/
|
|
onFocus = new EventEmitter();
|
|
/**
|
|
* Callback to execute when button loses focus.
|
|
* This event is intended to be used with the <p-button> component. Using a regular <button> element, use (blur).
|
|
* @param {FocusEvent} event - Focus event.
|
|
* @group Emits
|
|
*/
|
|
onBlur = new EventEmitter();
|
|
contentTemplate;
|
|
loadingIconTemplate;
|
|
iconTemplate;
|
|
templates;
|
|
constructor(el) {
|
|
this.el = el;
|
|
}
|
|
spinnerIconClass() {
|
|
return Object.entries(this.iconClass())
|
|
.filter(([, value]) => !!value)
|
|
.reduce((acc, [key]) => acc + ` ${key}`, 'p-button-loading-icon');
|
|
}
|
|
iconClass() {
|
|
return {
|
|
'p-button-icon': true,
|
|
'p-button-icon-left': this.iconPos === 'left' && this.label,
|
|
'p-button-icon-right': this.iconPos === 'right' && this.label,
|
|
'p-button-icon-top': this.iconPos === 'top' && this.label,
|
|
'p-button-icon-bottom': this.iconPos === 'bottom' && this.label
|
|
};
|
|
}
|
|
get buttonClass() {
|
|
return {
|
|
'p-button p-component': true,
|
|
'p-button-icon-only': (this.icon || this.iconTemplate || this.loadingIcon || this.loadingIconTemplate) && !this.label,
|
|
'p-button-vertical': (this.iconPos === 'top' || this.iconPos === 'bottom') && this.label,
|
|
'p-disabled': this.disabled || this.loading,
|
|
'p-button-loading': this.loading,
|
|
'p-button-loading-label-only': this.loading && !this.icon && this.label && !this.loadingIcon && this.iconPos === 'left',
|
|
'p-button-link': this.link,
|
|
[`p-button-${this.severity}`]: this.severity,
|
|
'p-button-raised': this.raised,
|
|
'p-button-rounded': this.rounded,
|
|
'p-button-text': this.text,
|
|
'p-button-outlined': this.outlined,
|
|
'p-button-sm': this.size === 'small',
|
|
'p-button-lg': this.size === 'large',
|
|
'p-button-plain': this.plain,
|
|
[`${this.styleClass}`]: this.styleClass
|
|
};
|
|
}
|
|
ngAfterContentInit() {
|
|
this.templates?.forEach((item) => {
|
|
switch (item.getType()) {
|
|
case 'content':
|
|
this.contentTemplate = item.template;
|
|
break;
|
|
case 'icon':
|
|
this.iconTemplate = item.template;
|
|
break;
|
|
case 'loadingicon':
|
|
this.loadingIconTemplate = item.template;
|
|
break;
|
|
default:
|
|
this.contentTemplate = item.template;
|
|
break;
|
|
}
|
|
});
|
|
}
|
|
badgeStyleClass() {
|
|
return {
|
|
'p-badge p-component': true,
|
|
'p-badge-no-gutter': this.badge && String(this.badge).length === 1
|
|
};
|
|
}
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: Button, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: Button, selector: "p-button", inputs: { type: "type", iconPos: "iconPos", icon: "icon", badge: "badge", label: "label", disabled: ["disabled", "disabled", booleanAttribute], loading: ["loading", "loading", booleanAttribute], loadingIcon: "loadingIcon", raised: ["raised", "raised", booleanAttribute], rounded: ["rounded", "rounded", booleanAttribute], text: ["text", "text", booleanAttribute], plain: ["plain", "plain", booleanAttribute], severity: "severity", outlined: ["outlined", "outlined", booleanAttribute], link: ["link", "link", booleanAttribute], tabindex: ["tabindex", "tabindex", numberAttribute], size: "size", style: "style", styleClass: "styleClass", badgeClass: "badgeClass", ariaLabel: "ariaLabel", autofocus: ["autofocus", "autofocus", booleanAttribute] }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur" }, host: { properties: { "class.p-disabled": "disabled" }, classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: `
|
|
<button
|
|
[attr.type]="type"
|
|
[attr.aria-label]="ariaLabel"
|
|
[ngStyle]="style"
|
|
[disabled]="disabled || loading"
|
|
[ngClass]="buttonClass"
|
|
(click)="onClick.emit($event)"
|
|
(focus)="onFocus.emit($event)"
|
|
(blur)="onBlur.emit($event)"
|
|
pRipple
|
|
[attr.data-pc-name]="'button'"
|
|
[attr.data-pc-section]="'root'"
|
|
[attr.tabindex]="tabindex"
|
|
pAutoFocus
|
|
[autofocus]="autofocus"
|
|
>
|
|
<ng-content></ng-content>
|
|
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
|
|
<ng-container *ngIf="loading">
|
|
<ng-container *ngIf="!loadingIconTemplate">
|
|
<span *ngIf="loadingIcon" [class]="'p-button-loading-icon pi-spin ' + loadingIcon" [ngClass]="iconClass()" [attr.aria-hidden]="true" [attr.data-pc-section]="'loadingicon'"></span>
|
|
<SpinnerIcon *ngIf="!loadingIcon" [styleClass]="spinnerIconClass()" [spin]="true" [attr.aria-hidden]="true" [attr.data-pc-section]="'loadingicon'" />
|
|
</ng-container>
|
|
<span *ngIf="loadingIconTemplate" class="p-button-loading-icon" [ngClass]="iconClass()" [attr.aria-hidden]="true" [attr.data-pc-section]="'loadingicon'">
|
|
<ng-template *ngTemplateOutlet="loadingIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
<ng-container *ngIf="!loading">
|
|
<span *ngIf="icon && !iconTemplate" [class]="icon" [ngClass]="iconClass()" [attr.data-pc-section]="'icon'"></span>
|
|
<span *ngIf="!icon && iconTemplate" [ngClass]="iconClass()" [attr.data-pc-section]="'icon'">
|
|
<ng-template [ngIf]="!icon" *ngTemplateOutlet="iconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
<span class="p-button-label" [attr.aria-hidden]="icon && !label" *ngIf="!contentTemplate && label" [attr.data-pc-section]="'label'">{{ label }}</span>
|
|
<span [ngClass]="badgeStyleClass()" [class]="badgeClass" *ngIf="!contentTemplate && badge" [attr.data-pc-section]="'badge'">{{ badge }}</span>
|
|
</button>
|
|
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i0.forwardRef(() => i2.Ripple), selector: "[pRipple]" }, { kind: "directive", type: i0.forwardRef(() => i3.AutoFocus), selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "component", type: i0.forwardRef(() => SpinnerIcon), selector: "SpinnerIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: Button, decorators: [{
|
|
type: Component,
|
|
args: [{
|
|
selector: 'p-button',
|
|
template: `
|
|
<button
|
|
[attr.type]="type"
|
|
[attr.aria-label]="ariaLabel"
|
|
[ngStyle]="style"
|
|
[disabled]="disabled || loading"
|
|
[ngClass]="buttonClass"
|
|
(click)="onClick.emit($event)"
|
|
(focus)="onFocus.emit($event)"
|
|
(blur)="onBlur.emit($event)"
|
|
pRipple
|
|
[attr.data-pc-name]="'button'"
|
|
[attr.data-pc-section]="'root'"
|
|
[attr.tabindex]="tabindex"
|
|
pAutoFocus
|
|
[autofocus]="autofocus"
|
|
>
|
|
<ng-content></ng-content>
|
|
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
|
|
<ng-container *ngIf="loading">
|
|
<ng-container *ngIf="!loadingIconTemplate">
|
|
<span *ngIf="loadingIcon" [class]="'p-button-loading-icon pi-spin ' + loadingIcon" [ngClass]="iconClass()" [attr.aria-hidden]="true" [attr.data-pc-section]="'loadingicon'"></span>
|
|
<SpinnerIcon *ngIf="!loadingIcon" [styleClass]="spinnerIconClass()" [spin]="true" [attr.aria-hidden]="true" [attr.data-pc-section]="'loadingicon'" />
|
|
</ng-container>
|
|
<span *ngIf="loadingIconTemplate" class="p-button-loading-icon" [ngClass]="iconClass()" [attr.aria-hidden]="true" [attr.data-pc-section]="'loadingicon'">
|
|
<ng-template *ngTemplateOutlet="loadingIconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
<ng-container *ngIf="!loading">
|
|
<span *ngIf="icon && !iconTemplate" [class]="icon" [ngClass]="iconClass()" [attr.data-pc-section]="'icon'"></span>
|
|
<span *ngIf="!icon && iconTemplate" [ngClass]="iconClass()" [attr.data-pc-section]="'icon'">
|
|
<ng-template [ngIf]="!icon" *ngTemplateOutlet="iconTemplate"></ng-template>
|
|
</span>
|
|
</ng-container>
|
|
<span class="p-button-label" [attr.aria-hidden]="icon && !label" *ngIf="!contentTemplate && label" [attr.data-pc-section]="'label'">{{ label }}</span>
|
|
<span [ngClass]="badgeStyleClass()" [class]="badgeClass" *ngIf="!contentTemplate && badge" [attr.data-pc-section]="'badge'">{{ badge }}</span>
|
|
</button>
|
|
`,
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
encapsulation: ViewEncapsulation.None,
|
|
host: {
|
|
class: 'p-element',
|
|
'[class.p-disabled]': 'disabled' || 'loading'
|
|
}
|
|
}]
|
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { type: [{
|
|
type: Input
|
|
}], iconPos: [{
|
|
type: Input
|
|
}], icon: [{
|
|
type: Input
|
|
}], badge: [{
|
|
type: Input
|
|
}], label: [{
|
|
type: Input
|
|
}], disabled: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], loading: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], loadingIcon: [{
|
|
type: Input
|
|
}], raised: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], rounded: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], text: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], plain: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], severity: [{
|
|
type: Input
|
|
}], outlined: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], link: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], tabindex: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], size: [{
|
|
type: Input
|
|
}], style: [{
|
|
type: Input
|
|
}], styleClass: [{
|
|
type: Input
|
|
}], badgeClass: [{
|
|
type: Input
|
|
}], ariaLabel: [{
|
|
type: Input
|
|
}], autofocus: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], onClick: [{
|
|
type: Output
|
|
}], onFocus: [{
|
|
type: Output
|
|
}], onBlur: [{
|
|
type: Output
|
|
}], templates: [{
|
|
type: ContentChildren,
|
|
args: [PrimeTemplate]
|
|
}] } });
|
|
export class ButtonModule {
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: ButtonModule, declarations: [ButtonDirective, Button], imports: [CommonModule, RippleModule, SharedModule, AutoFocusModule, SpinnerIcon], exports: [ButtonDirective, Button, SharedModule] });
|
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ButtonModule, imports: [CommonModule, RippleModule, SharedModule, AutoFocusModule, SpinnerIcon, SharedModule] });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ButtonModule, decorators: [{
|
|
type: NgModule,
|
|
args: [{
|
|
imports: [CommonModule, RippleModule, SharedModule, AutoFocusModule, SpinnerIcon],
|
|
exports: [ButtonDirective, Button, SharedModule],
|
|
declarations: [ButtonDirective, Button]
|
|
}]
|
|
}] });
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL2J1dHRvbi9idXR0b24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxRQUFRLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUN6RCxPQUFPLEVBR0gsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxlQUFlLEVBQ2YsU0FBUyxFQUVULFlBQVksRUFDWixNQUFNLEVBQ04sS0FBSyxFQUNMLFFBQVEsRUFFUixNQUFNLEVBR04saUJBQWlCLEVBQ2pCLGdCQUFnQixFQUNoQixlQUFlLEVBQ2xCLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxhQUFhLEVBQUUsWUFBWSxFQUFFLE1BQU0sYUFBYSxDQUFDO0FBQzFELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDekMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ3BELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUM5QyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzVDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQzs7Ozs7QUFJcEQsTUFBTSx1QkFBdUIsR0FBRztJQUM1QixNQUFNLEVBQUUsVUFBVTtJQUNsQixTQUFTLEVBQUUsYUFBY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cyBzdHJpbmc7XG4gICAgfVxuICAgIHNldCBsYWJlbCh2YWw6IHN0cmluZykge1xuICAgICAgICB0aGlzLl9sYWJlbCA9IHZhbDtcblxuICAgICAgICBpZiAodGhpcy5pbml0aWFsaXplZCkge1xuICAgICAgICAgICAgdGhpcy51cGRhdGVMYWJlbCgpO1xuICAgICAgICAgICAgdGhpcy51cGRhdGVJY29uKCk7XG4gICAgICAgICAgICB0aGlzLnNldFN0eWxlQ2xhc3MoKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICAvKipcbiAgICAgKiBOYW1lIG9mIHRoZSBpY29uLlxuICAgICAqIEBncm91cCBQcm9wc1xuICAgICAqL1xuICAgIEBJbnB1dCgpIGdldCBpY29uKCk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiB0aGlzLl9pY29uIGFzIHN0cmluZztcbiAgICB9XG4gICAgc2V0IGljb24odmFsOiBzdHJpbmcpIHtcbiAgICAgICAgdGhpcy5faWNvbiA9IHZhbDtcblxuICAgICAgICBpZiAodGhpcy5pbml0aWFsaXplZCkge1xuICAgICAgICAgICAgdGhpcy51cGRhdGVJY29uKCk7XG4gICAgICAgICAgICB0aGlzLnNldFN0eWxlQ2xhc3MoKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICAvKipcbiAgICAgKiBXaGV0aGVyIHRoZSBidXR0b24gaXMgaW4gbG9hZGluZyBzdGF0ZS5cbiAgICAgKiBAZ3JvdXAgUHJvcHNcbiAgICAgKi9cbiAgICBASW5wdXQoKSBnZXQgbG9hZGluZygpOiBib29sZWFuIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX2xvYWRpbmc7XG4gICAgfVxuICAgIHNldCBsb2FkaW5nKHZhbDogYm9vbGVhbikge1xuICAgICAgICB0aGlzLl9sb2FkaW5nID0gdmFsO1xuXG4gICAgICAgIGlmICh0aGlzLmluaXRpYWxpemVkKSB7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZUljb24oKTtcbiAgICAgICAgICAgIHRoaX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bGw7XG5cbiAgICAgICAgICAgIGlmIChpY29uUG9zQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICBEb21IYW5kbGVyLmFkZENsYXNzKGljb25FbGVtZW50LCBpY29uUG9zQ2xhc3MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsZXQgaWNvbkNsYXNzID0gdGhpcy5nZXRJY29uQ2xhc3MoKTtcblxuICAgICAgICAgICAgaWYgKGljb25DbGFzcykge1xuICAgICAgICAgICAgICAgIERvbUhhbmRsZXIuYWRkTXVsdGlwbGVDbGFzc2VzKGljb25FbGVtZW50LCBpY29uQ2xhc3MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIXRoaXMubG9hZGluZ0ljb24gJiYgdGhpcy5sb2FkaW5nKSB7XG4gICAgICAgICAgICAgICAgaWNvbkVsZW1lbnQuaW5uZXJIVE1MID0gdGhpcy5zcGlubmVySWNvbjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5odG1sRWxlbWVudC5pbnNlcnRCZWZvcmUoaWNvbkVsZW1lbnQsIHRoaXMuaHRtbEVsZW1lbnQuZmlyc3RDaGlsZCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB1cGRhdGVMYWJlbCgpIHtcbiAgICAgICAgbGV0IGxhYmVsRWxlbWVudCA9IERvbUhhbmRsZXIuZmluZFNpbmdsZSh0aGlzLmh0bWxFbGVtZW50LCAnLnAtYnV0dG9uLWxhYmVsJyk7XG5cbiAgICAgICAgaWYgKCF0aGlzLmxhYmVsKSB7XG4gICAgICAgICAgICBsYWJlbEVsZW1lbnQgJiYgdGhpcy5odG1sRWxlbWVudC5yZW1vdmVDaGlsZChsYWJlbEVsZW1lbnQpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgbGFiZWxFbGVtZW50ID8gKGxhYmVsRWxlbWVudC50ZXh0Q29udGVudCA9IHRoaXMubGFiZWwpIDogdGhpcy5jcmVhdGVMYWJlbCgpO1xuICAgIH1cblxuICAgIHVwZGF0ZUljb24oKSB7XG4gICAgICAgIGxldCBpY29uRWxlbWVudCA9IERvbUhhbmRsZXIuZmluZFNpbmdsZSh0aGlzLmh0bWxFbGVtZW50LCAnLnAtYnV0dG9uLWljb24nKTtcbiAgICAgICAgbGV0IGxhYmVsRWxlbWVudCA9IERvbUhhbmRsZXIuZmluZFNpbmdsZSh0aGlzLmh0bWxFbGVtZW50LCAnLnAtYnV0dG9uLWxhYmVsJyk7XG5cbiAgICAgICAgaWYgKHRoaXMubG9hZGluZyAmJiAhdGhpcy5sb2FkaW5nSWNvbiAmJiBpY29uRWxlbWVudCkge1xuICAgICAgICAgICAgaWNvbkVsZW1lbnQuaW5uZXJIVE1MID0gdGhpcy5zcGlubmVySWNvbjtcbiAgICAgICAgfSBlbHNlIGlmIChpY29uRWxlbWVudD8uaW5uZXJIVE1MKSB7XG4gICAgICAgICAgICBpY29uRWxlbWVudC5pbm5lckhUTUwgPSAnJztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpY29uRWxlbWVudCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuaWNvblBvcykge1xuICAgICAgICAgICAgICAgIGljb25FbGVtZW50LmNsYXNzTmFtZSA9ICdwLWJ1dHRvbi1pY29uICcgKyAobGFiZWxFbGVtZW50ID8gJ3AtYnV0dG9uLWljb24tJyArIHRoaXMuaWNvblBvcyA6ICcnKSArICcgJyArIHRoaXMuZ2V0SWNvbkNsYXNzKCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGljb25FbGVtZW50LmNsYXNzTmFtZSA9ICdwLWJ1dHRvbi1pY29uICcgKyB0aGlzLmdldEljb25DbGFzcygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5jcmVhdGVJY29uKCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRJY29uQ2xhc3MoKS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LXNtJzogdGhpcy5zaXplID09PSAnc21hbGwnLFxuICAgICAgICAgICAgJ3AtYnV0dG9uLWxnJzogdGhpcy5zaXplID09PSAnbGFyZ2UnLFxuICAgICAgICAgICAgJ3AtYnV0dG9uLXBsYWluJzogdGhpcy5wbGFpbixcbiAgICAgICAgICAgIFtgJHt0aGlzLnN0eWxlQ2xhc3N9YF06IHRoaXMuc3R5bGVDbGFzc1xuICAgICAgICB9O1xuICAgIH1cblxuICAgIG5nQWZ0ZXJDb250ZW50SW5pdCgpIHtcbiAgICAgICAgdGhpcy50ZW1wbGF0ZXM/LmZvckVhY2goKGl0ZW0pID0+IHtcbiAgICAgICAgICAgIHN3aXRjaCAoaXRlbS5nZXRUeXBlKCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlICdjb250ZW50JzpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jb250ZW50VGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ2ljb24nOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmljb25UZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSAnbG9hZGluZ2ljb24nOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmxvYWRpbmdJY29uVGVtcGxhdGUgPSBpdGVtLnRlbXBsYXRlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGVudFRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGJhZGdlU3R5bGVDbGFzcygpIHtcbiAgICAgICAgcmV0dXJu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