ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
216 lines • 7.61 kB
TypeScript
import * as i0 from "@angular/core";
import { EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from "@angular/core";
import { ControlValueAccessor, ValidationErrors, Validator, ValidatorFn } from "@angular/forms";
import { CronExpressionParser } from "cron-parser";
import { NzSafeAny, NzStatus } from "ng-zorro-antd/core/types";
import { NzCronExpressionCronErrorI18n, NzCronExpressionI18nInterface, NzCronExpressionLabelI18n } from "ng-zorro-antd/i18n";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
export type TimeType = keyof Cron;
export interface Cron {
second?: CronValue;
minute?: CronValue;
hour?: CronValue;
day?: CronValue;
month?: CronValue;
week?: CronValue;
}
export type CronValue = '*' | `${number}` | `${number}-${number}` | `${number}/${number}` | string;
export interface CronChangeType {
label: TimeType;
value: CronValue;
}
export type NzCronExpressionSize = 'large' | 'default' | 'small';
export type NzCronExpressionType = 'linux' | 'spring';
declare namespace cron_expression_component_d_exports {
export { NzCronExpressionComponent };
}
export declare class NzCronExpressionComponent implements OnInit, OnChanges, ControlValueAccessor, Validator {
private readonly formBuilder;
private readonly cdr;
private readonly i18n;
private readonly destroyRef;
private readonly nzFormStatusService;
readonly nzStatus: import("@angular/core").InputSignal<NzStatus>;
nzSize: NzCronExpressionSize;
nzType: NzCronExpressionType;
nzCollapseDisable: boolean;
nzExtra?: TemplateRef<void> | null;
nzSemantic: TemplateRef<void> | null;
nzBorderless: boolean;
nzDisabled: boolean;
locale: NzCronExpressionI18nInterface;
focus: boolean;
labelFocus: TimeType | null;
labels: TimeType[];
interval: ReturnType<typeof CronExpressionParser.parse>;
nextTimeList: Date[];
private isNzDisableFirstChange;
protected readonly cronValidatorFn: ValidatorFn;
protected readonly form: import("@angular/forms").FormGroup<{
second: import("@angular/forms").FormControl<string>;
minute: import("@angular/forms").FormControl<string>;
hour: import("@angular/forms").FormControl<string>;
day: import("@angular/forms").FormControl<string>;
month: import("@angular/forms").FormControl<string>;
week: import("@angular/forms").FormControl<string>;
}>;
private readonly inheritedStatus;
private readonly internalFormStatus;
private readonly finalStatus;
protected readonly statusClasses: import("@angular/core").Signal<import("ng-zorro-antd/core/types").NgClassInterface>;
onChange: NzSafeAny;
onTouch: () => void;
convertFormat(value: string): void;
writeValue(value: string | null): void;
registerOnChange(fn: NzSafeAny): void;
registerOnTouched(fn: NzSafeAny): void;
validate(): ValidationErrors | null;
setDisabledState(isDisabled: boolean): void;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
private cronFormType;
previewDate(value: Cron): void;
loadMorePreview(): void;
focusEffect(value: TimeType): void;
blurEffect(): void;
getValue(item: CronChangeType): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzCronExpressionComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzCronExpressionComponent, "nz-cron-expression", ["nzCronExpression"], {
"nzStatus": {
"alias": "nzStatus";
"required": false;
"isSignal": true;
};
"nzSize": {
"alias": "nzSize";
"required": false;
};
"nzType": {
"alias": "nzType";
"required": false;
};
"nzCollapseDisable": {
"alias": "nzCollapseDisable";
"required": false;
};
"nzExtra": {
"alias": "nzExtra";
"required": false;
};
"nzSemantic": {
"alias": "nzSemantic";
"required": false;
};
"nzBorderless": {
"alias": "nzBorderless";
"required": false;
};
"nzDisabled": {
"alias": "nzDisabled";
"required": false;
};
}, {}, never, never, true, never>;
static ngAcceptInputType_nzCollapseDisable: unknown;
static ngAcceptInputType_nzBorderless: unknown;
static ngAcceptInputType_nzDisabled: unknown;
}
declare namespace cron_expression_label_component_d_exports {
export { NzCronExpressionLabelComponent };
}
declare class NzCronExpressionLabelComponent {
type: TimeType;
locale: NzCronExpressionLabelI18n;
labelFocus: string | null;
static ɵfac: i0.ɵɵFactoryDeclaration<NzCronExpressionLabelComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzCronExpressionLabelComponent, "nz-cron-expression-label", ["nzCronExpressionLabel"], {
"type": {
"alias": "type";
"required": false;
};
"locale": {
"alias": "locale";
"required": false;
};
"labelFocus": {
"alias": "labelFocus";
"required": false;
};
}, {}, never, never, true, never>;
}
declare namespace cron_expression_input_component_d_exports {
export { NzCronExpressionInputComponent };
}
declare class NzCronExpressionInputComponent {
value: string;
label: TimeType;
disabled: boolean;
readonly focusEffect: EventEmitter<keyof import("ng-zorro-antd/cron-expression").Cron>;
readonly blurEffect: EventEmitter<void>;
readonly getValue: EventEmitter<CronChangeType>;
focusInputEffect(event: FocusEvent): void;
blurInputEffect(): void;
setValue(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzCronExpressionInputComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzCronExpressionInputComponent, "nz-cron-expression-input", ["nzCronExpressionInput"], {
"value": {
"alias": "value";
"required": false;
};
"label": {
"alias": "label";
"required": false;
};
"disabled": {
"alias": "disabled";
"required": false;
};
}, {
"focusEffect": "focusEffect";
"blurEffect": "blurEffect";
"getValue": "getValue";
}, never, never, true, never>;
static ngAcceptInputType_disabled: unknown;
}
declare namespace cron_expression_preview_component_d_exports {
export { NzCronExpressionPreviewComponent };
}
declare class NzCronExpressionPreviewComponent {
private cdr;
TimeList: Date[];
visible: boolean;
locale: NzCronExpressionCronErrorI18n;
nzSemantic: TemplateRef<void> | null;
readonly loadMorePreview: EventEmitter<void>;
isExpand: boolean;
setExpand(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzCronExpressionPreviewComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzCronExpressionPreviewComponent, "nz-cron-expression-preview", ["nzCronExpressionPreview"], {
"TimeList": {
"alias": "TimeList";
"required": false;
};
"visible": {
"alias": "visible";
"required": false;
};
"locale": {
"alias": "locale";
"required": false;
};
"nzSemantic": {
"alias": "nzSemantic";
"required": false;
};
}, {
"loadMorePreview": "loadMorePreview";
}, never, never, true, never>;
static ngAcceptInputType_visible: unknown;
}
export declare class NzCronExpressionModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NzCronExpressionModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NzCronExpressionModule, never, [typeof NzCronExpressionComponent, typeof NzCronExpressionLabelComponent, typeof NzCronExpressionInputComponent, typeof NzCronExpressionPreviewComponent], [typeof NzCronExpressionComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NzCronExpressionModule>;
}