{"version":3,"file":"bespunky-angular-cdk-timeline-core.mjs","sources":["../../../../libs/angular-cdk/timeline/core/src/modules/ticks/services/virtualization/timeline-tick-virtualization.service.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/directives/timeline-tick.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/directives/well-known/timeline-well-known-tick.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/directives/well-known/timeline-years-tick.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/directives/well-known/timeline-months-tick.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/directives/well-known/timeline-days-tick.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/directives/well-known/timeline-day-parts-tick.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/directives/well-known/timeline-hours-tick.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/directives/well-known/timeline-minutes-tick.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/directives/well-known/timeline-seconds-tick.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/directives/well-known/timeline-milliseconds-tick.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/timeline-cdk-ticks.module.ts","../../../../libs/angular-cdk/timeline/core/src/modules/items/directives/timeline-item.directive.ts","../../../../libs/angular-cdk/timeline/core/src/modules/items/timeline-cdk-items.module.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/services/renderer/timeline-tick-renderer.service.ts","../../../../libs/angular-cdk/timeline/core/src/modules/ticks/services/renderer/timeline-tick-renderer.provider.ts","../../../../libs/angular-cdk/timeline/core/src/services/config/timeline-config.service.ts","../../../../libs/angular-cdk/timeline/core/src/services/config/timeline-config.provider.ts","../../../../libs/angular-cdk/timeline/core/src/services/camera/timeline-camera.service.ts","../../../../libs/angular-cdk/timeline/core/src/services/camera/timeline-camera.provider.ts","../../../../libs/angular-cdk/timeline/core/src/directives/timeline.directive.ts","../../../../libs/angular-cdk/timeline/core/src/timeline-cdk.module.ts","../../../../libs/angular-cdk/timeline/core/src/bespunky-angular-cdk-timeline-core.ts"],"sourcesContent":["import { animationFrameScheduler, combineLatest, Observable } from 'rxjs';\nimport { distinctUntilChanged, map, observeOn               } from 'rxjs/operators';\nimport { Injectable                                         } from '@angular/core';\nimport { useActivationSwitch, valueInRange                  } from '@bespunky/rxjs';\n\nimport { ViewBounds                                                                  } from '@bespunky/angular-cdk/navigables/camera';\nimport { TimelineTick, DatesBetweenGenerator, TickData, TickLabeler, WidthCalculator } from '@bespunky/angular-cdk/timeline/abstraction/ticks';\nimport { dateToPosition, positionToDate, positionToScreenPosition                    } from '@bespunky/angular-cdk/timeline/shared';\n\n/**\n * Provides methods for virtualizing tick rendering. This service is designed to determine what ticks should\n * be displayed on the screen according to screen size, zoom, view center and other factors.\n *\n * @export\n * @class TimelineTickVirtualizationService\n */\n@Injectable({ providedIn: 'root' })\nexport class TimelineTickVirtualizationService\n{\n    /**\n     * Creates a stream that notifies subscribers when the specified tick scale should render or unrender.\n     * Render state is determined by the current zoom level and the min/max zoom defined for the tick scale.\n     *\n     * @param {TimelineTick} tick The tick scale for which to create the stream.\n     * @returns {Observable<boolean>} An observable that notifies subscribers when to render and unrender the tick.\n     */\n    public shouldRenderFeed(tick: TimelineTick): Observable<boolean>\n    {\n        return combineLatest([tick.camera.zoomLevel, tick.minZoom, tick.maxZoom]).pipe(\n            valueInRange(),\n            distinctUntilChanged()\n        );\n    }\n\n    public widthFeed(tick: TimelineTick): Observable<WidthCalculator>\n    {\n        return combineLatest([tick.dayFactor, tick.camera.dayWidth]).pipe(\n            map(([dayFactor, dayWidth]) => dayFactor instanceof Function \n                                            ? (date: Date) => dayFactor(date) * dayWidth\n                                            : () => dayWidth\n            )\n        );\n    }\n\n    /**\n     * Creates a stream that notifies subscribers when the ticks that should be displayed on the screen have changed.\n     * A new item array will be generated any time one of the following occurs:\n     * - The tick label function has been replaced\n     * - The tick dateBetween function has been replaced\n     * - The tick dayFactor has been updated\n     * - The timeline zoom level has changed\n     * - The timeline view center has changed\n     * - The timeline virtualization buffer size has changed\n     *\n     * @param {TimelineTick} tick The tick scale for which to create the stream.\n     * @returns {Observable<TickData[]>} A stream that notifies subscribers when the ticks that should\n     * be displayed on the screen have changed.\n     */\n    public itemsToRenderFeed(tick: TimelineTick): Observable<TickData[]>\n    {\n        return combineLatest([tick.label, tick.datesBetween, tick.width, tick.camera.dayWidth, tick.camera.viewBounds, tick.camera.sizeUnit, tick.config.virtualizationBuffer]).pipe(\n            // As item generation depends on multiple subjects, generation might be triggered multiple times for the same change.\n            // When zooming, for example, viewBounds + width are changed causing at least 2 notifications.\n            // The animationFrameScheduler calculates changes just before next browser content repaint, which prevents flickering and hangs,\n            // creating a smoother animation.\n            observeOn(animationFrameScheduler),\n            useActivationSwitch(tick.shouldRender),\n            map(([label, datesBetween, width, dayWidth, viewBounds, sizeUnit, virtualizationBuffer]) =>\n            {\n                const bufferWidth   = viewBounds.width * virtualizationBuffer;\n                const startPosition = viewBounds.left  - bufferWidth;\n                const endPosition   = viewBounds.right + bufferWidth;\n                \n                return this.ticksOnScreen(viewBounds, sizeUnit, dayWidth, width, startPosition, endPosition, datesBetween, label);\n            })\n        );\n    }\n\n    /**\n     * Generates an array of tick items representing the ticks that should be displayed on the screen given\n     * the specified state.\n     *\n     * @param {ViewBounds} viewBounds The current bounds of the view on the timeline's camera.\n     * @param {number} dayWidth The width (in pixels) representing one single day on the timeline.\n     * @param {WidthCalculator} width A function that calculates the width of a single tick.\n     * @param {number} startPosition The start position (in pixels) from which ticks should start. This should include any buffer width.\n     * @param {number} endPosition The end position (in pixels) from which ticks should end. This should include any buffer width.\n     * @param {DatesBetweenGenerator} datesBetween The function that generates all tick scale-level dates between two given dates.\n     * @param {TickLabeler} label The function to use for labeling the items.\n     * @returns {TickData[]} An array of tick items representing the ticks that should be displayed on the screen.\n     */\n    public ticksOnScreen(viewBounds: ViewBounds, sizeUnit: number, dayWidth: number, width: WidthCalculator, startPosition: number, endPosition: number, datesBetween: DatesBetweenGenerator, label: TickLabeler): TickData[]\n    {\n        // Find the dates corresponding to the bounds of the screen\n        const start = positionToDate(dayWidth, startPosition);\n        const end   = positionToDate(dayWidth, endPosition);\n\n        // Generate all scale-level dates inside the screen bounds and create a tick item for each\n        return datesBetween(start, end).map(date =>\n        {\n            const position        = dateToPosition(dayWidth, date);\n            const screenPositionX = positionToScreenPosition(position, viewBounds.left);\n            const screenPositionY = positionToScreenPosition(0       , viewBounds.top);\n\n            return new TickData(position, 0, screenPositionX, screenPositionY, date, width(date), label(date), sizeUnit);\n        });\n    };\n}","import { Observable                                      } from 'rxjs';\nimport { filter                                          } from 'rxjs/operators';\nimport { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';\n\nimport { TimelineCamera, TimelineConfig                                                                                            } from '@bespunky/angular-cdk/timeline/abstraction';\nimport { TimelineTick, TickData, DatesBetweenGenerator, DayFactor, TickLabeler, WidthCalculator, TickContext, TimelineTickRenderer } from '@bespunky/angular-cdk/timeline/abstraction/ticks';\nimport { TimelineTickVirtualizationService                                                                                         } from '../services/virtualization/timeline-tick-virtualization.service';\n\n/**\n * Converts an element to a tick template and provides tools for timelines to easily render ticks with\n * automatic virtualization.\n *\n * @export\n * @class TimelineTickDirective\n * @extends {TimelineTick}\n */\n@Directive({\n    selector: '[bsTimelineTick]',\n    exportAs: 'timelineTick'\n})\nexport class TimelineTickDirective extends TimelineTick\n{\n    public readonly shouldRender : Observable<boolean>;\n    public readonly width        : Observable<WidthCalculator>;\n    public readonly itemsToRender: Observable<TickData[]>;\n    \n    constructor(\n        public  readonly view        : ViewContainerRef,\n        public  readonly template    : TemplateRef<TickContext>,\n        public  readonly config      : TimelineConfig,\n        public  readonly camera      : TimelineCamera,\n        private readonly virtualize  : TimelineTickVirtualizationService,\n        private readonly tickRenderer: TimelineTickRenderer,\n    )\n    {\n        super();\n        \n        this.shouldRender  = this.virtualize.shouldRenderFeed(this);\n        this.width         = this.virtualize.widthFeed(this);\n        this.itemsToRender = this.virtualize.itemsToRenderFeed(this);\n\n        const render   = this.itemsToRender;\n        const unrender = this.shouldRender.pipe(filter(shouldRender => !shouldRender));\n\n        this.subscribe(render  , renderedItems => this.tickRenderer.renderTicks  (this, renderedItems));\n        this.subscribe(unrender, ()            => this.tickRenderer.unrenderTicks(this));\n    }\n\n    static ngTemplateContextGuard(directive: TimelineTickDirective, context: TickContext): context is TickContext { return true; }\n\n    @Input() public set bsTimelineTick            (value: string)                { this.id          .next(value); }\n    @Input() public set bsTimelineTickDayFactor   (value: DayFactor)             { this.dayFactor   .next(value); }\n    @Input() public set bsTimelineTickDatesBetween(value: DatesBetweenGenerator) { this.datesBetween.next(value); }\n    @Input() public set bsTimelineTickMinZoom     (value: number)                { this.minZoom     .next(value); }\n    @Input() public set bsTimelineTickMaxZoom     (value: number)                { this.maxZoom     .next(value); }\n    @Input() public set bsTimelineTickLabel       (value: TickLabeler)           { this.label       .next(value); }\n}\n","import { Directive, OnInit } from '@angular/core';\n\nimport { DatesBetween, DayFactors, DefaultLabels, WellKnownTickId } from '@bespunky/angular-cdk/timeline/well-known';\nimport { TimelineTickDirective                                    } from '../timeline-tick.directive';\n\n@Directive()\nexport abstract class TimelineWellKnownTickDirective extends TimelineTickDirective implements OnInit\n{\n    protected abstract readonly wellKnownTickId: WellKnownTickId;\n\n    ngOnInit()\n    {\n        this.datesBetween.next(DatesBetween [this.wellKnownTickId]);\n        this.dayFactor   .next(DayFactors   [this.wellKnownTickId]);\n        this.label       .next(DefaultLabels[this.wellKnownTickId]);\n    }\n}\n","import { Directive, OnInit } from '@angular/core';\n\nimport { WellKnownTickId                } from '@bespunky/angular-cdk/timeline/well-known';\nimport { TimelineWellKnownTickDirective } from './timeline-well-known-tick.directive';\n\n@Directive({\n    selector: '[bsTimelineYearsTick]'\n})\nexport class TimelineYearsTickDirective extends TimelineWellKnownTickDirective implements OnInit\n{\n    protected readonly wellKnownTickId: WellKnownTickId = 'years';\n}\n","import { Directive, OnInit } from '@angular/core';\n\nimport { WellKnownTickId                } from '@bespunky/angular-cdk/timeline/well-known';\nimport { TimelineWellKnownTickDirective } from './timeline-well-known-tick.directive';\n\n@Directive({\n    selector: '[bsTimelineMonthsTick]'\n})\nexport class TimelineMonthsTickDirective extends TimelineWellKnownTickDirective implements OnInit\n{\n    protected readonly wellKnownTickId: WellKnownTickId = 'months';\n\n}\n","import { Directive, OnInit } from '@angular/core';\n\nimport { WellKnownTickId                } from '@bespunky/angular-cdk/timeline/well-known';\nimport { TimelineWellKnownTickDirective } from './timeline-well-known-tick.directive';\n\n@Directive({\n    selector: '[bsTimelineDaysTick]'\n})\nexport class TimelineDaysTickDirective extends TimelineWellKnownTickDirective implements OnInit\n{\n    protected readonly wellKnownTickId: WellKnownTickId = 'days';\n}\n","import { Directive, OnInit } from '@angular/core';\n\nimport { WellKnownTickId                } from '@bespunky/angular-cdk/timeline/well-known';\nimport { TimelineWellKnownTickDirective } from './timeline-well-known-tick.directive';\n\n@Directive({\n    selector: '[bsTimelineDayPartsTick]'\n})\nexport class TimelineDayPartsTickDirective extends TimelineWellKnownTickDirective implements OnInit\n{\n    protected readonly wellKnownTickId: WellKnownTickId = 'dayParts';\n}\n","import { Directive, OnInit } from '@angular/core';\n\nimport { WellKnownTickId                } from '@bespunky/angular-cdk/timeline/well-known';\nimport { TimelineWellKnownTickDirective } from './timeline-well-known-tick.directive';\n\n@Directive({\n    selector: '[bsTimelineHoursTick]'\n})\nexport class TimelineHoursTickDirective extends TimelineWellKnownTickDirective implements OnInit\n{\n    protected readonly wellKnownTickId: WellKnownTickId = 'hours';\n}\n","import { Directive, OnInit } from '@angular/core';\n\nimport { WellKnownTickId                } from '@bespunky/angular-cdk/timeline/well-known';\nimport { TimelineWellKnownTickDirective } from './timeline-well-known-tick.directive';\n\n@Directive({\n    selector: '[bsTimelineMinutesTick]'\n})\nexport class TimelineMinutesTickDirective extends TimelineWellKnownTickDirective implements OnInit\n{\n    protected readonly wellKnownTickId: WellKnownTickId = 'minutes';\n}\n","import { Directive, OnInit } from '@angular/core';\n\nimport { WellKnownTickId                } from '@bespunky/angular-cdk/timeline/well-known';\nimport { TimelineWellKnownTickDirective } from './timeline-well-known-tick.directive';\n\n@Directive({\n    selector: '[bsTimelineSecondsTick]'\n})\nexport class TimelineSecondsTickDirective extends TimelineWellKnownTickDirective implements OnInit\n{\n    protected readonly wellKnownTickId: WellKnownTickId = 'seconds';\n\n}\n","import { Directive, OnInit } from '@angular/core';\n\nimport { WellKnownTickId                } from '@bespunky/angular-cdk/timeline/well-known';\nimport { TimelineWellKnownTickDirective } from './timeline-well-known-tick.directive';\n\n@Directive({\n    selector: '[bsTimelineMillisecondsTick]'\n})\nexport class TimelineMillisecondsTickDirective extends TimelineWellKnownTickDirective implements OnInit\n{\n    protected readonly wellKnownTickId: WellKnownTickId = 'milliseconds';\n}\n","import { NgModule } from '@angular/core';\n\nimport { TimelineTickDirective             } from './directives/timeline-tick.directive';\nimport { TimelineYearsTickDirective        } from './directives/well-known/timeline-years-tick.directive';\nimport { TimelineMonthsTickDirective       } from './directives/well-known/timeline-months-tick.directive';\nimport { TimelineDaysTickDirective         } from './directives/well-known/timeline-days-tick.directive';\nimport { TimelineDayPartsTickDirective     } from './directives/well-known/timeline-day-parts-tick.directive';\nimport { TimelineHoursTickDirective        } from './directives/well-known/timeline-hours-tick.directive';\nimport { TimelineMinutesTickDirective      } from './directives/well-known/timeline-minutes-tick.directive';\nimport { TimelineSecondsTickDirective      } from './directives/well-known/timeline-seconds-tick.directive';\nimport { TimelineMillisecondsTickDirective } from './directives/well-known/timeline-milliseconds-tick.directive';\n\n@NgModule({\n    declarations: [TimelineTickDirective, TimelineYearsTickDirective, TimelineMonthsTickDirective, TimelineDaysTickDirective, TimelineDayPartsTickDirective, TimelineHoursTickDirective, TimelineMinutesTickDirective, TimelineSecondsTickDirective, TimelineMillisecondsTickDirective],\n    exports     : [TimelineTickDirective, TimelineYearsTickDirective, TimelineMonthsTickDirective, TimelineDaysTickDirective, TimelineDayPartsTickDirective, TimelineHoursTickDirective, TimelineMinutesTickDirective, TimelineSecondsTickDirective, TimelineMillisecondsTickDirective]\n})\nexport class TimelineCdkTicksModule { }\n","import { combineLatest, Observable, Subject                               } from 'rxjs';\nimport { map, startWith                                                   } from 'rxjs/operators';\nimport { Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef } from '@angular/core';\n\nimport { TimelineCamera, TimelineConfig      } from '@bespunky/angular-cdk/timeline/abstraction';\nimport { ItemContext, ItemData, TimelineItem } from '@bespunky/angular-cdk/timeline/abstraction/items';\nimport { MillisecondsInADay                  } from '@bespunky/angular-cdk/timeline/shared';\nimport { ViewBounds                          } from '@bespunky/angular-cdk/navigables/camera';\n\n@Directive({\n    selector: '[bsTimelineItem]',\n    exportAs: 'timelineItem'\n})\nexport class TimelineItemDirective extends TimelineItem\n{\n    // Empty string is what Angular passes-in when no value is assiged to the directive via microsyntax. This enables an optional\n    // date value and allows *bsTimelineItem to be used simply to export context values\n    @Input() public set bsTimelineItem        (date: Date | '') { this.date.next(date || new Date()); }\n    @Input() public set bsTimelineItemDuration(value: number  ) { this.duration.next(value); }\n\n    private date    : Subject<Date>   = new Subject();\n    private duration: Subject<number> = new Subject();\n    private view    : EmbeddedViewRef<ItemContext | null>;\n\n    static ngTemplateContextGuard(directive: TimelineItemDirective, context: unknown): context is ItemContext { return true; }\n\n    constructor(\n        private viewContainer: ViewContainerRef,\n        private template     : TemplateRef<ItemContext | null>,\n        private camera       : TimelineCamera,\n        private config       : TimelineConfig\n    )\n    {\n        super();\n\n        this.view = this.viewContainer.createEmbeddedView(this.template, null);\n\n        this.subscribe(this.contextFeed(), context => this.view.context = context);\n    }\n\n    private contextFeed(): Observable<ItemContext>\n    {\n        // Allow combineLatest to emit with an optional date and/or duration\n        const date                     = this.date    .pipe(startWith(new Date()));\n        const duration                 = this.duration.pipe(startWith(0));\n        const { viewBounds, sizeUnit } = this.camera;\n        \n        return combineLatest([date, duration, viewBounds, sizeUnit]).pipe(\n            map(([date, duration, viewBounds, sizeUnit]) => this.createViewContext(date, duration, viewBounds, sizeUnit))\n        );\n    }\n\n    private createViewContext(date: Date, duration: number, viewBounds: ViewBounds, sizeUnit: number): ItemContext\n    {\n        const isVertical     = this.config.vertical.value;\n        const position       = this.camera.dateToPosition(date);\n        const screenPosition = this.camera.toScreenPosition(position, isVertical ? viewBounds.top : viewBounds.left);\n        const size           = (duration / MillisecondsInADay) * sizeUnit;\n        \n        const data = new ItemData(position, screenPosition, size, viewBounds, sizeUnit);\n\n        return {\n            $implicit     : data,\n            bsTimelineItem: data,\n            ...data\n        };\n    }\n}\n","import { NgModule     } from '@angular/core';\n\nimport { TimelineItemDirective } from './directives/timeline-item.directive';\n\n@NgModule({\n    declarations: [TimelineItemDirective],\n    exports     : [TimelineItemDirective]\n})\nexport class TimelineCdkItemsModule { }\n","import { Injectable } from '@angular/core';\n\nimport { TimelineTick, TimelineTickRenderer, RenderedTick, TickContext, TickData } from '@bespunky/angular-cdk/timeline/abstraction/ticks';\n\n/**\n * Provides tools for handling tick rendering.\n *\n * @export\n * @class TimelineTickRendererService\n * @extends {TimelineTickRenderer}\n */\n@Injectable()\nexport class TimelineTickRendererService extends TimelineTickRenderer\n{\n    /**\n     * Renders the provided tick items and stores them in the `ticksInView` map.\n     * Existing views are recycled and their context gets updated.\n     *\n     * @param {TimelineTick} tick The tick definition to use when rendering.\n     * @param {TickData[]} newTickItems The new items representing the ticks to render.\n     */\n    public renderTicks(tick: TimelineTick, newTickItems: TickData[]): void\n    {\n        const tickId        = tick.id.value;\n        const renderedViews = this.ticksInView[tickId] || [];\n\n        // Update state with created views\n        this.ticksInView[tickId] = this.AggregateChangesAndRecycleViews(tick, renderedViews , newTickItems);\n    }\n\n    /**\n     * Unrenders all previously rendered ticks for the specified tick level.\n     *\n     * @param {TimelineTick} tick The tick definition to use when unrendering.\n     * @returns {void}\n     */\n    public unrenderTicks(tick: TimelineTick): void\n    {\n        const tickId = tick.id.value;\n\n        if (!this.ticksInView[tickId]) return;\n\n        this.ticksInView[tickId].forEach(viewRef => viewRef.view.destroy());\n\n        delete this.ticksInView[tickId];\n    }\n\n    private renderTick(tick: TimelineTick, item: TickData): RenderedTick\n    {\n        const viewContext = this.createViewContext(item);\n        const view        = tick.view.createEmbeddedView(tick.template, viewContext);\n        \n        return { item, view, context: viewContext.$implicit } as RenderedTick;\n    }\n\n    private unrenderTick(tickView: RenderedTick): void\n    {\n        tickView?.view.destroy();\n    }\n\n    /**\n     * Creates the context to provide when rendering a tick.\n     *\n     * @private\n     * @param {TickData} item The item representing the tick.\n     * @returns {TickContext} The template context containing the tick information.\n     */\n    private createViewContext(item: TickData): TickContext\n    {\n        return {\n            // Enable `let-context` \n            $implicit     : item,\n            // Enable `as` keyword\n            bsTimelineTick: item,\n            // Enable specific variables (e.g. `let-position`, `let-index`)\n            ...item\n        };\n    }\n    \n    /**\n     * Renderes the new tick items efficiently by reusing and updating previously rendered views.\n     * \n     * ```text\n     *          0  1  2  3  4  5  6\n     * views:  [x, x, x, x, x]\n     * items:  [y, y, y, y, y, y, y]\n     * result: [y, y, y, y, y]\n     * \n     * Exeeding items be rendered in new views:\n     *          0  1  2  3  4  5  6\n     * views:  [x, x, x, x, x]\n     * items:  [y, y, y, y, y, y, y]\n     * result: [y, y, y, y, y, y, y]\n     * \n     * Unused views will be unrendered:\n     *          0  1  2  3  4  5  6\n     * views:  [x, x, x, x, x]\n     * items:  [y, y, y]\n     * result: [y, y, y]\n     * ```\n     * \n     * @private\n     * @param {TimelineTick} tick The tick definition to render.\n     * @param {RenderedTick[]} renderedTicks The existing tick with their previously rendered views.\n     * @param {TickData[]} newTickItems The new tick items to render.\n     * @returns {RenderedTick[]} The new rendered items with their views.\n     */\n    private AggregateChangesAndRecycleViews(tick: TimelineTick, renderedTicks: RenderedTick[], newTickItems: TickData[]): RenderedTick[]\n    {\n        // Get the difference between existing and new items\n        const changed = newTickItems.length - renderedTicks.length;\n\n        // Use all existing views as the limit for view recycling\n        let updateCount = renderedTicks.length;\n\n        if (changed > 0) // New tick count is greater than the existing one\n        {\n            // Render new views with the last items from the new ticks\n            this.renderMissingTicks(renderedTicks, newTickItems, changed, tick);\n        }\n        else if (changed < 0) // New tick count is lower than the existing one\n        {\n            // Unrender exeeding ticks\n            this.unrenderUnusedTicks(renderedTicks, changed);\n            // Use the new length as the limit for view recycling\n            updateCount = renderedTicks.length;\n        }\n        \n        // Run the update from start to the upper limit\n        this.updateRenderedTicks(renderedTicks, newTickItems, updateCount);\n\n        return renderedTicks;\n    }\n\n    /**\n     * Grabs new tick items from the end, renders new views for them and adds them to the `renderedTicks` array.\n     *\n     * @private\n     * @param {TickData[]} newTickItems The new tick items to be rendered.\n     * @param {number} addedCount The number of items to take from the end of the array.\n     * @param {TimelineTick} tick The tick definition to render.\n     */\n    private renderMissingTicks(renderedTicks: RenderedTick[], newTickItems: TickData[], addedCount: number, tick: TimelineTick)\n    {\n        const addedItems = newTickItems.slice(-addedCount).map(item => this.renderTick(tick, item));\n        \n        // Add the newly rendered ticks to the rendered views array\n        renderedTicks.push(...addedItems);\n    }\n\n    /**\n     * Grabs existing ticks from the end of the array and unrenders them.\n     *\n     * @private\n     * @param {RenderedTick[]} renderedTicks The existing ticks and their views.\n     * @param {number} removedCount The number of items to unrender from the end of the array. **Must be negative**.\n     */\n    private unrenderUnusedTicks(renderedTicks: RenderedTick[], removedCount: number): void\n    {\n        renderedTicks.splice(removedCount).forEach(tick => this.unrenderTick(tick));\n    }\n\n    /**\n     * Walks through existing ticks and updates their template context with a new information from the new ticks.\n     * Ticks are updated from left to right until the `count` items have been updated.\n     *\n     * @private\n     * @param {RenderedTick[]} renderedTicks The existing ticks to updated.\n     * @param {TickData[]} newTickItems The new tick items to take new information from.\n     * @param {number} count The number of items to copy from the new ticks to the existing ones.\n     */\n    private updateRenderedTicks(renderedTicks: RenderedTick[], newTickItems: TickData[], count: number)\n    {\n        for (let i = 0; i < count; ++i)\n        {\n            const renderedTick = renderedTicks[i];\n            const newTickItem  = newTickItems [i];\n\n            renderedTick.item         = newTickItem;\n            renderedTick.view.context = this.createViewContext(newTickItem);\n        }\n    }\n}","import { ClassProvider } from '@angular/core';\n\nimport { TimelineTickRenderer        } from '@bespunky/angular-cdk/timeline/abstraction/ticks';\nimport { TimelineTickRendererService } from './timeline-tick-renderer.service';\n\n/**\n * Provides the default implementation for the `TimelineTickRenderer` class.\n *\n * Provided by the timeline directive.\n */\nexport const TimelineTickRendererProvider: ClassProvider = {\n    provide : TimelineTickRenderer,\n    useClass: TimelineTickRendererService\n};","import { Injectable } from '@angular/core';\n\nimport { TimelineConfig } from '@bespunky/angular-cdk/timeline/abstraction';\n\n@Injectable()\nexport class TimelineConfigService extends TimelineConfig\n{\n}\n","import { ClassProvider } from '@angular/core';\n\nimport { TimelineConfig        } from '@bespunky/angular-cdk/timeline/abstraction';\nimport { TimelineConfigService } from './timeline-config.service';\n\n/**\n * Provides the default implementation for the `TimelineConfig` class.\n *\n * Provided by the timeline directive.\n */\nexport const TimelineConfigProvider: ClassProvider = {\n    provide : TimelineConfig,\n    useClass: TimelineConfigService\n};","import { combineLatest, Observable } from 'rxjs';\nimport { map, shareReplay, tap     } from 'rxjs/operators';\nimport { ElementRef, Injectable    } from '@angular/core';\nimport { DocumentRef               } from '@bespunky/angular-zen';\n\n\nimport { ReactiveMouseService           } from '@bespunky/angular-cdk/reactive-input/mouse';\nimport { ReactiveKeyboardService        } from '@bespunky/angular-cdk/reactive-input/keyboard';\nimport { ReactiveTouchService           } from '@bespunky/angular-cdk/reactive-input/touch';\nimport { TimelineConfig, TimelineCamera } from '@bespunky/angular-cdk/timeline/abstraction';\n\n@Injectable()\nexport class TimelineCameraService extends TimelineCamera\n{\n    public readonly dayWidth: Observable<number>;\n\n    private _dayWidth = 1;\n\n    public get currentDayWidth(): number { return this._dayWidth; }\n\n    constructor(\n        private config  : TimelineConfig,\n                document: DocumentRef,\n                mouse   : ReactiveMouseService,\n                keyboard: ReactiveKeyboardService,\n                touch   : ReactiveTouchService,\n                element : ElementRef\n    )\n    {\n        super(document, mouse, keyboard, touch, element);\n\n        this.dayWidth = this.dayWidthFeed();\n    }\n    \n    /**\n     * Creates a stream that notifies of changes to the width of the one day in pixels.\n     * The width is determined by `baseTickSize`, `zoom` and `zoomFactor`.\n     * \n     * @see /skeleton/services/control/readme.md for more information about zooming.\n     *\n     * @private\n     * @param {TimelineTick} tick The tick scale for which to create the stream.\n     * @returns {Observable<number>} A stream that notifies of changes to the width of the one day in pixels.\n     */\n    private dayWidthFeed(): Observable<number>\n    {\n        return combineLatest([this.config.baseTickSize, this.sizeUnit]).pipe(\n            map(([baseTickSize, sizeUnit]) => baseTickSize * sizeUnit),\n            tap(dayWidth => this._dayWidth = dayWidth),\n            // Make this observable remember and stream the latest value to each new subscriber.\n            // This way the width can be resolved instantly when the value is needed for some immidiate calcualtion\n            // like in TimelineCamera.moveTo().\n            shareReplay(1)\n        );\n    }\n}\n","import { ClassProvider } from '@angular/core';\n\nimport { TimelineCamera        } from '@bespunky/angular-cdk/timeline/abstraction';\nimport { TimelineCameraService } from './timeline-camera.service';\n\n/**\n * Provides the default implementation for the `TimelineCamera` class.\n *\n * Provided by the timeline directive.\n */\nexport const TimelineCameraProvider: ClassProvider = {\n    provide : TimelineCamera,\n    useClass: TimelineCameraService\n};","import { BehaviorSubject, combineLatest, merge, Observable                } from 'rxjs';\nimport { map                                      } from 'rxjs/operators';\nimport { Directive, Input                         } from '@angular/core';\n\nimport { Timeline, TimelineConfig, TimelineCamera } from '@bespunky/angular-cdk/timeline/abstraction';\nimport { TimelineTickRendererProvider             } from '../modules/ticks/services/renderer/timeline-tick-renderer.provider';\nimport { TimelineConfigProvider                   } from '../services/config/timeline-config.provider';\nimport { TimelineCameraProvider                   } from '../services/camera/timeline-camera.provider';\n\nconst providers = [\n    TimelineConfigProvider,\n    TimelineCameraProvider,\n    TimelineTickRendererProvider\n];\n\n/**\n * Adds timeline functionality to an element.\n *\n * @export\n * @class TimelineDirective\n * @extends {Destroyable}\n */\n@Directive({\n    selector : '[bsTimeline]',\n    exportAs : 'timeline',\n    providers: providers,\n})\nexport class TimelineDirective extends Timeline\n{\n    public readonly currentDate: Observable<Date>;\n    \n    protected readonly minDate$    : BehaviorSubject<Date | null>   = new BehaviorSubject(null as Date | null);\n    protected readonly maxDate$    : BehaviorSubject<Date | null>   = new BehaviorSubject(null as Date | null);\n    protected readonly topBound$   : BehaviorSubject<number | null> = new BehaviorSubject(null as number | null);\n    protected readonly bottomBound$: BehaviorSubject<number | null> = new BehaviorSubject(null as number | null);\n\n    /**\n     * Creates an instance of TimelineDirective.\n     */\n    constructor(\n        public readonly config: TimelineConfig,\n        public readonly camera: TimelineCamera\n    )\n    {\n        super();\n\n        this.currentDate = this.camera.viewCenterX.pipe(\n            map(position => this.camera.positionToDate(position))\n        );\n    \n        // TODO: Modify to accomodate RTL timelines and vertical timelines. Currently this will only work for\n        //       horizontal LTR timelines.\n        this.subscribe(merge(this.minDate$, this.camera.dayWidth), () => this.camera.leftBound .next(this.minDate ? this.camera.dateToPosition(this.minDate) : null));\n        this.subscribe(merge(this.maxDate$, this.camera.dayWidth), () => this.camera.rightBound.next(this.maxDate ? this.camera.dateToPosition(this.maxDate) : null));\n        // TODO: How will zooming affect the top and bottom bounds?\n        this.subscribe(merge(this.topBound$,    this.camera.dayWidth), () => this.camera.topBound.next(this.topBound));\n        this.subscribe(merge(this.bottomBound$, this.camera.dayWidth), () => this.camera.bottomBound.next(this.bottomBound));\n    }\n\n    /**\n     * The level of zoom to apply to when rendering the timeline. Default is 1.\n     * A larger number means zooming-in; A smaller number means zooming-out.\n     */\n    @Input() public set zoom(value: number)\n    {\n        this.camera.setZoom(value);\n    }\n\n    @Input() public set positionX(value: number)\n    {\n        this.camera.panToX(value);\n    }\n\n    @Input() public set positionY(value: number)\n    {\n        this.camera.panToY(value);\n    }\n\n             public get minDate(    ): Date | null  { return this.minDate$.value; }\n    @Input() public set minDate(value: Date | null) { this.minDate$.next(value);  }\n\n             public get maxDate(    ): Date | null  { return this.maxDate$.value; }\n    @Input() public set maxDate(value: Date | null) { this.maxDate$.next(value);  }\n\n             public get topBound(    ): number | null  { return this.topBound$.value; }\n    @Input() public set topBound(value: number | null) { this.topBound$.next(value);  }\n\n             public get bottomBound(    ): number | null  { return this.bottomBound$.value; }\n    @Input() public set bottomBound(value: number | null) { this.bottomBound$.next(value);  }\n    \n    @Input() public set date(value: Date)\n    {\n        this.camera.panTo(value);\n    }\n\n    @Input() public set baseTickSize(value: number)\n    {\n        this.config.baseTickSize.next(value);\n    }\n\n    @Input() public set virtualizationBuffer(value: number)\n    {\n        this.config.virtualizationBuffer.next(value);\n    }\n\n    @Input() public set vertical(value: boolean)\n    {\n        this.config.vertical.next(value);\n    }\n\n    @Input() public set panOnKeyboard(value: boolean)\n    {\n        this.camera.panOnKeyboard.next(value);\n    }\n\n    @Input() public set panOnWheel(value: boolean)\n    {\n        this.camera.panOnWheel.next(value);\n    }\n\n    @Input() public set zoomDeltaFactor(value: number)\n    {\n        this.camera.zoomFactor.next(value);\n    }\n\n    @Input() public set zoomOnKeyboard(value: boolean)\n    {\n        this.camera.zoomOnKeyboard.next(value);\n    }\n\n    @Input() public set zoomOnWheel(value: boolean)\n    {\n        this.camera.zoomOnWheel.next(value);\n    }\n\n    @Input() public set panAxisOnZoom(value: 'x' | 'y' | 'both')\n    {\n        this.camera.panAxisOnZoom.next(value);\n    }\n}","import { NgModule   } from '@angular/core';\nimport { CoreModule } from '@bespunky/angular-zen/core';\n\nimport { TimelineCdkTicksModule } from './modules/ticks/timeline-cdk-ticks.module';\nimport { TimelineCdkItemsModule } from './modules/items/timeline-cdk-items.module';\nimport { TimelineDirective      } from './directives/timeline.directive';\n\n@NgModule({\n    imports     : [CoreModule, TimelineCdkTicksModule, TimelineCdkItemsModule],\n    declarations: [TimelineDirective],\n    exports     : [TimelineDirective, TimelineCdkTicksModule, TimelineCdkItemsModule],\n})\nexport class TimelineCdkModule {}\n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