chowa
Version:
UI component library based on React
38 lines (37 loc) • 1.4 kB
TypeScript
/**
* @license chowa v1.1.3
*
* Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn).
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import * as moment from 'moment';
import { Event, EventType } from './full';
export interface RangeDate {
begin: moment.Moment;
end: moment.Moment;
}
export interface DisabledDate {
begin?: moment.Moment;
end?: moment.Moment;
before?: moment.Moment;
after?: moment.Moment;
}
export interface CEvent {
eventIndex: number;
index: number;
span: number;
type: EventType;
begin: boolean;
end: boolean;
start: moment.Moment;
finish: moment.Moment;
content: string;
category: string;
}
export declare function isDisabledDate(date: moment.Moment, disabledDate: DisabledDate, granularity?: moment.unitOfTime.StartOf): boolean;
export declare function isRangeDate(date: moment.Moment, rangeDate: RangeDate, granularity?: moment.unitOfTime.StartOf): boolean;
export declare function hasActiveMoment(mom: moment.Moment, values: moment.Moment[], granularity?: moment.unitOfTime.StartOf): boolean;
export declare function compileRowEvents(events: Event[], rowMoms: moment.Moment[], granularity: 'day' | 'month'): CEvent[][];
export declare function compileColumnEvents(events: Event[], mom: moment.Moment): CEvent[][];