@rangertechnologies/ngnxt
Version:
This library was used for creating dymanic UI based on the input JSON/data
69 lines (68 loc) • 2.84 kB
TypeScript
import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import { NgbDateStruct, NgbDatepicker, NgbDatepickerI18n } from '@ng-bootstrap/ng-bootstrap';
import * as i0 from "@angular/core";
export declare class CustomDatepickerI18n extends NgbDatepickerI18n {
private parent;
constructor(parent: CustomDatepickerComponent);
private toArabicNumber;
getWeekdayLabel(weekday: number): string;
getMonthShortName(month: number): string;
getMonthFullName(month: number): string;
getDayNumerals(date: NgbDateStruct): string;
getYearNumerals(year: number): string;
getDayAriaLabel(date: NgbDateStruct): string;
static ɵfac: i0.ɵɵFactoryDeclaration<CustomDatepickerI18n, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<CustomDatepickerI18n>;
}
export declare class CustomDatepickerComponent implements OnInit, OnChanges {
type: 'date' | 'datetime' | 'month' | 'time';
languageCode: 'en' | 'ar';
value: any;
min: any;
max: any;
modelChange: EventEmitter<any>;
datepicker?: NgbDatepicker;
/** SKS14AUG25 Bound to the datepicker via [(ngModel)] */
selectedDate: NgbDateStruct | null;
/** SKS14AUG25 Simple time holder for datetime/time modes */
time: {
hour: number;
minute: number;
};
hours: number[];
minutes: number[];
displayHours: string[];
displayMinutes: string[];
monthYear: {
year: number;
month: number;
};
months: number[];
years: number[];
monthNamesEn: string[];
monthNamesAr: string[];
minDate: NgbDateStruct;
maxDate: NgbDateStruct;
today: NgbDateStruct;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
/** SKS14AUG25 Create hours/minutes arrays and their display labels */
private generateTimeArrays;
/** SKS14AUG25 Converts number to Arabic digits with leading zero */
convertToArabic(num: number): string;
private initYears;
/** SKS14AUG25 Accepts:
* - "2023-10-26T20:00"
* - Date
* - { year, month, day }
* - { date: { year, month, day, time? } }
*/
private applyValue;
onDateSelect(date: NgbDateStruct): void;
onTimeChange(): void;
toArabicNumber(num: number): string;
onMonthSelect(): void;
private parseToDateStruct;
static ɵfac: i0.ɵɵFactoryDeclaration<CustomDatepickerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<CustomDatepickerComponent, "app-custom-datepicker", never, { "type": { "alias": "type"; "required": false; }; "languageCode": { "alias": "languageCode"; "required": false; }; "value": { "alias": "value"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, { "modelChange": "modelChange"; }, never, never, true, never>;
}