UNPKG

199 kBSource Map (JSON)View Raw
1{"version":3,"file":"angular-calendar.js","sources":["ng://angular-calendar/modules/common/calendar-event-actions.component.ts","ng://angular-calendar/modules/common/calendar-event-title.component.ts","ng://angular-calendar/modules/common/calendar-tooltip.directive.ts","ng://angular-calendar/date-adapters/date-adapter.ts","ng://angular-calendar/modules/common/calendar-view.enum.ts","ng://angular-calendar/modules/common/util.ts","ng://angular-calendar/modules/common/calendar-previous-view.directive.ts","ng://angular-calendar/modules/common/calendar-next-view.directive.ts","ng://angular-calendar/modules/common/calendar-today.directive.ts","ng://angular-calendar/modules/common/calendar-angular-date-formatter.provider.ts","ng://angular-calendar/modules/common/calendar-date-formatter.provider.ts","ng://angular-calendar/modules/common/calendar-date.pipe.ts","ng://angular-calendar/modules/common/calendar-event-title-formatter.provider.ts","ng://angular-calendar/modules/common/calendar-event-title.pipe.ts","ng://angular-calendar/modules/common/click.directive.ts","ng://angular-calendar/modules/common/keydown-enter.directive.ts","ng://angular-calendar/modules/common/calendar-utils.provider.ts","ng://angular-calendar/modules/common/calendar-a11y.provider.ts","ng://angular-calendar/modules/common/calendar-a11y.pipe.ts","ng://angular-calendar/modules/common/calendar-moment-date-formatter.provider.ts","ng://angular-calendar/modules/common/calendar-native-date-formatter.provider.ts","ng://angular-calendar/modules/common/calendar-event-times-changed-event.interface.ts","ng://angular-calendar/modules/common/calendar-common.module.ts","ng://angular-calendar/modules/month/calendar-month-view.component.ts","ng://angular-calendar/modules/month/calendar-month-view-header.component.ts","ng://angular-calendar/modules/month/calendar-month-cell.component.ts","ng://angular-calendar/modules/month/calendar-open-day-events.component.ts","ng://angular-calendar/modules/month/calendar-month.module.ts","ng://angular-calendar/modules/common/calendar-drag-helper.provider.ts","ng://angular-calendar/modules/common/calendar-resize-helper.provider.ts","ng://angular-calendar/modules/week/calendar-week-view.component.ts","ng://angular-calendar/modules/week/calendar-week-view-header.component.ts","ng://angular-calendar/modules/week/calendar-week-view-event.component.ts","ng://angular-calendar/modules/week/calendar-week-view-hour-segment.component.ts","ng://angular-calendar/modules/week/calendar-week-view-current-time-marker.component.ts","ng://angular-calendar/modules/week/calendar-week.module.ts","ng://angular-calendar/modules/day/calendar-day-view.component.ts","ng://angular-calendar/modules/day/calendar-day.module.ts","ng://angular-calendar/modules/calendar.module.ts","ng://angular-calendar/index.ts","ng://angular-calendar/angular-calendar.ts"],"sourcesContent":["import { Component, Input, TemplateRef } from '@angular/core';\nimport { CalendarEvent, EventAction } from 'calendar-utils';\n\n@Component({\n selector: 'mwl-calendar-event-actions',\n template: `\n <ng-template\n #defaultTemplate\n let-event=\"event\"\n let-trackByActionId=\"trackByActionId\"\n >\n <span *ngIf=\"event.actions\" class=\"cal-event-actions\">\n <a\n class=\"cal-event-action\"\n href=\"javascript:;\"\n *ngFor=\"let action of event.actions; trackBy: trackByActionId\"\n (mwlClick)=\"action.onClick({ event: event, sourceEvent: $event })\"\n (mwlKeydownEnter)=\"\n action.onClick({ event: event, sourceEvent: $event })\n \"\n [ngClass]=\"action.cssClass\"\n [innerHtml]=\"action.label\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"\n { action: action } | calendarA11y: 'actionButtonLabel'\n \"\n >\n </a>\n </span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n event: event,\n trackByActionId: trackByActionId\n }\"\n >\n </ng-template>\n `,\n})\nexport class CalendarEventActionsComponent {\n @Input() event: CalendarEvent;\n\n @Input() customTemplate: TemplateRef<any>;\n\n trackByActionId = (index: number, action: EventAction) =>\n action.id ? action.id : action;\n}\n","import { Component, Input, TemplateRef } from '@angular/core';\nimport { CalendarEvent } from 'calendar-utils';\n\n@Component({\n selector: 'mwl-calendar-event-title',\n template: `\n <ng-template #defaultTemplate let-event=\"event\" let-view=\"view\">\n <span\n class=\"cal-event-title\"\n [innerHTML]=\"event.title | calendarEventTitle: view:event\"\n [attr.aria-hidden]=\"{} | calendarA11y: 'hideEventTitle'\"\n >\n </span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n event: event,\n view: view\n }\"\n >\n </ng-template>\n `,\n})\nexport class CalendarEventTitleComponent {\n @Input() event: CalendarEvent;\n\n @Input() customTemplate: TemplateRef<any>;\n\n @Input() view: string;\n}\n","import {\n Directive,\n Component,\n HostListener,\n OnDestroy,\n Input,\n ComponentRef,\n Injector,\n ComponentFactoryResolver,\n ViewContainerRef,\n ElementRef,\n ComponentFactory,\n Inject,\n Renderer2,\n TemplateRef,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { PlacementArray, positionElements } from 'positioning';\nimport { CalendarEvent } from 'calendar-utils';\nimport { Observable, of, Subject, timer } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n@Component({\n selector: 'mwl-calendar-tooltip-window',\n template: `\n <ng-template\n #defaultTemplate\n let-contents=\"contents\"\n let-placement=\"placement\"\n let-event=\"event\"\n >\n <div class=\"cal-tooltip\" [ngClass]=\"'cal-tooltip-' + placement\">\n <div class=\"cal-tooltip-arrow\"></div>\n <div class=\"cal-tooltip-inner\" [innerHtml]=\"contents\"></div>\n </div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n contents: contents,\n placement: placement,\n event: event\n }\"\n >\n </ng-template>\n `,\n})\nexport class CalendarTooltipWindowComponent {\n @Input() contents: string;\n\n @Input() placement: string;\n\n @Input() event: CalendarEvent;\n\n @Input() customTemplate: TemplateRef<any>;\n}\n\n@Directive({\n selector: '[mwlCalendarTooltip]',\n})\nexport class CalendarTooltipDirective implements OnDestroy, OnChanges {\n @Input('mwlCalendarTooltip') contents: string; // tslint:disable-line no-input-rename\n\n @Input('tooltipPlacement') placement: PlacementArray = 'auto'; // tslint:disable-line no-input-rename\n\n @Input('tooltipTemplate') customTemplate: TemplateRef<any>; // tslint:disable-line no-input-rename\n\n @Input('tooltipEvent') event: CalendarEvent; // tslint:disable-line no-input-rename\n\n @Input('tooltipAppendToBody') appendToBody: boolean; // tslint:disable-line no-input-rename\n\n @Input('tooltipDelay') delay: number | null = null; // tslint:disable-line no-input-rename\n\n private tooltipFactory: ComponentFactory<CalendarTooltipWindowComponent>;\n private tooltipRef: ComponentRef<CalendarTooltipWindowComponent>;\n private cancelTooltipDelay$ = new Subject();\n\n constructor(\n private elementRef: ElementRef,\n private injector: Injector,\n private renderer: Renderer2,\n componentFactoryResolver: ComponentFactoryResolver,\n private viewContainerRef: ViewContainerRef,\n @Inject(DOCUMENT) private document //tslint:disable-line\n ) {\n this.tooltipFactory = componentFactoryResolver.resolveComponentFactory(\n CalendarTooltipWindowComponent\n );\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (\n this.tooltipRef &&\n (changes.contents || changes.customTemplate || changes.event)\n ) {\n this.tooltipRef.instance.contents = this.contents;\n this.tooltipRef.instance.customTemplate = this.customTemplate;\n this.tooltipRef.instance.event = this.event;\n this.tooltipRef.changeDetectorRef.markForCheck();\n\n if (!this.contents) {\n this.hide();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.hide();\n }\n\n @HostListener('mouseenter')\n onMouseOver(): void {\n const delay$: Observable<any> =\n this.delay === null ? of('now') : timer(this.delay);\n delay$.pipe(takeUntil(this.cancelTooltipDelay$)).subscribe(() => {\n this.show();\n });\n }\n\n @HostListener('mouseleave')\n onMouseOut(): void {\n this.hide();\n }\n\n private show(): void {\n if (!this.tooltipRef && this.contents) {\n this.tooltipRef = this.viewContainerRef.createComponent(\n this.tooltipFactory,\n 0,\n this.injector,\n []\n );\n this.tooltipRef.instance.contents = this.contents;\n this.tooltipRef.instance.customTemplate = this.customTemplate;\n this.tooltipRef.instance.event = this.event;\n if (this.appendToBody) {\n this.document.body.appendChild(this.tooltipRef.location.nativeElement);\n }\n requestAnimationFrame(() => {\n this.positionTooltip();\n });\n }\n }\n\n private hide(): void {\n if (this.tooltipRef) {\n this.viewContainerRef.remove(\n this.viewContainerRef.indexOf(this.tooltipRef.hostView)\n );\n this.tooltipRef = null;\n }\n this.cancelTooltipDelay$.next();\n }\n\n private positionTooltip(previousPositions: string[] = []): void {\n if (this.tooltipRef) {\n this.tooltipRef.changeDetectorRef.detectChanges();\n this.tooltipRef.instance.placement = positionElements(\n this.elementRef.nativeElement,\n this.tooltipRef.location.nativeElement.children[0],\n this.placement,\n this.appendToBody\n );\n // keep re-positioning the tooltip until the arrow position doesn't make a difference\n if (\n previousPositions.indexOf(this.tooltipRef.instance.placement) === -1\n ) {\n this.positionTooltip([\n ...previousPositions,\n this.tooltipRef.instance.placement,\n ]);\n }\n }\n }\n}\n","import { DateAdapter as BaseDateAdapter } from 'calendar-utils/date-adapters/date-adapter';\n\nexport abstract class DateAdapter implements BaseDateAdapter {\n abstract addWeeks(date: Date | number, amount: number): Date;\n\n abstract addMonths(date: Date | number, amount: number): Date;\n\n abstract subDays(date: Date | number, amount: number): Date;\n\n abstract subWeeks(date: Date | number, amount: number): Date;\n\n abstract subMonths(date: Date | number, amount: number): Date;\n\n abstract getISOWeek(date: Date | number): number;\n\n abstract setDate(date: Date | number, dayOfMonth: number): Date;\n\n abstract setMonth(date: Date | number, month: number): Date;\n\n abstract setYear(date: Date | number, year: number): Date;\n\n abstract getDate(date: Date | number): number;\n\n abstract getMonth(date: Date | number): number;\n\n abstract getYear(date: Date | number): number;\n\n abstract addDays(date: Date | number, amount: number): Date;\n\n abstract addHours(date: Date | number, amount: number): Date;\n\n abstract addMinutes(date: Date | number, amount: number): Date;\n\n abstract addSeconds(date: Date | number, amount: number): Date;\n\n abstract differenceInDays(\n dateLeft: Date | number,\n dateRight: Date | number\n ): number;\n\n abstract differenceInMinutes(\n dateLeft: Date | number,\n dateRight: Date | number\n ): number;\n\n abstract differenceInSeconds(\n dateLeft: Date | number,\n dateRight: Date | number\n ): number;\n\n abstract endOfDay(date: Date | number): Date;\n\n abstract endOfMonth(date: Date | number): Date;\n\n abstract endOfWeek(\n date: Date | number,\n options?: { weekStartsOn?: number }\n ): Date;\n\n abstract getDay(date: Date | number): number;\n\n abstract isSameDay(\n dateLeft: Date | number,\n dateRight: Date | number\n ): boolean;\n\n abstract isSameMonth(\n dateLeft: Date | number,\n dateRight: Date | number\n ): boolean;\n\n abstract isSameSecond(\n dateLeft: Date | number,\n dateRight: Date | number\n ): boolean;\n\n abstract max(dates: (Date | number)[]): Date;\n\n abstract setHours(date: Date | number, hours: number): Date;\n\n abstract setMinutes(date: Date | number, minutes: number): Date;\n\n abstract startOfDay(date: Date | number): Date;\n\n abstract startOfMinute(date: Date | number): Date;\n\n abstract startOfMonth(date: Date | number): Date;\n\n abstract startOfWeek(\n date: Date | number,\n options?: { weekStartsOn?: number }\n ): Date;\n\n abstract getHours(date: Date | number): number;\n\n abstract getMinutes(date: Date | number): number;\n}\n","export enum CalendarView {\n Month = 'month',\n Week = 'week',\n Day = 'day',\n}\n","import {\n CalendarEvent,\n WeekViewTimeEvent,\n WeekViewHour,\n WeekViewHourSegment,\n validateEvents as validateEventsWithoutLog,\n ViewPeriod,\n WeekDay,\n WeekViewAllDayEvent,\n} from 'calendar-utils';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\n\nexport const validateEvents = (events: CalendarEvent[]) => {\n const warn = (...args) => console.warn('angular-calendar', ...args);\n return validateEventsWithoutLog(events, warn);\n};\n\nexport function isInside(outer: ClientRect, inner: ClientRect): boolean {\n return (\n Math.floor(outer.left) <= Math.ceil(inner.left) &&\n Math.floor(inner.left) <= Math.ceil(outer.right) &&\n Math.floor(outer.left) <= Math.ceil(inner.right) &&\n Math.floor(inner.right) <= Math.ceil(outer.right) &&\n Math.floor(outer.top) <= Math.ceil(inner.top) &&\n Math.floor(inner.top) <= Math.ceil(outer.bottom) &&\n Math.floor(outer.top) <= Math.ceil(inner.bottom) &&\n Math.floor(inner.bottom) <= Math.ceil(outer.bottom)\n );\n}\n\nexport function roundToNearest(amount: number, precision: number) {\n return Math.round(amount / precision) * precision;\n}\n\nexport const trackByEventId = (index: number, event: CalendarEvent) =>\n event.id ? event.id : event;\n\nexport const trackByWeekDayHeaderDate = (index: number, day: WeekDay) =>\n day.date.toISOString();\n\nexport const trackByHourSegment = (\n index: number,\n segment: WeekViewHourSegment\n) => segment.date.toISOString();\n\nexport const trackByHour = (index: number, hour: WeekViewHour) =>\n hour.segments[0].date.toISOString();\n\nexport const trackByWeekAllDayEvent = (\n index: number,\n weekEvent: WeekViewAllDayEvent\n) => (weekEvent.event.id ? weekEvent.event.id : weekEvent.event);\n\nexport const trackByWeekTimeEvent = (\n index: number,\n weekEvent: WeekViewTimeEvent\n) => (weekEvent.event.id ? weekEvent.event.id : weekEvent.event);\n\nconst MINUTES_IN_HOUR = 60;\n\nfunction getPixelAmountInMinutes(\n hourSegments: number,\n hourSegmentHeight: number\n) {\n return MINUTES_IN_HOUR / (hourSegments * hourSegmentHeight);\n}\n\nexport function getMinutesMoved(\n movedY: number,\n hourSegments: number,\n hourSegmentHeight: number,\n eventSnapSize: number\n): number {\n const draggedInPixelsSnapSize = roundToNearest(\n movedY,\n eventSnapSize || hourSegmentHeight\n );\n const pixelAmountInMinutes = getPixelAmountInMinutes(\n hourSegments,\n hourSegmentHeight\n );\n return draggedInPixelsSnapSize * pixelAmountInMinutes;\n}\n\nexport function getMinimumEventHeightInMinutes(\n hourSegments: number,\n hourSegmentHeight: number\n) {\n return (\n getPixelAmountInMinutes(hourSegments, hourSegmentHeight) * hourSegmentHeight\n );\n}\n\nexport function getDefaultEventEnd(\n dateAdapter: DateAdapter,\n event: CalendarEvent,\n minimumMinutes: number\n): Date {\n if (event.end) {\n return event.end;\n } else {\n return dateAdapter.addMinutes(event.start, minimumMinutes);\n }\n}\n\nexport function addDaysWithExclusions(\n dateAdapter: DateAdapter,\n date: Date,\n days: number,\n excluded: number[]\n): Date {\n let daysCounter = 0;\n let daysToAdd = 0;\n const changeDays = days < 0 ? dateAdapter.subDays : dateAdapter.addDays;\n let result = date;\n while (daysToAdd <= Math.abs(days)) {\n result = changeDays(date, daysCounter);\n const day = dateAdapter.getDay(result);\n if (excluded.indexOf(day) === -1) {\n daysToAdd++;\n }\n daysCounter++;\n }\n return result;\n}\n\nexport function isDraggedWithinPeriod(\n newStart: Date,\n newEnd: Date,\n period: ViewPeriod\n): boolean {\n const end = newEnd || newStart;\n return (\n (period.start <= newStart && newStart <= period.end) ||\n (period.start <= end && end <= period.end)\n );\n}\n\nexport function shouldFireDroppedEvent(\n dropEvent: { dropData?: { event?: CalendarEvent; calendarId?: symbol } },\n date: Date,\n allDay: boolean,\n calendarId: symbol\n) {\n return (\n dropEvent.dropData &&\n dropEvent.dropData.event &&\n (dropEvent.dropData.calendarId !== calendarId ||\n (dropEvent.dropData.event.allDay && !allDay) ||\n (!dropEvent.dropData.event.allDay && allDay))\n );\n}\n\nexport function getWeekViewPeriod(\n dateAdapter: DateAdapter,\n viewDate: Date,\n weekStartsOn: number,\n excluded: number[] = [],\n daysInWeek?: number\n): { viewStart: Date; viewEnd: Date } {\n let viewStart = daysInWeek\n ? dateAdapter.startOfDay(viewDate)\n : dateAdapter.startOfWeek(viewDate, { weekStartsOn });\n const endOfWeek = dateAdapter.endOfWeek(viewDate, { weekStartsOn });\n while (\n excluded.indexOf(dateAdapter.getDay(viewStart)) > -1 &&\n viewStart < endOfWeek\n ) {\n viewStart = dateAdapter.addDays(viewStart, 1);\n }\n if (daysInWeek) {\n const viewEnd = dateAdapter.endOfDay(\n addDaysWithExclusions(dateAdapter, viewStart, daysInWeek - 1, excluded)\n );\n return { viewStart, viewEnd };\n } else {\n let viewEnd = endOfWeek;\n while (\n excluded.indexOf(dateAdapter.getDay(viewEnd)) > -1 &&\n viewEnd > viewStart\n ) {\n viewEnd = dateAdapter.subDays(viewEnd, 1);\n }\n return { viewStart, viewEnd };\n }\n}\n\nexport function isWithinThreshold({ x, y }: { x: number; y: number }) {\n const DRAG_THRESHOLD = 1;\n return Math.abs(x) > DRAG_THRESHOLD || Math.abs(y) > DRAG_THRESHOLD;\n}\n","import {\n Directive,\n HostListener,\n Input,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\nimport { CalendarView } from './calendar-view.enum';\nimport { addDaysWithExclusions } from './util';\n\n/**\n * Change the view date to the previous view. For example:\n *\n * ```typescript\n * <button\n * mwlCalendarPreviousView\n * [(viewDate)]=\"viewDate\"\n * [view]=\"view\">\n * Previous\n * </button>\n * ```\n */\n@Directive({\n selector: '[mwlCalendarPreviousView]',\n})\nexport class CalendarPreviousViewDirective {\n /**\n * The current view\n */\n @Input() view: CalendarView | 'month' | 'week' | 'day';\n\n /**\n * The current view date\n */\n @Input() viewDate: Date;\n\n /**\n * Days to skip when going back by 1 day\n */\n @Input() excludeDays: number[] = [];\n\n /**\n * The number of days in a week. If set will subtract this amount of days instead of 1 week\n */\n @Input() daysInWeek: number;\n\n /**\n * Called when the view date is changed\n */\n @Output() viewDateChange: EventEmitter<Date> = new EventEmitter();\n\n constructor(private dateAdapter: DateAdapter) {}\n\n /**\n * @hidden\n */\n @HostListener('click')\n onClick(): void {\n const subFn: any = {\n day: this.dateAdapter.subDays,\n week: this.dateAdapter.subWeeks,\n month: this.dateAdapter.subMonths,\n }[this.view];\n\n if (this.view === CalendarView.Day) {\n this.viewDateChange.emit(\n addDaysWithExclusions(\n this.dateAdapter,\n this.viewDate,\n -1,\n this.excludeDays\n )\n );\n } else if (this.view === CalendarView.Week && this.daysInWeek) {\n this.viewDateChange.emit(\n addDaysWithExclusions(\n this.dateAdapter,\n this.viewDate,\n -this.daysInWeek,\n this.excludeDays\n )\n );\n } else {\n this.viewDateChange.emit(subFn(this.viewDate, 1));\n }\n }\n}\n","import {\n Directive,\n EventEmitter,\n HostListener,\n Input,\n Output,\n} from '@angular/core';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\nimport { CalendarView } from './calendar-view.enum';\nimport { addDaysWithExclusions } from './util';\n\n/**\n * Change the view date to the next view. For example:\n *\n * ```typescript\n * <button\n * mwlCalendarNextView\n * [(viewDate)]=\"viewDate\"\n * [view]=\"view\">\n * Next\n * </button>\n * ```\n */\n@Directive({\n selector: '[mwlCalendarNextView]',\n})\nexport class CalendarNextViewDirective {\n /**\n * The current view\n */\n @Input() view: CalendarView | 'month' | 'week' | 'day';\n\n /**\n * The current view date\n */\n @Input() viewDate: Date;\n\n /**\n * Days to skip when going forward by 1 day\n */\n @Input() excludeDays: number[] = [];\n\n /**\n * The number of days in a week. If set will add this amount of days instead of 1 week\n */\n @Input() daysInWeek: number;\n\n /**\n * Called when the view date is changed\n */\n @Output() viewDateChange: EventEmitter<Date> = new EventEmitter();\n\n constructor(private dateAdapter: DateAdapter) {}\n\n /**\n * @hidden\n */\n @HostListener('click')\n onClick(): void {\n const addFn: any = {\n day: this.dateAdapter.addDays,\n week: this.dateAdapter.addWeeks,\n month: this.dateAdapter.addMonths,\n }[this.view];\n\n if (this.view === CalendarView.Day) {\n this.viewDateChange.emit(\n addDaysWithExclusions(\n this.dateAdapter,\n this.viewDate,\n 1,\n this.excludeDays\n )\n );\n } else if (this.view === CalendarView.Week && this.daysInWeek) {\n this.viewDateChange.emit(\n addDaysWithExclusions(\n this.dateAdapter,\n this.viewDate,\n this.daysInWeek,\n this.excludeDays\n )\n );\n } else {\n this.viewDateChange.emit(addFn(this.viewDate, 1));\n }\n }\n}\n","import {\n Directive,\n HostListener,\n Input,\n Output,\n EventEmitter,\n} from '@angular/core';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\n\n/**\n * Change the view date to the current day. For example:\n *\n * ```typescript\n * <button\n * mwlCalendarToday\n * [(viewDate)]=\"viewDate\">\n * Today\n * </button>\n * ```\n */\n@Directive({\n selector: '[mwlCalendarToday]',\n})\nexport class CalendarTodayDirective {\n /**\n * The current view date\n */\n @Input() viewDate: Date;\n\n /**\n * Called when the view date is changed\n */\n @Output() viewDateChange: EventEmitter<Date> = new EventEmitter();\n\n constructor(private dateAdapter: DateAdapter) {}\n\n /**\n * @hidden\n */\n @HostListener('click')\n onClick(): void {\n this.viewDateChange.emit(this.dateAdapter.startOfDay(new Date()));\n }\n}\n","import {\n CalendarDateFormatterInterface,\n DateFormatterParams,\n} from './calendar-date-formatter.interface';\nimport { formatDate } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\nimport { getWeekViewPeriod } from './util';\n\n/**\n * This will use the angular date pipe to do all date formatting. It is the default date formatter used by the calendar.\n */\n@Injectable()\nexport class CalendarAngularDateFormatter\n implements CalendarDateFormatterInterface\n{\n constructor(protected dateAdapter: DateAdapter) {}\n\n /**\n * The month view header week day labels\n */\n public monthViewColumnHeader({ date, locale }: DateFormatterParams): string {\n return formatDate(date, 'EEEE', locale);\n }\n\n /**\n * The month view cell day number\n */\n public monthViewDayNumber({ date, locale }: DateFormatterParams): string {\n return formatDate(date, 'd', locale);\n }\n\n /**\n * The month view title\n */\n public monthViewTitle({ date, locale }: DateFormatterParams): string {\n return formatDate(date, 'LLLL y', locale);\n }\n\n /**\n * The week view header week day labels\n */\n public weekViewColumnHeader({ date, locale }: DateFormatterParams): string {\n return formatDate(date, 'EEEE', locale);\n }\n\n /**\n * The week view sub header day and month labels\n */\n public weekViewColumnSubHeader({\n date,\n locale,\n }: DateFormatterParams): string {\n return formatDate(date, 'MMM d', locale);\n }\n\n /**\n * The week view title\n */\n public weekViewTitle({\n date,\n locale,\n weekStartsOn,\n excludeDays,\n daysInWeek,\n }: DateFormatterParams): string {\n const { viewStart, viewEnd } = getWeekViewPeriod(\n this.dateAdapter,\n date,\n weekStartsOn,\n excludeDays,\n daysInWeek\n );\n const format = (dateToFormat: Date, showYear: boolean) =>\n formatDate(dateToFormat, 'MMM d' + (showYear ? ', yyyy' : ''), locale);\n return `${format(\n viewStart,\n viewStart.getUTCFullYear() !== viewEnd.getUTCFullYear()\n )} - ${format(viewEnd, true)}`;\n }\n\n /**\n * The time formatting down the left hand side of the week view\n */\n public weekViewHour({ date, locale }: DateFormatterParams): string {\n return formatDate(date, 'h a', locale);\n }\n\n /**\n * The time formatting down the left hand side of the day view\n */\n public dayViewHour({ date, locale }: DateFormatterParams): string {\n return formatDate(date, 'h a', locale);\n }\n\n /**\n * The day view title\n */\n public dayViewTitle({ date, locale }: DateFormatterParams): string {\n return formatDate(date, 'EEEE, MMMM d, y', locale);\n }\n}\n","import { CalendarAngularDateFormatter } from './calendar-angular-date-formatter.provider';\nimport { Injectable } from '@angular/core';\n\n/**\n * This class is responsible for all formatting of dates. There are 3 implementations available, the `CalendarAngularDateFormatter` (default) which uses the angular date pipe to format dates, the `CalendarNativeDateFormatter` which will use the <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl\" target=\"_blank\">Intl</a> API to format dates, or there is the `CalendarMomentDateFormatter` which uses <a href=\"http://momentjs.com/\" target=\"_blank\">moment</a>.\n *\n * If you wish, you may override any of the defaults via angulars DI. For example:\n *\n * ```typescript\n * import { CalendarDateFormatter, DateFormatterParams } from 'angular-calendar';\n * import { formatDate } from '@angular/common';\n * import { Injectable } from '@angular/core';\n *\n * @Injectable()\n * class CustomDateFormatter extends CalendarDateFormatter {\n *\n * public monthViewColumnHeader({date, locale}: DateFormatterParams): string {\n * return formatDate(date, 'EEE', locale); // use short week days\n * }\n *\n * }\n *\n * // in your component that uses the calendar\n * providers: [{\n * provide: CalendarDateFormatter,\n * useClass: CustomDateFormatter\n * }]\n * ```\n */\n@Injectable()\nexport class CalendarDateFormatter extends CalendarAngularDateFormatter {}\n","import { Pipe, PipeTransform, LOCALE_ID, Inject } from '@angular/core';\nimport { CalendarDateFormatter } from './calendar-date-formatter.provider';\n\n/**\n * This pipe is primarily for rendering the current view title. Example usage:\n * ```typescript\n * // where `viewDate` is a `Date` and view is `'month' | 'week' | 'day'`\n * {{ viewDate | calendarDate:(view + 'ViewTitle'):'en' }}\n * ```\n */\n@Pipe({\n name: 'calendarDate',\n})\nexport class CalendarDatePipe implements PipeTransform {\n constructor(\n private dateFormatter: CalendarDateFormatter,\n @Inject(LOCALE_ID) private locale: string\n ) {}\n\n transform(\n date: Date,\n method: string,\n locale: string = this.locale,\n weekStartsOn: number = 0,\n excludeDays: number[] = [],\n daysInWeek?: number\n ): string {\n if (typeof this.dateFormatter[method] === 'undefined') {\n const allowedMethods = Object.getOwnPropertyNames(\n Object.getPrototypeOf(CalendarDateFormatter.prototype)\n ).filter((iMethod) => iMethod !== 'constructor');\n throw new Error(\n `${method} is not a valid date formatter. Can only be one of ${allowedMethods.join(\n ', '\n )}`\n );\n }\n return this.dateFormatter[method]({\n date,\n locale,\n weekStartsOn,\n excludeDays,\n daysInWeek,\n });\n }\n}\n","import { CalendarEvent } from 'calendar-utils';\n\n/**\n * This class is responsible for displaying all event titles within the calendar. You may override any of its methods via angulars DI to suit your requirements. For example:\n *\n * ```typescript\n * import { Injectable } from '@angular/core';\n * import { CalendarEventTitleFormatter, CalendarEvent } from 'angular-calendar';\n *\n * @Injectable()\n * class CustomEventTitleFormatter extends CalendarEventTitleFormatter {\n *\n * month(event: CalendarEvent): string {\n * return `Custom prefix: ${event.title}`;\n * }\n *\n * }\n *\n * // in your component\n * providers: [{\n * provide: CalendarEventTitleFormatter,\n * useClass: CustomEventTitleFormatter\n * }]\n * ```\n */\nexport class CalendarEventTitleFormatter {\n /**\n * The month view event title.\n */\n month(event: CalendarEvent, title: string): string {\n return event.title;\n }\n\n /**\n * The month view event tooltip. Return a falsey value from this to disable the tooltip.\n */\n monthTooltip(event: CalendarEvent, title: string): string {\n return event.title;\n }\n\n /**\n * The week view event title.\n */\n week(event: CalendarEvent, title: string): string {\n return event.title;\n }\n\n /**\n * The week view event tooltip. Return a falsey value from this to disable the tooltip.\n */\n weekTooltip(event: CalendarEvent, title: string): string {\n return event.title;\n }\n\n /**\n * The day view event title.\n */\n day(event: CalendarEvent, title: string): string {\n return event.title;\n }\n\n /**\n * The day view event tooltip. Return a falsey value from this to disable the tooltip.\n */\n dayTooltip(event: CalendarEvent, title: string): string {\n return event.title;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { CalendarEvent } from 'calendar-utils';\nimport { CalendarEventTitleFormatter } from './calendar-event-title-formatter.provider';\n\n@Pipe({\n name: 'calendarEventTitle',\n})\nexport class CalendarEventTitlePipe implements PipeTransform {\n constructor(private calendarEventTitle: CalendarEventTitleFormatter) {}\n\n transform(title: string, titleType: string, event: CalendarEvent): string {\n return this.calendarEventTitle[titleType](event, title);\n }\n}\n","import {\n Directive,\n Renderer2,\n ElementRef,\n OnInit,\n OnDestroy,\n Output,\n EventEmitter,\n Inject,\n Input,\n NgZone,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { Observable, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n@Directive({\n selector: '[mwlClick]',\n})\nexport class ClickDirective implements OnInit, OnDestroy {\n @Input() clickListenerDisabled = false;\n\n @Output('mwlClick') click = new EventEmitter<MouseEvent>(); // tslint:disable-line\n\n private destroy$ = new Subject();\n\n constructor(\n private renderer: Renderer2,\n private elm: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) private document\n ) {}\n\n ngOnInit(): void {\n if (!this.clickListenerDisabled) {\n this.listen()\n .pipe(takeUntil(this.destroy$))\n .subscribe((event) => {\n event.stopPropagation();\n this.click.emit(event);\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n }\n\n private listen() {\n return new Observable<MouseEvent>((observer) => {\n return this.renderer.listen(this.elm.nativeElement, 'click', (event) => {\n observer.next(event);\n });\n });\n }\n}\n","import {\n Directive,\n Output,\n EventEmitter,\n ElementRef,\n NgZone,\n Renderer2,\n OnInit,\n OnDestroy,\n} from '@angular/core';\n\n@Directive({ selector: '[mwlKeydownEnter]' })\nexport class KeydownEnterDirective implements OnInit, OnDestroy {\n @Output('mwlKeydownEnter') keydown = new EventEmitter<any>(); // tslint:disable-line\n\n private keydownListener: VoidFunction | null = null;\n\n constructor(\n private host: ElementRef<HTMLElement>,\n private ngZone: NgZone,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.ngZone.runOutsideAngular(() => {\n this.keydownListener = this.renderer.listen(\n this.host.nativeElement,\n 'keydown',\n (event) => {\n if (\n event.keyCode === 13 ||\n event.which === 13 ||\n event.key === 'Enter'\n ) {\n event.preventDefault();\n event.stopPropagation();\n\n this.ngZone.run(() => {\n this.keydown.emit(event);\n });\n }\n }\n );\n });\n }\n\n ngOnDestroy(): void {\n if (this.keydownListener !== null) {\n this.keydownListener();\n this.keydownListener = null;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n GetMonthViewArgs,\n MonthView,\n GetWeekViewHeaderArgs,\n WeekDay,\n GetWeekViewArgs,\n WeekView,\n getMonthView,\n getWeekViewHeader,\n getWeekView,\n} from 'calendar-utils';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\n\n@Injectable()\nexport class CalendarUtils {\n constructor(protected dateAdapter: DateAdapter) {}\n\n getMonthView(args: GetMonthViewArgs): MonthView {\n return getMonthView(this.dateAdapter, args);\n }\n\n getWeekViewHeader(args: GetWeekViewHeaderArgs): WeekDay[] {\n return getWeekViewHeader(this.dateAdapter, args);\n }\n\n getWeekView(args: GetWeekViewArgs): WeekView {\n return getWeekView(this.dateAdapter, args);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { formatDate, I18nPluralPipe } from '@angular/common';\nimport { A11yParams } from './calendar-a11y.interface';\n\n/**\n * This class is responsible for adding accessibility to the calendar.\n * You may override any of its methods via angulars DI to suit your requirements.\n * For example:\n *\n * ```typescript\n * import { A11yParams, CalendarA11y } from 'angular-calendar';\n * import { formatDate, I18nPluralPipe } from '@angular/common';\n * import { Injectable } from '@angular/core';\n *\n * // adding your own a11y params\n * export interface CustomA11yParams extends A11yParams {\n * isDrSuess?: boolean;\n * }\n *\n * @Injectable()\n * export class CustomCalendarA11y extends CalendarA11y {\n * constructor(protected i18nPlural: I18nPluralPipe) {\n * super(i18nPlural);\n * }\n *\n * // overriding a function\n * public openDayEventsLandmark({ date, locale, isDrSuess }: CustomA11yParams): string {\n * if (isDrSuess) {\n * return `\n * ${formatDate(date, 'EEEE MMMM d', locale)}\n * Today you are you! That is truer than true! There is no one alive\n * who is you-er than you!\n * `;\n * }\n * }\n * }\n *\n * // in your component that uses the calendar\n * providers: [{\n * provide: CalendarA11y,\n * useClass: CustomCalendarA11y\n * }]\n * ```\n */\n@Injectable()\nexport class CalendarA11y {\n constructor(protected i18nPlural: I18nPluralPipe) {}\n\n /**\n * Aria label for the badges/date of a cell\n * @example: `Saturday October 19 1 event click to expand`\n */\n public monthCell({ day, locale }: A11yParams): string {\n if (day.badgeTotal > 0) {\n return `\n ${formatDate(day.date, 'EEEE MMMM d', locale)},\n ${this.i18nPlural.transform(day.badgeTotal, {\n '=0': 'No events',\n '=1': 'One event',\n other: '# events',\n })},\n click to expand\n `;\n } else {\n return `${formatDate(day.date, 'EEEE MMMM d', locale)}`;\n }\n }\n\n /**\n * Aria label for the open day events start landmark\n * @example: `Saturday October 19 expanded view`\n */\n public openDayEventsLandmark({ date, locale }: A11yParams): string {\n return `\n Beginning of expanded view for ${formatDate(date, 'EEEE MMMM dd', locale)}\n `;\n }\n\n /**\n * Aria label for alert that a day in the month view was expanded\n * @example: `Saturday October 19 expanded`\n */\n public openDayEventsAlert({ date, locale }: A11yParams): string {\n return `${formatDate(date, 'EEEE MMMM dd', locale)} expanded`;\n }\n\n /**\n * Descriptive aria label for an event\n * @example: `Saturday October 19th, Scott's Pizza Party, from 11:00am to 5:00pm`\n */\n public eventDescription({ event, locale }: A11yParams): string {\n if (event.allDay === true) {\n return this.allDayEventDescription({ event, locale });\n }\n\n const aria = `\n ${formatDate(event.start, 'EEEE MMMM dd', locale)},\n ${event.title}, from ${formatDate(event.start, 'hh:mm a', locale)}\n `;\n if (event.end) {\n return aria + ` to ${formatDate(event.end, 'hh:mm a', locale)}`;\n }\n return aria;\n }\n\n /**\n * Descriptive aria label for an all day event\n * @example:\n * `Scott's Party, event spans multiple days: start time October 19 5:00pm, no stop time`\n */\n public allDayEventDescription({ event, locale }: A11yParams): string {\n const aria = `\n ${event.title}, event spans multiple days:\n start time ${formatDate(event.start, 'MMMM dd hh:mm a', locale)}\n `;\n if (event.end) {\n return (\n aria + `, stop time ${formatDate(event.end, 'MMMM d hh:mm a', locale)}`\n );\n }\n return aria + `, no stop time`;\n }\n\n /**\n * Aria label for the calendar event actions icons\n * @returns 'Edit' for fa-pencil icons, and 'Delete' for fa-times icons\n */\n public actionButtonLabel({ action }: A11yParams): string {\n return action.a11yLabel;\n }\n\n /**\n * @returns {number} Tab index to be given to month cells\n */\n public monthCellTabIndex(): number {\n return 0;\n }\n\n /**\n * @returns true if the events inside the month cell should be aria-hidden\n */\n public hideMonthCellEvents(): boolean {\n return true;\n }\n\n /**\n * @returns true if event titles should be aria-hidden (global)\n */\n public hideEventTitle(): boolean {\n return true;\n }\n\n /**\n * @returns true if hour segments in the week view should be aria-hidden\n */\n public hideWeekHourSegment(): boolean {\n return true;\n }\n\n /**\n * @returns true if hour segments in the day view should be aria-hidden\n */\n public hideDayHourSegment(): boolean {\n return true;\n }\n}\n","import { Pipe, PipeTransform, LOCALE_ID, Inject } from '@angular/core';\nimport { CalendarA11y } from './calendar-a11y.provider';\nimport { A11yParams } from './calendar-a11y.interface';\n\n/**\n * This pipe is primarily for rendering aria labels. Example usage:\n * ```typescript\n * // where `myEvent` is a `CalendarEvent` and myLocale is a locale identifier\n * {{ { event: myEvent, locale: myLocale } | calendarA11y: 'eventDescription' }}\n * ```\n */\n@Pipe({\n name: 'calendarA11y',\n})\nexport class CalendarA11yPipe implements PipeTransform {\n constructor(\n private calendarA11y: CalendarA11y,\n @Inject(LOCALE_ID) private locale: string\n ) {}\n\n transform(a11yParams: A11yParams, method: string): string {\n a11yParams.locale = a11yParams.locale || this.locale;\n if (typeof this.calendarA11y[method] === 'undefined') {\n const allowedMethods = Object.getOwnPropertyNames(\n Object.getPrototypeOf(CalendarA11y.prototype)\n ).filter((iMethod) => iMethod !== 'constructor');\n throw new Error(\n `${method} is not a valid a11y method. Can only be one of ${allowedMethods.join(\n ', '\n )}`\n );\n }\n return this.calendarA11y[method](a11yParams);\n }\n}\n","import { InjectionToken, Inject, Injectable } from '@angular/core';\nimport {\n CalendarDateFormatterInterface,\n DateFormatterParams,\n} from './calendar-date-formatter.interface';\nimport { getWeekViewPeriod } from './util';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\n\nexport const MOMENT: InjectionToken<string> = new InjectionToken('Moment');\n\n/**\n * This will use <a href=\"http://momentjs.com/\" target=\"_blank\">moment</a> to do all date formatting. To use this class:\n *\n * ```typescript\n * import { CalendarDateFormatter, CalendarMomentDateFormatter, MOMENT } from 'angular-calendar';\n * import moment from 'moment';\n *\n * // in your component\n * provide: [{\n * provide: MOMENT, useValue: moment\n * }, {\n * provide: CalendarDateFormatter, useClass: CalendarMomentDateFormatter\n * }]\n *\n * ```\n */\n@Injectable()\nexport class CalendarMomentDateFormatter\n implements CalendarDateFormatterInterface\n{\n /**\n * @hidden\n */\n constructor(\n @Inject(MOMENT) protected moment: any,\n protected dateAdapter: DateAdapter\n ) {}\n\n /**\n * The month view header week day labels\n */\n public monthViewColumnHeader({ date, locale }: DateFormatterParams): string {\n return this.moment(date).locale(locale).format('dddd');\n }\n\n /**\n * The month view cell day number\n */\n public monthViewDayNumber({ date, locale }: DateFormatterParams): string {\n return this.moment(date).locale(locale).format('D');\n }\n\n /**\n * The month view title\n */\n public monthViewTitle({ date, locale }: DateFormatterParams): string {\n return this.moment(date).locale(locale).format('MMMM YYYY');\n }\n\n /**\n * The week view header week day labels\n */\n public weekViewColumnHeader({ date, locale }: DateFormatterParams): string {\n return this.moment(date).locale(locale).format('dddd');\n }\n\n /**\n * The week view sub header day and month labels\n */\n public weekViewColumnSubHeader({\n date,\n locale,\n }: DateFormatterParams): string {\n return this.moment(date).locale(locale).format('MMM D');\n }\n\n /**\n * The week view title\n */\n public weekViewTitle({\n date,\n locale,\n weekStartsOn,\n excludeDays,\n daysInWeek,\n }: DateFormatterParams): string {\n const { viewStart, viewEnd } = getWeekViewPeriod(\n this.dateAdapter,\n date,\n weekStartsOn,\n excludeDays,\n daysInWeek\n );\n const format = (dateToFormat: Date, showYear: boolean) =>\n this.moment(dateToFormat)\n .locale(locale)\n .format('MMM D' + (showYear ? ', YYYY' : ''));\n return `${format(\n viewStart,\n viewStart.getUTCFullYear() !== viewEnd.getUTCFullYear()\n )} - ${format(viewEnd, true)}`;\n }\n\n /**\n * The time formatting down the left hand side of the week view\n */\n public weekViewHour({ date, locale }: DateFormatterParams): string {\n return this.moment(date).locale(locale).format('ha');\n }\n\n /**\n * The time formatting down the left hand side of the day view\n */\n public dayViewHour({ date, locale }: DateFormatterParams): string {\n return this.moment(date).locale(locale).format('ha');\n }\n\n /**\n * The day view title\n */\n public dayViewTitle({ date, locale }: DateFormatterParams): string {\n return this.moment(date).locale(locale).format('dddd, D MMMM, YYYY');\n }\n}\n","import {\n CalendarDateFormatterInterface,\n DateFormatterParams,\n} from './calendar-date-formatter.interface';\nimport { Injectable } from '@angular/core';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\nimport { getWeekViewPeriod } from './util';\n\n/**\n * This will use <a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl\" target=\"_blank\">Intl</a> API to do all date formatting.\n *\n * You will need to include a <a href=\"https://github.com/andyearnshaw/Intl.js/\">polyfill</a> for older browsers.\n */\n@Injectable()\nexport class CalendarNativeDateFormatter\n implements CalendarDateFormatterInterface\n{\n constructor(protected dateAdapter: DateAdapter) {}\n\n /**\n * The month view header week day labels\n */\n public monthViewColumnHeader({ date, locale }: DateFormatterParams): string {\n return new Intl.DateTimeFormat(locale, { weekday: 'long' }).format(date);\n }\n\n /**\n * The month view cell day number\n */\n public monthViewDayNumber({ date, locale }: DateFormatterParams): string {\n return new Intl.DateTimeFormat(locale, { day: 'numeric' }).format(date);\n }\n\n /**\n * The month view title\n */\n public monthViewTitle({ date, locale }: DateFormatterParams): string {\n return new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'long',\n }).format(date);\n }\n\n /**\n * The week view header week day labels\n */\n public weekViewColumnHeader({ date, locale }: DateFormatterParams): string {\n return new Intl.DateTimeFormat(locale, { weekday: 'long' }).format(date);\n }\n\n /**\n * The week view sub header day and month labels\n */\n public weekViewColumnSubHeader({\n date,\n locale,\n }: DateFormatterParams): string {\n return new Intl.DateTimeFormat(locale, {\n day: 'numeric',\n month: 'short',\n }).format(date);\n }\n\n /**\n * The week view title\n */\n public weekViewTitle({\n date,\n locale,\n weekStartsOn,\n excludeDays,\n daysInWeek,\n }: DateFormatterParams): string {\n const { viewStart, viewEnd } = getWeekViewPeriod(\n this.dateAdapter,\n date,\n weekStartsOn,\n excludeDays,\n daysInWeek\n );\n\n const format = (dateToFormat: Date, showYear: boolean) =>\n new Intl.DateTimeFormat(locale, {\n day: 'numeric',\n month: 'short',\n year: showYear ? 'numeric' : undefined,\n }).format(dateToFormat);\n\n return `${format(\n viewStart,\n viewStart.getUTCFullYear() !== viewEnd.getUTCFullYear()\n )} - ${format(viewEnd, true)}`;\n }\n\n /**\n * The time formatting down the left hand side of the week view\n */\n public weekViewHour({ date, locale }: DateFormatterParams): string {\n return new Intl.DateTimeFormat(locale, { hour: 'numeric' }).format(date);\n }\n\n /**\n * The time formatting down the left hand side of the day view\n */\n public dayViewHour({ date, locale }: DateFormatterParams): string {\n return new Intl.DateTimeFormat(locale, { hour: 'numeric' }).format(date);\n }\n\n /**\n * The day view title\n */\n public dayViewTitle({ date, locale }: DateFormatterParams): string {\n return new Intl.DateTimeFormat(locale, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n weekday: 'long',\n }).format(date);\n }\n}\n","import { CalendarEvent } from 'calendar-utils';\n\nexport enum CalendarEventTimesChangedEventType {\n Drag = 'drag',\n Drop = 'drop',\n Resize = 'resize',\n}\n\n/**\n * The output `$event` type when an event is resized or dragged and dropped.\n */\nexport interface CalendarEventTimesChangedEvent<MetaType = any> {\n type: CalendarEventTimesChangedEventType;\n event: CalendarEvent<MetaType>;\n newStart: Date;\n newEnd?: Date;\n allDay?: boolean;\n}\n","import { ModuleWithProviders, NgModule, Provider } from '@angular/core';\nimport { CommonModule, I18nPluralPipe } from '@angular/common';\nimport { CalendarEventActionsComponent } from './calendar-event-actions.component';\nimport { CalendarEventTitleComponent } from './calendar-event-title.component';\nimport {\n CalendarTooltipDirective,\n CalendarTooltipWindowComponent,\n} from './calendar-tooltip.directive';\nimport { CalendarPreviousViewDirective } from './calendar-previous-view.directive';\nimport { CalendarNextViewDirective } from './calendar-next-view.directive';\nimport { CalendarTodayDirective } from './calendar-today.directive';\nimport { CalendarDatePipe } from './calendar-date.pipe';\nimport { CalendarEventTitlePipe } from './calendar-event-title.pipe';\nimport { ClickDirective } from './click.directive';\nimport { KeydownEnterDirective } from './keydown-enter.directive';\nimport { CalendarEventTitleFormatter } from './calendar-event-title-formatter.provider';\nimport { CalendarDateFormatter } from './calendar-date-formatter.provider';\nimport { CalendarUtils } from './calendar-utils.provider';\nimport { CalendarA11y } from './calendar-a11y.provider';\nimport { CalendarA11yPipe } from './calendar-a11y.pipe';\n\nexport interface CalendarModuleConfig {\n eventTitleFormatter?: Provider;\n dateFormatter?: Provider;\n utils?: Provider;\n a11y?: Provider;\n}\n\nexport * from './calendar-event-title-formatter.provider';\nexport * from './calendar-moment-date-formatter.provider';\nexport * from './calendar-native-date-formatter.provider';\nexport * from './calendar-angular-date-formatter.provider';\nexport * from './calendar-date-formatter.provider';\nexport * from './calendar-utils.provider';\nexport * from './calendar-a11y.provider';\nexport * from './calendar-a11y.interface';\nexport * from './calendar-date-formatter.interface';\nexport * from './calendar-event-times-changed-event.interface';\nexport * from '../../date-adapters/date-adapter';\nexport * from './calendar-view.enum';\n\nexport {\n CalendarEvent,\n EventAction as CalendarEventAction,\n DAYS_OF_WEEK,\n ViewPeriod as CalendarViewPeriod,\n} from 'calendar-utils';\n\n/**\n * Import this module to if you're just using a singular view and want to save on bundle size. Example usage:\n *\n * ```typescript\n * import { CalendarCommonModule, CalendarMonthModule } from 'angular-calendar';\n *\n * @NgModule({\n * imports: [\n * CalendarCommonModule.forRoot(),\n * CalendarMonthModule\n * ]\n * })\n * class MyModule {}\n * ```\n *\n */\n@NgModule({\n declarations: [\n CalendarEventActionsComponent,\n CalendarEventTitleComponent,\n CalendarTooltipWindowComponent,\n CalendarTooltipDirective,\n CalendarPreviousViewDirective,\n CalendarNextViewDirective,\n CalendarTodayDirective,\n CalendarDatePipe,\n CalendarEventTitlePipe,\n CalendarA11yPipe,\n ClickDirective,\n KeydownEnterDirective,\n ],\n imports: [CommonModule],\n exports: [\n CalendarEventActionsComponent,\n CalendarEventTitleComponent,\n CalendarTooltipWindowComponent,\n CalendarTooltipDirective,\n CalendarPreviousViewDirective,\n CalendarNextViewDirective,\n CalendarTodayDirective,\n CalendarDatePipe,\n CalendarEventTitlePipe,\n CalendarA11yPipe,\n ClickDirective,\n KeydownEnterDirective,\n ],\n providers: [I18nPluralPipe],\n entryComponents: [CalendarTooltipWindowComponent],\n})\nexport class CalendarCommonModule {\n static forRoot(\n dateAdapter: Provider,\n config: CalendarModuleConfig = {}\n ): ModuleWithProviders<CalendarCommonModule> {\n return {\n ngModule: CalendarCommonModule,\n providers: [\n dateAdapter,\n config.eventTitleFormatter || CalendarEventTitleFormatter,\n config.dateFormatter || CalendarDateFormatter,\n config.utils || CalendarUtils,\n config.a11y || CalendarA11y,\n ],\n };\n }\n}\n","import {\n Component,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n OnInit,\n OnDestroy,\n LOCALE_ID,\n Inject,\n TemplateRef,\n} from '@angular/core';\nimport {\n CalendarEvent,\n WeekDay,\n MonthView,\n MonthViewDay,\n ViewPeriod,\n} from 'calendar-utils';\nimport { Subject, Subscription } from 'rxjs';\nimport {\n CalendarEventTimesChangedEvent,\n CalendarEventTimesChangedEventType,\n} from '../common/calendar-event-times-changed-event.interface';\nimport { CalendarUtils } from '../common/calendar-utils.provider';\nimport { validateEvents } from '../common/util';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\nimport { PlacementArray } from 'positioning';\n\nexport interface CalendarMonthViewBeforeRenderEvent {\n header: WeekDay[];\n body: MonthViewDay[];\n period: ViewPeriod;\n}\n\nexport interface CalendarMonthViewEventTimesChangedEvent<\n EventMetaType = any,\n DayMetaType = any\n> extends CalendarEventTimesChangedEvent<EventMetaType> {\n day: MonthViewDay<DayMetaType>;\n}\n\n/**\n * Shows all events on a given month. Example usage:\n *\n * ```typescript\n * <mwl-calendar-month-view\n * [viewDate]=\"viewDate\"\n * [events]=\"events\">\n * </mwl-calendar-month-view>\n * ```\n */\n@Component({\n selector: 'mwl-calendar-month-view',\n template: `\n <div class=\"cal-month-view\" role=\"grid\">\n <mwl-calendar-month-view-header\n [days]=\"columnHeaders\"\n [locale]=\"locale\"\n (columnHeaderClicked)=\"columnHeaderClicked.emit($event)\"\n [customTemplate]=\"headerTemplate\"\n >\n </mwl-calendar-month-view-header>\n <div class=\"cal-days\">\n <div\n *ngFor=\"let rowIndex of view.rowOffsets; trackBy: trackByRowOffset\"\n >\n <div role=\"row\" class=\"cal-cell-row\">\n <mwl-calendar-month-cell\n role=\"gridcell\"\n *ngFor=\"\n let day of view.days\n | slice: rowIndex:rowIndex + view.totalDaysVisibleInWeek;\n trackBy: trackByDate\n \"\n [ngClass]=\"day?.cssClass\"\n [day]=\"day\"\n [openDay]=\"openDay\"\n [locale]=\"locale\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipDelay]=\"tooltipDelay\"\n [customTemplate]=\"cellTemplate\"\n [ngStyle]=\"{ backgroundColor: day.backgroundColor }\"\n (mwlClick)=\"dayClicked.emit({ day: day, sourceEvent: $event })\"\n [clickListenerDisabled]=\"dayClicked.observers.length === 0\"\n (mwlKeydownEnter)=\"\n dayClicked.emit({ day: day, sourceEvent: $event })\n \"\n (highlightDay)=\"toggleDayHighlight($event.event, true)\"\n (unhighlightDay)=\"toggleDayHighlight($event.event, false)\"\n mwlDroppable\n dragOverClass=\"cal-drag-over\"\n (drop)=\"\n eventDropped(\n day,\n $event.dropData.event,\n $event.dropData.draggedFrom\n )\n \"\n (eventClicked)=\"\n eventClicked.emit({\n event: $event.event,\n sourceEvent: $event.sourceEvent\n })\n \"\n [attr.tabindex]=\"{} | calendarA11y: 'monthCellTabIndex'\"\n >\n </mwl-calendar-month-cell>\n </div>\n <mwl-calendar-open-day-events\n [locale]=\"locale\"\n [isOpen]=\"openRowIndex === rowIndex\"\n [events]=\"openDay?.events\"\n [date]=\"openDay?.date\"\n [customTemplate]=\"openDayEventsTemplate\"\n [eventTitleTemplate]=\"eventTitleTemplate\"\n [eventActionsTemplate]=\"eventActionsTemplate\"\n (eventClicked)=\"\n eventClicked.emit({\n event: $event.event,\n sourceEvent: $event.sourceEvent\n })\n \"\n mwlDroppable\n dragOverClass=\"cal-drag-over\"\n (drop)=\"\n eventDropped(\n openDay,\n $event.dropData.event,\n $event.dropData.draggedFrom\n )\n \"\n >\n </mwl-calendar-open-day-events>\n </div>\n </div>\n </div>\n `,\n})\nexport class CalendarMonthViewComponent\n implements OnChanges, OnInit, OnDestroy\n{\n /**\n * The current view date\n */\n @Input() viewDate: Date;\n\n /**\n * An array of events to display on view.\n * The schema is available here: https://github.com/mattlewis92/calendar-utils/blob/c51689985f59a271940e30bc4e2c4e1fee3fcb5c/src/calendarUtils.ts#L49-L63\n */\n @Input() events: CalendarEvent[] = [];\n\n /**\n * An array of day indexes (0 = sunday, 1 = monday etc) that will be hidden on the view\n */\n @Input() excludeDays: number[] = [];\n\n /**\n * Whether the events list for the day of the `viewDate` option is visible or not\n */\n @Input() activeDayIsOpen: boolean = false;\n\n /**\n * If set will be used to determine the day that should be open. If not set, the `viewDate` is used\n */\n @Input() activeDay: Date;\n\n /**\n * An observable that when emitted on will re-render the current view\n */\n @Input() refresh: Subject<any>;\n\n /**\n * The locale used to format dates\n */\n @Input() locale: string;\n\n /**\n * The placement of the event tooltip\n */\n @Input() tooltipPlacement: PlacementArray = 'auto';\n\n /**\n * A custom template to use for the event tooltips\n */\n @Input() tooltipTemplate: TemplateRef<any>;\n\n /**\n * Whether to append tooltips to the body or next to the trigger element\n */\n @Input() tooltipAppendToBody: boolean = true;\n\n /**\n * The delay in milliseconds before the tooltip should be displayed. If not provided the tooltip\n * will be displayed immediately.\n */\n @Input() tooltipDelay: number | null = null;\n\n /**\n * The start number of the week.\n * If using the moment date adapter this option won't do anything and you'll need to set it globally like so:\n * ```\n * moment.updateLocale('en', {\n * week: {\n * dow: 1, // set start of week to monday instead\n * doy: 0,\n * },\n * });\n * ```\n */\n @Input() weekStartsOn: number;\n\n /**\n * A custom template to use to replace the header\n */\n @Input() headerTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use to replace the day cell\n */\n @Input() cellTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use for the slide down box of events for the active day\n */\n @Input() openDayEventsTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use for event titles\n */\n @Input() eventTitleTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use for event actions\n */\n @Input() eventActionsTemplate: TemplateRef<any>;\n\n /**\n * An array of day indexes (0 = sunday, 1 = monday etc) that indicate which days are weekends\n */\n @Input() weekendDays: number[];\n\n /**\n * An output that will be called before the view is rendered for the current month.\n * If you add the `cssClass` property to a day in the body it will add that class to the cell element in the template\n */\n @Output() beforeViewRender =\n new EventEmitter<CalendarMonthViewBeforeRenderEvent>();\n\n /**\n * Called when the day cell is clicked\n */\n @Output() dayClicked = new EventEmitter<{\n day: MonthViewDay;\n sourceEvent: MouseEvent | any;\n }>();\n\n /**\n * Called when the event title is clicked\n */\n @Output() eventClicked = new EventEmitter<{\n event: CalendarEvent;\n sourceEvent: MouseEvent | any;\n }>();\n\n /**\n * Called when a header week day is clicked. Returns ISO day number.\n */\n @Output() columnHeaderClicked = new EventEmitter<{\n isoDayNumber: number;\n sourceEvent: MouseEvent | any;\n }>();\n\n /**\n * Called when an event is dragged and dropped\n */\n @Output()\n eventTimesChanged = new EventEmitter<CalendarMonthViewEventTimesChangedEvent>();\n\n /**\n * @hidden\n */\n columnHeaders: WeekDay[];\n\n /**\n * @hidden\n */\n view: MonthView;\n\n /**\n * @hidden\n */\n openRowIndex: number;\n\n /**\n * @hidden\n */\n openDay: MonthViewDay;\n\n /**\n * @hidden\n */\n refreshSubscription: Subscription;\n\n /**\n * @hidden\n */\n constructor(\n protected cdr: ChangeDetectorRef,\n protected utils: CalendarUtils,\n @Inject(LOCALE_ID) locale: string,\n protected dateAdapter: DateAdapter\n ) {\n this.locale = locale;\n }\n\n /**\n * @hidden\n */\n trackByRowOffset = (index: number, offset: number) =>\n this.view.days\n .slice(offset, this.view.totalDaysVisibleInWeek)\n .map((day) => day.date.toISOString())\n .join('-');\n\n /**\n * @hidden\n */\n trackByDate = (index: number, day: MonthViewDay) => day.date.toISOString();\n\n /**\n * @hidden\n */\n ngOnInit(): void {\n if (this.refresh) {\n this.refreshSubscription = this.refresh.subscribe(() => {\n this.refreshAll();\n this.cdr.markForCheck();\n });\n }\n }\n\n /**\n * @hidden\n */\n ngOnChanges(changes: any): void {\n const refreshHeader =\n changes.viewDate || changes.excludeDays || changes.weekendDays;\n const refreshBody =\n changes.viewDate ||\n changes.events ||\n changes.excludeDays ||\n changes.weekendDays;\n\n if (refreshHeader) {\n this.refreshHeader();\n }\n\n if (changes.events) {\n validateEvents(this.events);\n }\n\n if (refreshBody) {\n this.refreshBody();\n }\n\n if (refreshHeader || refreshBody) {\n this.emitBeforeViewRender();\n }\n\n if (\n changes.activeDayIsOpen ||\n changes.viewDate ||\n changes.events ||\n changes.excludeDays ||\n changes.activeDay\n ) {\n this.checkActiveDayIsOpen();\n }\n }\n\n /**\n * @hidden\n */\n ngOnDestroy(): void {\n if (this.refreshSubscription) {\n this.refreshSubscription.unsubscribe();\n }\n }\n\n /**\n * @hidden\n */\n toggleDayHighlight(event: CalendarEvent, isHighlighted: boolean): void {\n this.view.days.forEach((day) => {\n if (isHighlighted && day.events.indexOf(event) > -1) {\n day.backgroundColor =\n (event.color && event.color.secondary) || '#D1E8FF';\n } else {\n delete day.backgroundColor;\n }\n });\n }\n\n /**\n * @hidden\n */\n eventDropped(\n droppedOn: MonthViewDay,\n event: CalendarEvent,\n draggedFrom?: MonthViewDay\n ): void {\n if (droppedOn !== draggedFrom) {\n const year: number = this.dateAdapter.getYear(droppedOn.date);\n const month: number = this.dateAdapter.getMonth(droppedOn.date);\n const date: number = this.dateAdapter.getDate(droppedOn.date);\n const newStart: Date = this.dateAdapter.setDate(\n this.dateAdapter.setMonth(\n this.dateAdapter.setYear(event.start, year),\n month\n ),\n date\n );\n let newEnd: Date;\n if (event.end) {\n const secondsDiff: number = this.dateAdapter.differenceInSeconds(\n newStart,\n event.start\n );\n newEnd = this.dateAdapter.addSeconds(event.end, secondsDiff);\n }\n this.eventTimesChanged.emit({\n event,\n newStart,\n newEnd,\n day: droppedOn,\n type: CalendarEventTimesChangedEventType.Drop,\n });\n }\n }\n\n protected refreshHeader(): void {\n this.columnHeaders = this.utils.getWeekViewHeader({\n viewDate: this.viewDate,\n weekStartsOn: this.weekStartsOn,\n excluded: this.excludeDays,\n weekendDays: this.weekendDays,\n });\n }\n\n protected refreshBody(): void {\n this.view = this.utils.getMonthView({\n events: this.events,\n viewDate: this.viewDate,\n weekStartsOn: this.weekStartsOn,\n excluded: this.excludeDays,\n weekendDays: this.weekendDays,\n });\n }\n\n protected checkActiveDayIsOpen(): void {\n if (this.activeDayIsOpen === true) {\n const activeDay = this.activeDay || this.viewDate;\n this.openDay = this.view.days.find((day) =>\n this.dateAdapter.isSameDay(day.date, activeDay)\n );\n const index: number = this.view.days.indexOf(this.openDay);\n this.openRowIndex =\n Math.floor(index / this.view.totalDaysVisibleInWeek) *\n this.view.totalDaysVisibleInWeek;\n } else {\n this.openRowIndex = null;\n this.openDay = null;\n }\n }\n\n protected refreshAll(): void {\n this.refreshHeader();\n this.refreshBody();\n this.emitBeforeViewRender();\n this.checkActiveDayIsOpen();\n }\n\n protected emitBeforeViewRender(): void {\n if (this.columnHeaders && this.view) {\n this.beforeViewRender.emit({\n header: this.columnHeaders,\n body: this.view.days,\n period: this.view.period,\n });\n }\n }\n}\n","import {\n Component,\n Input,\n TemplateRef,\n EventEmitter,\n Output,\n} from '@angular/core';\nimport { WeekDay } from 'calendar-utils';\nimport { trackByWeekDayHeaderDate } from '../common/util';\n\n@Component({\n selector: 'mwl-calendar-month-view-header',\n template: `\n <ng-template\n #defaultTemplate\n let-days=\"days\"\n let-locale=\"locale\"\n let-trackByWeekDayHeaderDate=\"trackByWeekDayHeaderDate\"\n >\n <div class=\"cal-cell-row cal-header\" role=\"row\">\n <div\n class=\"cal-cell\"\n *ngFor=\"let day of days; trackBy: trackByWeekDayHeaderDate\"\n [class.cal-past]=\"day.isPast\"\n [class.cal-today]=\"day.isToday\"\n [class.cal-future]=\"day.isFuture\"\n [class.cal-weekend]=\"day.isWeekend\"\n (click)=\"\n columnHeaderClicked.emit({\n isoDayNumber: day.day,\n sourceEvent: $event\n })\n \"\n [ngClass]=\"day.cssClass\"\n tabindex=\"0\"\n role=\"columnheader\"\n >\n {{ day.date | calendarDate: 'monthViewColumnHeader':locale }}\n </div>\n </div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n days: days,\n locale: locale,\n trackByWeekDayHeaderDate: trackByWeekDayHeaderDate\n }\"\n >\n </ng-template>\n `,\n})\nexport class CalendarMonthViewHeaderComponent {\n @Input() days: WeekDay[];\n\n @Input() locale: string;\n\n @Input() customTemplate: TemplateRef<any>;\n\n @Output() columnHeaderClicked = new EventEmitter<{\n isoDayNumber: number;\n sourceEvent: MouseEvent;\n }>();\n\n trackByWeekDayHeaderDate = trackByWeekDayHeaderDate;\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n TemplateRef,\n} from '@angular/core';\nimport { MonthViewDay, CalendarEvent } from 'calendar-utils';\nimport { isWithinThreshold, trackByEventId } from '../common/util';\nimport { PlacementArray } from 'positioning';\n\n@Component({\n selector: 'mwl-calendar-month-cell',\n template: `\n <ng-template\n #defaultTemplate\n let-day=\"day\"\n let-openDay=\"openDay\"\n let-locale=\"locale\"\n let-tooltipPlacement=\"tooltipPlacement\"\n let-highlightDay=\"highlightDay\"\n let-unhighlightDay=\"unhighlightDay\"\n let-eventClicked=\"eventClicked\"\n let-tooltipTemplate=\"tooltipTemplate\"\n let-tooltipAppendToBody=\"tooltipAppendToBody\"\n let-tooltipDelay=\"tooltipDelay\"\n let-trackByEventId=\"trackByEventId\"\n let-validateDrag=\"validateDrag\"\n >\n <div\n class=\"cal-cell-top\"\n [attr.aria-label]=\"\n { day: day, locale: locale } | calendarA11y: 'monthCell'\n \"\n >\n <span aria-hidden=\"true\">\n <span class=\"cal-day-badge\" *ngIf=\"day.badgeTotal > 0\">{{\n day.badgeTotal\n }}</span>\n <span class=\"cal-day-number\">{{\n day.date | calendarDate: 'monthViewDayNumber':locale\n }}</span>\n </span>\n </div>\n <div class=\"cal-events\" *ngIf=\"day.events.length > 0\">\n <div\n class=\"cal-event\"\n *ngFor=\"let event of day.events; trackBy: trackByEventId\"\n [ngStyle]=\"{ backgroundColor: event.color?.primary }\"\n [ngClass]=\"event?.cssClass\"\n (mouseenter)=\"highlightDay.emit({ event: event })\"\n (mouseleave)=\"unhighlightDay.emit({ event: event })\"\n [mwlCalendarTooltip]=\"\n event.title | calendarEventTitle: 'monthTooltip':event\n \"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipEvent]=\"event\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipDelay]=\"tooltipDelay\"\n mwlDraggable\n [class.cal-draggable]=\"event.draggable\"\n dragActiveClass=\"cal-drag-active\"\n [dropData]=\"{ event: event, draggedFrom: day }\"\n [dragAxis]=\"{ x: event.draggable, y: event.draggable }\"\n [validateDrag]=\"validateDrag\"\n [touchStartLongPress]=\"{ delay: 300, delta: 30 }\"\n (mwlClick)=\"eventClicked.emit({ event: event, sourceEvent: $event })\"\n [attr.aria-hidden]=\"{} | calendarA11y: 'hideMonthCellEvents'\"\n ></div>\n </div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n day: day,\n openDay: openDay,\n locale: locale,\n tooltipPlacement: tooltipPlacement,\n highlightDay: highlightDay,\n unhighlightDay: unhighlightDay,\n eventClicked: eventClicked,\n tooltipTemplate: tooltipTemplate,\n tooltipAppendToBody: tooltipAppendToBody,\n tooltipDelay: tooltipDelay,\n trackByEventId: trackByEventId,\n validateDrag: validateDrag\n }\"\n >\n </ng-template>\n `,\n host: {\n class: 'cal-cell cal-day-cell',\n '[class.cal-past]': 'day.isPast',\n '[class.cal-today]': 'day.isToday',\n '[class.cal-future]': 'day.isFuture',\n '[class.cal-weekend]': 'day.isWeekend',\n '[class.cal-in-month]': 'day.inMonth',\n '[class.cal-out-month]': '!day.inMonth',\n '[class.cal-has-events]': 'day.events.length > 0',\n '[class.cal-open]': 'day === openDay',\n '[class.cal-event-highlight]': '!!day.backgroundColor',\n },\n})\nexport class CalendarMonthCellComponent {\n @Input() day: MonthViewDay;\n\n @Input() openDay: MonthViewDay;\n\n @Input() locale: string;\n\n @Input() tooltipPlacement: PlacementArray;\n\n @Input() tooltipAppendToBody: boolean;\n\n @Input() customTemplate: TemplateRef<any>;\n\n @Input() tooltipTemplate: TemplateRef<any>;\n\n @Input() tooltipDelay: number | null;\n\n @Output() highlightDay: EventEmitter<any> = new EventEmitter();\n\n @Output() unhighlightDay: EventEmitter<any> = new EventEmitter();\n\n @Output() eventClicked = new EventEmitter<{\n event: CalendarEvent;\n sourceEvent: MouseEvent;\n }>();\n\n trackByEventId = trackByEventId;\n\n validateDrag = isWithinThreshold;\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n TemplateRef,\n} from '@angular/core';\nimport {\n trigger,\n style,\n state,\n transition,\n animate,\n AnimationTriggerMetadata,\n} from '@angular/animations';\nimport { CalendarEvent } from 'calendar-utils';\nimport { isWithinThreshold, trackByEventId } from '../common/util';\n\nexport const collapseAnimation: AnimationTriggerMetadata = trigger('collapse', [\n state(\n 'void',\n style({\n height: 0,\n overflow: 'hidden',\n 'padding-top': 0,\n 'padding-bottom': 0,\n })\n ),\n state(\n '*',\n style({\n height: '*',\n overflow: 'hidden',\n 'padding-top': '*',\n 'padding-bottom': '*',\n })\n ),\n transition('* => void', animate('150ms ease-out')),\n transition('void => *', animate('150ms ease-in')),\n]);\n\n@Component({\n selector: 'mwl-calendar-open-day-events',\n template: `\n <ng-template\n #defaultTemplate\n let-events=\"events\"\n let-eventClicked=\"eventClicked\"\n let-isOpen=\"isOpen\"\n let-trackByEventId=\"trackByEventId\"\n let-validateDrag=\"validateDrag\"\n >\n <div\n class=\"cal-open-day-events\"\n [@collapse]\n *ngIf=\"isOpen\"\n role=\"application\"\n >\n <span\n tabindex=\"-1\"\n role=\"alert\"\n [attr.aria-label]=\"\n { date: date, locale: locale } | calendarA11y: 'openDayEventsAlert'\n \"\n ></span>\n <span\n tabindex=\"0\"\n role=\"landmark\"\n [attr.aria-label]=\"\n { date: date, locale: locale }\n | calendarA11y: 'openDayEventsLandmark'\n \"\n ></span>\n <div\n *ngFor=\"let event of events; trackBy: trackByEventId\"\n [ngClass]=\"event?.cssClass\"\n mwlDraggable\n [class.cal-draggable]=\"event.draggable\"\n dragActiveClass=\"cal-drag-active\"\n [dropData]=\"{ event: event }\"\n [dragAxis]=\"{ x: event.draggable, y: event.draggable }\"\n [validateDrag]=\"validateDrag\"\n [touchStartLongPress]=\"{ delay: 300, delta: 30 }\"\n >\n <span\n class=\"cal-event\"\n [ngStyle]=\"{ backgroundColor: event.color?.primary }\"\n >\n </span>\n &ngsp;\n <mwl-calendar-event-title\n [event]=\"event\"\n [customTemplate]=\"eventTitleTemplate\"\n view=\"month\"\n (mwlClick)=\"\n eventClicked.emit({ event: event, sourceEvent: $event })\n \"\n (mwlKeydownEnter)=\"\n eventClicked.emit({ event: event, sourceEvent: $event })\n \"\n tabindex=\"0\"\n [attr.aria-label]=\"\n { event: event, locale: locale }\n | calendarA11y: 'eventDescription'\n \"\n >\n </mwl-calendar-event-title>\n &ngsp;\n <mwl-calendar-event-actions\n [event]=\"event\"\n [customTemplate]=\"eventActionsTemplate\"\n >\n </mwl-calendar-event-actions>\n </div>\n </div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n events: events,\n eventClicked: eventClicked,\n isOpen: isOpen,\n trackByEventId: trackByEventId,\n validateDrag: validateDrag\n }\"\n >\n </ng-template>\n `,\n animations: [collapseAnimation],\n})\nexport class CalendarOpenDayEventsComponent {\n @Input() locale: string;\n\n @Input() isOpen: boolean = false;\n\n @Input() events: CalendarEvent[];\n\n @Input() customTemplate: TemplateRef<any>;\n\n @Input() eventTitleTemplate: TemplateRef<any>;\n\n @Input() eventActionsTemplate: TemplateRef<any>;\n\n @Input() date: Date;\n\n @Output() eventClicked = new EventEmitter<{\n event: CalendarEvent;\n sourceEvent: MouseEvent | any;\n }>();\n\n trackByEventId = trackByEventId;\n\n validateDrag = isWithinThreshold;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DragAndDropModule } from 'angular-draggable-droppable';\nimport { CalendarMonthViewComponent } from './calendar-month-view.component';\nimport { CalendarMonthViewHeaderComponent } from './calendar-month-view-header.component';\nimport { CalendarMonthCellComponent } from './calendar-month-cell.component';\nimport { CalendarOpenDayEventsComponent } from './calendar-open-day-events.component';\nimport { CalendarCommonModule } from '../common/calendar-common.module';\n\nexport {\n CalendarMonthViewComponent,\n CalendarMonthViewBeforeRenderEvent,\n CalendarMonthViewEventTimesChangedEvent,\n} from './calendar-month-view.component';\nexport { MonthViewDay as CalendarMonthViewDay } from 'calendar-utils';\nexport { collapseAnimation } from './calendar-open-day-events.component';\n\n@NgModule({\n imports: [CommonModule, DragAndDropModule, CalendarCommonModule],\n declarations: [\n CalendarMonthViewComponent,\n CalendarMonthCellComponent,\n CalendarOpenDayEventsComponent,\n CalendarMonthViewHeaderComponent,\n ],\n exports: [\n DragAndDropModule,\n CalendarMonthViewComponent,\n CalendarMonthCellComponent,\n CalendarOpenDayEventsComponent,\n CalendarMonthViewHeaderComponent,\n ],\n})\nexport class CalendarMonthModule {}\n","import { isInside, isWithinThreshold } from './util';\nimport { ValidateDragParams } from 'angular-draggable-droppable';\n\nexport class CalendarDragHelper {\n private readonly startPosition: ClientRect;\n\n constructor(\n private dragContainerElement: HTMLElement,\n draggableElement: HTMLElement\n ) {\n this.startPosition = draggableElement.getBoundingClientRect();\n }\n\n validateDrag({\n x,\n y,\n snapDraggedEvents,\n dragAlreadyMoved,\n transform,\n }: {\n x: number;\n y: number;\n snapDraggedEvents: boolean;\n dragAlreadyMoved: boolean;\n transform: ValidateDragParams['transform'];\n }): boolean {\n if (snapDraggedEvents) {\n const newRect: ClientRect = Object.assign({}, this.startPosition, {\n left: this.startPosition.left + transform.x,\n right: this.startPosition.right + transform.x,\n top: this.startPosition.top + transform.y,\n bottom: this.startPosition.bottom + transform.y,\n });\n\n return (\n (isWithinThreshold({ x, y }) || dragAlreadyMoved) &&\n isInside(this.dragContainerElement.getBoundingClientRect(), newRect)\n );\n } else {\n return isWithinThreshold({ x, y }) || dragAlreadyMoved;\n }\n }\n}\n","import { isInside } from './util';\n\nexport class CalendarResizeHelper {\n constructor(\n private resizeContainerElement: HTMLElement,\n private minWidth?: number\n ) {}\n\n validateResize({ rectangle }: { rectangle: ClientRect }): boolean {\n if (\n this.minWidth &&\n Math.ceil(rectangle.width) < Math.ceil(this.minWidth)\n ) {\n return false;\n }\n\n return isInside(\n this.resizeContainerElement.getBoundingClientRect(),\n rectangle\n );\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n OnChanges,\n OnInit,\n OnDestroy,\n LOCALE_ID,\n Inject,\n TemplateRef,\n} from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport {\n WeekDay,\n CalendarEvent,\n WeekViewAllDayEvent,\n WeekView,\n ViewPeriod,\n WeekViewHourColumn,\n WeekViewTimeEvent,\n WeekViewHourSegment,\n WeekViewHour,\n WeekViewAllDayEventRow,\n} from 'calendar-utils';\nimport { ResizeEvent } from 'angular-resizable-element';\nimport { CalendarDragHelper } from '../common/calendar-drag-helper.provider';\nimport { CalendarResizeHelper } from '../common/calendar-resize-helper.provider';\nimport {\n CalendarEventTimesChangedEvent,\n CalendarEventTimesChangedEventType,\n} from '../common/calendar-event-times-changed-event.interface';\nimport { CalendarUtils } from '../common/calendar-utils.provider';\nimport {\n validateEvents,\n roundToNearest,\n trackByWeekDayHeaderDate,\n trackByHourSegment,\n trackByHour,\n getMinutesMoved,\n getDefaultEventEnd,\n getMinimumEventHeightInMinutes,\n addDaysWithExclusions,\n isDraggedWithinPeriod,\n shouldFireDroppedEvent,\n getWeekViewPeriod,\n trackByWeekAllDayEvent,\n trackByWeekTimeEvent,\n} from '../common/util';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\nimport {\n DragEndEvent,\n DropEvent,\n DragMoveEvent,\n ValidateDrag,\n} from 'angular-draggable-droppable';\nimport { PlacementArray } from 'positioning';\n\nexport interface WeekViewAllDayEventResize {\n originalOffset: number;\n originalSpan: number;\n edge: string;\n}\n\nexport interface CalendarWeekViewBeforeRenderEvent extends WeekView {\n header: WeekDay[];\n}\n\n/**\n * Shows all events on a given week. Example usage:\n *\n * ```typescript\n * <mwl-calendar-week-view\n * [viewDate]=\"viewDate\"\n * [events]=\"events\">\n * </mwl-calendar-week-view>\n * ```\n */\n@Component({\n selector: 'mwl-calendar-week-view',\n template: `\n <div class=\"cal-week-view\" role=\"grid\">\n <mwl-calendar-week-view-header\n [days]=\"days\"\n [locale]=\"locale\"\n [customTemplate]=\"headerTemplate\"\n (dayHeaderClicked)=\"dayHeaderClicked.emit($event)\"\n (eventDropped)=\"\n eventDropped({ dropData: $event }, $event.newStart, true)\n \"\n (dragEnter)=\"dateDragEnter($event.date)\"\n >\n </mwl-calendar-week-view-header>\n <div\n class=\"cal-all-day-events\"\n #allDayEventsContainer\n *ngIf=\"view.allDayEventRows.length > 0\"\n mwlDroppable\n (dragEnter)=\"dragEnter('allDay')\"\n (dragLeave)=\"dragLeave('allDay')\"\n >\n <div class=\"cal-day-columns\">\n <div\n class=\"cal-time-label-column\"\n [ngTemplateOutlet]=\"allDayEventsLabelTemplate\"\n ></div>\n <div\n class=\"cal-day-column\"\n *ngFor=\"let day of days; trackBy: trackByWeekDayHeaderDate\"\n mwlDroppable\n dragOverClass=\"cal-drag-over\"\n (drop)=\"eventDropped($event, day.date, true)\"\n (dragEnter)=\"dateDragEnter(day.date)\"\n ></div>\n </div>\n <div\n *ngFor=\"let eventRow of view.allDayEventRows; trackBy: trackById\"\n #eventRowContainer\n class=\"cal-events-row\"\n >\n <div\n *ngFor=\"\n let allDayEvent of eventRow.row;\n trackBy: trackByWeekAllDayEvent\n \"\n #event\n class=\"cal-event-container\"\n [class.cal-draggable]=\"\n allDayEvent.event.draggable && allDayEventResizes.size === 0\n \"\n [class.cal-starts-within-week]=\"!allDayEvent.startsBeforeWeek\"\n [class.cal-ends-within-week]=\"!allDayEvent.endsAfterWeek\"\n [ngClass]=\"allDayEvent.event?.cssClass\"\n [style.width.%]=\"(100 / days.length) * allDayEvent.span\"\n [style.marginLeft.%]=\"(100 / days.length) * allDayEvent.offset\"\n mwlResizable\n [resizeSnapGrid]=\"{ left: dayColumnWidth, right: dayColumnWidth }\"\n [validateResize]=\"validateResize\"\n (resizeStart)=\"\n allDayEventResizeStarted(eventRowContainer, allDayEvent, $event)\n \"\n (resizing)=\"\n allDayEventResizing(allDayEvent, $event, dayColumnWidth)\n \"\n (resizeEnd)=\"allDayEventResizeEnded(allDayEvent)\"\n mwlDraggable\n dragActiveClass=\"cal-drag-active\"\n [dropData]=\"{ event: allDayEvent.event, calendarId: calendarId }\"\n [dragAxis]=\"{\n x: allDayEvent.event.draggable && allDayEventResizes.size === 0,\n y:\n !snapDraggedEvents &&\n allDayEvent.event.draggable &&\n allDayEventResizes.size === 0\n }\"\n [dragSnapGrid]=\"snapDraggedEvents ? { x: dayColumnWidth } : {}\"\n [validateDrag]=\"validateDrag\"\n [touchStartLongPress]=\"{ delay: 300, delta: 30 }\"\n (dragStart)=\"dragStarted(eventRowContainer, event)\"\n (dragging)=\"allDayEventDragMove()\"\n (dragEnd)=\"dragEnded(allDayEvent, $event, dayColumnWidth)\"\n >\n <div\n class=\"cal-resize-handle cal-resize-handle-before-start\"\n *ngIf=\"\n allDayEvent.event?.resizable?.beforeStart &&\n !allDayEvent.startsBeforeWeek\n \"\n mwlResizeHandle\n [resizeEdges]=\"{ left: true }\"\n ></div>\n <mwl-calendar-week-view-event\n [locale]=\"locale\"\n [weekEvent]=\"allDayEvent\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipDelay]=\"tooltipDelay\"\n [customTemplate]=\"eventTemplate\"\n [eventTitleTemplate]=\"eventTitleTemplate\"\n [eventActionsTemplate]=\"eventActionsTemplate\"\n [daysInWeek]=\"daysInWeek\"\n (eventClicked)=\"\n eventClicked.emit({\n event: allDayEvent.event,\n sourceEvent: $event.sourceEvent\n })\n \"\n >\n </mwl-calendar-week-view-event>\n <div\n class=\"cal-resize-handle cal-resize-handle-after-end\"\n *ngIf=\"\n allDayEvent.event?.resizable?.afterEnd &&\n !allDayEvent.endsAfterWeek\n \"\n mwlResizeHandle\n [resizeEdges]=\"{ right: true }\"\n ></div>\n </div>\n </div>\n </div>\n <div\n class=\"cal-time-events\"\n mwlDroppable\n (dragEnter)=\"dragEnter('time')\"\n (dragLeave)=\"dragLeave('time')\"\n >\n <div\n class=\"cal-time-label-column\"\n *ngIf=\"view.hourColumns.length > 0 && daysInWeek !== 1\"\n >\n <div\n *ngFor=\"\n let hour of view.hourColumns[0].hours;\n trackBy: trackByHour;\n let odd = odd\n \"\n class=\"cal-hour\"\n [class.cal-hour-odd]=\"odd\"\n >\n <mwl-calendar-week-view-hour-segment\n *ngFor=\"let segment of hour.segments; trackBy: trackByHourSegment\"\n [style.height.px]=\"hourSegmentHeight\"\n [segment]=\"segment\"\n [segmentHeight]=\"hourSegmentHeight\"\n [locale]=\"locale\"\n [customTemplate]=\"hourSegmentTemplate\"\n [isTimeLabel]=\"true\"\n [daysInWeek]=\"daysInWeek\"\n >\n </mwl-calendar-week-view-hour-segment>\n </div>\n </div>\n <div\n class=\"cal-day-columns\"\n [class.cal-resize-active]=\"timeEventResizes.size > 0\"\n #dayColumns\n >\n <div\n class=\"cal-day-column\"\n *ngFor=\"let column of view.hourColumns; trackBy: trackByHourColumn\"\n >\n <mwl-calendar-week-view-current-time-marker\n [columnDate]=\"column.date\"\n [dayStartHour]=\"dayStartHour\"\n [dayStartMinute]=\"dayStartMinute\"\n [dayEndHour]=\"dayEndHour\"\n [dayEndMinute]=\"dayEndMinute\"\n [hourSegments]=\"hourSegments\"\n [hourSegmentHeight]=\"hourSegmentHeight\"\n [customTemplate]=\"currentTimeMarkerTemplate\"\n ></mwl-calendar-week-view-current-time-marker>\n <div class=\"cal-events-container\">\n <div\n *ngFor=\"\n let timeEvent of column.events;\n trackBy: trackByWeekTimeEvent\n \"\n #event\n class=\"cal-event-container\"\n [class.cal-draggable]=\"\n timeEvent.event.draggable && timeEventResizes.size === 0\n \"\n [class.cal-starts-within-day]=\"!timeEvent.startsBeforeDay\"\n [class.cal-ends-within-day]=\"!timeEvent.endsAfterDay\"\n [ngClass]=\"timeEvent.event.cssClass\"\n [hidden]=\"timeEvent.height === 0 && timeEvent.width === 0\"\n [style.top.px]=\"timeEvent.top\"\n [style.height.px]=\"timeEvent.height\"\n [style.left.%]=\"timeEvent.left\"\n [style.width.%]=\"timeEvent.width\"\n mwlResizable\n [resizeSnapGrid]=\"{\n left: dayColumnWidth,\n right: dayColumnWidth,\n top: eventSnapSize || hourSegmentHeight,\n bottom: eventSnapSize || hourSegmentHeight\n }\"\n [validateResize]=\"validateResize\"\n [allowNegativeResizes]=\"true\"\n (resizeStart)=\"\n timeEventResizeStarted(dayColumns, timeEvent, $event)\n \"\n (resizing)=\"timeEventResizing(timeEvent, $event)\"\n (resizeEnd)=\"timeEventResizeEnded(timeEvent)\"\n mwlDraggable\n dragActiveClass=\"cal-drag-active\"\n [dropData]=\"{ event: timeEvent.event, calendarId: calendarId }\"\n [dragAxis]=\"{\n x: timeEvent.event.draggable && timeEventResizes.size === 0,\n y: timeEvent.event.draggable && timeEventResizes.size === 0\n }\"\n [dragSnapGrid]=\"\n snapDraggedEvents\n ? {\n x: dayColumnWidth,\n y: eventSnapSize || hourSegmentHeight\n }\n : {}\n \"\n [touchStartLongPress]=\"{ delay: 300, delta: 30 }\"\n [ghostDragEnabled]=\"!snapDraggedEvents\"\n [ghostElementTemplate]=\"weekEventTemplate\"\n [validateDrag]=\"validateDrag\"\n (dragStart)=\"dragStarted(dayColumns, event, timeEvent)\"\n (dragging)=\"dragMove(timeEvent, $event)\"\n (dragEnd)=\"dragEnded(timeEvent, $event, dayColumnWidth, true)\"\n >\n <div\n class=\"cal-resize-handle cal-resize-handle-before-start\"\n *ngIf=\"\n timeEvent.event?.resizable?.beforeStart &&\n !timeEvent.startsBeforeDay\n \"\n mwlResizeHandle\n [resizeEdges]=\"{\n left: true,\n top: true\n }\"\n ></div>\n <ng-template\n [ngTemplateOutlet]=\"weekEventTemplate\"\n ></ng-template>\n <ng-template #weekEventTemplate>\n <mwl-calendar-week-view-event\n [locale]=\"locale\"\n [weekEvent]=\"timeEvent\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipDisabled]=\"dragActive || timeEventResizes.size > 0\"\n [tooltipDelay]=\"tooltipDelay\"\n [customTemplate]=\"eventTemplate\"\n [eventTitleTemplate]=\"eventTitleTemplate\"\n [eventActionsTemplate]=\"eventActionsTemplate\"\n [column]=\"column\"\n [daysInWeek]=\"daysInWeek\"\n (eventClicked)=\"\n eventClicked.emit({\n event: timeEvent.event,\n sourceEvent: $event.sourceEvent\n })\n \"\n >\n </mwl-calendar-week-view-event>\n </ng-template>\n <div\n class=\"cal-resize-handle cal-resize-handle-after-end\"\n *ngIf=\"\n timeEvent.event?.resizable?.afterEnd &&\n !timeEvent.endsAfterDay\n \"\n mwlResizeHandle\n [resizeEdges]=\"{\n right: true,\n bottom: true\n }\"\n ></div>\n </div>\n </div>\n\n <div\n *ngFor=\"\n let hour of column.hours;\n trackBy: trackByHour;\n let odd = odd\n \"\n class=\"cal-hour\"\n [class.cal-hour-odd]=\"odd\"\n >\n <mwl-calendar-week-view-hour-segment\n *ngFor=\"\n let segment of hour.segments;\n trackBy: trackByHourSegment\n \"\n [style.height.px]=\"hourSegmentHeight\"\n [segment]=\"segment\"\n [segmentHeight]=\"hourSegmentHeight\"\n [locale]=\"locale\"\n [customTemplate]=\"hourSegmentTemplate\"\n [daysInWeek]=\"daysInWeek\"\n (mwlClick)=\"\n hourSegmentClicked.emit({\n date: segment.date,\n sourceEvent: $event\n })\n \"\n [clickListenerDisabled]=\"\n hourSegmentClicked.observers.length === 0\n \"\n mwlDroppable\n [dragOverClass]=\"\n !dragActive || !snapDraggedEvents ? 'cal-drag-over' : null\n \"\n dragActiveClass=\"cal-drag-active\"\n (drop)=\"eventDropped($event, segment.date, false)\"\n (dragEnter)=\"dateDragEnter(segment.date)\"\n [isTimeLabel]=\"daysInWeek === 1\"\n >\n </mwl-calendar-week-view-hour-segment>\n </div>\n </div>\n </div>\n </div>\n </div>\n `,\n})\nexport class CalendarWeekViewComponent implements OnChanges, OnInit, OnDestroy {\n /**\n * The current view date\n */\n @Input() viewDate: Date;\n\n /**\n * An array of events to display on view\n * The schema is available here: https://github.com/mattlewis92/calendar-utils/blob/c51689985f59a271940e30bc4e2c4e1fee3fcb5c/src/calendarUtils.ts#L49-L63\n */\n @Input() events: CalendarEvent[] = [];\n\n /**\n * An array of day indexes (0 = sunday, 1 = monday etc) that will be hidden on the view\n */\n @Input() excludeDays: number[] = [];\n\n /**\n * An observable that when emitted on will re-render the current view\n */\n @Input() refresh: Subject<any>;\n\n /**\n * The locale used to format dates\n */\n @Input() locale: string;\n\n /**\n * The placement of the event tooltip\n */\n @Input() tooltipPlacement: PlacementArray = 'auto';\n\n /**\n * A custom template to use for the event tooltips\n */\n @Input() tooltipTemplate: TemplateRef<any>;\n\n /**\n * Whether to append tooltips to the body or next to the trigger element\n */\n @Input() tooltipAppendToBody: boolean = true;\n\n /**\n * The delay in milliseconds before the tooltip should be displayed. If not provided the tooltip\n * will be displayed immediately.\n */\n @Input() tooltipDelay: number | null = null;\n\n /**\n * The start number of the week.\n * This is ignored when the `daysInWeek` input is also set as the `viewDate` will be used as the start of the week instead.\n * Note, you should also pass this to the calendar title pipe so it shows the same days: {{ viewDate | calendarDate:(view + 'ViewTitle'):locale:weekStartsOn }}\n * If using the moment date adapter this option won't do anything and you'll need to set it globally like so:\n * ```\n * moment.updateLocale('en', {\n * week: {\n * dow: 1, // set start of week to monday instead\n * doy: 0,\n * },\n * });\n * ```\n */\n @Input() weekStartsOn: number;\n\n /**\n * A custom template to use to replace the header\n */\n @Input() headerTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use for week view events\n */\n @Input() eventTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use for event titles\n */\n @Input() eventTitleTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use for event actions\n */\n @Input() eventActionsTemplate: TemplateRef<any>;\n\n /**\n * The precision to display events.\n * `days` will round event start and end dates to the nearest day and `minutes` will not do this rounding\n */\n @Input() precision: 'days' | 'minutes' = 'days';\n\n /**\n * An array of day indexes (0 = sunday, 1 = monday etc) that indicate which days are weekends\n */\n @Input() weekendDays: number[];\n\n /**\n * Whether to snap events to a grid when dragging\n */\n @Input() snapDraggedEvents: boolean = true;\n\n /**\n * The number of segments in an hour. Must divide equally into 60.\n */\n @Input() hourSegments: number = 2;\n\n /**\n * The height in pixels of each hour segment\n */\n @Input() hourSegmentHeight: number = 30;\n\n /**\n * The day start hours in 24 hour time. Must be 0-23\n */\n @Input() dayStartHour: number = 0;\n\n /**\n * The day start minutes. Must be 0-59\n */\n @Input() dayStartMinute: number = 0;\n\n /**\n * The day end hours in 24 hour time. Must be 0-23\n */\n @Input() dayEndHour: number = 23;\n\n /**\n * The day end minutes. Must be 0-59\n */\n @Input() dayEndMinute: number = 59;\n\n /**\n * A custom template to use to replace the hour segment\n */\n @Input() hourSegmentTemplate: TemplateRef<any>;\n\n /**\n * The grid size to snap resizing and dragging of hourly events to\n */\n @Input() eventSnapSize: number;\n\n /**\n * A custom template to use for the all day events label text\n */\n @Input() allDayEventsLabelTemplate: TemplateRef<any>;\n\n /**\n * The number of days in a week. Can be used to create a shorter or longer week view.\n * The first day of the week will always be the `viewDate` and `weekStartsOn` if set will be ignored\n */\n @Input() daysInWeek: number;\n\n /**\n * A custom template to use for the current time marker\n */\n @Input() currentTimeMarkerTemplate: TemplateRef<any>;\n\n /**\n * Called when a header week day is clicked. Adding a `cssClass` property on `$event.day` will add that class to the header element\n */\n @Output() dayHeaderClicked = new EventEmitter<{\n day: WeekDay;\n sourceEvent: MouseEvent;\n }>();\n\n /**\n * Called when the event title is clicked\n */\n @Output() eventClicked = new EventEmitter<{\n event: CalendarEvent;\n sourceEvent: MouseEvent | any;\n }>();\n\n /**\n * Called when an event is resized or dragged and dropped\n */\n @Output() eventTimesChanged =\n new EventEmitter<CalendarEventTimesChangedEvent>();\n\n /**\n * An output that will be called before the view is rendered for the current week.\n * If you add the `cssClass` property to a day in the header it will add that class to the cell element in the template\n */\n @Output() beforeViewRender =\n new EventEmitter<CalendarWeekViewBeforeRenderEvent>();\n\n /**\n * Called when an hour segment is clicked\n */\n @Output() hourSegmentClicked = new EventEmitter<{\n date: Date;\n sourceEvent: MouseEvent;\n }>();\n\n /**\n * @hidden\n */\n days: WeekDay[];\n\n /**\n * @hidden\n */\n view: WeekView;\n\n /**\n * @hidden\n */\n refreshSubscription: Subscription;\n\n /**\n * @hidden\n */\n allDayEventResizes: Map<WeekViewAllDayEvent, WeekViewAllDayEventResize> =\n new Map();\n\n /**\n * @hidden\n */\n timeEventResizes: Map<CalendarEvent, ResizeEvent> = new Map();\n\n /**\n * @hidden\n */\n eventDragEnterByType = {\n allDay: 0,\n time: 0,\n };\n\n /**\n * @hidden\n */\n dragActive = false;\n\n /**\n * @hidden\n */\n dragAlreadyMoved = false;\n\n /**\n * @hidden\n */\n validateDrag: ValidateDrag;\n\n /**\n * @hidden\n */\n validateResize: (args: any) => boolean;\n\n /**\n * @hidden\n */\n dayColumnWidth: number;\n\n /**\n * @hidden\n */\n calendarId = Symbol('angular calendar week view id');\n\n /**\n * @hidden\n */\n lastDraggedEvent: CalendarEvent;\n\n /**\n * @hidden\n */\n trackByWeekDayHeaderDate = trackByWeekDayHeaderDate;\n\n /**\n * @hidden\n */\n trackByHourSegment = trackByHourSegment;\n\n /**\n * @hidden\n */\n trackByHour = trackByHour;\n\n /**\n * @hidden\n */\n trackByWeekAllDayEvent = trackByWeekAllDayEvent;\n\n /**\n * @hidden\n */\n trackByWeekTimeEvent = trackByWeekTimeEvent;\n\n /**\n * @hidden\n */\n private lastDragEnterDate: Date;\n\n /**\n * @hidden\n */\n constructor(\n protected cdr: ChangeDetectorRef,\n protected utils: CalendarUtils,\n @Inject(LOCALE_ID) locale: string,\n protected dateAdapter: DateAdapter\n ) {\n this.locale = locale;\n }\n\n /**\n * @hidden\n */\n trackByHourColumn = (index: number, column: WeekViewHourColumn) =>\n column.hours[0] ? column.hours[0].segments[0].date.toISOString() : column;\n\n /**\n * @hidden\n */\n trackById = (index: number, row: WeekViewAllDayEventRow) => row.id;\n\n /**\n * @hidden\n */\n ngOnInit(): void {\n if (this.refresh) {\n this.refreshSubscription = this.refresh.subscribe(() => {\n this.refreshAll();\n this.cdr.markForCheck();\n });\n }\n }\n\n /**\n * @hidden\n */\n ngOnChanges(changes: any): void {\n const refreshHeader =\n changes.viewDate ||\n changes.excludeDays ||\n changes.weekendDays ||\n changes.daysInWeek ||\n changes.weekStartsOn;\n\n const refreshBody =\n changes.viewDate ||\n changes.dayStartHour ||\n changes.dayStartMinute ||\n changes.dayEndHour ||\n changes.dayEndMinute ||\n changes.hourSegments ||\n changes.weekStartsOn ||\n changes.weekendDays ||\n changes.excludeDays ||\n changes.hourSegmentHeight ||\n changes.events ||\n changes.daysInWeek;\n\n if (refreshHeader) {\n this.refreshHeader();\n }\n\n if (changes.events) {\n validateEvents(this.events);\n }\n\n if (refreshBody) {\n this.refreshBody();\n }\n\n if (refreshHeader || refreshBody) {\n this.emitBeforeViewRender();\n }\n }\n\n /**\n * @hidden\n */\n ngOnDestroy(): void {\n if (this.refreshSubscription) {\n this.refreshSubscription.unsubscribe();\n }\n }\n\n /**\n * @hidden\n */\n timeEventResizeStarted(\n eventsContainer: HTMLElement,\n timeEvent: WeekViewTimeEvent,\n resizeEvent: ResizeEvent\n ): void {\n this.timeEventResizes.set(timeEvent.event, resizeEvent);\n this.resizeStarted(eventsContainer);\n }\n\n /**\n * @hidden\n */\n timeEventResizing(timeEvent: WeekViewTimeEvent, resizeEvent: ResizeEvent) {\n this.timeEventResizes.set(timeEvent.event, resizeEvent);\n const adjustedEvents = new Map<CalendarEvent, CalendarEvent>();\n\n const tempEvents = [...this.events];\n\n this.timeEventResizes.forEach((lastResizeEvent, event) => {\n const newEventDates = this.getTimeEventResizedDates(\n event,\n lastResizeEvent\n );\n const adjustedEvent = { ...event, ...newEventDates };\n adjustedEvents.set(adjustedEvent, event);\n const eventIndex = tempEvents.indexOf(event);\n tempEvents[eventIndex] = adjustedEvent;\n });\n\n this.restoreOriginalEvents(tempEvents, adjustedEvents, true);\n }\n\n /**\n * @hidden\n */\n timeEventResizeEnded(timeEvent: WeekViewTimeEvent) {\n this.view = this.getWeekView(this.events);\n const lastResizeEvent = this.timeEventResizes.get(timeEvent.event);\n if (lastResizeEvent) {\n this.timeEventResizes.delete(timeEvent.event);\n const newEventDates = this.getTimeEventResizedDates(\n timeEvent.event,\n lastResizeEvent\n );\n this.eventTimesChanged.emit({\n newStart: newEventDates.start,\n newEnd: newEventDates.end,\n event: timeEvent.event,\n type: CalendarEventTimesChangedEventType.Resize,\n });\n }\n }\n\n /**\n * @hidden\n */\n allDayEventResizeStarted(\n allDayEventsContainer: HTMLElement,\n allDayEvent: WeekViewAllDayEvent,\n resizeEvent: ResizeEvent\n ): void {\n this.allDayEventResizes.set(allDayEvent, {\n originalOffset: allDayEvent.offset,\n originalSpan: allDayEvent.span,\n edge: typeof resizeEvent.edges.left !== 'undefined' ? 'left' : 'right',\n });\n this.resizeStarted(\n allDayEventsContainer,\n this.getDayColumnWidth(allDayEventsContainer)\n );\n }\n\n /**\n * @hidden\n */\n allDayEventResizing(\n allDayEvent: WeekViewAllDayEvent,\n resizeEvent: ResizeEvent,\n dayWidth: number\n ): void {\n const currentResize: WeekViewAllDayEventResize =\n this.allDayEventResizes.get(allDayEvent);\n\n if (typeof resizeEvent.edges.left !== 'undefined') {\n const diff: number = Math.round(+resizeEvent.edges.left / dayWidth);\n allDayEvent.offset = currentResize.originalOffset + diff;\n allDayEvent.span = currentResize.originalSpan - diff;\n } else if (typeof resizeEvent.edges.right !== 'undefined') {\n const diff: number = Math.round(+resizeEvent.edges.right / dayWidth);\n allDayEvent.span = currentResize.originalSpan + diff;\n }\n }\n\n /**\n * @hidden\n */\n allDayEventResizeEnded(allDayEvent: WeekViewAllDayEvent): void {\n const currentResize: WeekViewAllDayEventResize =\n this.allDayEventResizes.get(allDayEvent);\n\n if (currentResize) {\n const allDayEventResizingBeforeStart = currentResize.edge === 'left';\n let daysDiff: number;\n if (allDayEventResizingBeforeStart) {\n daysDiff = allDayEvent.offset - currentResize.originalOffset;\n } else {\n daysDiff = allDayEvent.span - currentResize.originalSpan;\n }\n\n allDayEvent.offset = currentResize.originalOffset;\n allDayEvent.span = currentResize.originalSpan;\n\n let newStart: Date = allDayEvent.event.start;\n let newEnd: Date = allDayEvent.event.end || allDayEvent.event.start;\n if (allDayEventResizingBeforeStart) {\n newStart = addDaysWithExclusions(\n this.dateAdapter,\n newStart,\n daysDiff,\n this.excludeDays\n );\n } else {\n newEnd = addDaysWithExclusions(\n this.dateAdapter,\n newEnd,\n daysDiff,\n this.excludeDays\n );\n }\n\n this.eventTimesChanged.emit({\n newStart,\n newEnd,\n event: allDayEvent.event,\n type: CalendarEventTimesChangedEventType.Resize,\n });\n this.allDayEventResizes.delete(allDayEvent);\n }\n }\n\n /**\n * @hidden\n */\n getDayColumnWidth(eventRowContainer: HTMLElement): number {\n return Math.floor(eventRowContainer.offsetWidth / this.days.length);\n }\n\n /**\n * @hidden\n */\n dateDragEnter(date: Date) {\n this.lastDragEnterDate = date;\n }\n\n /**\n * @hidden\n */\n eventDropped(\n dropEvent: DropEvent<{ event?: CalendarEvent; calendarId?: symbol }>,\n date: Date,\n allDay: boolean\n ): void {\n if (\n shouldFireDroppedEvent(dropEvent, date, allDay, this.calendarId) &&\n this.lastDragEnterDate.getTime() === date.getTime() &&\n (!this.snapDraggedEvents ||\n dropEvent.dropData.event !== this.lastDraggedEvent)\n ) {\n this.eventTimesChanged.emit({\n type: CalendarEventTimesChangedEventType.Drop,\n event: dropEvent.dropData.event,\n newStart: date,\n allDay,\n });\n }\n this.lastDraggedEvent = null;\n }\n\n /**\n * @hidden\n */\n dragEnter(type: 'allDay' | 'time') {\n this.eventDragEnterByType[type]++;\n }\n\n /**\n * @hidden\n */\n dragLeave(type: 'allDay' | 'time') {\n this.eventDragEnterByType[type]--;\n }\n\n /**\n * @hidden\n */\n dragStarted(\n eventsContainer: HTMLElement,\n event: HTMLElement,\n dayEvent?: WeekViewTimeEvent\n ): void {\n this.dayColumnWidth = this.getDayColumnWidth(eventsContainer);\n const dragHelper: CalendarDragHelper = new CalendarDragHelper(\n eventsContainer,\n event\n );\n this.validateDrag = ({ x, y, transform }) =>\n this.allDayEventResizes.size === 0 &&\n this.timeEventResizes.size === 0 &&\n dragHelper.validateDrag({\n x,\n y,\n snapDraggedEvents: this.snapDraggedEvents,\n dragAlreadyMoved: this.dragAlreadyMoved,\n transform,\n });\n this.dragActive = true;\n this.dragAlreadyMoved = false;\n this.lastDraggedEvent = null;\n this.eventDragEnterByType = {\n allDay: 0,\n time: 0,\n };\n if (!this.snapDraggedEvents && dayEvent) {\n this.view.hourColumns.forEach((column) => {\n const linkedEvent = column.events.find(\n (columnEvent) =>\n columnEvent.event === dayEvent.event && columnEvent !== dayEvent\n );\n // hide any linked events while dragging\n if (linkedEvent) {\n linkedEvent.width = 0;\n linkedEvent.height = 0;\n }\n });\n }\n this.cdr.markForCheck();\n }\n\n /**\n * @hidden\n */\n dragMove(dayEvent: WeekViewTimeEvent, dragEvent: DragMoveEvent) {\n const newEventTimes = this.getDragMovedEventTimes(\n dayEvent,\n dragEvent,\n this.dayColumnWidth,\n true\n );\n const originalEvent = dayEvent.event;\n const adjustedEvent = { ...originalEvent, ...newEventTimes };\n const tempEvents = this.events.map((event) => {\n if (event === originalEvent) {\n return adjustedEvent;\n }\n return event;\n });\n this.restoreOriginalEvents(\n tempEvents,\n new Map([[adjustedEvent, originalEvent]]),\n this.snapDraggedEvents\n );\n this.dragAlreadyMoved = true;\n }\n\n /**\n * @hidden\n */\n allDayEventDragMove() {\n this.dragAlreadyMoved = true;\n }\n\n /**\n * @hidden\n */\n dragEnded(\n weekEvent: WeekViewAllDayEvent | WeekViewTimeEvent,\n dragEndEvent: DragEndEvent,\n dayWidth: number,\n useY = false\n ): void {\n this.view = this.getWeekView(this.events);\n this.dragActive = false;\n this.validateDrag = null;\n const { start, end } = this.getDragMovedEventTimes(\n weekEvent,\n dragEndEvent,\n dayWidth,\n useY\n );\n if (\n (this.snapDraggedEvents ||\n this.eventDragEnterByType[useY ? 'time' : 'allDay'] > 0) &&\n isDraggedWithinPeriod(start, end, this.view.period)\n ) {\n this.lastDraggedEvent = weekEvent.event;\n this.eventTimesChanged.emit({\n newStart: start,\n newEnd: end,\n event: weekEvent.event,\n type: CalendarEventTimesChangedEventType.Drag,\n allDay: !useY,\n });\n }\n }\n\n protected refreshHeader(): void {\n this.days = this.utils.getWeekViewHeader({\n viewDate: this.viewDate,\n weekStartsOn: this.weekStartsOn,\n excluded: this.excludeDays,\n weekendDays: this.weekendDays,\n ...getWeekViewPeriod(\n this.dateAdapter,\n this.viewDate,\n this.weekStartsOn,\n this.excludeDays,\n this.daysInWeek\n ),\n });\n }\n\n protected refreshBody(): void {\n this.view = this.getWeekView(this.events);\n }\n\n protected refreshAll(): void {\n this.refreshHeader();\n this.refreshBody();\n this.emitBeforeViewRender();\n }\n\n protected emitBeforeViewRender(): void {\n if (this.days && this.view) {\n this.beforeViewRender.emit({\n header: this.days,\n ...this.view,\n });\n }\n }\n\n protected getWeekView(events: CalendarEvent[]) {\n return this.utils.getWeekView({\n events,\n viewDate: this.viewDate,\n weekStartsOn: this.weekStartsOn,\n excluded: this.excludeDays,\n precision: this.precision,\n absolutePositionedEvents: true,\n hourSegments: this.hourSegments,\n dayStart: {\n hour: this.dayStartHour,\n minute: this.dayStartMinute,\n },\n dayEnd: {\n hour: this.dayEndHour,\n minute: this.dayEndMinute,\n },\n segmentHeight: this.hourSegmentHeight,\n weekendDays: this.weekendDays,\n ...getWeekViewPeriod(\n this.dateAdapter,\n this.viewDate,\n this.weekStartsOn,\n this.excludeDays,\n this.daysInWeek\n ),\n });\n }\n\n protected getDragMovedEventTimes(\n weekEvent: WeekViewAllDayEvent | WeekViewTimeEvent,\n dragEndEvent: DragEndEvent | DragMoveEvent,\n dayWidth: number,\n useY: boolean\n ) {\n const daysDragged = roundToNearest(dragEndEvent.x, dayWidth) / dayWidth;\n const minutesMoved = useY\n ? getMinutesMoved(\n dragEndEvent.y,\n this.hourSegments,\n this.hourSegmentHeight,\n this.eventSnapSize\n )\n : 0;\n\n const start = this.dateAdapter.addMinutes(\n addDaysWithExclusions(\n this.dateAdapter,\n weekEvent.event.start,\n daysDragged,\n this.excludeDays\n ),\n minutesMoved\n );\n let end: Date;\n if (weekEvent.event.end) {\n end = this.dateAdapter.addMinutes(\n addDaysWithExclusions(\n this.dateAdapter,\n weekEvent.event.end,\n daysDragged,\n this.excludeDays\n ),\n minutesMoved\n );\n }\n\n return { start, end };\n }\n\n protected restoreOriginalEvents(\n tempEvents: CalendarEvent[],\n adjustedEvents: Map<CalendarEvent, CalendarEvent>,\n snapDraggedEvents = true\n ) {\n const previousView = this.view;\n if (snapDraggedEvents) {\n this.view = this.getWeekView(tempEvents);\n }\n\n const adjustedEventsArray = tempEvents.filter((event) =>\n adjustedEvents.has(event)\n );\n this.view.hourColumns.forEach((column, columnIndex) => {\n previousView.hourColumns[columnIndex].hours.forEach((hour, hourIndex) => {\n hour.segments.forEach((segment, segmentIndex) => {\n column.hours[hourIndex].segments[segmentIndex].cssClass =\n segment.cssClass;\n });\n });\n\n adjustedEventsArray.forEach((adjustedEvent) => {\n const originalEvent = adjustedEvents.get(adjustedEvent);\n const existingColumnEvent = column.events.find(\n (columnEvent) =>\n columnEvent.event ===\n (snapDraggedEvents ? adjustedEvent : originalEvent)\n );\n if (existingColumnEvent) {\n // restore the original event so trackBy kicks in and the dom isn't changed\n existingColumnEvent.event = originalEvent;\n existingColumnEvent['tempEvent'] = adjustedEvent;\n if (!snapDraggedEvents) {\n existingColumnEvent.height = 0;\n existingColumnEvent.width = 0;\n }\n } else {\n // add a dummy event to the drop so if the event was removed from the original column the drag doesn't end early\n const event = {\n event: originalEvent,\n left: 0,\n top: 0,\n height: 0,\n width: 0,\n startsBeforeDay: false,\n endsAfterDay: false,\n tempEvent: adjustedEvent,\n };\n column.events.push(event);\n }\n });\n });\n adjustedEvents.clear();\n }\n\n protected getTimeEventResizedDates(\n calendarEvent: CalendarEvent,\n resizeEvent: ResizeEvent\n ) {\n const minimumEventHeight = getMinimumEventHeightInMinutes(\n this.hourSegments,\n this.hourSegmentHeight\n );\n const newEventDates = {\n start: calendarEvent.start,\n end: getDefaultEventEnd(\n this.dateAdapter,\n calendarEvent,\n minimumEventHeight\n ),\n };\n const { end, ...eventWithoutEnd } = calendarEvent;\n const smallestResizes = {\n start: this.dateAdapter.addMinutes(\n newEventDates.end,\n minimumEventHeight * -1\n ),\n end: getDefaultEventEnd(\n this.dateAdapter,\n eventWithoutEnd,\n minimumEventHeight\n ),\n };\n\n if (typeof resizeEvent.edges.left !== 'undefined') {\n const daysDiff = Math.round(\n +resizeEvent.edges.left / this.dayColumnWidth\n );\n const newStart = addDaysWithExclusions(\n this.dateAdapter,\n newEventDates.start,\n daysDiff,\n this.excludeDays\n );\n if (newStart < smallestResizes.start) {\n newEventDates.start = newStart;\n } else {\n newEventDates.start = smallestResizes.start;\n }\n } else if (typeof resizeEvent.edges.right !== 'undefined') {\n const daysDiff = Math.round(\n +resizeEvent.edges.right / this.dayColumnWidth\n );\n const newEnd = addDaysWithExclusions(\n this.dateAdapter,\n newEventDates.end,\n daysDiff,\n this.excludeDays\n );\n if (newEnd > smallestResizes.end) {\n newEventDates.end = newEnd;\n } else {\n newEventDates.end = smallestResizes.end;\n }\n }\n\n if (typeof resizeEvent.edges.top !== 'undefined') {\n const minutesMoved = getMinutesMoved(\n resizeEvent.edges.top as number,\n this.hourSegments,\n this.hourSegmentHeight,\n this.eventSnapSize\n );\n const newStart = this.dateAdapter.addMinutes(\n newEventDates.start,\n minutesMoved\n );\n if (newStart < smallestResizes.start) {\n newEventDates.start = newStart;\n } else {\n newEventDates.start = smallestResizes.start;\n }\n } else if (typeof resizeEvent.edges.bottom !== 'undefined') {\n const minutesMoved = getMinutesMoved(\n resizeEvent.edges.bottom as number,\n this.hourSegments,\n this.hourSegmentHeight,\n this.eventSnapSize\n );\n const newEnd = this.dateAdapter.addMinutes(\n newEventDates.end,\n minutesMoved\n );\n if (newEnd > smallestResizes.end) {\n newEventDates.end = newEnd;\n } else {\n newEventDates.end = smallestResizes.end;\n }\n }\n\n return newEventDates;\n }\n\n protected resizeStarted(eventsContainer: HTMLElement, minWidth?: number) {\n this.dayColumnWidth = this.getDayColumnWidth(eventsContainer);\n const resizeHelper: CalendarResizeHelper = new CalendarResizeHelper(\n eventsContainer,\n minWidth\n );\n this.validateResize = ({ rectangle }) =>\n resizeHelper.validateResize({ rectangle });\n this.cdr.markForCheck();\n }\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n TemplateRef,\n} from '@angular/core';\nimport { CalendarEvent, WeekDay } from 'calendar-utils';\nimport { trackByWeekDayHeaderDate } from '../common/util';\n\n@Component({\n selector: 'mwl-calendar-week-view-header',\n template: `\n <ng-template\n #defaultTemplate\n let-days=\"days\"\n let-locale=\"locale\"\n let-dayHeaderClicked=\"dayHeaderClicked\"\n let-eventDropped=\"eventDropped\"\n let-trackByWeekDayHeaderDate=\"trackByWeekDayHeaderDate\"\n let-dragEnter=\"dragEnter\"\n >\n <div class=\"cal-day-headers\" role=\"row\">\n <div\n class=\"cal-header\"\n *ngFor=\"let day of days; trackBy: trackByWeekDayHeaderDate\"\n [class.cal-past]=\"day.isPast\"\n [class.cal-today]=\"day.isToday\"\n [class.cal-future]=\"day.isFuture\"\n [class.cal-weekend]=\"day.isWeekend\"\n [ngClass]=\"day.cssClass\"\n (mwlClick)=\"dayHeaderClicked.emit({ day: day, sourceEvent: $event })\"\n mwlDroppable\n dragOverClass=\"cal-drag-over\"\n (drop)=\"\n eventDropped.emit({\n event: $event.dropData.event,\n newStart: day.date\n })\n \"\n (dragEnter)=\"dragEnter.emit({ date: day.date })\"\n tabindex=\"0\"\n role=\"columnheader\"\n >\n <b>{{ day.date | calendarDate: 'weekViewColumnHeader':locale }}</b\n ><br />\n <span>{{\n day.date | calendarDate: 'weekViewColumnSubHeader':locale\n }}</span>\n </div>\n </div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n days: days,\n locale: locale,\n dayHeaderClicked: dayHeaderClicked,\n eventDropped: eventDropped,\n dragEnter: dragEnter,\n trackByWeekDayHeaderDate: trackByWeekDayHeaderDate\n }\"\n >\n </ng-template>\n `,\n})\nexport class CalendarWeekViewHeaderComponent {\n @Input() days: WeekDay[];\n\n @Input() locale: string;\n\n @Input() customTemplate: TemplateRef<any>;\n\n @Output() dayHeaderClicked = new EventEmitter<{\n day: WeekDay;\n sourceEvent: MouseEvent;\n }>();\n\n @Output() eventDropped = new EventEmitter<{\n event: CalendarEvent;\n newStart: Date;\n }>();\n\n @Output() dragEnter = new EventEmitter<{ date: Date }>();\n\n trackByWeekDayHeaderDate = trackByWeekDayHeaderDate;\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n TemplateRef,\n} from '@angular/core';\nimport {\n WeekViewAllDayEvent,\n WeekViewTimeEvent,\n WeekViewHourColumn,\n} from 'calendar-utils';\nimport { PlacementArray } from 'positioning';\n\n@Component({\n selector: 'mwl-calendar-week-view-event',\n template: `\n <ng-template\n #defaultTemplate\n let-weekEvent=\"weekEvent\"\n let-tooltipPlacement=\"tooltipPlacement\"\n let-eventClicked=\"eventClicked\"\n let-tooltipTemplate=\"tooltipTemplate\"\n let-tooltipAppendToBody=\"tooltipAppendToBody\"\n let-tooltipDisabled=\"tooltipDisabled\"\n let-tooltipDelay=\"tooltipDelay\"\n let-column=\"column\"\n let-daysInWeek=\"daysInWeek\"\n >\n <div\n class=\"cal-event\"\n [ngStyle]=\"{\n backgroundColor: weekEvent.event.color?.secondary,\n borderColor: weekEvent.event.color?.primary\n }\"\n [mwlCalendarTooltip]=\"\n !tooltipDisabled\n ? (weekEvent.event.title\n | calendarEventTitle\n : (daysInWeek === 1 ? 'dayTooltip' : 'weekTooltip')\n : weekEvent.tempEvent || weekEvent.event)\n : ''\n \"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipEvent]=\"weekEvent.tempEvent || weekEvent.event\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipDelay]=\"tooltipDelay\"\n (mwlClick)=\"eventClicked.emit({ sourceEvent: $event })\"\n (mwlKeydownEnter)=\"eventClicked.emit({ sourceEvent: $event })\"\n tabindex=\"0\"\n role=\"application\"\n [attr.aria-label]=\"\n { event: weekEvent.tempEvent || weekEvent.event, locale: locale }\n | calendarA11y: 'eventDescription'\n \"\n >\n <mwl-calendar-event-actions\n [event]=\"weekEvent.tempEvent || weekEvent.event\"\n [customTemplate]=\"eventActionsTemplate\"\n >\n </mwl-calendar-event-actions>\n &ngsp;\n <mwl-calendar-event-title\n [event]=\"weekEvent.tempEvent || weekEvent.event\"\n [customTemplate]=\"eventTitleTemplate\"\n [view]=\"daysInWeek === 1 ? 'day' : 'week'\"\n >\n </mwl-calendar-event-title>\n </div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n weekEvent: weekEvent,\n tooltipPlacement: tooltipPlacement,\n eventClicked: eventClicked,\n tooltipTemplate: tooltipTemplate,\n tooltipAppendToBody: tooltipAppendToBody,\n tooltipDisabled: tooltipDisabled,\n tooltipDelay: tooltipDelay,\n column: column,\n daysInWeek: daysInWeek\n }\"\n >\n </ng-template>\n `,\n})\nexport class CalendarWeekViewEventComponent {\n @Input() locale: string;\n\n @Input() weekEvent: WeekViewAllDayEvent | WeekViewTimeEvent;\n\n @Input() tooltipPlacement: PlacementArray;\n\n @Input() tooltipAppendToBody: boolean;\n\n @Input() tooltipDisabled: boolean;\n\n @Input() tooltipDelay: number | null;\n\n @Input() customTemplate: TemplateRef<any>;\n\n @Input() eventTitleTemplate: TemplateRef<any>;\n\n @Input() eventActionsTemplate: TemplateRef<any>;\n\n @Input() tooltipTemplate: TemplateRef<any>;\n\n @Input() column: WeekViewHourColumn;\n\n @Input() daysInWeek: number;\n\n @Output() eventClicked = new EventEmitter<{\n sourceEvent: MouseEvent | any;\n }>();\n}\n","import { Component, Input, TemplateRef } from '@angular/core';\nimport { WeekViewHourSegment } from 'calendar-utils';\n\n@Component({\n selector: 'mwl-calendar-week-view-hour-segment',\n template: `\n <ng-template\n #defaultTemplate\n let-segment=\"segment\"\n let-locale=\"locale\"\n let-segmentHeight=\"segmentHeight\"\n let-isTimeLabel=\"isTimeLabel\"\n let-daysInWeek=\"daysInWeek\"\n >\n <div\n [attr.aria-hidden]=\"\n {}\n | calendarA11y\n : (daysInWeek === 1\n ? 'hideDayHourSegment'\n : 'hideWeekHourSegment')\n \"\n class=\"cal-hour-segment\"\n [style.height.px]=\"segmentHeight\"\n [class.cal-hour-start]=\"segment.isStart\"\n [class.cal-after-hour-start]=\"!segment.isStart\"\n [ngClass]=\"segment.cssClass\"\n >\n <div class=\"cal-time\" *ngIf=\"isTimeLabel\">\n {{\n segment.displayDate\n | calendarDate\n : (daysInWeek === 1 ? 'dayViewHour' : 'weekViewHour')\n : locale\n }}\n </div>\n </div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n segment: segment,\n locale: locale,\n segmentHeight: segmentHeight,\n isTimeLabel: isTimeLabel,\n daysInWeek: daysInWeek\n }\"\n >\n </ng-template>\n `,\n})\nexport class CalendarWeekViewHourSegmentComponent {\n @Input() segment: WeekViewHourSegment;\n\n @Input() segmentHeight: number;\n\n @Input() locale: string;\n\n @Input() isTimeLabel: boolean;\n\n @Input() daysInWeek: number;\n\n @Input() customTemplate: TemplateRef<any>;\n}\n","import {\n Component,\n Input,\n NgZone,\n OnChanges,\n SimpleChanges,\n TemplateRef,\n} from '@angular/core';\nimport { BehaviorSubject, interval, Observable } from 'rxjs';\nimport { switchMapTo, startWith, map, switchMap } from 'rxjs/operators';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\n\n@Component({\n selector: 'mwl-calendar-week-view-current-time-marker',\n template: `\n <ng-template\n #defaultTemplate\n let-columnDate=\"columnDate\"\n let-dayStartHour=\"dayStartHour\"\n let-dayStartMinute=\"dayStartMinute\"\n let-dayEndHour=\"dayEndHour\"\n let-dayEndMinute=\"dayEndMinute\"\n let-isVisible=\"isVisible\"\n let-topPx=\"topPx\"\n >\n <div\n class=\"cal-current-time-marker\"\n *ngIf=\"isVisible\"\n [style.top.px]=\"topPx\"\n ></div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n columnDate: columnDate,\n dayStartHour: dayStartHour,\n dayStartMinute: dayStartMinute,\n dayEndHour: dayEndHour,\n dayEndMinute: dayEndMinute,\n isVisible: (marker$ | async)?.isVisible,\n topPx: (marker$ | async)?.top\n }\"\n >\n </ng-template>\n `,\n})\nexport class CalendarWeekViewCurrentTimeMarkerComponent implements OnChanges {\n @Input() columnDate: Date;\n\n @Input() dayStartHour: number;\n\n @Input() dayStartMinute: number;\n\n @Input() dayEndHour: number;\n\n @Input() dayEndMinute: number;\n\n @Input() hourSegments: number;\n\n @Input() hourSegmentHeight: number;\n\n @Input() customTemplate: TemplateRef<any>;\n\n columnDate$ = new BehaviorSubject<Date>(this.columnDate);\n\n marker$: Observable<{\n isVisible: boolean;\n top: number;\n }> = this.zone.onStable.pipe(\n switchMap(() => interval(60 * 1000)),\n startWith(0),\n switchMapTo(this.columnDate$),\n map((columnDate) => {\n const startOfDay = this.dateAdapter.setMinutes(\n this.dateAdapter.setHours(columnDate, this.dayStartHour),\n this.dayStartMinute\n );\n const endOfDay = this.dateAdapter.setMinutes(\n this.dateAdapter.setHours(columnDate, this.dayEndHour),\n this.dayEndMinute\n );\n const hourHeightModifier =\n (this.hourSegments * this.hourSegmentHeight) / 60;\n const now = new Date();\n return {\n isVisible:\n this.dateAdapter.isSameDay(columnDate, now) &&\n now >= startOfDay &&\n now <= endOfDay,\n top:\n this.dateAdapter.differenceInMinutes(now, startOfDay) *\n hourHeightModifier,\n };\n })\n );\n\n constructor(private dateAdapter: DateAdapter, private zone: NgZone) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.columnDate) {\n this.columnDate$.next(changes.columnDate.currentValue);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ResizableModule } from 'angular-resizable-element';\nimport { DragAndDropModule } from 'angular-draggable-droppable';\nimport { CalendarWeekViewComponent } from './calendar-week-view.component';\nimport { CalendarWeekViewHeaderComponent } from './calendar-week-view-header.component';\nimport { CalendarWeekViewEventComponent } from './calendar-week-view-event.component';\nimport { CalendarCommonModule } from '../common/calendar-common.module';\nimport { CalendarWeekViewHourSegmentComponent } from './calendar-week-view-hour-segment.component';\nimport { CalendarWeekViewCurrentTimeMarkerComponent } from './calendar-week-view-current-time-marker.component';\n\nexport {\n CalendarWeekViewComponent,\n CalendarWeekViewBeforeRenderEvent,\n} from './calendar-week-view.component';\nexport {\n WeekViewAllDayEvent as CalendarWeekViewAllDayEvent,\n WeekViewAllDayEventRow as CalendarWeekViewAllDayEventRow,\n GetWeekViewArgs as CalendarGetWeekViewArgs,\n} from 'calendar-utils';\nexport { getWeekViewPeriod } from '../common/util';\n\n@NgModule({\n imports: [\n CommonModule,\n ResizableModule,\n DragAndDropModule,\n CalendarCommonModule,\n ],\n declarations: [\n CalendarWeekViewComponent,\n CalendarWeekViewHeaderComponent,\n CalendarWeekViewEventComponent,\n CalendarWeekViewHourSegmentComponent,\n CalendarWeekViewCurrentTimeMarkerComponent,\n ],\n exports: [\n ResizableModule,\n DragAndDropModule,\n CalendarWeekViewComponent,\n CalendarWeekViewHeaderComponent,\n CalendarWeekViewEventComponent,\n CalendarWeekViewHourSegmentComponent,\n CalendarWeekViewCurrentTimeMarkerComponent,\n ],\n})\nexport class CalendarWeekModule {}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n TemplateRef,\n} from '@angular/core';\nimport { CalendarEvent } from 'calendar-utils';\nimport { Subject } from 'rxjs';\nimport { CalendarEventTimesChangedEvent } from '../common/calendar-event-times-changed-event.interface';\nimport { PlacementArray } from 'positioning';\nimport { CalendarWeekViewBeforeRenderEvent } from '../week/calendar-week.module';\n\nexport type CalendarDayViewBeforeRenderEvent =\n CalendarWeekViewBeforeRenderEvent;\n\n/**\n * Shows all events on a given day. Example usage:\n *\n * ```typescript\n * <mwl-calendar-day-view\n * [viewDate]=\"viewDate\"\n * [events]=\"events\">\n * </mwl-calendar-day-view>\n * ```\n */\n@Component({\n selector: 'mwl-calendar-day-view',\n template: `\n <mwl-calendar-week-view\n class=\"cal-day-view\"\n [daysInWeek]=\"1\"\n [viewDate]=\"viewDate\"\n [events]=\"events\"\n [hourSegments]=\"hourSegments\"\n [hourSegmentHeight]=\"hourSegmentHeight\"\n [dayStartHour]=\"dayStartHour\"\n [dayStartMinute]=\"dayStartMinute\"\n [dayEndHour]=\"dayEndHour\"\n [dayEndMinute]=\"dayEndMinute\"\n [refresh]=\"refresh\"\n [locale]=\"locale\"\n [eventSnapSize]=\"eventSnapSize\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipDelay]=\"tooltipDelay\"\n [hourSegmentTemplate]=\"hourSegmentTemplate\"\n [eventTemplate]=\"eventTemplate\"\n [eventTitleTemplate]=\"eventTitleTemplate\"\n [eventActionsTemplate]=\"eventActionsTemplate\"\n [snapDraggedEvents]=\"snapDraggedEvents\"\n [allDayEventsLabelTemplate]=\"allDayEventsLabelTemplate\"\n [currentTimeMarkerTemplate]=\"currentTimeMarkerTemplate\"\n (eventClicked)=\"eventClicked.emit($event)\"\n (hourSegmentClicked)=\"hourSegmentClicked.emit($event)\"\n (eventTimesChanged)=\"eventTimesChanged.emit($event)\"\n (beforeViewRender)=\"beforeViewRender.emit($event)\"\n ></mwl-calendar-week-view>\n `,\n})\nexport class CalendarDayViewComponent {\n /**\n * The current view date\n */\n @Input() viewDate: Date;\n\n /**\n * An array of events to display on view\n * The schema is available here: https://github.com/mattlewis92/calendar-utils/blob/c51689985f59a271940e30bc4e2c4e1fee3fcb5c/src/calendarUtils.ts#L49-L63\n */\n @Input() events: CalendarEvent[] = [];\n\n /**\n * The number of segments in an hour. Must divide equally into 60.\n */\n @Input() hourSegments: number = 2;\n\n /**\n * The height in pixels of each hour segment\n */\n @Input() hourSegmentHeight: number = 30;\n\n /**\n * The day start hours in 24 hour time. Must be 0-23\n */\n @Input() dayStartHour: number = 0;\n\n /**\n * The day start minutes. Must be 0-59\n */\n @Input() dayStartMinute: number = 0;\n\n /**\n * The day end hours in 24 hour time. Must be 0-23\n */\n @Input() dayEndHour: number = 23;\n\n /**\n * The day end minutes. Must be 0-59\n */\n @Input() dayEndMinute: number = 59;\n\n /**\n * An observable that when emitted on will re-render the current view\n */\n @Input() refresh: Subject<any>;\n\n /**\n * The locale used to format dates\n */\n @Input() locale: string;\n\n /**\n * The grid size to snap resizing and dragging of events to\n */\n @Input() eventSnapSize: number;\n\n /**\n * The placement of the event tooltip\n */\n @Input() tooltipPlacement: PlacementArray = 'auto';\n\n /**\n * A custom template to use for the event tooltips\n */\n @Input() tooltipTemplate: TemplateRef<any>;\n\n /**\n * Whether to append tooltips to the body or next to the trigger element\n */\n @Input() tooltipAppendToBody: boolean = true;\n\n /**\n * The delay in milliseconds before the tooltip should be displayed. If not provided the tooltip\n * will be displayed immediately.\n */\n @Input() tooltipDelay: number | null = null;\n\n /**\n * A custom template to use to replace the hour segment\n */\n @Input() hourSegmentTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use for day view events\n */\n @Input() eventTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use for event titles\n */\n @Input() eventTitleTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use for event actions\n */\n @Input() eventActionsTemplate: TemplateRef<any>;\n\n /**\n * Whether to snap events to a grid when dragging\n */\n @Input() snapDraggedEvents: boolean = true;\n\n /**\n * A custom template to use for the all day events label text\n */\n @Input() allDayEventsLabelTemplate: TemplateRef<any>;\n\n /**\n * A custom template to use for the current time marker\n */\n @Input() currentTimeMarkerTemplate: TemplateRef<any>;\n\n /**\n * Called when an event title is clicked\n */\n @Output() eventClicked = new EventEmitter<{\n event: CalendarEvent;\n sourceEvent: MouseEvent | any;\n }>();\n\n /**\n * Called when an hour segment is clicked\n */\n @Output() hourSegmentClicked = new EventEmitter<{\n date: Date;\n sourceEvent: MouseEvent;\n }>();\n\n /**\n * Called when an event is resized or dragged and dropped\n */\n @Output() eventTimesChanged =\n new EventEmitter<CalendarEventTimesChangedEvent>();\n\n /**\n * An output that will be called before the view is rendered for the current day.\n * If you add the `cssClass` property to an hour grid segment it will add that class to the hour segment in the template\n */\n @Output() beforeViewRender =\n new EventEmitter<CalendarDayViewBeforeRenderEvent>();\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CalendarDayViewComponent } from './calendar-day-view.component';\nimport { CalendarCommonModule } from '../common/calendar-common.module';\nimport { CalendarWeekModule } from '../week/calendar-week.module';\n\nexport {\n CalendarDayViewComponent,\n CalendarDayViewBeforeRenderEvent,\n} from './calendar-day-view.component';\n\n@NgModule({\n imports: [CommonModule, CalendarCommonModule, CalendarWeekModule],\n declarations: [CalendarDayViewComponent],\n exports: [CalendarDayViewComponent],\n})\nexport class CalendarDayModule {}\n","import { NgModule, ModuleWithProviders, Provider } from '@angular/core';\nimport {\n CalendarCommonModule,\n CalendarModuleConfig,\n CalendarEventTitleFormatter,\n CalendarDateFormatter,\n CalendarA11y,\n} from './common/calendar-common.module';\nimport { CalendarMonthModule } from './month/calendar-month.module';\nimport { CalendarWeekModule } from './week/calendar-week.module';\nimport { CalendarDayModule } from './day/calendar-day.module';\nimport { CalendarUtils } from './common/calendar-utils.provider';\n\nexport * from './common/calendar-common.module';\nexport * from './month/calendar-month.module';\nexport * from './week/calendar-week.module';\nexport * from './day/calendar-day.module';\n\n/**\n * The main module of this library. Example usage:\n *\n * ```typescript\n * import { CalenderModule } from 'angular-calendar';\n *\n * @NgModule({\n * imports: [\n * CalenderModule.forRoot()\n * ]\n * })\n * class MyModule {}\n * ```\n *\n */\n@NgModule({\n imports: [\n CalendarCommonModule,\n CalendarMonthModule,\n CalendarWeekModule,\n CalendarDayModule,\n ],\n exports: [\n CalendarCommonModule,\n CalendarMonthModule,\n CalendarWeekModule,\n CalendarDayModule,\n ],\n})\nexport class CalendarModule {\n static forRoot(\n dateAdapter: Provider,\n config: CalendarModuleConfig = {}\n ): ModuleWithProviders<CalendarModule> {\n return {\n ngModule: CalendarModule,\n providers: [\n dateAdapter,\n config.eventTitleFormatter || CalendarEventTitleFormatter,\n config.dateFormatter || CalendarDateFormatter,\n config.utils || CalendarUtils,\n config.a11y || CalendarA11y,\n ],\n };\n }\n}\n","/*\n * Public API Surface of angular-calendar\n */\n\nexport * from './modules/calendar.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {CalendarA11yPipe as ɵk} from './modules/common/calendar-a11y.pipe';\nexport {CalendarDatePipe as ɵi} from './modules/common/calendar-date.pipe';\nexport {CalendarEventActionsComponent as ɵb} from './modules/common/calendar-event-actions.component';\nexport {CalendarEventTitleComponent as ɵc} from './modules/common/calendar-event-title.component';\nexport {CalendarEventTitlePipe as ɵj} from './modules/common/calendar-event-title.pipe';\nexport {CalendarNextViewDirective as ɵg} from './modules/common/calendar-next-view.directive';\nexport {CalendarPreviousViewDirective as ɵf} from './modules/common/calendar-previous-view.directive';\nexport {CalendarTodayDirective as ɵh} from './modules/common/calendar-today.directive';\nexport {CalendarTooltipDirective as ɵe,CalendarTooltipWindowComponent as ɵd} from './modules/common/calendar-tooltip.directive';\nexport {ClickDirective as ɵl} from './modules/common/click.directive';\nexport {KeydownEnterDirective as ɵm} from './modules/common/keydown-enter.directive';\nexport {CalendarMonthCellComponent as ɵn} from './modules/month/calendar-month-cell.component';\nexport {CalendarMonthViewHeaderComponent as ɵo} from './modules/month/calendar-month-view-header.component';\nexport {CalendarOpenDayEventsComponent as ɵa} from './modules/month/calendar-open-day-events.component';\nexport {CalendarWeekViewCurrentTimeMarkerComponent as ɵs} from './modules/week/calendar-week-view-current-time-marker.component';\nexport {CalendarWeekViewEventComponent as ɵq} from './modules/week/calendar-week-view-event.component';\nexport {CalendarWeekViewHeaderComponent as ɵp} from './modules/week/calendar-week-view-header.component';\nexport {CalendarWeekViewHourSegmentComponent as ɵr} from './modules/week/calendar-week-view-hour-segment.component';"],"names":["validateEventsWithoutLog"],"mappings":";;;;;;;;;;;;;IAyCA;QAKE,oBAAe,GAAG,UAAC,KAAa,EAAE,MAAmB;YACnD,OAAA,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM;SAAA,CAAC;KAClC;IANU;QAAR,KAAK,EAAE;;gEAAsB;IAErB;QAAR,KAAK,EAAE;kCAAiB,WAAW;yEAAM;IAH/B,6BAA6B;QAtCzC,SAAS,CAAC;YACT,QAAQ,EAAE,4BAA4B;YACtC,QAAQ,EAAE,qjCAkCT;SACF,CAAC;OACW,6BAA6B,CAOzC;IAAD,oCAAC;CAPD;;;ICjBA;KAMC;IALU;QAAR,KAAK,EAAE;;8DAAsB;IAErB;QAAR,KAAK,EAAE;kCAAiB,WAAW;uEAAM;IAEjC;QAAR,KAAK,EAAE;;6DAAc;IALX,2BAA2B;QArBvC,SAAS,CAAC;YACT,QAAQ,EAAE,0BAA0B;YACpC,QAAQ,EAAE,8fAiBT;SACF,CAAC;OACW,2BAA2B,CAMvC;IAAD,kCAAC;CAND;;;ICyBA;KAQC;IAPU;QAAR,KAAK,EAAE;;oEAAkB;IAEjB;QAAR,KAAK,EAAE;;qEAAmB;IAElB;QAAR,KAAK,EAAE;;iEAAsB;IAErB;QAAR,KAAK,EAAE;kCAAiB,WAAW;0EAAM;IAP/B,8BAA8B;QAzB1C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