UNPKG

quarkd

Version:

Mobile UI Components built on Web Components.

104 lines (103 loc) 3.14 kB
import { QuarkElement } from "quarkc"; import "../popup"; import "../button"; import "./month"; import type { CalendarDayItem, EventType } from "./types"; export interface Props { open?: boolean; type?: "single" | "multiple" | "range"; title?: string; square?: boolean; readonly?: boolean; tiled?: boolean; maxrange?: number | string; position?: "top" | "left" | "bottom" | "right" | "center" | ""; maxdate?: number; mindate?: number; hidemark?: boolean; hidetitle?: boolean; hidesubtitle?: boolean; rangeprompt?: string; hiderangeprompt?: boolean; allowsameday?: boolean; hideconfirm?: boolean; forbidmaskclick?: boolean; eagerrender?: boolean; confirmtext?: string; confirmdisabledtext?: string; weekfirstday?: number; } export interface CustomEvent { confirm: (e: EventType) => void; select: (e: EventType) => void; unselect: (e: EventType) => void; close: () => void; overrange: () => void; } declare class QuarkCalendar extends QuarkElement { open: boolean; type: string; title: string; square: boolean; readonly: boolean; tiled: boolean; maxrange: number | string; position: string; mindate: number | string; maxdate: number | string; hidemark: boolean; hidetitle: boolean; hidesubtitle: boolean; rangeprompt: string; hiderangeprompt: boolean; allowsameday: boolean; hideconfirm: boolean; forbidmaskclick: boolean; eagerrender: boolean; confirmtext: string; confirmdisabledtext?: string; weekfirstday: number; currentDate: Date | Date[]; dayOffset: number; subtitle: string; months: Date[]; btnDisabled: boolean; innerMinDate: Date; innerMaxDate: Date; bodyHeight: number; bodyRef: import("quarkc").Ref<any>; monthRefs: any[]; componentDidMount(): void; componentDidUpdate(propName: string, oldValue: any, newValue: any): void; init: () => void; setValue: (value: any) => void; getValue(): Date | Date[]; setFormatter(formatter: (item: CalendarDayItem) => CalendarDayItem): void; initInnerData: () => void; setMonths: () => void; setBtnDisabled: () => void; limitDateRange: (date: Date, minDate?: Date, maxDate?: Date) => Date; getInitialDate: (defaultDate: Date | Date[]) => Date | Date[]; onScroll: () => void; scrollToDate: (targetDate: Date) => void; scrollToCurrentDate: () => void; checkRange: (date: [Date, Date]) => boolean; onConfirm: () => boolean; select: (date: Date | Date[], complete?: boolean) => void; getDisabledDate: (startDay: Date, date: Date) => Date | undefined; onClickDay: ({ detail }: { detail: { item: CalendarDayItem; }; }) => void; setMonthRef: (index: any) => any; renderMonth: (date: Date, index: number) => any; getMonthHeights: () => number[]; renderFooterButton: () => any; renderFooter: () => any; renderHeader: () => any; renderCalendar: () => any; closePop: () => void; render(): any; } export default QuarkCalendar;