{"version":3,"file":"bespunky-angular-cdk-timeline-abstraction.mjs","sources":["../../../../libs/angular-cdk/timeline/abstraction/src/services/timeline-config.ts","../../../../libs/angular-cdk/timeline/abstraction/src/services/timeline-camera.ts","../../../../libs/angular-cdk/timeline/abstraction/src/directives/timeline.ts","../../../../libs/angular-cdk/timeline/abstraction/src/bespunky-angular-cdk-timeline-abstraction.ts"],"sourcesContent":["import { BehaviorSubject } from 'rxjs';\n    \nexport abstract class TimelineConfig\n{\n    public readonly baseTickSize        : BehaviorSubject<number>  = new BehaviorSubject(1);\n    public readonly virtualizationBuffer: BehaviorSubject<number>  = new BehaviorSubject(0.5);\n    public readonly vertical            : BehaviorSubject<boolean> = new BehaviorSubject(false as boolean);\n}\n","import { Observable } from 'rxjs';\n\nimport { ReactiveCamera } from '@bespunky/angular-cdk/navigables/camera/reactive';\nimport { dateToPosition, positionToDate, positionToScreenPosition } from '@bespunky/angular-cdk/timeline/shared';\n\nexport abstract class TimelineCamera extends ReactiveCamera<Date>\n{\n    public abstract readonly dayWidth: Observable<number>;\n\n    public abstract readonly currentDayWidth: number;\n\n    protected panToItem(date: Date): void\n    {\n        this.panToPosition(this.dateToPosition(date), 0);\n    }\n\n    protected zoomOnItem(date: Date, amount: number): void\n    {\n        this.zoomOnPosition(this.dateToPosition(date), 0, amount);\n    }\n\n    /**\n     * Determines the date that a position on the timeline (in pixels) refers to.\n     *\n     * @param {number} position The position for which to calculate the date.\n     * @returns {Date} The date corresponding to the position.\n     */\n    public positionToDate(position: number): Date\n    {\n        return positionToDate(this.currentDayWidth, position);\n    }\n\n    /**\n     * Determines the position on the timeline (in pixels) that corresponds to a specific date.\n     *\n     * @param {number} y The year part of the date.\n     * @param {number} [m] (Optional) The month part of the date. Default is 0 (January).\n     * @param {number} [d] (Optional) The day part of the date. Default is 1.\n     * @param {number} [h] (Optional) The hourpart of the date. Default is 0.\n     * @param {number} [mm] (Optional) The minute part of the date. Default is 0.\n     * @param {number} [s] (Optional) The second part of the date. Default is 0.\n     * @param {number} [ms] (Optional) The millisecond part of the date. Default is 0.\n     * @returns The position (in pixels) corresponding to the specified date.\n     */\n    public dateToPosition(y: number, m?: number, d?: number, h?: number, mm?: number, s?: number, ms?: number): number;\n    /**\n     * Determines the position on the timeline (in pixels) that corresponds to a specific date.\n     *\n     * @param {Date} date The date to convert to position.\n     * @returns The position (in pixels) corresponding to the specified date.\n     */\n    public dateToPosition(date: Date): number;\n    /**\n     * Determines the position on the timeline (in pixels) that corresponds to a specific date.\n     *\n     * @param {(number | Date)} yOrDate \n     * @param {number} [m] (Optional) The month part of the date. Default is 0 (January).\n     * @param {number} [d] (Optional) The day part of the date. Default is 1.\n     * @param {number} [h] (Optional) The hourpart of the date. Default is 0.\n     * @param {number} [mm] (Optional) The minute part of the date. Default is 0.\n     * @param {number} [s] (Optional) The second part of the date. Default is 0.\n     * @param {number} [ms] (Optional) The millisecond part of the date. Default is 0.\n     * @returns The position (in pixels) corresponding to the specified date.\n     */\n    public dateToPosition(\n        yOrDate: number | Date, m?: number, d?: number, h?: number, mm?: number, s?: number, ms?: number\n    ): number\n    {\n        return dateToPosition(this.currentDayWidth, yOrDate, m, d, h, mm, s, ms);\n    }\n\n    public toScreenPosition(position: number, viewStart: number): number\n    {\n        return positionToScreenPosition(position, viewStart);\n    }\n}\n","import { Observable  } from 'rxjs';\nimport { Destroyable } from '@bespunky/angular-zen/core';\n\nimport { TimelineConfig } from '../services/timeline-config';\nimport { TimelineCamera } from '../services/timeline-camera';\n\nexport abstract class Timeline extends Destroyable\n{\n    public abstract readonly currentDate: Observable<Date>;\n    public abstract readonly config     : TimelineConfig;\n    public abstract readonly camera     : TimelineCamera;\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAEsB,cAAc,CAAA;AAApC,IAAA,WAAA,GAAA;QAEoB,IAAA,CAAA,YAAY,GAAqC,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;QACxE,IAAA,CAAA,oBAAoB,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