@ibragim-dev-org/ui-forge-library 1.4.36 → 1.4.52

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
@@ -4,7 +4,7 @@
4
4
  "access": "public",
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
7
- "version": "1.4.36",
7
+ "version": "1.4.52",
8
8
  "peerDependencies": {
9
9
  "@angular/common": "^21.1.0",
10
10
  "@angular/core": "^21.1.0"
@@ -2,7 +2,7 @@ import { Location } from '@angular/common';
2
2
  import { Router, Params, UrlCreationOptions, UrlTree, NavigationExtras, NavigationStart, NavigationEnd, NavigationCancel, NavigationError, RoutesRecognized, GuardsCheckStart, GuardsCheckEnd, RouteConfigLoadStart, RouteConfigLoadEnd, ChildActivationStart, ChildActivationEnd, ActivationStart, ActivationEnd, Scroll, ResolveStart, ResolveEnd, NavigationSkipped } from '@angular/router';
3
3
  import { Observable, BehaviorSubject, Subject } from 'rxjs';
4
4
  import * as i0 from '@angular/core';
5
- import { ModelSignal, ElementRef, DestroyRef, OnInit, OnDestroy, AfterViewInit, InputSignal, Renderer2, OnChanges, DoCheck, AfterContentInit, AfterContentChecked, AfterViewChecked, EventEmitter, SimpleChanges, PipeTransform, WritableSignal, Signal, Type, OutputEmitterRef, Injector, TemplateRef } from '@angular/core';
5
+ import { ModelSignal, ElementRef, DestroyRef, OnInit, OnDestroy, AfterViewInit, InputSignal, Renderer2, OnChanges, DoCheck, AfterContentInit, AfterContentChecked, AfterViewChecked, EventEmitter, SimpleChanges, PipeTransform, WritableSignal, Signal, Type, OutputEmitterRef, Injector, ComponentRef, TemplateRef } from '@angular/core';
6
6
  import { DomSanitizer } from '@angular/platform-browser';
7
7
  import { ComponentType, Overlay, OverlayRef } from '@angular/cdk/overlay';
8
8
  import { ComponentPortal } from '@angular/cdk/portal';
@@ -614,35 +614,13 @@ declare abstract class UiCodeDirective {
614
614
  readonly $code: InputSignal<string>;
615
615
  protected readonly $language: WritableSignal<string>;
616
616
  protected readonly $highlightedArray: WritableSignal<Highlighted[]>;
617
+ protected readonly $codeToCopy: Signal<string>;
617
618
  constructor();
618
619
  private highlightCode;
619
620
  static ɵfac: i0.ɵɵFactoryDeclaration<UiCodeDirective, never>;
620
621
  static ɵdir: i0.ɵɵDirectiveDeclaration<UiCodeDirective, "app-ui-code", never, { "$code": { "alias": "$code"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
621
622
  }
622
623
 
623
- interface PopupAnimationOptions {
624
- positionX: number;
625
- positionY: number;
626
- startTransition: string;
627
- endTransition: string;
628
- }
629
- declare class UiPopupInstance {
630
- private readonly overlayRef;
631
- private readonly destroyRef;
632
- private readonly onClose;
633
- id: string;
634
- width: number;
635
- readonly animationOrigin$: BehaviorSubject<string>;
636
- readonly options: PopupAnimationOptions;
637
- private readonly closed;
638
- private readonly shouldClose;
639
- private isClosing;
640
- constructor(overlayRef: OverlayRef, destroyRef: DestroyRef, onClose?: () => void, options?: PopupAnimationOptions);
641
- close(): void;
642
- detach(): void;
643
- onShouldClose(): Observable<void>;
644
- }
645
-
646
624
  interface UiPopupAnimation {
647
625
  startOrigin: string;
648
626
  endOrigin: string;
@@ -663,6 +641,25 @@ interface UiPopupOptions<TComponent> {
663
641
  };
664
642
  }
665
643
 
644
+ declare class UiPopupInstance {
645
+ private readonly overlayRef;
646
+ private readonly destroyRef;
647
+ private readonly onClose;
648
+ id: string;
649
+ width: number;
650
+ readonly animationOrigin$: BehaviorSubject<string>;
651
+ options: UiPopupAnimation;
652
+ readonly triggerPulse$: Subject<void>;
653
+ readonly isHide$: Subject<boolean>;
654
+ private readonly closed;
655
+ private readonly shouldClose;
656
+ private isClosing;
657
+ constructor(overlayRef: OverlayRef, destroyRef: DestroyRef, onClose?: () => void, options?: UiPopupAnimation);
658
+ close(): void;
659
+ detach(): void;
660
+ onShouldClose(): Observable<void>;
661
+ }
662
+
666
663
  declare class UiPopupBackdropService {
667
664
  readonly tipContainerPortal?: ComponentPortal<unknown>;
668
665
  readonly backdropPortal: ComponentPortal<any>;
@@ -672,44 +669,29 @@ declare class UiPopupBackdropService {
672
669
  }
673
670
 
674
671
  interface PopupParameters {
675
- animationOptions: PopupAnimationOptions;
672
+ animationOptions: UiPopupAnimation;
676
673
  isStaticBackdrop: boolean;
677
674
  isClosePrevious: boolean;
678
675
  width: number;
679
676
  }
680
- declare class UiPopupService {
681
- protected overlay: Overlay;
682
- protected injector: Injector;
683
- protected destroyRef: DestroyRef;
684
- protected router: Router;
685
- protected backdropService: UiPopupBackdropService;
686
- popupInstances: UiPopupInstance[];
687
- private backdropRef?;
688
- private backdropPortalRef?;
677
+ declare abstract class UiModal {
678
+ protected readonly overlay: Overlay;
679
+ protected readonly injector: Injector;
680
+ protected readonly destroyRef: DestroyRef;
681
+ protected readonly router: Router;
682
+ protected readonly backdropService: UiPopupBackdropService;
683
+ instances: UiPopupInstance[];
684
+ protected backdropRef?: OverlayRef;
685
+ protected backdropPortalRef?: ComponentRef<ComponentType<unknown>>;
689
686
  protected readonly destroyDownloading$: Subject<void>;
690
687
  protected readonly destroyOutsideClickSubscription$: Subject<void>;
691
688
  constructor(overlay: Overlay, injector: Injector, destroyRef: DestroyRef, router: Router, backdropService: UiPopupBackdropService);
692
- /**
693
- * Opens a popup with the specified component and options.
694
- *
695
- * @param component - The component to be displayed in the popup.
696
- * @param options - Configuration options for the popup, including inputs.
697
- * @param id - A unique identifier for the popup instance.
698
- * @param parameters - (Optional) Configuration options for the popup.
699
- */
700
- open<TComponent>(component: Type<TComponent>, options: UiPopupOptions<TComponent>, id: string, parameters: Partial<PopupParameters>): void;
701
- /**
702
- * Opens a popup that scales from the provided origin element to the centered popup size.
703
- * Useful for image-preview transitions where the source element animates into the popup.
704
- */
705
- openScaledFromElement<TComponent>(component: Type<TComponent>, options: UiPopupOptions<TComponent>, id: string, originElement: HTMLElement, sourceWidth: number, sourceHeight: number, parameters?: Partial<PopupParameters>): void;
706
689
  /**
707
690
  * Closes the last opened popup.
708
691
  */
709
692
  close(): void;
710
- private closePrevious;
711
693
  /**
712
- * Closes a popup by its index in the popupInstances array.
694
+ * Closes a popup by its index in the instances array.
713
695
  *
714
696
  * @param index - The index of the popup to close.
715
697
  */
@@ -747,19 +729,17 @@ declare class UiPopupService {
747
729
  * @param parameters - Partial configuration options for the popup.
748
730
  * @returns A complete set of popup parameters with default values applied.
749
731
  */
750
- private fetchPopupParameters;
751
- private createScaleAnimationOptionsFromElement;
752
- static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupService, never>;
753
- static ɵprov: i0.ɵɵInjectableDeclaration<UiPopupService>;
732
+ private fetchParameters;
754
733
  }
755
734
 
756
735
  declare abstract class UiPopupContainerDirective implements OnInit {
757
736
  protected popupInstance: UiPopupInstance;
758
737
  protected destroyRef: DestroyRef;
759
- protected popupService: UiPopupService;
738
+ protected popupService: UiModal;
760
739
  protected elementRef: ElementRef<HTMLElement>;
761
740
  protected readonly $isShow: WritableSignal<boolean>;
762
741
  protected readonly $pulseTrigger: WritableSignal<boolean>;
742
+ protected readonly $isHide: WritableSignal<boolean>;
763
743
  readonly $overflowHidden: InputSignal<boolean>;
764
744
  readonly $shouldClose: ModelSignal<boolean>;
765
745
  readonly $hasCloseButton: InputSignal<boolean>;
@@ -767,7 +747,7 @@ declare abstract class UiPopupContainerDirective implements OnInit {
767
747
  protected readonly $iconClose: ModelSignal<AppIcon | undefined>;
768
748
  protected readonly $animationParams: WritableSignal<UiPopupAnimation>;
769
749
  protected readonly destroyAnimationOrigin$: Subject<void>;
770
- constructor(popupInstance: UiPopupInstance, destroyRef: DestroyRef, popupService: UiPopupService, elementRef: ElementRef<HTMLElement>);
750
+ constructor(popupInstance: UiPopupInstance, destroyRef: DestroyRef, popupService: UiModal, elementRef: ElementRef<HTMLElement>);
771
751
  ngOnInit(): void;
772
752
  protected close(): void;
773
753
  protected onAnimationDone(): void;
@@ -792,12 +772,84 @@ interface DropdownItem {
792
772
  func?: () => void;
793
773
  }
794
774
 
795
- declare class UiDropdownService extends UiPopupService {
775
+ declare abstract class UiPopupImageDirective implements OnInit, AfterViewInit {
776
+ private destroyRef;
777
+ readonly src: string;
778
+ readonly width: number;
779
+ readonly height: number;
780
+ protected readonly $imageWidth: i0.WritableSignal<number>;
781
+ protected readonly $imageHeight: i0.WritableSignal<number>;
782
+ protected readonly $imageStyleTransform: i0.WritableSignal<string>;
783
+ protected readonly $container: i0.Signal<ElementRef<HTMLDivElement> | undefined>;
784
+ protected readonly $image: i0.Signal<ElementRef<HTMLDivElement> | undefined>;
785
+ protected readonly $cursor: i0.WritableSignal<string>;
786
+ private isDragging;
787
+ private isTouchDragging;
788
+ private isPinching;
789
+ private lastTouchX;
790
+ private lastTouchY;
791
+ private lastTouchDistance;
792
+ private size;
793
+ private speed;
794
+ private readonly pos;
795
+ private readonly target;
796
+ private readonly pointer;
797
+ private scale;
798
+ constructor(destroyRef: DestroyRef);
799
+ ngOnInit(): void;
800
+ ngAfterViewInit(): void;
801
+ private setPosition;
802
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupImageDirective, never>;
803
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiPopupImageDirective, "app-ui-popup-image", never, { "src": { "alias": "src"; "required": true; }; "width": { "alias": "width"; "required": true; }; "height": { "alias": "height"; "required": true; }; }, {}, never, never, true, never>;
804
+ }
805
+
806
+ declare class UiPopupService extends UiModal {
807
+ private defaultAnimationOptions;
808
+ constructor(overlay: Overlay, injector: Injector, destroyRef: DestroyRef, router: Router, backdropService: UiPopupBackdropService);
809
+ /**
810
+ * Opens a popup with the specified component and options.
811
+ *
812
+ * @param component - The component to be displayed in the popup.
813
+ * @param options - Configuration options for the popup, including inputs.
814
+ * @param id - A unique identifier for the popup instance.
815
+ * @param parameters - (Optional) Configuration options for the popup.
816
+ */
817
+ open<TComponent>(component: Type<TComponent>, options: UiPopupOptions<TComponent>, id: string, parameters: Partial<PopupParameters>): void;
818
+ close(): void;
819
+ closeAll(): void;
820
+ closeById(id: string): void;
821
+ private resetAnimationForSingleInstance;
822
+ private applyHideToLastInstance;
823
+ private closePrevious;
824
+ /**
825
+ * Opens a popup that scales from the provided origin element to the centered popup size.
826
+ * Useful for image-preview transitions where the source element animates into the popup.
827
+ */
828
+ openScaledFromElement<TComponent>(component: Type<TComponent>, options: UiPopupOptions<TComponent>, id: string, originElement: HTMLElement, sourceWidth: number, sourceHeight: number, parameters?: Partial<PopupParameters>): void;
829
+ private createScaleAnimationOptionsFromElement;
830
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupService, never>;
831
+ static ɵprov: i0.ɵɵInjectableDeclaration<UiPopupService>;
832
+ }
833
+
834
+ declare class UiPopupBackdropDirective implements OnInit {
835
+ private readonly elementRef;
836
+ private readonly uiPopupService;
837
+ private readonly destroyRef;
838
+ isStaticBackdrop: boolean;
839
+ clicked: () => void;
840
+ constructor(elementRef: ElementRef, uiPopupService: UiPopupService, destroyRef: DestroyRef);
841
+ ngOnInit(): void;
842
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupBackdropDirective, never>;
843
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiPopupBackdropDirective, "app-ui-popup-backdrop", never, { "isStaticBackdrop": { "alias": "isStaticBackdrop"; "required": false; }; "clicked": { "alias": "clicked"; "required": false; }; }, {}, never, never, true, never>;
844
+ }
845
+
846
+ declare class UiDropdownService extends UiModal {
796
847
  containerSize$: BehaviorSubject<{
797
848
  width: number;
798
849
  height: number;
799
850
  }>;
800
851
  private connectedPositions;
852
+ constructor(overlay: Overlay, injector: Injector, destroyRef: DestroyRef, router: Router, backdropService: UiPopupBackdropService);
801
853
  /**
802
854
  * Opens a tooltip (tip) component attached to a specific HTML element.
803
855
  * The tooltip displays text content with customizable position and offset.
@@ -938,48 +990,6 @@ declare abstract class UiPaginationDirective {
938
990
  static ɵdir: i0.ɵɵDirectiveDeclaration<UiPaginationDirective, "app-ui-pagination", never, { "$hasNext": { "alias": "$hasNext"; "required": true; "isSignal": true; }; "$hasPrevious": { "alias": "$hasPrevious"; "required": true; "isSignal": true; }; }, { "$nextClicked": "$nextClicked"; "$previousClicked": "$previousClicked"; }, never, never, true, never>;
939
991
  }
940
992
 
941
- declare abstract class UiPopupImageDirective implements OnInit, AfterViewInit {
942
- private destroyRef;
943
- readonly src: string;
944
- readonly width: number;
945
- readonly height: number;
946
- protected readonly $imageWidth: i0.WritableSignal<number>;
947
- protected readonly $imageHeight: i0.WritableSignal<number>;
948
- protected readonly $imageStyleTransform: i0.WritableSignal<string>;
949
- protected readonly $container: i0.Signal<ElementRef<HTMLDivElement> | undefined>;
950
- protected readonly $image: i0.Signal<ElementRef<HTMLDivElement> | undefined>;
951
- protected readonly $cursor: i0.WritableSignal<string>;
952
- private isDragging;
953
- private isTouchDragging;
954
- private isPinching;
955
- private lastTouchX;
956
- private lastTouchY;
957
- private lastTouchDistance;
958
- private size;
959
- private speed;
960
- private readonly pos;
961
- private readonly target;
962
- private readonly pointer;
963
- private scale;
964
- constructor(destroyRef: DestroyRef);
965
- ngOnInit(): void;
966
- ngAfterViewInit(): void;
967
- private setPosition;
968
- static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupImageDirective, never>;
969
- static ɵdir: i0.ɵɵDirectiveDeclaration<UiPopupImageDirective, "app-ui-popup-image", never, { "src": { "alias": "src"; "required": true; }; "width": { "alias": "width"; "required": true; }; "height": { "alias": "height"; "required": true; }; }, {}, never, never, true, never>;
970
- }
971
-
972
- declare class UiPopupBackdropDirective implements OnInit {
973
- private readonly elementRef;
974
- private readonly uiPopupService;
975
- private readonly destroyRef;
976
- isStaticBackdrop: boolean;
977
- constructor(elementRef: ElementRef, uiPopupService: UiPopupService, destroyRef: DestroyRef);
978
- ngOnInit(): void;
979
- static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupBackdropDirective, never>;
980
- static ɵdir: i0.ɵɵDirectiveDeclaration<UiPopupBackdropDirective, "app-ui-popup-backdrop", never, { "isStaticBackdrop": { "alias": "isStaticBackdrop"; "required": false; }; }, {}, never, never, true, never>;
981
- }
982
-
983
993
  type ButtonColor = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'success' | 'warning' | 'info' | 'danger';
984
994
  type SizeBehavior = 'block' | 'padding';
985
995
  type ButtonSizes = 'large' | 'medium' | 'small';
@@ -1250,4 +1260,4 @@ declare class UiTimeDropdownDirective {
1250
1260
  }
1251
1261
 
1252
1262
  export { Alert, AlertType, AppIconsLibrary, CalendarUtils, CenterEllipsisPipe, ContainerSizeDirective, CountryService, DateUtils, EMAIL, FocusDirective, HAS_CAPITAL_CASE, HAS_NUMBER, HAS_SMALL_CASE, HAS_SPECIAL_CHARTERS, HoverTipDirective, IconComponent, LazyImgDirective, MIN_LENGTH, MaskGradientDirective, RouterBehavior, SkeletonDirective, StableScrollDirective, StickyObserverDirective, ThemeService, TrackLifecycleDirective, UIInputDateDirective, UIPhoneNumberDirective, UiAccordionComponent, UiAlertMessagesOverlayService, UiAlertMessagesService, UiAvatarDirective, UiButtonDirective, UiCalendarDropdownDirective, UiCodeDirective, UiCopyButtonDirective, UiDailyCalendarDirective, UiDropdownContainerDirective, UiDropdownService, UiFieldBaseDirective, UiImageDirective, UiInputCheckboxDirective, UiInputCountryDirective, UiInputDirective, UiInputSelectDirective, UiInputSequenceDirective, UiInputTimeDirective, UiMonthlyCalendarDirective, UiPaginationDirective, UiPopupBackdropDirective, UiPopupBackdropService, UiPopupContainerDirective, UiPopupImageDirective, UiPopupInstance, UiPopupService, UiSelectButtonsDirective, UiTabsDirective, UiTimeDropdownDirective, UiValidationErrorsDirective, UiYearlyCalendarDirective, createNavigation, createUrl, createUrlTree, emptyCountry, extractParam, getAspectRatioFit, isBrowser, navigateByUrl, stringToColorGradient, stringToHslColor };
1253
- 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 };
1263
+ export type { AlertParams, AppIcon, AppIconName, ButtonColor, CalendarDay, CalendarMonthItem, CalendarYearItem, CheckboxStyles, CountryData, DropdownItem, DropdownParameters, DropdownPosition, GenerateDaysOptions, GeneratePeriodOptions, InputSelectData, NavigationEvent, OverflowMode, ParsedRoutes, RawSVG, RouteDefinition, TabsAlignment, UiPopupAnimation, UiPopupOptions, UiPopupParameters, UiSelectButton, UiSelectButtonAlignment, UiTab, ValidationErrorsType, paramExtractor };