@ibragim-dev-org/ui-forge-library 1.3.5 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -72,6 +72,76 @@ type paramExtractor<T> = (key: keyof T) => any;
|
|
|
72
72
|
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
73
73
|
declare const extractParam: <T>(key: keyof NoInfer<T>) => any;
|
|
74
74
|
|
|
75
|
+
interface CalendarDay<T = unknown> {
|
|
76
|
+
date: Date;
|
|
77
|
+
isDisabled: boolean;
|
|
78
|
+
isSelected: boolean;
|
|
79
|
+
isStart?: boolean;
|
|
80
|
+
isEnd?: boolean;
|
|
81
|
+
inRange?: boolean;
|
|
82
|
+
inCurrentMonth: boolean;
|
|
83
|
+
inHoverRange: boolean;
|
|
84
|
+
data?: T;
|
|
85
|
+
}
|
|
86
|
+
interface CalendarMonthItem {
|
|
87
|
+
index: number;
|
|
88
|
+
name: string;
|
|
89
|
+
short: string;
|
|
90
|
+
date: Date;
|
|
91
|
+
isDisabled: boolean;
|
|
92
|
+
isSelected: boolean;
|
|
93
|
+
isStart?: boolean;
|
|
94
|
+
isEnd?: boolean;
|
|
95
|
+
inRange?: boolean;
|
|
96
|
+
inHoverRange: boolean;
|
|
97
|
+
}
|
|
98
|
+
interface CalendarYearItem {
|
|
99
|
+
year: number;
|
|
100
|
+
date: Date;
|
|
101
|
+
isDisabled: boolean;
|
|
102
|
+
isSelected: boolean;
|
|
103
|
+
isStart?: boolean;
|
|
104
|
+
isEnd?: boolean;
|
|
105
|
+
inRange?: boolean;
|
|
106
|
+
inHoverRange: boolean;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
interface GenerateDaysOptions {
|
|
110
|
+
isUsaFormat: boolean;
|
|
111
|
+
dateStart: Date | null;
|
|
112
|
+
dateEnd: Date | null;
|
|
113
|
+
hoverDate: Date | null;
|
|
114
|
+
isRangeSelection: boolean;
|
|
115
|
+
minDate?: Date;
|
|
116
|
+
maxDate?: Date;
|
|
117
|
+
}
|
|
118
|
+
interface GeneratePeriodOptions {
|
|
119
|
+
dateStart: Date | null;
|
|
120
|
+
dateEnd: Date | null;
|
|
121
|
+
hoverDate: Date | null;
|
|
122
|
+
isRangeSelection: boolean;
|
|
123
|
+
minDate?: Date;
|
|
124
|
+
maxDate?: Date;
|
|
125
|
+
}
|
|
126
|
+
declare class CalendarUtils {
|
|
127
|
+
private static readonly monthNames;
|
|
128
|
+
static isSameDay(a: Date | null, b: Date | null): boolean;
|
|
129
|
+
static normalizeDate(date: Date): Date;
|
|
130
|
+
static isDisabledDate(date: Date, minDate?: Date, maxDate?: Date): boolean;
|
|
131
|
+
static isBetween(date: Date, start: Date | null, end: Date | null): boolean;
|
|
132
|
+
static createSafeDate(year: number, month: number, day: number): Date;
|
|
133
|
+
static mapCalendarDaysData<T extends {
|
|
134
|
+
date: Date;
|
|
135
|
+
}>(calendarDays: CalendarDay[], items: T[]): CalendarDay<T>[];
|
|
136
|
+
private static getTime;
|
|
137
|
+
private static getDayState;
|
|
138
|
+
private static getPeriodState;
|
|
139
|
+
static generateWeek(referenceDate: Date, options: GenerateDaysOptions): CalendarDay[];
|
|
140
|
+
static generateDays(month: number, year: number, options: GenerateDaysOptions): CalendarDay[];
|
|
141
|
+
static generateMonths(year: number, options: GeneratePeriodOptions): CalendarMonthItem[];
|
|
142
|
+
static generateYears(startYear: number, options: GeneratePeriodOptions): CalendarYearItem[];
|
|
143
|
+
}
|
|
144
|
+
|
|
75
145
|
declare class AutoFocusDirective {
|
|
76
146
|
private el;
|
|
77
147
|
$shouldFocus: InputSignal<boolean>;
|
|
@@ -194,6 +264,7 @@ declare function getAspectRatioFit(maxWidth: number, maxHeight: number, srcWidth
|
|
|
194
264
|
};
|
|
195
265
|
|
|
196
266
|
declare const stringToHslColor: (value: string) => string;
|
|
267
|
+
declare const stringToColorGradient: (value: string) => string;
|
|
197
268
|
|
|
198
269
|
type AppIconName = string;
|
|
199
270
|
declare type Nominal<T, Name extends string> = T & {
|
|
@@ -371,29 +442,6 @@ declare abstract class UiAvatarDirective {
|
|
|
371
442
|
static ɵdir: i0.ɵɵDirectiveDeclaration<UiAvatarDirective, "app-ui-avatar", never, { "$size": { "alias": "$size"; "required": false; "isSignal": true; }; "$isRounded": { "alias": "$isRounded"; "required": false; "isSignal": true; }; "$src": { "alias": "$src"; "required": true; "isSignal": true; }; "$acronym": { "alias": "$acronym"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
372
443
|
}
|
|
373
444
|
|
|
374
|
-
interface CalendarDay {
|
|
375
|
-
date: Date;
|
|
376
|
-
isDisabled: boolean;
|
|
377
|
-
isSelected: boolean;
|
|
378
|
-
isStart?: boolean;
|
|
379
|
-
isEnd?: boolean;
|
|
380
|
-
inRange?: boolean;
|
|
381
|
-
inCurrentMonth: boolean;
|
|
382
|
-
inHoverRange: boolean;
|
|
383
|
-
}
|
|
384
|
-
interface CalendarMonthItem {
|
|
385
|
-
index: number;
|
|
386
|
-
name: string;
|
|
387
|
-
short: string;
|
|
388
|
-
date: Date;
|
|
389
|
-
isSelected: boolean;
|
|
390
|
-
}
|
|
391
|
-
interface CalendarYearItem {
|
|
392
|
-
year: number;
|
|
393
|
-
date: Date;
|
|
394
|
-
isSelected: boolean;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
445
|
declare class UiDailyCalendarDirective {
|
|
398
446
|
private readonly weekDaysEuropean;
|
|
399
447
|
private readonly weekDaysUsa;
|
|
@@ -413,12 +461,6 @@ declare class UiDailyCalendarDirective {
|
|
|
413
461
|
}>;
|
|
414
462
|
readonly $onSelect: OutputEmitterRef<Date>;
|
|
415
463
|
protected readonly $calendarDays: Signal<CalendarDay[]>;
|
|
416
|
-
private generateCalendar;
|
|
417
|
-
private isSameDay;
|
|
418
|
-
private normalizeDate;
|
|
419
|
-
private isDisabledDate;
|
|
420
|
-
private isBetween;
|
|
421
|
-
private getDayState;
|
|
422
464
|
protected onHover(date: Date | null, inHoverRange: boolean): void;
|
|
423
465
|
private isUsaDateFormat;
|
|
424
466
|
protected select(date: Date): void;
|
|
@@ -428,26 +470,34 @@ declare class UiDailyCalendarDirective {
|
|
|
428
470
|
|
|
429
471
|
declare abstract class UiMonthlyCalendarDirective {
|
|
430
472
|
$date: ModelSignal<Date | null>;
|
|
473
|
+
readonly $dateEnd: InputSignal<Date | null>;
|
|
474
|
+
readonly $isRangeSelection: InputSignal<boolean>;
|
|
475
|
+
readonly $minDate: InputSignal<Date | undefined>;
|
|
476
|
+
readonly $maxDate: InputSignal<Date | undefined>;
|
|
477
|
+
protected readonly $hoverDate: WritableSignal<Date | null>;
|
|
431
478
|
$onSelect: OutputEmitterRef<Date>;
|
|
432
479
|
$currentYear: ModelSignal<number>;
|
|
433
480
|
protected $months: Signal<CalendarMonthItem[]>;
|
|
434
|
-
|
|
481
|
+
protected onHover(date: Date | null, inHoverRange: boolean): void;
|
|
435
482
|
protected select(date: Date): void;
|
|
436
|
-
private isSelected;
|
|
437
483
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiMonthlyCalendarDirective, never>;
|
|
438
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<UiMonthlyCalendarDirective, "app-ui-monthly-calendar", never, { "$date": { "alias": "$date"; "required": false; "isSignal": true; }; "$currentYear": { "alias": "$currentYear"; "required": true; "isSignal": true; }; }, { "$date": "$dateChange"; "$onSelect": "$onSelect"; "$currentYear": "$currentYearChange"; }, never, never, true, never>;
|
|
484
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiMonthlyCalendarDirective, "app-ui-monthly-calendar", never, { "$date": { "alias": "$date"; "required": false; "isSignal": true; }; "$dateEnd": { "alias": "$dateEnd"; "required": false; "isSignal": true; }; "$isRangeSelection": { "alias": "$isRangeSelection"; "required": false; "isSignal": true; }; "$minDate": { "alias": "$minDate"; "required": false; "isSignal": true; }; "$maxDate": { "alias": "$maxDate"; "required": false; "isSignal": true; }; "$currentYear": { "alias": "$currentYear"; "required": true; "isSignal": true; }; }, { "$date": "$dateChange"; "$onSelect": "$onSelect"; "$currentYear": "$currentYearChange"; }, never, never, true, never>;
|
|
439
485
|
}
|
|
440
486
|
|
|
441
487
|
declare class UiYearlyCalendarDirective {
|
|
442
488
|
$date: ModelSignal<Date | null>;
|
|
489
|
+
readonly $dateEnd: InputSignal<Date | null>;
|
|
490
|
+
readonly $isRangeSelection: InputSignal<boolean>;
|
|
491
|
+
readonly $minDate: InputSignal<Date | undefined>;
|
|
492
|
+
readonly $maxDate: InputSignal<Date | undefined>;
|
|
493
|
+
protected readonly $hoverDate: WritableSignal<Date | null>;
|
|
443
494
|
$onSelect: OutputEmitterRef<Date>;
|
|
444
495
|
$currentYear: ModelSignal<number>;
|
|
445
496
|
protected $years: Signal<CalendarYearItem[]>;
|
|
446
|
-
|
|
447
|
-
private createSafeDate;
|
|
497
|
+
protected onHover(date: Date | null, inHoverRange: boolean): void;
|
|
448
498
|
protected select(date: Date): void;
|
|
449
499
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiYearlyCalendarDirective, never>;
|
|
450
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<UiYearlyCalendarDirective, "app-ui-yearly-calendar", never, { "$date": { "alias": "$date"; "required": false; "isSignal": true; }; "$currentYear": { "alias": "$currentYear"; "required": true; "isSignal": true; }; }, { "$date": "$dateChange"; "$onSelect": "$onSelect"; "$currentYear": "$currentYearChange"; }, never, never, true, never>;
|
|
500
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiYearlyCalendarDirective, "app-ui-yearly-calendar", never, { "$date": { "alias": "$date"; "required": false; "isSignal": true; }; "$dateEnd": { "alias": "$dateEnd"; "required": false; "isSignal": true; }; "$isRangeSelection": { "alias": "$isRangeSelection"; "required": false; "isSignal": true; }; "$minDate": { "alias": "$minDate"; "required": false; "isSignal": true; }; "$maxDate": { "alias": "$maxDate"; "required": false; "isSignal": true; }; "$currentYear": { "alias": "$currentYear"; "required": true; "isSignal": true; }; }, { "$date": "$dateChange"; "$onSelect": "$onSelect"; "$currentYear": "$currentYearChange"; }, never, never, true, never>;
|
|
451
501
|
}
|
|
452
502
|
|
|
453
503
|
type CalendarType = 'day' | 'month' | 'year';
|
|
@@ -1140,5 +1190,5 @@ declare class UiTimeDropdownDirective {
|
|
|
1140
1190
|
static ɵdir: i0.ɵɵDirectiveDeclaration<UiTimeDropdownDirective, "app-ui-time-dropdown", never, { "action": { "alias": "action"; "required": false; }; "initialValue": { "alias": "initialValue"; "required": false; }; "timeFormat": { "alias": "timeFormat"; "required": false; }; }, {}, never, never, true, never>;
|
|
1141
1191
|
}
|
|
1142
1192
|
|
|
1143
|
-
export { Alert, AlertType, AppIconsLibrary, AutoFocusDirective, CenterEllipsisPipe, ContainerSizeDirective, CountryService, DateUtils, EMAIL, HAS_CAPITAL_CASE, HAS_NUMBER, HAS_SMALL_CASE, HAS_SPECIAL_CHARTERS, HoverTipDirective, IconComponent, LazyImgDirective, MIN_LENGTH, MaskGradientDirective, RouterBehavior, SkeletonDirective, StickyObserverDirective, ThemeService, TrackLifecycleDirective, UIInputDateDirective, UIPhoneNumberDirective, UiAccordionComponent, UiAlertMessagesService, UiAvatarDirective, UiButtonDirective, UiCalendarDropdownDirective, UiCodeDirective, UiCopyButtonDirective, UiDailyCalendarDirective, UiDropdownContainerDirective, UiDropdownService, UiFieldBaseDirective, UiImageDirective, UiInputCheckboxDirective, UiInputCountryDirective, UiInputDirective, UiInputSelectDirective, UiInputSequenceDirective, UiInputTimeDirective, UiMonthlyCalendarDirective, UiPaginationDirective, UiPopupBackdropDirective, UiPopupContainerDirective, UiPopupImageDirective, UiPopupInstance, UiPopupService, UiSelectButtonsDirective, UiTabsDirective, UiTimeDropdownDirective, UiValidationErrorsDirective, UiYearlyCalendarDirective, createNavigation, createUrl, createUrlTree, emptyCountry, extractParam, getAspectRatioFit, navigateByUrl, stringToHslColor };
|
|
1144
|
-
export type { AlertParams, AppIcon, AppIconName, ButtonColor, CalendarDay, CalendarMonthItem, CalendarYearItem, CheckboxStyles, CountryData, DropdownItem, DropdownParameters, DropdownPosition, InputSelectData, NavigationEvent, OverflowMode, ParsedRoutes, PopupAnimationOptions, RawSVG, RouteDefinition, TabsAlignment, UiPopupAnimation, UiPopupOptions, UiPopupParameters, UiSelectButton, UiSelectButtonAlignment, UiTab, ValidationErrorsType, paramExtractor };
|
|
1193
|
+
export { Alert, AlertType, AppIconsLibrary, AutoFocusDirective, CalendarUtils, CenterEllipsisPipe, ContainerSizeDirective, CountryService, DateUtils, EMAIL, HAS_CAPITAL_CASE, HAS_NUMBER, HAS_SMALL_CASE, HAS_SPECIAL_CHARTERS, HoverTipDirective, IconComponent, LazyImgDirective, MIN_LENGTH, MaskGradientDirective, RouterBehavior, SkeletonDirective, StickyObserverDirective, ThemeService, TrackLifecycleDirective, UIInputDateDirective, UIPhoneNumberDirective, UiAccordionComponent, UiAlertMessagesService, UiAvatarDirective, UiButtonDirective, UiCalendarDropdownDirective, UiCodeDirective, UiCopyButtonDirective, UiDailyCalendarDirective, UiDropdownContainerDirective, UiDropdownService, UiFieldBaseDirective, UiImageDirective, UiInputCheckboxDirective, UiInputCountryDirective, UiInputDirective, UiInputSelectDirective, UiInputSequenceDirective, UiInputTimeDirective, UiMonthlyCalendarDirective, UiPaginationDirective, UiPopupBackdropDirective, UiPopupContainerDirective, UiPopupImageDirective, UiPopupInstance, UiPopupService, UiSelectButtonsDirective, UiTabsDirective, UiTimeDropdownDirective, UiValidationErrorsDirective, UiYearlyCalendarDirective, createNavigation, createUrl, createUrlTree, emptyCountry, extractParam, getAspectRatioFit, navigateByUrl, stringToColorGradient, stringToHslColor };
|
|
1194
|
+
export type { AlertParams, AppIcon, AppIconName, ButtonColor, CalendarDay, CalendarMonthItem, CalendarYearItem, CheckboxStyles, CountryData, DropdownItem, DropdownParameters, DropdownPosition, GenerateDaysOptions, GeneratePeriodOptions, InputSelectData, NavigationEvent, OverflowMode, ParsedRoutes, PopupAnimationOptions, RawSVG, RouteDefinition, TabsAlignment, UiPopupAnimation, UiPopupOptions, UiPopupParameters, UiSelectButton, UiSelectButtonAlignment, UiTab, ValidationErrorsType, paramExtractor };
|