/** Angular2 */
import * as ng from "@angular/core";
/** Core */
import { CoreComponent } from "cmf.core/src/core";
/** Moment */
import moment from "moment";
/** Utils and Model */
import * as Utils from "./timeLineUtils";
/**
* Min days intervak to show hours
*/
export declare const MIN_DAYS_INTERVAL_TO_SHOW_HOURS: number;
/**
* TimeLineTickSize
*/
export declare enum TimeLineTickSize {
ExtraSmall = 0,
Small = 1,
Medium = 2,
Large = 3,
LargeSpecial = 4
}
/**
* TimeLineMouseState
*/
export declare enum TimeLineMouseState {
Idle = 0,
DownOnWindow = 1,
DownOnHandler = 2
}
/**
* TimeLineTick
*/
export interface TimeLineTick {
position: number;
size: TimeLineTickSize;
text: string;
}
/**
* @whatItDoes
* TimeLine component
*
* @howToUse
* This component is used with the inputs and outputs mentioned below.
*
* ### Inputs
* `Utils.TimeLineModel` : **data** - The data of this component ;
* `moment.Moment` : **date** - The date of this component ;
* `Utils.TimeLineModelStep` : **step** - The step of this component .
*
* ### Outputs
* `Utils.VisibleWindowChangeEventArgs` : **onVisibleWindowChange** - Triggered when visible window change .
*
* ### Example
* To use the component, assume this HTML Template as an example:
*
* ```HTML
*
* ```
*
*/
export declare class TimeLine extends CoreComponent implements ng.AfterViewInit, ng.OnChanges, ng.OnDestroy {
private _elementRef;
private _ngZone;
/**
* Visible window position
*/
private _visibleWindowPosition;
/**
* Clock updater interval
*/
private _clockUpdaterInterval;
/**
* Step percentage
*/
private _stepPercentage;
/**
* Percentage of timeline that represents one hour
*/
private _hourPercentage;
/**
* Mouse state
*/
_mouseState: TimeLineMouseState;
/**
* Mouse down X coordinate
*/
private _mouseDownX;
/**
* Window left
*/
_windowLeft: moment.Moment;
/**
* Window right
*/
_windowRight: moment.Moment;
/**
* Last emitted start
*/
private _lastEmittedStart;
/**
* Last emitted end
*/
private _lastEmittedEnd;
/**
* Time line JQuery
*/
private _timeLineJQ;
/**
* Handler right JQuery
*/
private _handlerRightJQ;
/**
* Handler left JQuery
*/
private _handlerLeftJQ;
/**
* Time line ticks
*/
_timeLineTicks: TimeLineTick[];
/**
* Time line blocks
*/
_timeLineBlocks: Utils.TimeLineBlock[];
/**
* Today line position
*/
_todayLinePosition: number;
/**
* Invisible area left
*/
_invisibleAreaLeft: number;
/**
* Invisible area right
*/
_invisibleAreaRight: number;
/**
* Initial invisible area left
*/
_initialInvisibleAreaLeft: number;
/**
* Initial invisible area right
*/
_initialInvisibleAreaRight: number;
/**
* Handler left date position horizontal
*/
_handlerLeftDatePositionHorizontal: number;
/**
* Handler left date position vertical
*/
_handlerLeftDatePositionVertical: number;
/**
* Handler right date position horizontal
*/
_handlerRightDatePositionHorizontal: number;
/**
* Handler right date position vertical
*/
_handlerRightDatePositionVertical: number;
/**
* Window left text
*/
_windowLeftText: string;
/**
* window right text
*/
_windowRightText: string;
/**
* Handler picked
*/
_handlerPicked: string;
/**
* Number of hours in window
*/
private _numberOfHoursInWindow;
/**
* Total number of hours
*/
private _totalNumberOfHours;
/**
* Data from value
*/
_dataFromValue: string;
/**
* Data to value
*/
_dataToValue: string;
/**
* Data
*/
data: Utils.TimeLineModel;
/**
* Date
*/
date: moment.Moment;
/**
* Step
*/
step: Utils.TimeLineModelStep;
/**
* On visible window change
* @event visibleWindowChanged
*/
onVisibleWindowChange: ng.EventEmitter;
/**
* Constructor
*/
constructor(_elementRef: ng.ElementRef, _ngZone: ng.NgZone);
/**
* Visible window change
*/
private visibleWindowChange;
/**
* Emit visible window change event
*/
private emitVisibleWindowChange;
/**
* Update step percentage
*/
private updateStepPercentage;
/**
* Calculate visible window
*/
private calculateVisibleWindow;
/**
* Calculate time ticks and day percentage
*/
private calculateTimeTicks;
/**
* Calculate time blocks
*/
private calculateTimeBlocks;
/**
* Calculate handlers dates positions
*/
private calculateHandlersDatesPositions;
/**
* On handler mouse down
* @param event
* @param side
*/
onHandlerMouseDown(event: any, side: string): void;
/**
* On mouse down
* @param event
*/
onMouseDown(event: any): void;
/**
* On mouse up
* @param event
*/
onMouseUp: (event: any) => void;
/**
* On mouse move
* @param event
*/
private onMouseMove;
/**
* Scroll window with a step
* @param step
*/
private scrollWindow;
/**
* Scroll time window left
*/
scrollLeft(): void;
/**
* Scroll time window right
*/
scrollRight(): void;
/**
* After view init
*/
ngAfterViewInit(): void;
/**
* On destroy
*/
ngOnDestroy(): void;
/**
* On changes
*/
ngOnChanges(changes: ng.SimpleChanges): void;
}
export declare class TimeLineModule {
}