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

1 line
37 KiB
Plaintext
Raw Normal View History

2024-07-16 15:23:22 +00:00
{"version":3,"file":"primeng-button.mjs","sources":["../../src/app/components/button/button.ts","../../src/app/components/button/primeng-button.ts"],"sourcesContent":["import { CommonModule, DOCUMENT } from '@angular/common';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgModule,\n OnDestroy,\n Output,\n QueryList,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n numberAttribute\n} from '@angular/core';\nimport { PrimeTemplate, SharedModule } from 'primeng/api';\nimport { DomHandler } from 'primeng/dom';\nimport { SpinnerIcon } from 'primeng/icons/spinner';\nimport { RippleModule } from 'primeng/ripple';\nimport { ObjectUtils } from 'primeng/utils';\nimport { AutoFocusModule } from 'primeng/autofocus';\n\ntype ButtonIconPosition = 'left' | 'right' | 'top' | 'bottom';\n\nconst INTERNAL_BUTTON_CLASSES = {\n button: 'p-button',\n component: 'p-component',\n iconOnly: 'p-button-icon-only',\n disabled: 'p-disabled',\n loading: 'p-button-loading',\n labelOnly: 'p-button-loading-label-only'\n} as const;\n/**\n * Button directive is an extension to button component.\n * @group Components\n */\n@Directive({\n selector: '[pButton]',\n host: {\n class: 'p-element'\n }\n})\nexport class ButtonDirective implements AfterViewInit, OnDestroy {\n /**\n * Position of the icon.\n * @group Props\n */\n @Input() iconPos: ButtonIconPosition = 'left';\n /**\n * Uses to pass attributes to the loading icon's DOM element.\n * @group Props\n */\n @Input() loadingIcon: string | undefined;\n /**\n * Text of the button.\n * @group Props\n */\n @Input() get label(): string {\n return this._label as string;\n }\n set label(val: string) {\n this._label = val;\n\n if (this.initialized) {\n this.updateLabel();\n this.updateIcon();\n this.setStyleClass();\n }\n }\n /**\n * Name of the icon.\n * @group Props\n */\n @Input() get icon(): string {\n return this._icon as string;\n }\n set icon(val: string) {\n this._icon = val;\n\n if (this.initialized) {\n this.updateIcon();\n this.setStyleClass();\n }\n }\n /**\n * Whether the button is in loading state.\n * @group Props\n */\n @Input() get loading(): boolean {\n return this._loading;\n }\n set loading(val: boolean) {\n this._loading = val;\n\n if (this.initialized) {\n this.updateIcon();\n this.setStyleClass();\n }\n }\n /**\n * Defines the style of the button.\n * @group Props\n */\n @Input() severity: 'success' | 'info' | 'warning' | 'danger' | 'help' | 'primary' | 'secondary' | 'contrast' | null | undefined;\n /**\n * Add a shadow to indicate elevation.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) raised: boolean = false;\n /**\n * Add a circular border radius to the button.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) rounded: boolean = false;\n /**\n * Add a textual class to the button without a background initially.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) text: boolean = false;\n /**\n * Add a border class without a background initially.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) outlined: boolean = false;\n /**\n * Defines the size of the button.\n * @group Props\n */\n @Input() size: 'small' | 'large' | undefined | null = null;\n /**\n * Add a plain textual class to the button without a background initially.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) plain: boolean = false;\n\n public _label: string | undefined;\n\n public _icon: string | undefined;\n\n public _loading: bool