@iobroker/adapter-react-v5
Version:
React components to develop ioBroker interfaces with react.
41 lines (40 loc) • 1.37 kB
TypeScript
import React, { Component } from 'react';
type CronNames = 'seconds' | 'minutes' | 'hours' | 'dates' | 'months' | 'dow';
interface CronProps {
seconds: string | false | null;
minutes: string | null;
hours: string | null;
dates: string | null;
months: string | null;
dow: string | null;
}
interface ComplexCronProps {
cronExpression: string;
onChange: (cron: string) => void;
language: ioBroker.Languages;
}
interface ComplexCronState {
extended: boolean;
tab: number;
cron: string;
seconds?: string | false;
minutes?: string;
hours?: string;
dates?: string;
months?: string;
dow?: string;
modes: CronProps;
}
export declare class ComplexCron extends Component<ComplexCronProps, ComplexCronState> {
constructor(props: ComplexCronProps);
static cron2state(cron: string): CronProps;
static state2cron(state: ComplexCronState | CronProps): string;
recalcCron(): void;
onToggle(i: boolean | number, type: CronNames, max: number): void;
getDigitsSelector(type: CronNames, max: number): React.JSX.Element[];
getPeriodsTab(type: CronNames, max: number): React.JSX.Element | null;
static convertCronToText(cron: string, lang: ioBroker.Languages): string;
setCronAttr(attr: CronNames, value: string, modes?: CronProps): void;
render(): React.JSX.Element;
}
export {};