@obliczeniowo/elementary
Version:
Library made in Angular version 20
102 lines (94 loc) • 4.63 kB
TypeScript
import * as i0 from '@angular/core';
import { AfterViewInit, ElementRef, QueryList, EventEmitter, Renderer2 } from '@angular/core';
import * as i5 from '@angular/common';
import * as i6 from '@obliczeniowo/elementary/icons';
interface EventSettings {
color: any;
day: Date;
}
declare class CalendarEventComponent implements AfterViewInit {
private readonly calendarEventComponent;
calendarEventWindow: ElementRef<HTMLElement>;
eventSettings: i0.InputSignal<EventSettings>;
constructor(calendarEventComponent: ElementRef<HTMLElement>);
ngAfterViewInit(): void;
displayWindow(x: number, y: number): void;
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarEventComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarEventComponent, "obl-calendar-event", never, { "eventSettings": { "alias": "eventSettings"; "required": true; "isSignal": true; }; }, {}, never, ["title", "body"], false, never>;
}
declare class EventsListComponent {
eventsList: QueryList<CalendarEventComponent>;
static ɵfac: i0.ɵɵFactoryDeclaration<EventsListComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<EventsListComponent, "obl-events-list", never, {}, {}, ["eventsList"], ["eventslist"], false, never>;
}
declare class MonthControlComponent {
date: i0.ModelSignal<Date>;
triggerFunction: (date: Date) => void;
nextMonth(): void;
previousMonth(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<MonthControlComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MonthControlComponent, "obl-month-control", never, { "date": { "alias": "date"; "required": false; "isSignal": true; }; }, { "date": "dateChange"; }, never, never, false, never>;
}
declare class CalendarComponent implements AfterViewInit {
readonly locale: string;
private readonly calendarComponent;
private readonly renderer;
svgContainer: ElementRef<SVGSVGElement>;
monthControl: i0.InputSignal<MonthControlComponent | null>;
private _eventsList;
set eventsList(eventList: EventsListComponent | null);
clicked: EventEmitter<Date>;
width: number;
height: number;
rectWidth: number;
rectHeight: number;
dx: number;
private framesGroup;
private readonly defs;
private readonly radialGradient;
private readonly linearGradient;
private readonly datePipe;
currentDay: Date;
currentMonth: Date;
startDate: Date;
endDate: Date;
backgroundColor: string;
private readonly svgRects;
private readonly svgNumbers;
private svgHeaderGroup;
private readonly svgHeaderDaysText;
constructor(locale: string, calendarComponent: ElementRef<HTMLElement>, renderer: Renderer2);
private setStartEndDates;
private getFirstMonthDay;
private setXYGradientPost;
mouseMove(event: any): void;
private setMonth;
private setEvents;
ngAfterViewInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "obl-calendar", never, { "monthControl": { "alias": "monthControl"; "required": false; "isSignal": true; }; "eventsList": { "alias": "eventsList"; "required": false; }; }, { "clicked": "clicked"; }, never, never, false, never>;
}
declare class DateModule {
static ɵfac: i0.ɵɵFactoryDeclaration<DateModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<DateModule, [typeof EventsListComponent, typeof CalendarComponent, typeof MonthControlComponent, typeof CalendarEventComponent], [typeof i5.CommonModule, typeof i6.IconsModule], [typeof EventsListComponent, typeof CalendarComponent, typeof MonthControlComponent, typeof CalendarEventComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<DateModule>;
}
declare class SvgDayElement {
private day;
private readonly svgGroup;
private readonly svgDayNumber;
private readonly svgDayFrame;
private readonly svgDayBackground;
private eventComponent;
private readonly svgContainer;
set event(eventListComponent: EventsListComponent);
constructor(x: number, y: number, width: number, height: number, day: Date, currentMonth: Date, svgContainer: any, eventsListComponent: EventsListComponent, onClick?: (date: Date) => void);
onClick: ((date: Date) => void) | undefined;
setDay(day: Date, currentMonth: Date): void;
get id(): string;
get frameId(): string;
get textId(): string;
get backgroundId(): string;
}
export { CalendarComponent, CalendarEventComponent, DateModule, EventsListComponent, MonthControlComponent, SvgDayElement };
export type { EventSettings };