import { TimelineTick, TimelineTickRenderer, TickData } from '@bespunky/angular-cdk/timeline/abstraction/ticks'; import * as i0 from "@angular/core"; /** * Provides tools for handling tick rendering. * * @export * @class TimelineTickRendererService * @extends {TimelineTickRenderer} */ export declare class TimelineTickRendererService extends TimelineTickRenderer { /** * Renders the provided tick items and stores them in the `ticksInView` map. * Existing views are recycled and their context gets updated. * * @param {TimelineTick} tick The tick definition to use when rendering. * @param {TickData[]} newTickItems The new items representing the ticks to render. */ renderTicks(tick: TimelineTick, newTickItems: TickData[]): void; /** * Unrenders all previously rendered ticks for the specified tick level. * * @param {TimelineTick} tick The tick definition to use when unrendering. * @returns {void} */ unrenderTicks(tick: TimelineTick): void; private renderTick; private unrenderTick; /** * Creates the context to provide when rendering a tick. * * @private * @param {TickData} item The item representing the tick. * @returns {TickContext} The template context containing the tick information. */ private createViewContext; /** * Renderes the new tick items efficiently by reusing and updating previously rendered views. * * ```text * 0 1 2 3 4 5 6 * views: [x, x, x, x, x] * items: [y, y, y, y, y, y, y] * result: [y, y, y, y, y] * * Exeeding items be rendered in new views: * 0 1 2 3 4 5 6 * views: [x, x, x, x, x] * items: [y, y, y, y, y, y, y] * result: [y, y, y, y, y, y, y] * * Unused views will be unrendered: * 0 1 2 3 4 5 6 * views: [x, x, x, x, x] * items: [y, y, y] * result: [y, y, y] * ``` * * @private * @param {TimelineTick} tick The tick definition to render. * @param {RenderedTick[]} renderedTicks The existing tick with their previously rendered views. * @param {TickData[]} newTickItems The new tick items to render. * @returns {RenderedTick[]} The new rendered items with their views. */ private AggregateChangesAndRecycleViews; /** * Grabs new tick items from the end, renders new views for them and adds them to the `renderedTicks` array. * * @private * @param {TickData[]} newTickItems The new tick items to be rendered. * @param {number} addedCount The number of items to take from the end of the array. * @param {TimelineTick} tick The tick definition to render. */ private renderMissingTicks; /** * Grabs existing ticks from the end of the array and unrenders them. * * @private * @param {RenderedTick[]} renderedTicks The existing ticks and their views. * @param {number} removedCount The number of items to unrender from the end of the array. **Must be negative**. */ private unrenderUnusedTicks; /** * Walks through existing ticks and updates their template context with a new information from the new ticks. * Ticks are updated from left to right until the `count` items have been updated. * * @private * @param {RenderedTick[]} renderedTicks The existing ticks to updated. * @param {TickData[]} newTickItems The new tick items to take new information from. * @param {number} count The number of items to copy from the new ticks to the existing ones. */ private updateRenderedTicks; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }