@ibragim-dev-org/ui-forge-library 1.2.5 → 1.2.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
@@ -4,7 +4,7 @@
4
4
  "access": "public",
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
7
- "version": "1.2.5",
7
+ "version": "1.2.7",
8
8
  "peerDependencies": {
9
9
  "@angular/common": "^21.1.0",
10
10
  "@angular/core": "^21.1.0"
@@ -1,10 +1,11 @@
1
+ import { Location } from '@angular/common';
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
+ import { Observable, BehaviorSubject, Subject } from 'rxjs';
1
4
  import * as i0 from '@angular/core';
2
5
  import { InputSignal, ElementRef, OnInit, OnDestroy, EventEmitter, AfterViewInit, DestroyRef, Renderer2, OnChanges, DoCheck, AfterContentInit, AfterContentChecked, AfterViewChecked, SimpleChanges, PipeTransform, WritableSignal, ModelSignal, Signal, OutputEmitterRef, Injector, Type, TemplateRef } from '@angular/core';
3
6
  import { DomSanitizer } from '@angular/platform-browser';
4
- import { NavigationStart, NavigationEnd, NavigationCancel, NavigationError, RoutesRecognized, GuardsCheckStart, GuardsCheckEnd, RouteConfigLoadStart, RouteConfigLoadEnd, ChildActivationStart, ChildActivationEnd, ActivationStart, ActivationEnd, Scroll, ResolveStart, ResolveEnd, NavigationSkipped, Router } from '@angular/router';
5
7
  import { ComponentType, Overlay, OverlayRef } from '@angular/cdk/overlay';
6
8
  import { ComponentType as ComponentType$1 } from '@angular/cdk/portal';
7
- import { BehaviorSubject, Observable, Subject } from 'rxjs';
8
9
  import { WithOptionalField, ValidationError, FormValueControl, FormCheckboxControl, FieldTree } from '@angular/forms/signals';
9
10
 
10
11
  declare class DateUtils {
@@ -14,6 +15,63 @@ declare class DateUtils {
14
15
  static setMonthSafe(date: Date, month: number): Date;
15
16
  }
16
17
 
18
+ type LocalizedString = {
19
+ key: string;
20
+ };
21
+ interface SeoMeta {
22
+ title?: LocalizedString | string;
23
+ description?: LocalizedString | string;
24
+ imageAlt?: LocalizedString | string;
25
+ image?: string;
26
+ canonicalPath?: string;
27
+ updatedAt?: string;
28
+ imageSize?: [string, string];
29
+ schemaJson?: Record<string, unknown>;
30
+ }
31
+ interface BaseRouteData<SID = string> {
32
+ seo?: Omit<SeoMeta, 'title' | 'description'>;
33
+ }
34
+ type RouteParams<F extends (...args: unknown[]) => string> = (...args: Parameters<F>) => string;
35
+ type RouteDefinition = (...args: any[]) => string;
36
+ interface Routes {
37
+ [key: string]: RouteDefinition;
38
+ }
39
+ type ParsedRoutes<T extends Routes> = {
40
+ [key in keyof T]: RouteParams<T[key]>;
41
+ };
42
+ declare class RouterBehavior {
43
+ static router: Router;
44
+ static previousUrl: string;
45
+ static navigationState: {
46
+ [k: string]: unknown;
47
+ };
48
+ private static routeDataSubj;
49
+ private static trigger?;
50
+ private static location;
51
+ static get routeData(): BaseRouteData;
52
+ static get navigationTrigger(): 'imperative' | 'popstate' | 'hashchange' | undefined;
53
+ static get isImperative(): boolean;
54
+ static setup(router: Router, location: Location): void;
55
+ static onNavEnd(cb: () => void): void;
56
+ static onNavEndInfinity(cb: () => void): void;
57
+ static getRouteDataChanges<T = BaseRouteData>(): Observable<T>;
58
+ static clearQueryParam(currentParams: Params | string, removeKey: string): void;
59
+ static queryStringToObject(url: string): Params;
60
+ private static observeEvents;
61
+ }
62
+ /** Create UrlTree from string, same as default but use string instead string[] */
63
+ declare function createUrlTree(url: string, extras?: UrlCreationOptions): UrlTree;
64
+ /**
65
+ * Navigate by string url using NavigationExtras,
66
+ * because Router allows only NavigationBehaviorOptions at navigateByUrl()
67
+ */
68
+ declare function navigateByUrl(url: string, extras?: NavigationExtras, removeOutlet?: string): Promise<boolean>;
69
+ declare function createUrl(url: string, moduleRoot?: string): string;
70
+ declare function createNavigation<T extends Routes, R = ParsedRoutes<T>>(from: T, moduleRoot?: string, overrides?: Partial<ParsedRoutes<T>>): R;
71
+ type paramExtractor<T> = (key: keyof T) => any;
72
+ type NoInfer<T> = [T][T extends any ? 0 : never];
73
+ declare const extractParam: <T>(key: keyof NoInfer<T>) => any;
74
+
17
75
  declare class AutoFocusDirective {
18
76
  private el;
19
77
  $shouldFocus: InputSignal<boolean>;
@@ -264,11 +322,15 @@ declare class UiAlertMessagesService {
264
322
  readonly $alerts: WritableSignal<Alert[]>;
265
323
  private overlayRef?;
266
324
  private component;
325
+ private timerSubscriptions;
326
+ private timerState;
267
327
  constructor(overlay: Overlay, router: Router);
268
328
  success(params: AlertParams): void;
269
329
  error(params: AlertParams): void;
270
330
  information(params: AlertParams): void;
271
331
  warning(params: AlertParams): void;
332
+ pauseTimer(alert: Alert): void;
333
+ resumeTimer(alert: Alert): void;
272
334
  remove(alert: Alert): void;
273
335
  removeAll(): void;
274
336
  init(component: ComponentType$1<unknown>): void;
@@ -1050,5 +1112,5 @@ declare class UiTimeDropdownDirective {
1050
1112
  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
1113
  }
1052
1114
 
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 };
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 };
1115
+ 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, 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 };
1116
+ 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 };