source: trip-planner-front/node_modules/@angular/material/fesm2015/button.js.map@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 10.2 KB
Line 
1{"version":3,"file":"button.js","sources":["../../../../../../src/material/button/button.ts","../../../../../../src/material/button/button-module.ts","../../../../../../src/material/button/public-api.ts","../../../../../../src/material/button/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor, FocusableOption, FocusOrigin} from '@angular/cdk/a11y';\nimport {BooleanInput} from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n ViewChild,\n ViewEncapsulation,\n Optional,\n Inject,\n Input,\n AfterViewInit,\n} from '@angular/core';\nimport {\n CanColor,\n CanDisable,\n CanDisableRipple,\n MatRipple,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n/** Default color palette for round buttons (mat-fab and mat-mini-fab) */\nconst DEFAULT_ROUND_BUTTON_COLOR = 'accent';\n\n/**\n * List of classes to add to MatButton instances based on host attributes to\n * style as different variants.\n */\nconst BUTTON_HOST_ATTRIBUTES = [\n 'mat-button',\n 'mat-flat-button',\n 'mat-icon-button',\n 'mat-raised-button',\n 'mat-stroked-button',\n 'mat-mini-fab',\n 'mat-fab',\n];\n\n// Boilerplate for applying mixins to MatButton.\nconst _MatButtonBase = mixinColor(mixinDisabled(mixinDisableRipple(class {\n constructor(public _elementRef: ElementRef) {}\n})));\n\n/**\n * Material design button.\n */\n@Component({\n selector: `button[mat-button], button[mat-raised-button], button[mat-icon-button],\n button[mat-fab], button[mat-mini-fab], button[mat-stroked-button],\n button[mat-flat-button]`,\n exportAs: 'matButton',\n host: {\n '[attr.disabled]': 'disabled || null',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n // Add a class for disabled button styling instead of the using attribute\n // selector or pseudo-selector. This allows users to create focusabled\n // disabled buttons without recreating the styles.\n '[class.mat-button-disabled]': 'disabled',\n 'class': 'mat-focus-indicator',\n },\n templateUrl: 'button.html',\n styleUrls: ['button.css'],\n inputs: ['disabled', 'disableRipple', 'color'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatButton extends _MatButtonBase\n implements AfterViewInit, OnDestroy, CanDisable, CanColor, CanDisableRipple, FocusableOption {\n\n /** Whether the button is round. */\n readonly isRoundButton: boolean = this._hasHostAttributes('mat-fab', 'mat-mini-fab');\n\n /** Whether the button is icon button. */\n readonly isIconButton: boolean = this._hasHostAttributes('mat-icon-button');\n\n /** Reference to the MatRipple instance of the button. */\n @ViewChild(MatRipple) ripple: MatRipple;\n\n constructor(elementRef: ElementRef,\n private _focusMonitor: FocusMonitor,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode: string) {\n super(elementRef);\n\n // For each of the variant selectors that is present in the button's host\n // attributes, add the correct corresponding class.\n for (const attr of BUTTON_HOST_ATTRIBUTES) {\n if (this._hasHostAttributes(attr)) {\n (this._getHostElement() as HTMLElement).classList.add(attr);\n }\n }\n\n // Add a class that applies to all buttons. This makes it easier to target if somebody\n // wants to target all Material buttons. We do it here rather than `host` to ensure that\n // the class is applied to derived classes.\n elementRef.nativeElement.classList.add('mat-button-base');\n\n if (this.isRoundButton) {\n this.color = DEFAULT_ROUND_BUTTON_COLOR;\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true);\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /** Focuses the button. */\n focus(origin?: FocusOrigin, options?: FocusOptions): void {\n if (origin) {\n this._focusMonitor.focusVia(this._getHostElement(), origin, options);\n } else {\n this._getHostElement().focus(options);\n }\n }\n\n _getHostElement() {\n return this._elementRef.nativeElement;\n }\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Gets whether the button has one of the given attributes. */\n _hasHostAttributes(...attributes: string[]) {\n return attributes.some(attribute => this._getHostElement().hasAttribute(attribute));\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n}\n\n/**\n * Material design anchor button.\n */\n@Component({\n selector: `a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab],\n a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]`,\n exportAs: 'matButton, matAnchor',\n host: {\n // Note that we ignore the user-specified tabindex when it's disabled for\n // consistency with the `mat-button` applied on native buttons where even\n // though they have an index, they're not tabbable.\n '[attr.tabindex]': 'disabled ? -1 : (tabIndex || 0)',\n '[attr.disabled]': 'disabled || null',\n '[attr.aria-disabled]': 'disabled.toString()',\n '(click)': '_haltDisabledEvents($event)',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n '[class.mat-button-disabled]': 'disabled',\n 'class': 'mat-focus-indicator',\n },\n inputs: ['disabled', 'disableRipple', 'color'],\n templateUrl: 'button.html',\n styleUrls: ['button.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatAnchor extends MatButton {\n /** Tabindex of the button. */\n @Input() tabIndex: number;\n\n constructor(\n focusMonitor: FocusMonitor,\n elementRef: ElementRef,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode: string) {\n super(elementRef, focusMonitor, animationMode);\n }\n\n _haltDisabledEvents(event: Event) {\n // A disabled button shouldn't apply any actions\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatAnchor, MatButton} from './button';\n\n\n@NgModule({\n imports: [\n MatRippleModule,\n MatCommonModule,\n ],\n exports: [\n MatButton,\n MatAnchor,\n MatCommonModule,\n ],\n declarations: [\n MatButton,\n MatAnchor,\n ],\n})\nexport class MatButtonModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './button-module';\nexport * from './button';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;AAiCA;AACA,MAAM,0BAA0B,GAAG,QAAQ,CAAC;AAE5C;;;;AAIA,MAAM,sBAAsB,GAAG;IAC7B,YAAY;IACZ,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,oBAAoB;IACpB,cAAc;IACd,SAAS;CACV,CAAC;AAEF;AACA,MAAM,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC,kBAAkB,CAAC;IACjE,YAAmB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;KAAI;CAC/C,CAAC,CAAC,CAAC,CAAC;AAEL;;;MAuBa,SAAU,SAAQ,cAAc;IAY3C,YAAY,UAAsB,EACd,aAA2B,EACe,cAAsB;QAClF,KAAK,CAAC,UAAU,CAAC,CAAC;QAFA,kBAAa,GAAb,aAAa,CAAc;QACe,mBAAc,GAAd,cAAc,CAAQ;;QAV3E,kBAAa,GAAY,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;;QAG5E,iBAAY,GAAY,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;;;QAY1E,KAAK,MAAM,IAAI,IAAI,sBAAsB,EAAE;YACzC,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE;gBAChC,IAAI,CAAC,eAAe,EAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,I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