@ibragim-dev-org/ui-forge-library 1.2.4 → 1.2.5
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
|
@@ -5,7 +5,7 @@ import { NavigationStart, NavigationEnd, NavigationCancel, NavigationError, Rout
|
|
|
5
5
|
import { ComponentType, Overlay, OverlayRef } from '@angular/cdk/overlay';
|
|
6
6
|
import { ComponentType as ComponentType$1 } from '@angular/cdk/portal';
|
|
7
7
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
8
|
-
import { WithOptionalField, ValidationError, FormValueControl, FormCheckboxControl } from '@angular/forms/signals';
|
|
8
|
+
import { WithOptionalField, ValidationError, FormValueControl, FormCheckboxControl, FieldTree } from '@angular/forms/signals';
|
|
9
9
|
|
|
10
10
|
declare class DateUtils {
|
|
11
11
|
static parse(value: string, isUsaDateFormat?: boolean): Date | null;
|
|
@@ -292,6 +292,7 @@ declare abstract class UiAvatarDirective {
|
|
|
292
292
|
|
|
293
293
|
interface CalendarDay {
|
|
294
294
|
date: Date;
|
|
295
|
+
isDisabled: boolean;
|
|
295
296
|
isSelected: boolean;
|
|
296
297
|
isStart?: boolean;
|
|
297
298
|
isEnd?: boolean;
|
|
@@ -316,6 +317,8 @@ declare class UiDailyCalendarDirective {
|
|
|
316
317
|
private readonly weekDaysEuropean;
|
|
317
318
|
private readonly weekDaysUsa;
|
|
318
319
|
readonly $isRangeSelection: InputSignal<boolean>;
|
|
320
|
+
readonly $minDate: InputSignal<Date | undefined>;
|
|
321
|
+
readonly $maxDate: InputSignal<Date | undefined>;
|
|
319
322
|
get weekDays(): string[];
|
|
320
323
|
readonly $dateStart: ModelSignal<Date | null>;
|
|
321
324
|
readonly $dateEnd: ModelSignal<Date | null>;
|
|
@@ -330,13 +333,15 @@ declare class UiDailyCalendarDirective {
|
|
|
330
333
|
protected readonly $calendarDays: Signal<CalendarDay[]>;
|
|
331
334
|
private generateCalendar;
|
|
332
335
|
private isSameDay;
|
|
336
|
+
private normalizeDate;
|
|
337
|
+
private isDisabledDate;
|
|
333
338
|
private isBetween;
|
|
334
339
|
private getDayState;
|
|
335
340
|
protected onHover(date: Date | null, inHoverRange: boolean): void;
|
|
336
341
|
private isUsaDateFormat;
|
|
337
342
|
protected select(date: Date): void;
|
|
338
343
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiDailyCalendarDirective, never>;
|
|
339
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<UiDailyCalendarDirective, "app-ui-daily-calendar", never, { "$isRangeSelection": { "alias": "$isRangeSelection"; "required": false; "isSignal": true; }; "$dateStart": { "alias": "$dateStart"; "required": false; "isSignal": true; }; "$dateEnd": { "alias": "$dateEnd"; "required": false; "isSignal": true; }; "$currentMonth": { "alias": "$currentMonth"; "required": true; "isSignal": true; }; "$currentYear": { "alias": "$currentYear"; "required": true; "isSignal": true; }; }, { "$dateStart": "$dateStartChange"; "$dateEnd": "$dateEndChange"; "$currentMonth": "$currentMonthChange"; "$currentYear": "$currentYearChange"; "$onRangeSelect": "$onRangeSelect"; "$onSelect": "$onSelect"; }, never, never, true, never>;
|
|
344
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiDailyCalendarDirective, "app-ui-daily-calendar", never, { "$isRangeSelection": { "alias": "$isRangeSelection"; "required": false; "isSignal": true; }; "$minDate": { "alias": "$minDate"; "required": false; "isSignal": true; }; "$maxDate": { "alias": "$maxDate"; "required": false; "isSignal": true; }; "$dateStart": { "alias": "$dateStart"; "required": false; "isSignal": true; }; "$dateEnd": { "alias": "$dateEnd"; "required": false; "isSignal": true; }; "$currentMonth": { "alias": "$currentMonth"; "required": true; "isSignal": true; }; "$currentYear": { "alias": "$currentYear"; "required": true; "isSignal": true; }; }, { "$dateStart": "$dateStartChange"; "$dateEnd": "$dateEndChange"; "$currentMonth": "$currentMonthChange"; "$currentYear": "$currentYearChange"; "$onRangeSelect": "$onRangeSelect"; "$onSelect": "$onSelect"; }, never, never, true, never>;
|
|
340
345
|
}
|
|
341
346
|
|
|
342
347
|
declare abstract class UiMonthlyCalendarDirective {
|
|
@@ -363,6 +368,56 @@ declare class UiYearlyCalendarDirective {
|
|
|
363
368
|
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>;
|
|
364
369
|
}
|
|
365
370
|
|
|
371
|
+
type CalendarType = 'day' | 'month' | 'year';
|
|
372
|
+
interface ViewItem {
|
|
373
|
+
key: CalendarType;
|
|
374
|
+
state: 'enter-up' | 'enter-down' | 'leave-up' | 'leave-down';
|
|
375
|
+
}
|
|
376
|
+
declare class UiCalendarDropdownDirective {
|
|
377
|
+
action: (date: Date) => void;
|
|
378
|
+
rangeSelect: (dates: {
|
|
379
|
+
start: Date | null;
|
|
380
|
+
end: Date | null;
|
|
381
|
+
}) => void;
|
|
382
|
+
startDate: Date | null;
|
|
383
|
+
endDate: Date | null;
|
|
384
|
+
isRangeSelection: boolean;
|
|
385
|
+
minDate: Date | undefined;
|
|
386
|
+
maxDate: Date | undefined;
|
|
387
|
+
protected $close: WritableSignal<boolean>;
|
|
388
|
+
protected $height: WritableSignal<number>;
|
|
389
|
+
protected $width: WritableSignal<number>;
|
|
390
|
+
protected $currentMonth: WritableSignal<number>;
|
|
391
|
+
protected $currentYear: WritableSignal<number>;
|
|
392
|
+
$mode: WritableSignal<CalendarType>;
|
|
393
|
+
protected $view: WritableSignal<ViewItem>;
|
|
394
|
+
protected levels: {
|
|
395
|
+
day: number;
|
|
396
|
+
month: number;
|
|
397
|
+
year: number;
|
|
398
|
+
};
|
|
399
|
+
protected $current: WritableSignal<CalendarType>;
|
|
400
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
401
|
+
private normalizeDate;
|
|
402
|
+
private getInitialViewDate;
|
|
403
|
+
private clampToRange;
|
|
404
|
+
protected select(date: Date): void;
|
|
405
|
+
protected selectMonth(date: Date): void;
|
|
406
|
+
protected selectYear(date: Date): void;
|
|
407
|
+
protected onRangeSelect(dates: {
|
|
408
|
+
start: Date | null;
|
|
409
|
+
end: Date | null;
|
|
410
|
+
}): void;
|
|
411
|
+
protected setToday(): void;
|
|
412
|
+
protected setMode(next: CalendarType): void;
|
|
413
|
+
protected setSize(size: {
|
|
414
|
+
width: number;
|
|
415
|
+
height: number;
|
|
416
|
+
}): void;
|
|
417
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiCalendarDropdownDirective, never>;
|
|
418
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiCalendarDropdownDirective, "app-ui-calendar-dropdown-calendar", never, { "action": { "alias": "action"; "required": false; }; "rangeSelect": { "alias": "rangeSelect"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "endDate": { "alias": "endDate"; "required": false; }; "isRangeSelection": { "alias": "isRangeSelection"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; }, {}, never, never, true, never>;
|
|
419
|
+
}
|
|
420
|
+
|
|
366
421
|
interface Highlighted {
|
|
367
422
|
string: string;
|
|
368
423
|
index: number;
|
|
@@ -849,28 +904,30 @@ declare abstract class UiInputCheckboxDirective implements FormCheckboxControl {
|
|
|
849
904
|
static ɵdir: i0.ɵɵDirectiveDeclaration<UiInputCheckboxDirective, "app-ui-input", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "$style": { "alias": "$style"; "required": false; "isSignal": true; }; "$label": { "alias": "$label"; "required": false; "isSignal": true; }; "$hideValidatorErrors": { "alias": "$hideValidatorErrors"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "invalid": "invalidChange"; "touched": "touchedChange"; "dirty": "dirtyChange"; }, never, never, true, never>;
|
|
850
905
|
}
|
|
851
906
|
|
|
907
|
+
type InputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
852
908
|
type Size = 'small' | 'medium' | 'large';
|
|
853
909
|
declare abstract class UiInputDirective extends UiFieldBaseDirective<string> {
|
|
854
|
-
protected readonly elementRef: ElementRef<
|
|
910
|
+
protected readonly elementRef: ElementRef<HTMLInputElement>;
|
|
855
911
|
protected readonly renderer: Renderer2;
|
|
856
912
|
readonly $size: InputSignal<Size>;
|
|
857
913
|
readonly $placeholder: InputSignal<string>;
|
|
914
|
+
readonly $inputMode: InputSignal<InputMode>;
|
|
858
915
|
readonly $label: InputSignal<string>;
|
|
859
916
|
readonly $shouldFocusedAfterViewInit: InputSignal<boolean>;
|
|
860
917
|
readonly $isRounded: InputSignal<boolean>;
|
|
861
918
|
readonly $hideValidatorErrors: InputSignal<boolean>;
|
|
862
919
|
readonly $icon: InputSignal<AppIcon | null>;
|
|
863
920
|
protected readonly $isError: Signal<boolean>;
|
|
864
|
-
constructor(elementRef: ElementRef<
|
|
921
|
+
constructor(elementRef: ElementRef<HTMLInputElement>, renderer: Renderer2);
|
|
865
922
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiInputDirective, never>;
|
|
866
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<UiInputDirective, "app-ui-input", never, { "$size": { "alias": "$size"; "required": false; "isSignal": true; }; "$placeholder": { "alias": "$placeholder"; "required": false; "isSignal": true; }; "$label": { "alias": "$label"; "required": false; "isSignal": true; }; "$shouldFocusedAfterViewInit": { "alias": "$shouldFocusedAfterViewInit"; "required": false; "isSignal": true; }; "$isRounded": { "alias": "$isRounded"; "required": false; "isSignal": true; }; "$hideValidatorErrors": { "alias": "$hideValidatorErrors"; "required": false; "isSignal": true; }; "$icon": { "alias": "$icon"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
923
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiInputDirective, "app-ui-input", never, { "$size": { "alias": "$size"; "required": false; "isSignal": true; }; "$placeholder": { "alias": "$placeholder"; "required": false; "isSignal": true; }; "$inputMode": { "alias": "$inputMode"; "required": false; "isSignal": true; }; "$label": { "alias": "$label"; "required": false; "isSignal": true; }; "$shouldFocusedAfterViewInit": { "alias": "$shouldFocusedAfterViewInit"; "required": false; "isSignal": true; }; "$isRounded": { "alias": "$isRounded"; "required": false; "isSignal": true; }; "$hideValidatorErrors": { "alias": "$hideValidatorErrors"; "required": false; "isSignal": true; }; "$icon": { "alias": "$icon"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
867
924
|
}
|
|
868
925
|
|
|
869
926
|
declare abstract class UiInputCountryDirective extends UiInputDirective implements AfterViewInit {
|
|
870
927
|
protected $selectedCountry: WritableSignal<CountryData>;
|
|
871
928
|
protected $isOpen: WritableSignal<boolean>;
|
|
872
929
|
private $inputElement;
|
|
873
|
-
constructor(elementRef: ElementRef<
|
|
930
|
+
constructor(elementRef: ElementRef<HTMLInputElement>, renderer: Renderer2);
|
|
874
931
|
ngAfterViewInit(): void;
|
|
875
932
|
protected onPaste(event: ClipboardEvent): void;
|
|
876
933
|
private searchCountry;
|
|
@@ -884,6 +941,8 @@ declare abstract class UIInputDateDirective extends UiInputDirective {
|
|
|
884
941
|
protected readonly $isOpen: WritableSignal<boolean>;
|
|
885
942
|
readonly $isRangeSelection: InputSignal<boolean>;
|
|
886
943
|
readonly $dividePattern: InputSignal<string>;
|
|
944
|
+
readonly $minDate: InputSignal<Date | undefined>;
|
|
945
|
+
readonly $maxDate: InputSignal<Date | undefined>;
|
|
887
946
|
private $inputElement;
|
|
888
947
|
protected setDate(date: Date): void;
|
|
889
948
|
private formatDate;
|
|
@@ -895,7 +954,7 @@ declare abstract class UIInputDateDirective extends UiInputDirective {
|
|
|
895
954
|
onInput(value: string): void;
|
|
896
955
|
private maskDate;
|
|
897
956
|
static ɵfac: i0.ɵɵFactoryDeclaration<UIInputDateDirective, never>;
|
|
898
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<UIInputDateDirective, "app-ui-input-date", never, { "$isRangeSelection": { "alias": "$isRangeSelection"; "required": false; "isSignal": true; }; "$dividePattern": { "alias": "$dividePattern"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
957
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UIInputDateDirective, "app-ui-input-date", never, { "$isRangeSelection": { "alias": "$isRangeSelection"; "required": false; "isSignal": true; }; "$dividePattern": { "alias": "$dividePattern"; "required": false; "isSignal": true; }; "$minDate": { "alias": "$minDate"; "required": false; "isSignal": true; }; "$maxDate": { "alias": "$maxDate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
899
958
|
}
|
|
900
959
|
|
|
901
960
|
declare abstract class UIPhoneNumberDirective extends UiInputDirective implements AfterViewInit {
|
|
@@ -903,7 +962,7 @@ declare abstract class UIPhoneNumberDirective extends UiInputDirective implement
|
|
|
903
962
|
protected $isOpen: WritableSignal<boolean>;
|
|
904
963
|
protected $countryCode: WritableSignal<string>;
|
|
905
964
|
private $inputElement;
|
|
906
|
-
constructor(elementRef: ElementRef<
|
|
965
|
+
constructor(elementRef: ElementRef<HTMLInputElement>, renderer: Renderer2);
|
|
907
966
|
ngAfterViewInit(): void;
|
|
908
967
|
protected onInput(value: string): void;
|
|
909
968
|
protected onPaste(event: ClipboardEvent): void;
|
|
@@ -939,14 +998,57 @@ declare abstract class UiInputSequenceDirective extends UiInputDirective {
|
|
|
939
998
|
}
|
|
940
999
|
|
|
941
1000
|
declare abstract class UiInputTimeDirective extends UiInputDirective {
|
|
942
|
-
protected
|
|
1001
|
+
protected get times(): string[];
|
|
1002
|
+
protected get inputMode(): 'numeric' | 'text';
|
|
943
1003
|
private $inputElement;
|
|
944
1004
|
protected readonly $isOpen: WritableSignal<boolean>;
|
|
945
1005
|
onInput(value: string): void;
|
|
946
1006
|
maskTime(value: string): string;
|
|
1007
|
+
private mask12HourTime;
|
|
1008
|
+
private appendMeridiem;
|
|
1009
|
+
private clampTwelveHour;
|
|
1010
|
+
private clampMinutes;
|
|
1011
|
+
private extractMeridiem;
|
|
1012
|
+
private uses12HourTime;
|
|
1013
|
+
private formatTime;
|
|
947
1014
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiInputTimeDirective, never>;
|
|
948
1015
|
static ɵdir: i0.ɵɵDirectiveDeclaration<UiInputTimeDirective, "app-ui-input-time", never, {}, {}, never, never, true, never>;
|
|
949
1016
|
}
|
|
950
1017
|
|
|
951
|
-
|
|
1018
|
+
declare class UiTimeDropdownDirective {
|
|
1019
|
+
protected readonly $close: WritableSignal<boolean>;
|
|
1020
|
+
protected readonly is12HourFormat: boolean;
|
|
1021
|
+
protected readonly $hourForm: WritableSignal<string>;
|
|
1022
|
+
protected readonly $minuteForm: WritableSignal<string>;
|
|
1023
|
+
protected readonly $periodForm: WritableSignal<string>;
|
|
1024
|
+
protected readonly $hour: FieldTree<string>;
|
|
1025
|
+
protected readonly $minute: FieldTree<string>;
|
|
1026
|
+
protected readonly $period: FieldTree<string>;
|
|
1027
|
+
action: (time: string) => void;
|
|
1028
|
+
initialValue: string | null;
|
|
1029
|
+
ngOnInit(): void;
|
|
1030
|
+
protected onHourInput(event: Event): void;
|
|
1031
|
+
protected onMinuteInput(event: Event): void;
|
|
1032
|
+
protected onPeriodInput(event: Event): void;
|
|
1033
|
+
protected increaseHour(): void;
|
|
1034
|
+
protected decreaseHour(): void;
|
|
1035
|
+
protected increaseMinute(): void;
|
|
1036
|
+
protected decreaseMinute(): void;
|
|
1037
|
+
protected increasePeriod(): void;
|
|
1038
|
+
protected decreasePeriod(): void;
|
|
1039
|
+
private incrementWithinRange;
|
|
1040
|
+
private decrementWithinRange;
|
|
1041
|
+
private parseNumber;
|
|
1042
|
+
private normalizeHourInput;
|
|
1043
|
+
private normalizeMinuteInput;
|
|
1044
|
+
private normalizePeriodInput;
|
|
1045
|
+
private setInitialTime;
|
|
1046
|
+
private parseInitialValue;
|
|
1047
|
+
private emitTime;
|
|
1048
|
+
onTimeSelect(time: string): void;
|
|
1049
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiTimeDropdownDirective, never>;
|
|
1050
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiTimeDropdownDirective, "app-ui-time-dropdown", never, { "action": { "alias": "action"; "required": false; }; "initialValue": { "alias": "initialValue"; "required": false; }; }, {}, never, never, true, never>;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
export { Alert, AlertType, AppIconsLibrary, AutoFocusDirective, CenterEllipsisPipe, CountryService, DateUtils, EMAIL, HAS_CAPITAL_CASE, HAS_NUMBER, HAS_SMALL_CASE, HAS_SPECIAL_CHARTERS, HoverTipDirective, IconComponent, LazyImgDirective, MIN_LENGTH, MaskGradientDirective, 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, emptyCountry, getAspectRatioFit, stringToHslColor };
|
|
952
1054
|
export type { AlertParams, AppIcon, AppIconName, ButtonColor, CalendarDay, CalendarMonthItem, CalendarYearItem, CheckboxStyles, CountryData, DropdownItem, DropdownParameters, DropdownPosition, InputSelectData, NavigationEvent, OverflowMode, PopupAnimationOptions, RawSVG, TabsAlignment, UiPopupAnimation, UiPopupOptions, UiPopupParameters, UiSelectButton, UiSelectButtonAlignment, UiTab, ValidationErrorsType };
|