UNPKG

ngx-bootstrap

Version:
42 lines 2.01 kB
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; var BsDatepickerDayDecoratorComponent = (function () { function BsDatepickerDayDecoratorComponent() { this.onSelect = new EventEmitter(); this.onHover = new EventEmitter(); } BsDatepickerDayDecoratorComponent.prototype.selectDay = function (day) { this.onSelect.emit(day); }; BsDatepickerDayDecoratorComponent.prototype.hoverDay = function (day, isHovered) { this.onHover.emit({ day: day, isHovered: isHovered }); }; BsDatepickerDayDecoratorComponent.decorators = [ { type: Component, args: [{ selector: '[bsDatepickerDayDecorator]', changeDetection: ChangeDetectionStrategy.OnPush, host: { '(click)': 'selectDay(day)', '(mouseenter)': 'hoverDay(day, true)', '(mouseleave)': 'hoverDay(day, false)', '[class.disabled]': 'day.isDisabled', '[class.is-highlighted]': 'day.isHovered', '[class.is-other-month]': 'day.isOtherMonth', '[class.in-range]': 'day.isInRange', '[class.select-start]': 'day.isSelectionStart', '[class.select-end]': 'day.isSelectionEnd', '[class.selected]': 'day.isSelected' }, template: "{{ day.label }}" },] }, ]; /** @nocollapse */ BsDatepickerDayDecoratorComponent.ctorParameters = function () { return []; }; BsDatepickerDayDecoratorComponent.propDecorators = { 'day': [{ type: Input },], 'onSelect': [{ type: Output },], 'onHover': [{ type: Output },], }; return BsDatepickerDayDecoratorComponent; }()); export { BsDatepickerDayDecoratorComponent }; //# sourceMappingURL=bs-datepicker-day-decorator.directive.js.map