@ibragim-dev-org/ui-forge-library 1.4.35 → 1.4.51

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.35",
7
+ "version": "1.4.51",
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';
@@ -258,16 +258,22 @@ declare class ContainerSizeDirective implements AfterViewInit, OnDestroy {
258
258
 
259
259
  declare class StableScrollDirective implements AfterViewInit, OnDestroy {
260
260
  private el;
261
- private resizeObserver;
261
+ private readonly platformId;
262
+ private readonly isBrowser;
262
263
  private destroy$;
263
264
  private scrolling$;
264
265
  private _isScrolling;
266
+ private mutationObserver?;
267
+ private restoreFrameId;
268
+ private restoreMicrotaskPending;
265
269
  $topThreshold: i0.InputSignal<number>;
266
270
  $bottomThreshold: i0.InputSignal<number>;
267
271
  reachedTop: i0.OutputEmitterRef<void>;
268
272
  reachedBottom: i0.OutputEmitterRef<void>;
269
- private anchorElement;
270
- private anchorOffset;
273
+ private anchorSnapshot;
274
+ private lastScrollTop;
275
+ private scrollingUp;
276
+ private scrollingDown;
271
277
  constructor(elRef: ElementRef<HTMLElement>);
272
278
  get scrolling(): boolean;
273
279
  ngAfterViewInit(): void;
@@ -277,8 +283,13 @@ declare class StableScrollDirective implements AfterViewInit, OnDestroy {
277
283
  /** Call AFTER render */
278
284
  restoreScrollPosition(): void;
279
285
  private checkThresholds;
280
- private captureAnchor;
281
- private restoreAnchor;
286
+ private observeContentChanges;
287
+ private scheduleRestore;
288
+ private restoreFromSnapshot;
289
+ private scheduleAnimationFrameRestore;
290
+ private refreshAnchorSnapshot;
291
+ private resolveAnchorElement;
292
+ private resolveAnchorCandidates;
282
293
  static ɵfac: i0.ɵɵFactoryDeclaration<StableScrollDirective, never>;
283
294
  static ɵdir: i0.ɵɵDirectiveDeclaration<StableScrollDirective, "[stableScroll]", never, { "$topThreshold": { "alias": "$topThreshold"; "required": false; "isSignal": true; }; "$bottomThreshold": { "alias": "$bottomThreshold"; "required": false; "isSignal": true; }; }, { "reachedTop": "reachedTop"; "reachedBottom": "reachedBottom"; }, never, never, true, never>;
284
295
  }
@@ -603,35 +614,13 @@ declare abstract class UiCodeDirective {
603
614
  readonly $code: InputSignal<string>;
604
615
  protected readonly $language: WritableSignal<string>;
605
616
  protected readonly $highlightedArray: WritableSignal<Highlighted[]>;
617
+ protected readonly $codeToCopy: Signal<string>;
606
618
  constructor();
607
619
  private highlightCode;
608
620
  static ɵfac: i0.ɵɵFactoryDeclaration<UiCodeDirective, never>;
609
621
  static ɵdir: i0.ɵɵDirectiveDeclaration<UiCodeDirective, "app-ui-code", never, { "$code": { "alias": "$code"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
610
622
  }
611
623
 
612
- interface PopupAnimationOptions {
613
- positionX: number;
614
- positionY: number;
615
- startTransition: string;
616
- endTransition: string;
617
- }
618
- declare class UiPopupInstance {
619
- private readonly overlayRef;
620
- private readonly destroyRef;
621
- private readonly onClose;
622
- id: string;
623
- width: number;
624
- readonly animationOrigin$: BehaviorSubject<string>;
625
- readonly options: PopupAnimationOptions;
626
- private readonly closed;
627
- private readonly shouldClose;
628
- private isClosing;
629
- constructor(overlayRef: OverlayRef, destroyRef: DestroyRef, onClose?: () => void, options?: PopupAnimationOptions);
630
- close(): void;
631
- detach(): void;
632
- onShouldClose(): Observable<void>;
633
- }
634
-
635
624
  interface UiPopupAnimation {
636
625
  startOrigin: string;
637
626
  endOrigin: string;
@@ -652,6 +641,25 @@ interface UiPopupOptions<TComponent> {
652
641
  };
653
642
  }
654
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
+
655
663
  declare class UiPopupBackdropService {
656
664
  readonly tipContainerPortal?: ComponentPortal<unknown>;
657
665
  readonly backdropPortal: ComponentPortal<any>;
@@ -661,44 +669,29 @@ declare class UiPopupBackdropService {
661
669
  }
662
670
 
663
671
  interface PopupParameters {
664
- animationOptions: PopupAnimationOptions;
672
+ animationOptions: UiPopupAnimation;
665
673
  isStaticBackdrop: boolean;
666
674
  isClosePrevious: boolean;
667
675
  width: number;
668
676
  }
669
- declare class UiPopupService {
670
- protected overlay: Overlay;
671
- protected injector: Injector;
672
- protected destroyRef: DestroyRef;
673
- protected router: Router;
674
- protected backdropService: UiPopupBackdropService;
675
- popupInstances: UiPopupInstance[];
676
- private backdropRef?;
677
- 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>>;
678
686
  protected readonly destroyDownloading$: Subject<void>;
679
687
  protected readonly destroyOutsideClickSubscription$: Subject<void>;
680
688
  constructor(overlay: Overlay, injector: Injector, destroyRef: DestroyRef, router: Router, backdropService: UiPopupBackdropService);
681
- /**
682
- * Opens a popup with the specified component and options.
683
- *
684
- * @param component - The component to be displayed in the popup.
685
- * @param options - Configuration options for the popup, including inputs.
686
- * @param id - A unique identifier for the popup instance.
687
- * @param parameters - (Optional) Configuration options for the popup.
688
- */
689
- open<TComponent>(component: Type<TComponent>, options: UiPopupOptions<TComponent>, id: string, parameters: Partial<PopupParameters>): void;
690
- /**
691
- * Opens a popup that scales from the provided origin element to the centered popup size.
692
- * Useful for image-preview transitions where the source element animates into the popup.
693
- */
694
- openScaledFromElement<TComponent>(component: Type<TComponent>, options: UiPopupOptions<TComponent>, id: string, originElement: HTMLElement, sourceWidth: number, sourceHeight: number, parameters?: Partial<PopupParameters>): void;
695
689
  /**
696
690
  * Closes the last opened popup.
697
691
  */
698
692
  close(): void;
699
- private closePrevious;
700
693
  /**
701
- * Closes a popup by its index in the popupInstances array.
694
+ * Closes a popup by its index in the instances array.
702
695
  *
703
696
  * @param index - The index of the popup to close.
704
697
  */
@@ -736,19 +729,17 @@ declare class UiPopupService {
736
729
  * @param parameters - Partial configuration options for the popup.
737
730
  * @returns A complete set of popup parameters with default values applied.
738
731
  */
739
- private fetchPopupParameters;
740
- private createScaleAnimationOptionsFromElement;
741
- static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupService, never>;
742
- static ɵprov: i0.ɵɵInjectableDeclaration<UiPopupService>;
732
+ private fetchParameters;
743
733
  }
744
734
 
745
735
  declare abstract class UiPopupContainerDirective implements OnInit {
746
736
  protected popupInstance: UiPopupInstance;
747
737
  protected destroyRef: DestroyRef;
748
- protected popupService: UiPopupService;
738
+ protected popupService: UiModal;
749
739
  protected elementRef: ElementRef<HTMLElement>;
750
740
  protected readonly $isShow: WritableSignal<boolean>;
751
741
  protected readonly $pulseTrigger: WritableSignal<boolean>;
742
+ protected readonly $isHide: WritableSignal<boolean>;
752
743
  readonly $overflowHidden: InputSignal<boolean>;
753
744
  readonly $shouldClose: ModelSignal<boolean>;
754
745
  readonly $hasCloseButton: InputSignal<boolean>;
@@ -756,7 +747,7 @@ declare abstract class UiPopupContainerDirective implements OnInit {
756
747
  protected readonly $iconClose: ModelSignal<AppIcon | undefined>;
757
748
  protected readonly $animationParams: WritableSignal<UiPopupAnimation>;
758
749
  protected readonly destroyAnimationOrigin$: Subject<void>;
759
- constructor(popupInstance: UiPopupInstance, destroyRef: DestroyRef, popupService: UiPopupService, elementRef: ElementRef<HTMLElement>);
750
+ constructor(popupInstance: UiPopupInstance, destroyRef: DestroyRef, popupService: UiModal, elementRef: ElementRef<HTMLElement>);
760
751
  ngOnInit(): void;
761
752
  protected close(): void;
762
753
  protected onAnimationDone(): void;
@@ -781,12 +772,84 @@ interface DropdownItem {
781
772
  func?: () => void;
782
773
  }
783
774
 
784
- 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 {
785
847
  containerSize$: BehaviorSubject<{
786
848
  width: number;
787
849
  height: number;
788
850
  }>;
789
851
  private connectedPositions;
852
+ constructor(overlay: Overlay, injector: Injector, destroyRef: DestroyRef, router: Router, backdropService: UiPopupBackdropService);
790
853
  /**
791
854
  * Opens a tooltip (tip) component attached to a specific HTML element.
792
855
  * The tooltip displays text content with customizable position and offset.
@@ -927,48 +990,6 @@ declare abstract class UiPaginationDirective {
927
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>;
928
991
  }
929
992
 
930
- declare abstract class UiPopupImageDirective implements OnInit, AfterViewInit {
931
- private destroyRef;
932
- readonly src: string;
933
- readonly width: number;
934
- readonly height: number;
935
- protected readonly $imageWidth: i0.WritableSignal<number>;
936
- protected readonly $imageHeight: i0.WritableSignal<number>;
937
- protected readonly $imageStyleTransform: i0.WritableSignal<string>;
938
- protected readonly $container: i0.Signal<ElementRef<HTMLDivElement> | undefined>;
939
- protected readonly $image: i0.Signal<ElementRef<HTMLDivElement> | undefined>;
940
- protected readonly $cursor: i0.WritableSignal<string>;
941
- private isDragging;
942
- private isTouchDragging;
943
- private isPinching;
944
- private lastTouchX;
945
- private lastTouchY;
946
- private lastTouchDistance;
947
- private size;
948
- private speed;
949
- private readonly pos;
950
- private readonly target;
951
- private readonly pointer;
952
- private scale;
953
- constructor(destroyRef: DestroyRef);
954
- ngOnInit(): void;
955
- ngAfterViewInit(): void;
956
- private setPosition;
957
- static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupImageDirective, never>;
958
- 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>;
959
- }
960
-
961
- declare class UiPopupBackdropDirective implements OnInit {
962
- private readonly elementRef;
963
- private readonly uiPopupService;
964
- private readonly destroyRef;
965
- isStaticBackdrop: boolean;
966
- constructor(elementRef: ElementRef, uiPopupService: UiPopupService, destroyRef: DestroyRef);
967
- ngOnInit(): void;
968
- static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupBackdropDirective, never>;
969
- static ɵdir: i0.ɵɵDirectiveDeclaration<UiPopupBackdropDirective, "app-ui-popup-backdrop", never, { "isStaticBackdrop": { "alias": "isStaticBackdrop"; "required": false; }; }, {}, never, never, true, never>;
970
- }
971
-
972
993
  type ButtonColor = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'success' | 'warning' | 'info' | 'danger';
973
994
  type SizeBehavior = 'block' | 'padding';
974
995
  type ButtonSizes = 'large' | 'medium' | 'small';
@@ -1239,4 +1260,4 @@ declare class UiTimeDropdownDirective {
1239
1260
  }
1240
1261
 
1241
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 };
1242
- 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 };