material-ui-cron
Version:
A React cron editor using material ui
41 lines (40 loc) • 2.42 kB
TypeScript
import { CronValidation, SelectOptions } from './types';
export declare const getIndex: (obj: SelectOptions, arr: Array<SelectOptions>) => number;
export declare const getTimeIndex: (obj: SelectOptions) => number;
export declare const getMinutesIndex: (obj: SelectOptions) => number;
export declare const getPeriodIndex: (obj: SelectOptions) => 0 | 1 | 2 | 3 | 4;
export declare const getDayOfMonthIndex: (obj: SelectOptions) => number;
export declare const getSortedOptions: (options: SelectOptions[]) => SelectOptions[];
export declare const isIncreasingSequence: (options: SelectOptions[]) => boolean;
export declare function isAscending(arr: string[]): boolean;
export declare function getTimesOfTheDayList(): Array<string>;
export declare function getTimesOfTheDay(): Array<SelectOptions>;
export declare const hasValidCronParts: (cronExp: string) => boolean;
export declare const getNumbersInCronPart: (part: string) => number[];
export declare const doesNumberStartWithZero: (part: string) => boolean;
export declare const hasValidNumbersInCronPart: (part: string, condition: (n: number) => boolean) => boolean;
export declare function hasNoDuplicates(part: string): boolean;
export declare const REGEX_ALL: RegExp;
export declare const REGEX_EVERY: RegExp;
export declare const REGEX_EVERY_HYPEN: RegExp;
export declare const REGEX_COMMA: RegExp;
export declare const REGEX_HYPHEN: RegExp;
export declare const REGEX_SINGLE_DIGIT: RegExp;
export declare const REGEX_SINGLE_ALL: RegExp;
export declare const REGEX_SINGLE_SPL: RegExp;
export declare const CRON_VALIDATION: (isValid: boolean, message: string) => CronValidation;
export declare const isValidMinutePart: (cronExp: string) => CronValidation;
export declare const isValidHourPart: (cronExp: string) => CronValidation;
export declare const isValidDayOfMonthPart: (cronExp: string) => CronValidation;
export declare const isValidDayOfWeekPart: (cronExp: string) => CronValidation;
export declare const isValidMonthPart: (cronExp: string) => CronValidation;
export declare const getCronStatus: (msg: string, hasError: boolean) => {
hasError: boolean;
message: string;
};
export declare const validateCronExp: (cronExp: string) => {
hasError: boolean;
message: string;
};
export declare const countOccurrences: (arr: string[], val: string) => number;
export declare function range(start: number, end: number, step?: number): Array<string>;