UNPKG

204 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/request-idle-callback.ts","ng://angular-calendar/modules/common/click.directive.ts","ng://angular-calendar/modules/common/calendar-utils.provider.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-date-formatter.interface.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.module.ts","ng://angular-calendar/modules/day/calendar-day-view.component.ts","ng://angular-calendar/modules/day/calendar-day-view-hour-segment.component.ts","ng://angular-calendar/modules/day/calendar-day-view-event.component.ts","ng://angular-calendar/modules/day/calendar-day.module.ts","ng://angular-calendar/modules/calendar.module.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 })\"\n [ngClass]=\"action.cssClass\"\n [innerHtml]=\"action.label\"\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 >\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 }\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 | string | number, amount: number): Date;\n\n abstract addMonths(date: Date | string | number, amount: number): Date;\n\n abstract subDays(date: Date | string | number, amount: number): Date;\n\n abstract subWeeks(date: Date | string | number, amount: number): Date;\n\n abstract subMonths(date: Date | string | number, amount: number): Date;\n\n abstract getISOWeek(date: Date | string | number): number;\n\n abstract setDate(date: Date | string | number, dayOfMonth: number): Date;\n\n abstract setMonth(date: Date | string | number, month: number): Date;\n\n abstract setYear(date: Date | string | number, year: number): Date;\n\n abstract getDate(date: Date | string | number): number;\n\n abstract getMonth(date: Date | string | number): number;\n\n abstract getYear(date: Date | string | number): number;\n\n abstract addDays(date: Date | string | number, amount: number): Date;\n\n abstract addHours(date: Date | string | number, amount: number): Date;\n\n abstract addMinutes(date: Date | string | number, amount: number): Date;\n\n abstract addSeconds(date: Date | string | number, amount: number): Date;\n\n abstract differenceInDays(\n dateLeft: Date | string | number,\n dateRight: Date | string | number\n ): number;\n\n abstract differenceInMinutes(\n dateLeft: Date | string | number,\n dateRight: Date | string | number\n ): number;\n\n abstract differenceInSeconds(\n dateLeft: Date | string | number,\n dateRight: Date | string | number\n ): number;\n\n abstract endOfDay(date: Date | string | number): Date;\n\n abstract endOfMonth(date: Date | string | number): Date;\n\n abstract endOfWeek(\n date: Date | string | number,\n options?: { weekStartsOn?: number }\n ): Date;\n\n abstract getDay(date: Date | string | number): number;\n\n abstract isSameDay(\n dateLeft: Date | string | number,\n dateRight: Date | string | number\n ): boolean;\n\n abstract isSameMonth(\n dateLeft: Date | string | number,\n dateRight: Date | string | number\n ): boolean;\n\n abstract isSameSecond(\n dateLeft: Date | string | number,\n dateRight: Date | string | number\n ): boolean;\n\n abstract max(...dates: Array<Date | string | number>): Date;\n\n abstract setHours(date: Date | string | number, hours: number): Date;\n\n abstract setMinutes(date: Date | string | number, minutes: number): Date;\n\n abstract startOfDay(date: Date | string | number): Date;\n\n abstract startOfMinute(date: Date | string | number): Date;\n\n abstract startOfMonth(date: Date | string | number): Date;\n\n abstract startOfWeek(\n date: Date | string | number,\n options?: { weekStartsOn?: number }\n ): Date;\n\n abstract getHours(date: Date | string | number): number;\n\n abstract getMinutes(date: Date | string | number): number;\n}\n","export enum CalendarView {\n Month = 'month',\n Week = 'week',\n Day = 'day'\n}\n","import {\n CalendarEvent,\n DayViewEvent,\n DayViewHour,\n DayViewHourSegment,\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: DayViewHourSegment\n) => segment.date.toISOString();\n\nexport const trackByHour = (index: number, hour: DayViewHour) =>\n hour.segments[0].date.toISOString();\n\nexport const trackByDayOrWeekEvent = (\n index: number,\n weekEvent: WeekViewAllDayEvent | DayViewEvent\n) => (weekEvent.event.id ? weekEvent.event.id : weekEvent.event);\n\nconst MINUTES_IN_HOUR = 60;\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 =\n MINUTES_IN_HOUR / (hourSegments * hourSegmentHeight);\n return draggedInPixelsSnapSize * pixelAmountInMinutes;\n}\n\nexport function getMinimumEventHeightInMinutes(\n hourSegments: number,\n hourSegmentHeight: number\n) {\n return (\n (MINUTES_IN_HOUR / (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;\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;\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 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 *\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 { CalendarEventTitleFormatter, CalendarEvent } from 'angular-calendar';\n *\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 { Observable } from 'rxjs';\n\nconst isSupported =\n typeof window !== 'undefined' &&\n typeof window['requestIdleCallback'] !== 'undefined';\n\nexport function requestIdleCallbackObservable() {\n return new Observable(observer => {\n /* istanbul ignore else */\n if (isSupported) {\n const id = window['requestIdleCallback'](() => {\n observer.next();\n observer.complete();\n });\n return () => {\n window['cancelIdleCallback'](id);\n };\n } else {\n const timeoutId = setTimeout(() => {\n observer.next();\n observer.complete();\n }, 1);\n return () => {\n clearTimeout(timeoutId);\n };\n }\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 { requestIdleCallbackObservable } from './request-idle-callback';\nimport { switchMapTo, takeUntil } from 'rxjs/operators';\n\nconst clickElements = new Set<HTMLElement>();\n\nconst eventName: string =\n typeof window !== 'undefined' && typeof window['Hammer'] !== 'undefined'\n ? 'tap'\n : 'click';\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 private zone: NgZone\n ) {}\n\n ngOnInit(): void {\n if (!this.clickListenerDisabled) {\n this.renderer.setAttribute(\n this.elm.nativeElement,\n 'data-calendar-clickable',\n 'true'\n );\n clickElements.add(this.elm.nativeElement);\n\n // issue #942 - lazily initialise all click handlers after initial render as hammerjs is slow\n requestIdleCallbackObservable()\n .pipe(\n switchMapTo(this.listen()),\n takeUntil(this.destroy$)\n )\n .subscribe(event => {\n // prevent child click events from firing on parent elements that also have click events\n let nearestClickableParent = event.target as HTMLElement;\n while (\n !clickElements.has(nearestClickableParent) &&\n nearestClickableParent !== this.document.body\n ) {\n nearestClickableParent = nearestClickableParent.parentElement;\n }\n const isThisClickableElement =\n this.elm.nativeElement === nearestClickableParent;\n if (isThisClickableElement) {\n this.zone.run(() => {\n this.click.next(event);\n });\n }\n });\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n clickElements.delete(this.elm.nativeElement);\n }\n\n private listen() {\n return new Observable<MouseEvent>(observer => {\n return this.renderer.listen(this.elm.nativeElement, eventName, event => {\n observer.next(event);\n });\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n GetMonthViewArgs,\n MonthView,\n GetWeekViewHeaderArgs,\n WeekDay,\n GetWeekViewArgs,\n GetDayViewArgs,\n DayView,\n GetDayViewHourGridArgs,\n DayViewHour,\n WeekView,\n getDayView,\n getDayViewHourGrid,\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 getDayView(args: GetDayViewArgs): DayView {\n return getDayView(this.dateAdapter, args);\n }\n\n getDayViewHourGrid(args: GetDayViewHourGridArgs): DayViewHour[] {\n return getDayViewHourGrid(this.dateAdapter, args);\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 * @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)\n .locale(locale)\n .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)\n .locale(locale)\n .format('D');\n }\n\n /**\n * The month view title\n */\n public monthViewTitle({ date, locale }: DateFormatterParams): string {\n return this.moment(date)\n .locale(locale)\n .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)\n .locale(locale)\n .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)\n .locale(locale)\n .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)\n .locale(locale)\n .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)\n .locale(locale)\n .format('ha');\n }\n\n /**\n * The day view title\n */\n public dayViewTitle({ date, locale }: DateFormatterParams): string {\n return this.moment(date)\n .locale(locale)\n .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 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","/**\n * The parameter type passed to the date formatter methods.\n */\nexport interface DateFormatterParams {\n /**\n * The date to format.\n */\n date: Date;\n\n /**\n * The users preferred locale.\n */\n locale?: string;\n\n /**\n * The start day number of the week\n */\n weekStartsOn?: number;\n\n /**\n * An array of day indexes (0 = sunday, 1 = monday etc) that will be hidden on the view\n */\n excludeDays?: number[];\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`\n */\n daysInWeek?: number;\n}\n\n/**\n * If using a completely custom date formatter then it should implement this interface.\n */\nexport interface CalendarDateFormatterInterface {\n /**\n * The month view header week day labels\n */\n monthViewColumnHeader({ date: Date }: DateFormatterParams): string;\n\n /**\n * The month view cell day number\n */\n monthViewDayNumber({ date: Date }: DateFormatterParams): string;\n\n /**\n * The month view title\n */\n monthViewTitle({ date: Date }: DateFormatterParams): string;\n\n /**\n * The week view header week day labels\n */\n weekViewColumnHeader({ date: Date }: DateFormatterParams): string;\n\n /**\n * The week view sub header day and month labels\n */\n weekViewColumnSubHeader({ date: Date }: DateFormatterParams): string;\n\n /**\n * The week view title\n */\n weekViewTitle({ date: Date }: DateFormatterParams): string;\n\n /**\n * The time formatting down the left hand side of the day view\n */\n weekViewHour({ date: Date }: DateFormatterParams): string;\n\n /**\n * The time formatting down the left hand side of the day view\n */\n dayViewHour({ date: Date }: DateFormatterParams): string;\n\n /**\n * The day view title\n */\n dayViewTitle({ date: Date }: DateFormatterParams): string;\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 } 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 { CalendarEventTitleFormatter } from './calendar-event-title-formatter.provider';\nimport { CalendarDateFormatter } from './calendar-date-formatter.provider';\nimport { CalendarUtils } from './calendar-utils.provider';\n\nexport interface CalendarModuleConfig {\n eventTitleFormatter?: Provider;\n dateFormatter?: Provider;\n utils?: 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-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 ClickDirective\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 ClickDirective\n ],\n entryComponents: [CalendarTooltipWindowComponent]\n})\nexport class CalendarCommonModule {\n static forRoot(\n dateAdapter: Provider,\n config: CalendarModuleConfig = {}\n ): ModuleWithProviders {\n return {\n ngModule: CalendarCommonModule,\n providers: [\n dateAdapter,\n config.eventTitleFormatter || CalendarEventTitleFormatter,\n config.dateFormatter || CalendarDateFormatter,\n config.utils || CalendarUtils\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\">\n <mwl-calendar-month-view-header\n [days]=\"columnHeaders\"\n [locale]=\"locale\"\n (columnHeaderClicked)=\"columnHeaderClicked.emit($event)\"\n [customTemplate]=\"headerTemplate\"\n >\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 class=\"cal-cell-row\">\n <mwl-calendar-month-cell\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 })\"\n [clickListenerDisabled]=\"dayClicked.observers.length === 0\"\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)=\"eventClicked.emit({ event: $event.event })\"\n >\n </mwl-calendar-month-cell>\n </div>\n <mwl-calendar-open-day-events\n [isOpen]=\"openRowIndex === rowIndex\"\n [events]=\"openDay?.events\"\n [customTemplate]=\"openDayEventsTemplate\"\n [eventTitleTemplate]=\"eventTitleTemplate\"\n [eventActionsTemplate]=\"eventActionsTemplate\"\n (eventClicked)=\"eventClicked.emit({ event: $event.event })\"\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 * 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 */\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()\n beforeViewRender = new EventEmitter<CalendarMonthViewBeforeRenderEvent>();\n\n /**\n * Called when the day cell is clicked\n */\n @Output()\n dayClicked = new EventEmitter<{\n day: MonthViewDay;\n }>();\n\n /**\n * Called when the event title is clicked\n */\n @Output()\n eventClicked = new EventEmitter<{\n event: CalendarEvent;\n }>();\n\n /**\n * Called when a header week day is clicked. Returns ISO day number.\n */\n @Output() columnHeaderClicked = new EventEmitter<number>();\n\n /**\n * Called when an event is dragged and dropped\n */\n @Output()\n eventTimesChanged = new EventEmitter<\n CalendarMonthViewEventTimesChangedEvent\n >();\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 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 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 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\">\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)=\"columnHeaderClicked.emit(day.day)\"\n [ngClass]=\"day.cssClass\"\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<number>();\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 class=\"cal-cell-top\">\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 </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 (mwlClick)=\"eventClicked.emit({ event: event })\"\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()\n eventClicked: EventEmitter<{ event: CalendarEvent }> = new EventEmitter<{\n event: CalendarEvent;\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 class=\"cal-open-day-events\" [@collapse] *ngIf=\"isOpen\">\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 >\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)=\"eventClicked.emit({ event: event })\"\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() 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 @Output()\n eventClicked: EventEmitter<{ event: CalendarEvent }> = new EventEmitter<{\n event: CalendarEvent;\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 DayViewEvent,\n DayViewHourSegment,\n DayViewHour,\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 trackByDayOrWeekEvent,\n isDraggedWithinPeriod,\n shouldFireDroppedEvent,\n getWeekViewPeriod\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\">\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 >\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 ></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: trackByDayOrWeekEvent\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 (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 [weekEvent]=\"allDayEvent\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipDelay]=\"tooltipDelay\"\n [customTemplate]=\"eventTemplate\"\n [eventTitleTemplate]=\"eventTitleTemplate\"\n [eventActionsTemplate]=\"eventActionsTemplate\"\n (eventClicked)=\"eventClicked.emit({ event: allDayEvent.event })\"\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 class=\"cal-time-label-column\" *ngIf=\"view.hourColumns.length > 0\">\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 >\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 <div\n *ngFor=\"\n let timeEvent of column.events;\n trackBy: trackByDayOrWeekEvent\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 ? { x: dayColumnWidth, y: eventSnapSize || hourSegmentHeight }\n : {}\n \"\n [ghostDragEnabled]=\"!snapDraggedEvents\"\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 <mwl-calendar-week-view-event\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 (eventClicked)=\"eventClicked.emit({ event: timeEvent.event })\"\n >\n </mwl-calendar-week-view-event>\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\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 (mwlClick)=\"hourSegmentClicked.emit({ date: segment.date })\"\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 >\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 */\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 be <= 6\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 * 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()\n dayHeaderClicked = new EventEmitter<{\n day: WeekDay;\n }>();\n\n /**\n * Called when the event title is clicked\n */\n @Output()\n eventClicked = new EventEmitter<{\n event: CalendarEvent;\n }>();\n\n /**\n * Called when an event is resized or dragged and dropped\n */\n @Output()\n eventTimesChanged = 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()\n beforeViewRender = new EventEmitter<CalendarWeekViewBeforeRenderEvent>();\n\n /**\n * Called when an hour segment is clicked\n */\n @Output()\n hourSegmentClicked = new EventEmitter<{\n date: Date;\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<\n WeekViewAllDayEvent,\n 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 trackByWeekDayHeaderDate = trackByWeekDayHeaderDate;\n\n /**\n * @hidden\n */\n trackByHourSegment = trackByHourSegment;\n\n /**\n * @hidden\n */\n trackByHour = trackByHour;\n\n /**\n * @hidden\n */\n trackByDayOrWeekEvent = trackByDayOrWeekEvent;\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 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 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 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 /**\n * @hidden\n */\n timeEventResizeStarted(\n eventsContainer: HTMLElement,\n timeEvent: DayViewEvent,\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: DayViewEvent, 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);\n }\n\n /**\n * @hidden\n */\n timeEventResizeEnded(timeEvent: DayViewEvent) {\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 = this.allDayEventResizes.get(\n allDayEvent\n );\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 = this.allDayEventResizes.get(\n allDayEvent\n );\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 eventDropped(\n dropEvent: DropEvent<{ event?: CalendarEvent; calendarId?: symbol }>,\n date: Date,\n allDay: boolean\n ): void {\n if (shouldFireDroppedEvent(dropEvent, date, allDay, this.calendarId)) {\n this.eventTimesChanged.emit({\n type: CalendarEventTimesChangedEventType.Drop,\n event: dropEvent.dropData.event,\n newStart: date,\n allDay\n });\n }\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?: DayViewEvent\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.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: DayViewEvent, dragEvent: DragMoveEvent) {\n if (this.snapDraggedEvents) {\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 );\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 | DayViewEvent,\n dragEndEvent: DragEndEvent,\n dayWidth: number,\n useY = false\n ): void {\n this.view = this.getWeekView(this.events);\n this.dragActive = false;\n const { start, end } = this.getDragMovedEventTimes(\n weekEvent,\n dragEndEvent,\n dayWidth,\n useY\n );\n if (\n this.eventDragEnterByType[useY ? 'time' : 'allDay'] > 0 &&\n isDraggedWithinPeriod(start, end, this.view.period)\n ) {\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 | DayViewEvent,\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 ) {\n const previousView = this.view;\n this.view = this.getWeekView(tempEvents);\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 adjustedEventsArray.forEach(adjustedEvent => {\n const originalEvent = adjustedEvents.get(adjustedEvent);\n const existingColumnEvent = column.events.find(\n columnEvent => columnEvent.event === adjustedEvent\n );\n if (existingColumnEvent) {\n // restore the original event so trackBy kicks in and the dom isn't changed\n existingColumnEvent.event = originalEvent;\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 column.events.push({\n event: originalEvent,\n left: 0,\n top: 0,\n height: 0,\n width: 0,\n startsBeforeDay: false,\n endsAfterDay: false\n });\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","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 >\n <div class=\"cal-day-headers\">\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 })\"\n mwlDroppable\n dragOverClass=\"cal-drag-over\"\n (drop)=\"\n eventDropped.emit({\n event: $event.dropData.event,\n newStart: day.date\n })\n \"\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 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()\n dayHeaderClicked: EventEmitter<{ day: WeekDay }> = new EventEmitter<{\n day: WeekDay;\n }>();\n\n @Output()\n eventDropped: EventEmitter<{\n event: CalendarEvent;\n newStart: Date;\n }> = new EventEmitter<{ event: CalendarEvent; newStart: 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 DayViewEvent,\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 >\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: 'weekTooltip':weekEvent.event)\n : ''\n \"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipEvent]=\"weekEvent.event\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipDelay]=\"tooltipDelay\"\n (mwlClick)=\"eventClicked.emit()\"\n >\n <mwl-calendar-event-actions\n [event]=\"weekEvent.event\"\n [customTemplate]=\"eventActionsTemplate\"\n >\n </mwl-calendar-event-actions>\n &ngsp;\n <mwl-calendar-event-title\n [event]=\"weekEvent.event\"\n [customTemplate]=\"eventTitleTemplate\"\n view=\"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 }\"\n >\n </ng-template>\n `\n})\nexport class CalendarWeekViewEventComponent {\n @Input() weekEvent: WeekViewAllDayEvent | DayViewEvent;\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 @Output() eventClicked: EventEmitter<any> = new EventEmitter();\n}\n","import { Component, Input, TemplateRef } from '@angular/core';\nimport { WeekViewHourColumn } 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 >\n <div\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 {{ segment.displayDate | calendarDate: 'weekViewHour':locale }}\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 }\"\n >\n </ng-template>\n `\n})\nexport class CalendarWeekViewHourSegmentComponent {\n @Input() segment: WeekViewHourColumn;\n\n @Input() segmentHeight: number;\n\n @Input() locale: string;\n\n @Input() isTimeLabel: boolean;\n\n @Input() customTemplate: TemplateRef<any>;\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';\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 ],\n exports: [\n ResizableModule,\n DragAndDropModule,\n CalendarWeekViewComponent,\n CalendarWeekViewHeaderComponent,\n CalendarWeekViewEventComponent,\n CalendarWeekViewHourSegmentComponent\n ]\n})\nexport class CalendarWeekModule {}\n","import {\n Component,\n Input,\n OnChanges,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n LOCALE_ID,\n Inject,\n OnInit,\n OnDestroy,\n TemplateRef\n} from '@angular/core';\nimport {\n CalendarEvent,\n DayView,\n DayViewHour,\n DayViewHourSegment,\n DayViewEvent,\n ViewPeriod,\n WeekViewAllDayEvent\n} from 'calendar-utils';\nimport { Subject, Subscription } from 'rxjs';\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 trackByEventId,\n trackByHour,\n trackByHourSegment,\n getMinutesMoved,\n getDefaultEventEnd,\n getMinimumEventHeightInMinutes,\n trackByDayOrWeekEvent,\n isDraggedWithinPeriod,\n shouldFireDroppedEvent\n} from '../common/util';\nimport { DateAdapter } from '../../date-adapters/date-adapter';\nimport {\n DragEndEvent,\n DragMoveEvent,\n ValidateDrag\n} from 'angular-draggable-droppable';\nimport { PlacementArray } from 'positioning';\n\nexport interface CalendarDayViewBeforeRenderEvent {\n body: {\n hourGrid: DayViewHour[];\n allDayEvents: CalendarEvent[];\n };\n period: ViewPeriod;\n}\n\n/**\n * @hidden\n */\nexport interface DayViewEventResize {\n originalTop: number;\n originalHeight: number;\n edge: string;\n}\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 <div class=\"cal-day-view\">\n <div\n class=\"cal-all-day-events\"\n mwlDroppable\n dragOverClass=\"cal-drag-over\"\n dragActiveClass=\"cal-drag-active\"\n (drop)=\"eventDropped($event, view.period.start, true)\"\n >\n <mwl-calendar-day-view-event\n *ngFor=\"let event of view.allDayEvents; trackBy: trackByEventId\"\n [ngClass]=\"event.cssClass\"\n [dayEvent]=\"{ event: event }\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipDelay]=\"tooltipDelay\"\n [customTemplate]=\"eventTemplate\"\n [eventTitleTemplate]=\"eventTitleTemplate\"\n [eventActionsTemplate]=\"eventActionsTemplate\"\n (eventClicked)=\"eventClicked.emit({ event: event })\"\n [class.cal-draggable]=\"!snapDraggedEvents && event.draggable\"\n mwlDraggable\n dragActiveClass=\"cal-drag-active\"\n [dropData]=\"{ event: event, calendarId: calendarId }\"\n [dragAxis]=\"{\n x: !snapDraggedEvents && event.draggable,\n y: !snapDraggedEvents && event.draggable\n }\"\n >\n </mwl-calendar-day-view-event>\n </div>\n <div\n class=\"cal-hour-rows\"\n #dayEventsContainer\n mwlDroppable\n (dragEnter)=\"eventDragEnter = eventDragEnter + 1\"\n (dragLeave)=\"eventDragEnter = eventDragEnter - 1\"\n >\n <div class=\"cal-events\">\n <div\n #event\n *ngFor=\"let dayEvent of view?.events; trackBy: trackByDayEvent\"\n class=\"cal-event-container\"\n [class.cal-draggable]=\"dayEvent.event.draggable\"\n [class.cal-starts-within-day]=\"!dayEvent.startsBeforeDay\"\n [class.cal-ends-within-day]=\"!dayEvent.endsAfterDay\"\n [ngClass]=\"dayEvent.event.cssClass\"\n mwlResizable\n [resizeSnapGrid]=\"{\n top: eventSnapSize || hourSegmentHeight,\n bottom: eventSnapSize || hourSegmentHeight\n }\"\n [validateResize]=\"validateResize\"\n (resizeStart)=\"resizeStarted(dayEvent, $event, dayEventsContainer)\"\n (resizing)=\"resizing(dayEvent, $event)\"\n (resizeEnd)=\"resizeEnded(dayEvent)\"\n mwlDraggable\n dragActiveClass=\"cal-drag-active\"\n [dropData]=\"{ event: dayEvent.event, calendarId: calendarId }\"\n [dragAxis]=\"{\n x:\n !snapDraggedEvents &&\n dayEvent.event.draggable &&\n currentResizes.size === 0,\n y: dayEvent.event.draggable && currentResizes.size === 0\n }\"\n [dragSnapGrid]=\"\n snapDraggedEvents ? { y: eventSnapSize || hourSegmentHeight } : {}\n \"\n [validateDrag]=\"validateDrag\"\n [ghostDragEnabled]=\"!snapDraggedEvents\"\n (dragStart)=\"dragStarted(event, dayEventsContainer, dayEvent)\"\n (dragging)=\"dragMove($event)\"\n (dragEnd)=\"dragEnded(dayEvent, $event)\"\n [style.marginTop.px]=\"dayEvent.top\"\n [style.height.px]=\"dayEvent.height\"\n [style.marginLeft.px]=\"dayEvent.left + 70\"\n [style.width.px]=\"dayEvent.width - 1\"\n >\n <div\n class=\"cal-resize-handle cal-resize-handle-before-start\"\n *ngIf=\"\n dayEvent.event?.resizable?.beforeStart &&\n !dayEvent.startsBeforeDay\n \"\n mwlResizeHandle\n [resizeEdges]=\"{ top: true }\"\n ></div>\n <mwl-calendar-day-view-event\n [dayEvent]=\"dayEvent\"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipDelay]=\"tooltipDelay\"\n [customTemplate]=\"eventTemplate\"\n [eventTitleTemplate]=\"eventTitleTemplate\"\n [eventActionsTemplate]=\"eventActionsTemplate\"\n (eventClicked)=\"eventClicked.emit({ event: dayEvent.event })\"\n >\n </mwl-calendar-day-view-event>\n <div\n class=\"cal-resize-handle cal-resize-handle-after-end\"\n *ngIf=\"\n dayEvent.event?.resizable?.afterEnd && !dayEvent.endsAfterDay\n \"\n mwlResizeHandle\n [resizeEdges]=\"{ bottom: true }\"\n ></div>\n </div>\n </div>\n <div\n class=\"cal-hour\"\n *ngFor=\"let hour of hours; trackBy: trackByHour\"\n [style.minWidth.px]=\"view?.width + 70\"\n >\n <mwl-calendar-day-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 (mwlClick)=\"hourSegmentClicked.emit({ date: segment.date })\"\n [clickListenerDisabled]=\"hourSegmentClicked.observers.length === 0\"\n mwlDroppable\n dragOverClass=\"cal-drag-over\"\n dragActiveClass=\"cal-drag-active\"\n (drop)=\"eventDropped($event, segment.date, false)\"\n >\n </mwl-calendar-day-view-hour-segment>\n </div>\n </div>\n </div>\n `\n})\nexport class CalendarDayViewComponent 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 * The number of segments in an hour. Must be <= 6\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 * The width in pixels of each event on the view\n */\n @Input() eventWidth: number = 150;\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 * Called when an event title is clicked\n */\n @Output()\n eventClicked = new EventEmitter<{\n event: CalendarEvent;\n }>();\n\n /**\n * Called when an hour segment is clicked\n */\n @Output()\n hourSegmentClicked = new EventEmitter<{\n date: Date;\n }>();\n\n /**\n * Called when an event is resized or dragged and dropped\n */\n @Output()\n eventTimesChanged = 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()\n beforeViewRender = new EventEmitter<CalendarDayViewBeforeRenderEvent>();\n\n /**\n * @hidden\n */\n hours: DayViewHour[] = [];\n\n /**\n * @hidden\n */\n view: DayView;\n\n /**\n * @hidden\n */\n width: number = 0;\n\n /**\n * @hidden\n */\n refreshSubscription: Subscription;\n\n /**\n * @hidden\n */\n currentResizes: Map<DayViewEvent, DayViewEventResize> = new Map();\n\n /**\n * @hidden\n */\n eventDragEnter = 0;\n\n /**\n * @hidden\n */\n calendarId = Symbol('angular calendar day view id');\n\n /**\n * @hidden\n */\n dragAlreadyMoved = false;\n\n /**\n * @hidden\n */\n currentDrag?: {\n dayEvent: DayViewEvent;\n originalTop: number;\n originalLeft: number;\n };\n\n /**\n * @hidden\n */\n validateDrag: ValidateDrag;\n\n /**\n * @hidden\n */\n validateResize: (args: any) => boolean;\n\n /**\n * @hidden\n */\n trackByEventId = trackByEventId;\n\n /**\n * @hidden\n */\n trackByHour = trackByHour;\n\n /**\n * @hidden\n */\n trackByHourSegment = trackByHourSegment;\n\n /**\n * @hidden\n */\n trackByDayEvent = trackByDayOrWeekEvent;\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 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 ngOnDestroy(): void {\n if (this.refreshSubscription) {\n this.refreshSubscription.unsubscribe();\n }\n }\n\n /**\n * @hidden\n */\n ngOnChanges(changes: any): void {\n const refreshHourGrid =\n changes.viewDate ||\n changes.dayStartHour ||\n changes.dayStartMinute ||\n changes.dayEndHour ||\n changes.dayEndMinute ||\n changes.hourSegments;\n\n const refreshView =\n changes.viewDate ||\n changes.events ||\n changes.dayStartHour ||\n changes.dayStartMinute ||\n changes.dayEndHour ||\n changes.dayEndMinute ||\n changes.eventWidth ||\n changes.hourSegments;\n\n if (refreshHourGrid) {\n this.refreshHourGrid();\n }\n\n if (changes.events) {\n validateEvents(this.events);\n }\n\n if (refreshView) {\n this.refreshView();\n }\n\n if (refreshHourGrid || refreshView) {\n this.emitBeforeViewRender();\n }\n }\n\n eventDropped(\n dropEvent: { dropData?: { event?: CalendarEvent; calendarId?: symbol } },\n date: Date,\n allDay: boolean\n ): void {\n if (shouldFireDroppedEvent(dropEvent, date, allDay, this.calendarId)) {\n this.eventTimesChanged.emit({\n type: CalendarEventTimesChangedEventType.Drop,\n event: dropEvent.dropData.event,\n newStart: date,\n allDay\n });\n }\n }\n\n resizeStarted(\n event: DayViewEvent,\n resizeEvent: ResizeEvent,\n dayEventsContainer: HTMLElement\n ): void {\n this.currentResizes.set(event, {\n originalTop: event.top,\n originalHeight: event.height,\n edge: typeof resizeEvent.edges.top !== 'undefined' ? 'top' : 'bottom'\n });\n const resizeHelper: CalendarResizeHelper = new CalendarResizeHelper(\n dayEventsContainer\n );\n this.validateResize = ({ rectangle }) =>\n resizeHelper.validateResize({ rectangle });\n this.cdr.markForCheck();\n }\n\n resizing(event: DayViewEvent, resizeEvent: ResizeEvent): void {\n const currentResize: DayViewEventResize = this.currentResizes.get(event);\n if (typeof resizeEvent.edges.top !== 'undefined') {\n event.top = currentResize.originalTop + +resizeEvent.edges.top;\n event.height = currentResize.originalHeight - +resizeEvent.edges.top;\n } else if (typeof resizeEvent.edges.bottom !== 'undefined') {\n event.height = currentResize.originalHeight + +resizeEvent.edges.bottom;\n }\n }\n\n resizeEnded(dayEvent: DayViewEvent): void {\n const currentResize: DayViewEventResize = this.currentResizes.get(dayEvent);\n\n const resizingBeforeStart = currentResize.edge === 'top';\n let pixelsMoved: number;\n if (resizingBeforeStart) {\n pixelsMoved = dayEvent.top - currentResize.originalTop;\n } else {\n pixelsMoved = dayEvent.height - currentResize.originalHeight;\n }\n\n dayEvent.top = currentResize.originalTop;\n dayEvent.height = currentResize.originalHeight;\n\n const minutesMoved = getMinutesMoved(\n pixelsMoved,\n this.hourSegments,\n this.hourSegmentHeight,\n this.eventSnapSize\n );\n\n let newStart: Date = dayEvent.event.start;\n let newEnd: Date = getDefaultEventEnd(\n this.dateAdapter,\n dayEvent.event,\n getMinimumEventHeightInMinutes(this.hourSegments, this.hourSegmentHeight)\n );\n if (resizingBeforeStart) {\n newStart = this.dateAdapter.addMinutes(newStart, minutesMoved);\n } else {\n newEnd = this.dateAdapter.addMinutes(newEnd, minutesMoved);\n }\n\n this.eventTimesChanged.emit({\n newStart,\n newEnd,\n event: dayEvent.event,\n type: CalendarEventTimesChangedEventType.Resize\n });\n this.currentResizes.delete(dayEvent);\n }\n\n dragStarted(\n event: HTMLElement,\n dayEventsContainer: HTMLElement,\n dayEvent: DayViewEvent\n ): void {\n const dragHelper: CalendarDragHelper = new CalendarDragHelper(\n dayEventsContainer,\n event\n );\n this.validateDrag = ({ x, y, transform }) =>\n this.currentResizes.size === 0 &&\n dragHelper.validateDrag({\n x,\n y,\n snapDraggedEvents: this.snapDraggedEvents,\n dragAlreadyMoved: this.dragAlreadyMoved,\n transform\n });\n this.eventDragEnter = 0;\n this.dragAlreadyMoved = false;\n this.currentDrag = {\n dayEvent,\n originalTop: dayEvent.top,\n originalLeft: dayEvent.left\n };\n this.cdr.markForCheck();\n }\n\n /**\n * @hidden\n */\n dragMove(coords: DragMoveEvent) {\n this.dragAlreadyMoved = true;\n if (this.snapDraggedEvents) {\n this.currentDrag.dayEvent.top = this.currentDrag.originalTop + coords.y;\n this.currentDrag.dayEvent.left = this.currentDrag.originalLeft + coords.x;\n }\n }\n\n dragEnded(dayEvent: DayViewEvent, dragEndEvent: DragEndEvent): void {\n this.currentDrag.dayEvent.top = this.currentDrag.originalTop;\n this.currentDrag.dayEvent.left = this.currentDrag.originalLeft;\n this.currentDrag = null;\n if (this.eventDragEnter > 0) {\n let minutesMoved = getMinutesMoved(\n dragEndEvent.y,\n this.hourSegments,\n this.hourSegmentHeight,\n this.eventSnapSize\n );\n let newStart: Date = this.dateAdapter.addMinutes(\n dayEvent.event.start,\n minutesMoved\n );\n if (dragEndEvent.y < 0 && newStart < this.view.period.start) {\n minutesMoved += this.dateAdapter.differenceInMinutes(\n this.view.period.start,\n newStart\n );\n newStart = this.view.period.start;\n }\n let newEnd: Date;\n if (dayEvent.event.end) {\n newEnd = this.dateAdapter.addMinutes(dayEvent.event.end, minutesMoved);\n }\n if (isDraggedWithinPeriod(newStart, newEnd, this.view.period)) {\n this.eventTimesChanged.emit({\n newStart,\n newEnd,\n event: dayEvent.event,\n type: CalendarEventTimesChangedEventType.Drag,\n allDay: false\n });\n }\n }\n }\n\n protected refreshHourGrid(): void {\n this.hours = this.utils.getDayViewHourGrid({\n viewDate: this.viewDate,\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 });\n }\n\n protected refreshView(): void {\n this.view = this.utils.getDayView({\n events: this.events,\n viewDate: this.viewDate,\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 eventWidth: this.eventWidth,\n segmentHeight: this.hourSegmentHeight\n });\n }\n\n protected refreshAll(): void {\n this.refreshHourGrid();\n this.refreshView();\n this.emitBeforeViewRender();\n }\n\n protected emitBeforeViewRender(): void {\n if (this.hours && this.view) {\n this.beforeViewRender.emit({\n body: {\n hourGrid: this.hours,\n allDayEvents: this.view.allDayEvents\n },\n period: this.view.period\n });\n }\n }\n}\n","import { Component, Input, TemplateRef } from '@angular/core';\nimport { DayViewHourSegment } from 'calendar-utils';\n\n@Component({\n selector: 'mwl-calendar-day-view-hour-segment',\n template: `\n <ng-template\n #defaultTemplate\n let-segment=\"segment\"\n let-locale=\"locale\"\n let-segmentHeight=\"segmentHeight\"\n >\n <div\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\">\n {{ segment.displayDate | calendarDate: 'dayViewHour':locale }}\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 }\"\n >\n </ng-template>\n `\n})\nexport class CalendarDayViewHourSegmentComponent {\n @Input() segment: DayViewHourSegment;\n\n @Input() segmentHeight: number;\n\n @Input() locale: string;\n\n @Input() customTemplate: TemplateRef<any>;\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n TemplateRef\n} from '@angular/core';\nimport { DayViewEvent } from 'calendar-utils';\nimport { PlacementArray } from 'positioning';\n\n@Component({\n selector: 'mwl-calendar-day-view-event',\n template: `\n <ng-template\n #defaultTemplate\n let-dayEvent=\"dayEvent\"\n let-tooltipPlacement=\"tooltipPlacement\"\n let-eventClicked=\"eventClicked\"\n let-tooltipTemplate=\"tooltipTemplate\"\n let-tooltipAppendToBody=\"tooltipAppendToBody\"\n let-tooltipDelay=\"tooltipDelay\"\n >\n <div\n class=\"cal-event\"\n [ngStyle]=\"{\n backgroundColor: dayEvent.event.color?.secondary,\n borderColor: dayEvent.event.color?.primary\n }\"\n [mwlCalendarTooltip]=\"\n dayEvent.event.title | calendarEventTitle: 'dayTooltip':dayEvent.event\n \"\n [tooltipPlacement]=\"tooltipPlacement\"\n [tooltipEvent]=\"dayEvent.event\"\n [tooltipTemplate]=\"tooltipTemplate\"\n [tooltipAppendToBody]=\"tooltipAppendToBody\"\n [tooltipDelay]=\"tooltipDelay\"\n (mwlClick)=\"eventClicked.emit()\"\n >\n <mwl-calendar-event-actions\n [event]=\"dayEvent.event\"\n [customTemplate]=\"eventActionsTemplate\"\n >\n </mwl-calendar-event-actions>\n &ngsp;\n <mwl-calendar-event-title\n [event]=\"dayEvent.event\"\n [customTemplate]=\"eventTitleTemplate\"\n view=\"day\"\n >\n </mwl-calendar-event-title>\n </div>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customTemplate || defaultTemplate\"\n [ngTemplateOutletContext]=\"{\n dayEvent: dayEvent,\n tooltipPlacement: tooltipPlacement,\n eventClicked: eventClicked,\n tooltipTemplate: tooltipTemplate,\n tooltipAppendToBody: tooltipAppendToBody,\n tooltipDelay: tooltipDelay\n }\"\n >\n </ng-template>\n `\n})\nexport class CalendarDayViewEventComponent {\n @Input() dayEvent: DayViewEvent;\n\n @Input() tooltipPlacement: PlacementArray;\n\n @Input() tooltipAppendToBody: boolean;\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() tooltipDelay: number | null;\n\n @Output() eventClicked: EventEmitter<any> = new EventEmitter();\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 { CalendarDayViewComponent } from './calendar-day-view.component';\nimport { CalendarDayViewHourSegmentComponent } from './calendar-day-view-hour-segment.component';\nimport { CalendarDayViewEventComponent } from './calendar-day-view-event.component';\nimport { CalendarCommonModule } from '../common/calendar-common.module';\n\nexport {\n CalendarDayViewComponent,\n CalendarDayViewBeforeRenderEvent\n} from './calendar-day-view.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ResizableModule,\n DragAndDropModule,\n CalendarCommonModule\n ],\n declarations: [\n CalendarDayViewComponent,\n CalendarDayViewHourSegmentComponent,\n CalendarDayViewEventComponent\n ],\n exports: [\n ResizableModule,\n DragAndDropModule,\n CalendarDayViewComponent,\n CalendarDayViewHourSegmentComponent,\n CalendarDayViewEventComponent\n ]\n})\nexport class CalendarDayModule {}\n","import { NgModule, ModuleWithProviders, Provider } from '@angular/core';\nimport {\n CalendarCommonModule,\n CalendarModuleConfig,\n CalendarEventTitleFormatter,\n CalendarDateFormatter\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 {\n return {\n ngModule: CalendarModule,\n providers: [\n dateAdapter,\n config.eventTitleFormatter || CalendarEventTitleFormatter,\n config.dateFormatter || CalendarDateFormatter,\n config.utils || CalendarUtils\n ]\n };\n }\n}\n"],"names":["validateEvent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