/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { ChangeDetectionStrategy } from '../change_detection/constants';
import { compileComponent, compileDirective } from '../render3/jit/directive';
import { compilePipe } from '../render3/jit/pipe';
import { makeDecorator, makePropDecorator } from '../util/decorators';
/**
* Type of the Directive metadata.
*
* @publicApi
*/
export const Directive = makeDecorator('Directive', (dir = {}) => dir, undefined, undefined, (type, meta) => compileDirective(type, meta));
/**
* Component decorator and metadata.
*
* @Annotation
* @publicApi
*/
export const Component = makeDecorator('Component', (c = {}) => ({ changeDetection: ChangeDetectionStrategy.Default, ...c }), Directive, undefined, (type, meta) => compileComponent(type, meta));
/**
* @Annotation
* @publicApi
*/
export const Pipe = makeDecorator('Pipe', (p) => ({ pure: true, ...p }), undefined, undefined, (type, meta) => compilePipe(type, meta));
/**
* @Annotation
* @publicApi
*/
export const Input = makePropDecorator('Input', (arg) => {
if (!arg) {
return {};
}
return typeof arg === 'string' ? { alias: arg } : arg;
});
/**
* @Annotation
* @publicApi
*/
export const Output = makePropDecorator('Output', (alias) => ({ alias }));
/**
* @Annotation
* @publicApi
*/
export const HostBinding = makePropDecorator('HostBinding', (hostPropertyName) => ({ hostPropertyName }));
/**
* Decorator that binds a DOM event to a host listener and supplies configuration metadata.
* Angular invokes the supplied handler method when the host element emits the specified event,
* and updates the bound element with the result.
*
* If the handler method returns false, applies `preventDefault` on the bound element.
*
* @usageNotes
*
* The following example declares a directive
* that attaches a click listener to a button and counts clicks.
*
* ```ts
* @Directive({selector: 'button[counting]'})
* class CountClicks {
* numberOfClicks = 0;
*
* @HostListener('click', ['$event.target'])
* onClick(btn) {
* console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
* }
* }
*
* @Component({
* selector: 'app',
* template: '',
* })
* class App {}
*
* ```
*
* The following example registers another DOM event handler that listens for `Enter` key-press
* events on the global `window`.
* ``` ts
* import { HostListener, Component } from "@angular/core";
*
* @Component({
* selector: 'app',
* template: `
Hello, you have pressed enter {{counter}} number of times!
Press enter key
* to increment the counter.
* `
* })
* class AppComponent {
* counter = 0;
* @HostListener('window:keydown.enter', ['$event'])
* handleKeyDown(event: KeyboardEvent) {
* this.counter++;
* }
* resetCounter() {
* this.counter = 0;
* }
* }
* ```
* The list of valid key names for `keydown` and `keyup` events
* can be found here:
* https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values
*
* Note that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.
*
* The global target names that can be used to prefix an event name are
* `document:`, `window:` and `body:`.
*
* @Annotation
* @publicApi
*/
export const HostListener = makePropDecorator('HostListener', (eventName, args) => ({ eventName, args }));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlyZWN0aXZlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvc3JjL21ldGFkYXRhL2RpcmVjdGl2ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLHVCQUF1QixFQUFDLE1BQU0sK0JBQStCLENBQUM7QUFHdEUsT0FBTyxFQUFDLGdCQUFnQixFQUFFLGdCQUFnQixFQUFDLE1BQU0sMEJBQTBCLENBQUM7QUFDNUUsT0FBTyxFQUFDLFdBQVcsRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBQ2hELE9BQU8sRUFBQyxhQUFhLEVBQUUsaUJBQWlCLEVBQWdCLE1BQU0sb0JBQW9CLENBQUM7QUFtV25GOzs7O0dBSUc7QUFDSCxNQUFNLENBQUMsTUFBTSxTQUFTLEdBQXVCLGFBQWEsQ0FDdEQsV0FBVyxFQUFFLENBQUMsTUFBaUIsRUFBRSxFQUFFLEVBQUUsQ0FBQyxHQUFHLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFDL0Q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