@ibragim-dev-org/ui-forge-library 1.4.2 → 1.4.4

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.2",
7
+ "version": "1.4.4",
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';
@@ -256,6 +256,44 @@ declare class ContainerSizeDirective implements AfterViewInit, OnDestroy {
256
256
  static ɵdir: i0.ɵɵDirectiveDeclaration<ContainerSizeDirective, "[containerSize]", never, {}, { "sizeChange": "sizeChange"; }, never, never, true, never>;
257
257
  }
258
258
 
259
+ declare class StableScrollDirective implements AfterViewInit, OnDestroy {
260
+ private el;
261
+ private readonly platformId;
262
+ private readonly isBrowser;
263
+ private destroy$;
264
+ private scrolling$;
265
+ private _isScrolling;
266
+ private mutationObserver?;
267
+ private restoreFrameId;
268
+ private restoreMicrotaskPending;
269
+ $topThreshold: i0.InputSignal<number>;
270
+ $bottomThreshold: i0.InputSignal<number>;
271
+ reachedTop: i0.OutputEmitterRef<void>;
272
+ reachedBottom: i0.OutputEmitterRef<void>;
273
+ private anchorSnapshot;
274
+ private lastScrollTop;
275
+ private scrollingUp;
276
+ private scrollingDown;
277
+ constructor(elRef: ElementRef<HTMLElement>);
278
+ get scrolling(): boolean;
279
+ ngAfterViewInit(): void;
280
+ ngOnDestroy(): void;
281
+ /** Call BEFORE data changes */
282
+ captureBeforeChange(): void;
283
+ /** Call AFTER render */
284
+ restoreScrollPosition(): void;
285
+ private checkThresholds;
286
+ private observeContentChanges;
287
+ private scheduleRestore;
288
+ private restoreFromSnapshot;
289
+ private scheduleAnimationFrameRestore;
290
+ private refreshAnchorSnapshot;
291
+ private resolveAnchorElement;
292
+ private resolveAnchorCandidates;
293
+ static ɵfac: i0.ɵɵFactoryDeclaration<StableScrollDirective, never>;
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>;
295
+ }
296
+
259
297
  declare class CenterEllipsisPipe implements PipeTransform {
260
298
  transform(value: string, visibleStart?: number, visibleEnd?: number): string;
261
299
  static ɵfac: i0.ɵɵFactoryDeclaration<CenterEllipsisPipe, never>;
@@ -596,6 +634,7 @@ declare class UiPopupInstance {
596
634
  width: number;
597
635
  readonly animationOrigin$: BehaviorSubject<string>;
598
636
  readonly options: PopupAnimationOptions;
637
+ readonly triggerPulse$: Subject<void>;
599
638
  private readonly closed;
600
639
  private readonly shouldClose;
601
640
  private isClosing;
@@ -639,37 +678,23 @@ interface PopupParameters {
639
678
  isClosePrevious: boolean;
640
679
  width: number;
641
680
  }
642
- declare class UiPopupService {
643
- protected overlay: Overlay;
644
- protected injector: Injector;
645
- protected destroyRef: DestroyRef;
646
- protected router: Router;
647
- protected backdropService: UiPopupBackdropService;
681
+ declare abstract class UiModal {
682
+ protected readonly overlay: Overlay;
683
+ protected readonly injector: Injector;
684
+ protected readonly destroyRef: DestroyRef;
685
+ protected readonly router: Router;
686
+ protected readonly backdropService: UiPopupBackdropService;
648
687
  popupInstances: UiPopupInstance[];
649
- private backdropRef?;
650
- private backdropPortalRef?;
688
+ protected backdropRef?: OverlayRef;
689
+ protected backdropPortalRef?: ComponentRef<ComponentType<unknown>>;
651
690
  protected readonly destroyDownloading$: Subject<void>;
652
691
  protected readonly destroyOutsideClickSubscription$: Subject<void>;
653
692
  constructor(overlay: Overlay, injector: Injector, destroyRef: DestroyRef, router: Router, backdropService: UiPopupBackdropService);
654
- /**
655
- * Opens a popup with the specified component and options.
656
- *
657
- * @param component - The component to be displayed in the popup.
658
- * @param options - Configuration options for the popup, including inputs.
659
- * @param id - A unique identifier for the popup instance.
660
- * @param parameters - (Optional) Configuration options for the popup.
661
- */
662
- open<TComponent>(component: Type<TComponent>, options: UiPopupOptions<TComponent>, id: string, parameters: Partial<PopupParameters>): void;
663
- /**
664
- * Opens a popup that scales from the provided origin element to the centered popup size.
665
- * Useful for image-preview transitions where the source element animates into the popup.
666
- */
667
- openScaledFromElement<TComponent>(component: Type<TComponent>, options: UiPopupOptions<TComponent>, id: string, originElement: HTMLElement, sourceWidth: number, sourceHeight: number, parameters?: Partial<PopupParameters>): void;
668
693
  /**
669
694
  * Closes the last opened popup.
670
695
  */
671
696
  close(): void;
672
- private closePrevious;
697
+ closePrevious(): void;
673
698
  /**
674
699
  * Closes a popup by its index in the popupInstances array.
675
700
  *
@@ -709,16 +734,13 @@ declare class UiPopupService {
709
734
  * @param parameters - Partial configuration options for the popup.
710
735
  * @returns A complete set of popup parameters with default values applied.
711
736
  */
712
- private fetchPopupParameters;
713
- private createScaleAnimationOptionsFromElement;
714
- static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupService, never>;
715
- static ɵprov: i0.ɵɵInjectableDeclaration<UiPopupService>;
737
+ private fetchParameters;
716
738
  }
717
739
 
718
740
  declare abstract class UiPopupContainerDirective implements OnInit {
719
741
  protected popupInstance: UiPopupInstance;
720
742
  protected destroyRef: DestroyRef;
721
- protected popupService: UiPopupService;
743
+ protected popupService: UiModal;
722
744
  protected elementRef: ElementRef<HTMLElement>;
723
745
  protected readonly $isShow: WritableSignal<boolean>;
724
746
  protected readonly $pulseTrigger: WritableSignal<boolean>;
@@ -729,7 +751,7 @@ declare abstract class UiPopupContainerDirective implements OnInit {
729
751
  protected readonly $iconClose: ModelSignal<AppIcon | undefined>;
730
752
  protected readonly $animationParams: WritableSignal<UiPopupAnimation>;
731
753
  protected readonly destroyAnimationOrigin$: Subject<void>;
732
- constructor(popupInstance: UiPopupInstance, destroyRef: DestroyRef, popupService: UiPopupService, elementRef: ElementRef<HTMLElement>);
754
+ constructor(popupInstance: UiPopupInstance, destroyRef: DestroyRef, popupService: UiModal, elementRef: ElementRef<HTMLElement>);
733
755
  ngOnInit(): void;
734
756
  protected close(): void;
735
757
  protected onAnimationDone(): void;
@@ -754,12 +776,78 @@ interface DropdownItem {
754
776
  func?: () => void;
755
777
  }
756
778
 
757
- declare class UiDropdownService extends UiPopupService {
779
+ declare abstract class UiPopupImageDirective implements OnInit, AfterViewInit {
780
+ private destroyRef;
781
+ readonly src: string;
782
+ readonly width: number;
783
+ readonly height: number;
784
+ protected readonly $imageWidth: i0.WritableSignal<number>;
785
+ protected readonly $imageHeight: i0.WritableSignal<number>;
786
+ protected readonly $imageStyleTransform: i0.WritableSignal<string>;
787
+ protected readonly $container: i0.Signal<ElementRef<HTMLDivElement> | undefined>;
788
+ protected readonly $image: i0.Signal<ElementRef<HTMLDivElement> | undefined>;
789
+ protected readonly $cursor: i0.WritableSignal<string>;
790
+ private isDragging;
791
+ private isTouchDragging;
792
+ private isPinching;
793
+ private lastTouchX;
794
+ private lastTouchY;
795
+ private lastTouchDistance;
796
+ private size;
797
+ private speed;
798
+ private readonly pos;
799
+ private readonly target;
800
+ private readonly pointer;
801
+ private scale;
802
+ constructor(destroyRef: DestroyRef);
803
+ ngOnInit(): void;
804
+ ngAfterViewInit(): void;
805
+ private setPosition;
806
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupImageDirective, never>;
807
+ 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>;
808
+ }
809
+
810
+ declare class UiPopupService extends UiModal {
811
+ constructor(overlay: Overlay, injector: Injector, destroyRef: DestroyRef, router: Router, backdropService: UiPopupBackdropService);
812
+ /**
813
+ * Opens a popup with the specified component and options.
814
+ *
815
+ * @param component - The component to be displayed in the popup.
816
+ * @param options - Configuration options for the popup, including inputs.
817
+ * @param id - A unique identifier for the popup instance.
818
+ * @param parameters - (Optional) Configuration options for the popup.
819
+ */
820
+ open<TComponent>(component: Type<TComponent>, options: UiPopupOptions<TComponent>, id: string, parameters: Partial<PopupParameters>): void;
821
+ closePrevious(isClosePrevious?: boolean): void;
822
+ /**
823
+ * Opens a popup that scales from the provided origin element to the centered popup size.
824
+ * Useful for image-preview transitions where the source element animates into the popup.
825
+ */
826
+ openScaledFromElement<TComponent>(component: Type<TComponent>, options: UiPopupOptions<TComponent>, id: string, originElement: HTMLElement, sourceWidth: number, sourceHeight: number, parameters?: Partial<PopupParameters>): void;
827
+ private createScaleAnimationOptionsFromElement;
828
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupService, never>;
829
+ static ɵprov: i0.ɵɵInjectableDeclaration<UiPopupService>;
830
+ }
831
+
832
+ declare class UiPopupBackdropDirective implements OnInit {
833
+ private readonly elementRef;
834
+ private readonly uiPopupService;
835
+ private readonly destroyRef;
836
+ isStaticBackdrop: boolean;
837
+ clicked: () => void;
838
+ constructor(elementRef: ElementRef, uiPopupService: UiPopupService, destroyRef: DestroyRef);
839
+ ngOnInit(): void;
840
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupBackdropDirective, never>;
841
+ static ɵdir: i0.ɵɵDirectiveDeclaration<UiPopupBackdropDirective, "app-ui-popup-backdrop", never, { "isStaticBackdrop": { "alias": "isStaticBackdrop"; "required": false; }; "clicked": { "alias": "clicked"; "required": false; }; }, {}, never, never, true, never>;
842
+ }
843
+
844
+ declare class UiDropdownService extends UiModal {
758
845
  containerSize$: BehaviorSubject<{
759
846
  width: number;
760
847
  height: number;
761
848
  }>;
762
849
  private connectedPositions;
850
+ constructor(overlay: Overlay, injector: Injector, destroyRef: DestroyRef, router: Router, backdropService: UiPopupBackdropService);
763
851
  /**
764
852
  * Opens a tooltip (tip) component attached to a specific HTML element.
765
853
  * The tooltip displays text content with customizable position and offset.
@@ -900,48 +988,6 @@ declare abstract class UiPaginationDirective {
900
988
  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>;
901
989
  }
902
990
 
903
- declare abstract class UiPopupImageDirective implements OnInit, AfterViewInit {
904
- private destroyRef;
905
- readonly src: string;
906
- readonly width: number;
907
- readonly height: number;
908
- protected readonly $imageWidth: i0.WritableSignal<number>;
909
- protected readonly $imageHeight: i0.WritableSignal<number>;
910
- protected readonly $imageStyleTransform: i0.WritableSignal<string>;
911
- protected readonly $container: i0.Signal<ElementRef<HTMLDivElement> | undefined>;
912
- protected readonly $image: i0.Signal<ElementRef<HTMLDivElement> | undefined>;
913
- protected readonly $cursor: i0.WritableSignal<string>;
914
- private isDragging;
915
- private isTouchDragging;
916
- private isPinching;
917
- private lastTouchX;
918
- private lastTouchY;
919
- private lastTouchDistance;
920
- private size;
921
- private speed;
922
- private readonly pos;
923
- private readonly target;
924
- private readonly pointer;
925
- private scale;
926
- constructor(destroyRef: DestroyRef);
927
- ngOnInit(): void;
928
- ngAfterViewInit(): void;
929
- private setPosition;
930
- static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupImageDirective, never>;
931
- 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>;
932
- }
933
-
934
- declare class UiPopupBackdropDirective implements OnInit {
935
- private readonly elementRef;
936
- private readonly uiPopupService;
937
- private readonly destroyRef;
938
- isStaticBackdrop: boolean;
939
- constructor(elementRef: ElementRef, uiPopupService: UiPopupService, destroyRef: DestroyRef);
940
- ngOnInit(): void;
941
- static ɵfac: i0.ɵɵFactoryDeclaration<UiPopupBackdropDirective, never>;
942
- static ɵdir: i0.ɵɵDirectiveDeclaration<UiPopupBackdropDirective, "app-ui-popup-backdrop", never, { "isStaticBackdrop": { "alias": "isStaticBackdrop"; "required": false; }; }, {}, never, never, true, never>;
943
- }
944
-
945
991
  type ButtonColor = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'success' | 'warning' | 'info' | 'danger';
946
992
  type SizeBehavior = 'block' | 'padding';
947
993
  type ButtonSizes = 'large' | 'medium' | 'small';
@@ -1211,5 +1257,5 @@ declare class UiTimeDropdownDirective {
1211
1257
  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>;
1212
1258
  }
1213
1259
 
1214
- 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, 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 };
1260
+ 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 };
1215
1261
  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 };