UNPKG

@asadi/angular-date-components

Version:

`Angular Date Components` is a comprehensive angular library of date-related components designed to meet the needs of applications that require localization based on various calendar systems. While the package currently includes two powerful components (S

118 lines (117 loc) 4.83 kB
import { EventEmitter } from '@angular/core'; import { ADCILabels, ADCIOptions, ADCIViewButton, DateChangeService } from '@asadi/angular-date-components/core'; import { ADCIResourceSchedulerView } from '../../interface.global'; import * as i0 from "@angular/core"; import * as i1 from "../../directives/adc-resource-scheduler-source.directive"; /** * The ADCResourceSchedulerComponent is responsible for rendering a resource scheduler view. * It supports different views (e.g., month, week, day) and handles navigation through date ranges. * This component integrates with other services like date changes and event handling. * * ### Usage Example: * ```html * <adc-resource-scheduler * [DefaultViews]="['month', 'week']" * [CustomViews]="customViewsArray" * (ViewChange)="handleViewChange($event)" * (Next)="handleNext()" * (Previous)="handlePrevious()"> * </adc-resource-scheduler> * ``` */ export declare class ADCResourceSchedulerComponent { private options; labels: ADCILabels | null; private dateChangeService; currentView: 'month' | 'week' | 'day'; private defaultViewComponents; viewButtons: ADCIViewButton[]; resourceSchedulerViews: ADCIResourceSchedulerView[]; private _defaultViews; private _customViews; /** * The default views for the scheduler. * This input accepts an array of view identifiers (e.g., 'month', 'week', 'day') to set the default views. * * @example * ```html * <adc-resource-scheduler [DefaultViews]="['month', 'week']"></adc-resource-scheduler> * ``` */ set defaultViews(value: string[]); get defaultViews(): string[]; /** * Custom views for the scheduler. * This input allows you to provide custom views to display in the scheduler. * * @example * ```html * <adc-resource-scheduler [CustomViews]="customViewsArray"></adc-resource-scheduler> * ``` */ set customViews(value: ADCIResourceSchedulerView[]); get customViews(): ADCIResourceSchedulerView[]; /** * disables next button for resource scheduler component * * @example * <adc-resource-scheduler disableNext></adc-resource-scheduler> */ disableNext: boolean; /** * disables previous button for resource scheduler component * * @example * adc-resource-scheduler disablePrevious></adc-resource-scheduler> */ disablePrevious: boolean; /** * disables today button for resource scheduler component * * @example * <adc-resource-scheduler disableToday></adc-resource-scheduler> */ disableToday: boolean; /** * Emitted when the view changes (e.g., month, week, or day). * Use this output to capture the current view selection in the parent component. * * @event * @example * ```html * <adc-resource-scheduler (viewChange)="onViewChange($event)"></adc-resource-scheduler> * ``` */ onViewChangeEvent: EventEmitter<string>; /** * Emitted when the "Next" button is clicked to navigate to the next date range. * * @event * @example * ```html * <adc-resource-scheduler (next)="onNext()"></adc-resource-scheduler> * ``` */ onNextEvent: EventEmitter<void>; /** * Emitted when the "Previous" button is clicked to navigate to the previous date range. * * @event * @example * ```html * <adc-resource-scheduler (previous)="onPrevious()"></adc-resource-scheduler> * ``` */ onPreviousEvent: EventEmitter<void>; constructor(options: ADCIOptions, labels: ADCILabels | null, dateChangeService: DateChangeService); onViewChange(view: any): void; onPrevious(): void; onNext(): void; onToday(): void; onViewSet(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ADCResourceSchedulerComponent, [null, { optional: true; }, null]>; static ɵcmp: i0.ɵɵComponentDeclaration<ADCResourceSchedulerComponent, "adc-resource-scheduler", never, { "defaultViews": { "alias": "defaultViews"; "required": false; }; "customViews": { "alias": "customViews"; "required": false; }; "disableNext": { "alias": "disableNext"; "required": false; }; "disablePrevious": { "alias": "disablePrevious"; "required": false; }; "disableToday": { "alias": "disableToday"; "required": false; }; }, { "onViewChangeEvent": "viewChange"; "onNextEvent": "next"; "onPreviousEvent": "previous"; }, never, never, true, [{ directive: typeof i1.ADCResourceSchedulerSource; inputs: { "startOf": "startOf"; "holidays": "holidays"; "weekends": "weekends"; "events": "events"; "resources": "resources"; }; outputs: { "dateRangeSelect": "dateRangeSelect"; "eventSelect": "eventSelect"; "dateRangeChange": "dateRangeChange"; }; }]>; static ngAcceptInputType_disableNext: unknown; static ngAcceptInputType_disablePrevious: unknown; static ngAcceptInputType_disableToday: unknown; }