@ibragim-dev-org/ui-forge-library 1.3.0 → 1.3.2
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.
|
@@ -2,7 +2,7 @@ import * as i2$1 from '@angular/router';
|
|
|
2
2
|
import { NavigationEnd, NavigationStart, ActivationEnd } from '@angular/router';
|
|
3
3
|
import { BehaviorSubject, filter, take, fromEvent, tap, debounceTime, asyncScheduler, Subscription, timer, switchMap, scheduled, interval, takeWhile, finalize, Subject, takeUntil } from 'rxjs';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { input, effect, Directive, Injectable, EventEmitter, Output, Input, PLATFORM_ID, Inject, Pipe, Attribute, ChangeDetectionStrategy, Component, signal, model, computed, viewChild, untracked,
|
|
5
|
+
import { input, effect, Directive, Injectable, EventEmitter, Output, Input, PLATFORM_ID, Inject, output, Pipe, Attribute, ChangeDetectionStrategy, Component, signal, model, computed, viewChild, untracked, Injector, afterRenderEffect, contentChildren, contentChild, ViewChildren } from '@angular/core';
|
|
6
6
|
import { isPlatformBrowser, DOCUMENT, NgStyle } from '@angular/common';
|
|
7
7
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
8
|
import * as i2 from '@angular/platform-browser';
|
|
@@ -543,6 +543,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
543
543
|
}]
|
|
544
544
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { $isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "appSkeleton", required: true }] }], $lightColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "$lightColor", required: true }] }], $darkColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "$darkColor", required: true }] }] } });
|
|
545
545
|
|
|
546
|
+
class ContainerSizeDirective {
|
|
547
|
+
el;
|
|
548
|
+
platformId;
|
|
549
|
+
sizeChange = output();
|
|
550
|
+
resizeObserver;
|
|
551
|
+
constructor(el, platformId) {
|
|
552
|
+
this.el = el;
|
|
553
|
+
this.platformId = platformId;
|
|
554
|
+
}
|
|
555
|
+
ngAfterViewInit() {
|
|
556
|
+
this.emitSize();
|
|
557
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
558
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
559
|
+
this.emitSize();
|
|
560
|
+
});
|
|
561
|
+
this.resizeObserver.observe(this.el.nativeElement);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
emitSize() {
|
|
565
|
+
const { offsetWidth, offsetHeight } = this.el.nativeElement;
|
|
566
|
+
this.sizeChange.emit({ width: offsetWidth, height: offsetHeight });
|
|
567
|
+
}
|
|
568
|
+
ngOnDestroy() {
|
|
569
|
+
if (this.resizeObserver) {
|
|
570
|
+
this.resizeObserver.disconnect();
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ContainerSizeDirective, deps: [{ token: i0.ElementRef }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive });
|
|
574
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: ContainerSizeDirective, isStandalone: true, selector: "[containerSize]", outputs: { sizeChange: "sizeChange" }, ngImport: i0 });
|
|
575
|
+
}
|
|
576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ContainerSizeDirective, decorators: [{
|
|
577
|
+
type: Directive,
|
|
578
|
+
args: [{
|
|
579
|
+
selector: '[containerSize]',
|
|
580
|
+
}]
|
|
581
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: Object, decorators: [{
|
|
582
|
+
type: Inject,
|
|
583
|
+
args: [PLATFORM_ID]
|
|
584
|
+
}] }], propDecorators: { sizeChange: [{ type: i0.Output, args: ["sizeChange"] }] } });
|
|
585
|
+
|
|
546
586
|
class CenterEllipsisPipe {
|
|
547
587
|
transform(value, visibleStart = 4, visibleEnd = 4) {
|
|
548
588
|
if (!value) {
|
|
@@ -1027,7 +1067,6 @@ class UiAlertMessagesService {
|
|
|
1027
1067
|
}
|
|
1028
1068
|
}
|
|
1029
1069
|
remove(alert) {
|
|
1030
|
-
// Cancel any active timer for this alert
|
|
1031
1070
|
const subscription = this.timerSubscriptions.get(alert.id);
|
|
1032
1071
|
if (subscription) {
|
|
1033
1072
|
subscription.unsubscribe();
|
|
@@ -1047,6 +1086,12 @@ class UiAlertMessagesService {
|
|
|
1047
1086
|
}))
|
|
1048
1087
|
.subscribe();
|
|
1049
1088
|
}
|
|
1089
|
+
removeById(id) {
|
|
1090
|
+
const alert = this.$alerts().find((x) => x.id === id);
|
|
1091
|
+
if (alert) {
|
|
1092
|
+
this.remove(alert);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1050
1095
|
removeAll() {
|
|
1051
1096
|
this.$alerts.set([]);
|
|
1052
1097
|
timer(250)
|
|
@@ -1078,16 +1123,14 @@ class UiAlertMessagesService {
|
|
|
1078
1123
|
}), take(1))
|
|
1079
1124
|
.subscribe();
|
|
1080
1125
|
this.$alerts.set([...this.$alerts(), alert]);
|
|
1081
|
-
// Create pausable timer with 100ms intervals
|
|
1082
1126
|
this.timerState.set(alert.id, { paused: false, elapsed: 0 });
|
|
1083
|
-
const DURATION = 10000;
|
|
1084
|
-
const CHECK_INTERVAL = 100;
|
|
1127
|
+
const DURATION = 10000;
|
|
1128
|
+
const CHECK_INTERVAL = 100;
|
|
1085
1129
|
const subscription = interval(CHECK_INTERVAL)
|
|
1086
1130
|
.pipe(takeWhile(() => {
|
|
1087
1131
|
const state = this.timerState.get(alert.id);
|
|
1088
1132
|
if (!state)
|
|
1089
1133
|
return false;
|
|
1090
|
-
// Only increment elapsed time if not paused
|
|
1091
1134
|
if (!state.paused) {
|
|
1092
1135
|
state.elapsed += CHECK_INTERVAL;
|
|
1093
1136
|
}
|
|
@@ -4021,5 +4064,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
4021
4064
|
* Generated bundle index. Do not edit.
|
|
4022
4065
|
*/
|
|
4023
4066
|
|
|
4024
|
-
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 };
|
|
4067
|
+
export { Alert, AlertType, AppIconsLibrary, AutoFocusDirective, CenterEllipsisPipe, ContainerSizeDirective, 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 };
|
|
4025
4068
|
//# sourceMappingURL=ibragim-dev-org-ui-forge-library.mjs.map
|