@ibragim-dev-org/ui-forge-library 1.3.9 → 1.4.1
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,15 +2,15 @@ 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 {
|
|
6
|
-
import { isPlatformBrowser, DOCUMENT, NgStyle } from '@angular/common';
|
|
5
|
+
import { model, effect, Directive, Injectable, EventEmitter, Output, Input, input, PLATFORM_ID, Inject, output, Pipe, Attribute, ChangeDetectionStrategy, Component, signal, computed, viewChild, untracked, Injector, afterRenderEffect, contentChildren, contentChild, ViewChildren } from '@angular/core';
|
|
7
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
+
import { isPlatformBrowser, DOCUMENT, NgStyle } from '@angular/common';
|
|
8
8
|
import * as i2 from '@angular/platform-browser';
|
|
9
9
|
import { PhoneNumberUtil, AsYouTypeFormatter } from 'google-libphonenumber';
|
|
10
|
+
import { ulid } from 'ulid';
|
|
10
11
|
import * as i1 from '@angular/cdk/overlay';
|
|
11
12
|
import { OverlayConfig, FlexibleConnectedPositionStrategy } from '@angular/cdk/overlay';
|
|
12
13
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
13
|
-
import { ulid } from 'ulid';
|
|
14
14
|
import { form } from '@angular/forms/signals';
|
|
15
15
|
|
|
16
16
|
class DateUtils {
|
|
@@ -356,26 +356,35 @@ class CalendarUtils {
|
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
class
|
|
359
|
+
class FocusDirective {
|
|
360
360
|
el;
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
destroyRef;
|
|
362
|
+
$focus = model(false, { ...(ngDevMode ? { debugName: "$focus" } : {}), alias: 'appFocus' });
|
|
363
|
+
constructor(el, destroyRef) {
|
|
363
364
|
this.el = el;
|
|
365
|
+
this.destroyRef = destroyRef;
|
|
364
366
|
effect(() => {
|
|
365
|
-
if (this.$
|
|
367
|
+
if (this.$focus()) {
|
|
366
368
|
this.el.nativeElement.focus();
|
|
367
369
|
}
|
|
368
370
|
});
|
|
369
371
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
+
ngAfterViewInit() {
|
|
373
|
+
fromEvent(this.el.nativeElement, 'blur')
|
|
374
|
+
.pipe(tap(() => {
|
|
375
|
+
this.$focus.set(false);
|
|
376
|
+
}), takeUntilDestroyed(this.destroyRef))
|
|
377
|
+
.subscribe();
|
|
378
|
+
}
|
|
379
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: FocusDirective, deps: [{ token: i0.ElementRef }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
380
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: FocusDirective, isStandalone: true, selector: "[appFocus]", inputs: { $focus: { classPropertyName: "$focus", publicName: "appFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { $focus: "appFocusChange" }, ngImport: i0 });
|
|
372
381
|
}
|
|
373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type:
|
|
382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: FocusDirective, decorators: [{
|
|
374
383
|
type: Directive,
|
|
375
384
|
args: [{
|
|
376
|
-
selector: '[
|
|
385
|
+
selector: '[appFocus]',
|
|
377
386
|
}]
|
|
378
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { $
|
|
387
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.DestroyRef }], propDecorators: { $focus: [{ type: i0.Input, args: [{ isSignal: true, alias: "appFocus", required: false }] }, { type: i0.Output, args: ["appFocusChange"] }] } });
|
|
379
388
|
|
|
380
389
|
class LazyImageService {
|
|
381
390
|
observer;
|
|
@@ -786,19 +795,69 @@ function getAspectRatioFit(maxWidth, maxHeight, srcWidth, srcHeight) {
|
|
|
786
795
|
return { width: maxWidth, height: maxHeight };
|
|
787
796
|
}
|
|
788
797
|
|
|
789
|
-
const
|
|
790
|
-
//
|
|
791
|
-
{ solid: '#FF7A7A', gradientStart: '#FF7A7A', gradientEnd: '#D74A59' },
|
|
792
|
-
{ solid: '#
|
|
793
|
-
|
|
794
|
-
{ solid: '#
|
|
795
|
-
|
|
796
|
-
{ solid: '#
|
|
797
|
-
{ solid: '#
|
|
798
|
-
{ solid: '#
|
|
799
|
-
|
|
800
|
-
{ solid: '#
|
|
798
|
+
const COLORS = [
|
|
799
|
+
// Reds
|
|
800
|
+
{ solid: '#FF7A7A', gradientStart: '#FF7A7A', gradientEnd: '#D74A59' },
|
|
801
|
+
{ solid: '#FF6C6C', gradientStart: '#FF6C6C', gradientEnd: '#D64545' },
|
|
802
|
+
// Rose
|
|
803
|
+
{ solid: '#FF6F9A', gradientStart: '#FF6F9A', gradientEnd: '#D94A7A' },
|
|
804
|
+
// Coral / Orange
|
|
805
|
+
{ solid: '#FF9F7A', gradientStart: '#FF9F7A', gradientEnd: '#E56A4F' },
|
|
806
|
+
{ solid: '#FF8C4F', gradientStart: '#FF8C4F', gradientEnd: '#E0672F' },
|
|
807
|
+
{ solid: '#FFB357', gradientStart: '#FFB357', gradientEnd: '#F47D3D' },
|
|
808
|
+
// Yellows
|
|
809
|
+
{ solid: '#FFD86A', gradientStart: '#FFD86A', gradientEnd: '#E6B84A' },
|
|
810
|
+
{ solid: '#E6D24A', gradientStart: '#D4C32A', gradientEnd: '#FFAA55' },
|
|
811
|
+
{ solid: '#F4E25A', gradientStart: '#F4E25A', gradientEnd: '#D6C43A' },
|
|
812
|
+
// Lime
|
|
813
|
+
{ solid: '#A8DF4A', gradientStart: '#A8DF4A', gradientEnd: '#72BD45' },
|
|
814
|
+
{ solid: '#C4E85A', gradientStart: '#C4E85A', gradientEnd: '#9CCB3F' },
|
|
815
|
+
{ solid: '#9EE84F', gradientStart: '#9EE84F', gradientEnd: '#6CC33A' },
|
|
816
|
+
// Greens
|
|
817
|
+
{ solid: '#57D88B', gradientStart: '#57D88B', gradientEnd: '#1FA96E' },
|
|
818
|
+
{ solid: '#4EDB9C', gradientStart: '#4EDB9C', gradientEnd: '#1FAE72' },
|
|
819
|
+
// Mint
|
|
820
|
+
{ solid: '#6FE8A8', gradientStart: '#6FE8A8', gradientEnd: '#3DBE7F' },
|
|
821
|
+
// Aqua / Cyan
|
|
822
|
+
{ solid: '#6FE0F5', gradientStart: '#6FE0F5', gradientEnd: '#2AB6D4' },
|
|
823
|
+
{ solid: '#4ED6E8', gradientStart: '#4ED6E8', gradientEnd: '#1AAAC5' },
|
|
824
|
+
// Light Blue
|
|
825
|
+
{ solid: '#55DAF5', gradientStart: '#55DAF5', gradientEnd: '#1EA9C8' },
|
|
826
|
+
// Blues
|
|
827
|
+
{ solid: '#4F9BFF', gradientStart: '#4F9BFF', gradientEnd: '#1D6DD6' },
|
|
828
|
+
{ solid: '#6AA8FF', gradientStart: '#6AA8FF', gradientEnd: '#3A7BE0' },
|
|
829
|
+
{ solid: '#4A8CFF', gradientStart: '#4A8CFF', gradientEnd: '#1C63D6' },
|
|
830
|
+
// Indigo
|
|
831
|
+
{ solid: '#7D84FF', gradientStart: '#7D84FF', gradientEnd: '#5A60D9' },
|
|
832
|
+
{ solid: '#9A8BFF', gradientStart: '#9A8BFF', gradientEnd: '#6A63D9' },
|
|
833
|
+
{ solid: '#8A7BFF', gradientStart: '#8A7BFF', gradientEnd: '#5C55D9' },
|
|
834
|
+
// Violet / Purple
|
|
835
|
+
{ solid: '#B979FF', gradientStart: '#B979FF', gradientEnd: '#8D57D6' },
|
|
836
|
+
{ solid: '#D28CFF', gradientStart: '#D28CFF', gradientEnd: '#A45AD9' },
|
|
837
|
+
{ solid: '#C77BFF', gradientStart: '#C77BFF', gradientEnd: '#9A52D6' },
|
|
838
|
+
// Pink
|
|
839
|
+
{ solid: '#FF86E4', gradientStart: '#FF64DD', gradientEnd: '#F599C4' },
|
|
840
|
+
{ solid: '#FF9BEF', gradientStart: '#FF9BEF', gradientEnd: '#E56AD4' },
|
|
841
|
+
// Magenta
|
|
842
|
+
{ solid: '#FF7BD9', gradientStart: '#FF7BD9', gradientEnd: '#E054B9' },
|
|
801
843
|
];
|
|
844
|
+
function seededRandom(seed) {
|
|
845
|
+
return () => {
|
|
846
|
+
seed = (seed * 9301 + 49297) % 233280;
|
|
847
|
+
return seed / 233280;
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
function seededShuffle(arr, seed = 1337) {
|
|
851
|
+
const random = seededRandom(seed);
|
|
852
|
+
const copy = [...arr];
|
|
853
|
+
for (let i = copy.length - 1; i > 0; i--) {
|
|
854
|
+
const j = Math.floor(random() * (i + 1));
|
|
855
|
+
[copy[i], copy[j]] = [copy[j], copy[i]];
|
|
856
|
+
}
|
|
857
|
+
return copy;
|
|
858
|
+
}
|
|
859
|
+
// Shuffled palette for this session
|
|
860
|
+
const SHUFFLED_COLORS = seededShuffle(COLORS, 20240612);
|
|
802
861
|
const hashValue = (value) => {
|
|
803
862
|
if (!value || typeof value !== 'string') {
|
|
804
863
|
return 0;
|
|
@@ -812,7 +871,7 @@ const hashValue = (value) => {
|
|
|
812
871
|
};
|
|
813
872
|
const pickColorFamily = (value) => {
|
|
814
873
|
const absHash = hashValue(value);
|
|
815
|
-
return
|
|
874
|
+
return SHUFFLED_COLORS[absHash % SHUFFLED_COLORS.length];
|
|
816
875
|
};
|
|
817
876
|
const hexToRgb = (hex) => {
|
|
818
877
|
const value = hex.replace('#', '');
|
|
@@ -1182,16 +1241,54 @@ class Alert {
|
|
|
1182
1241
|
}
|
|
1183
1242
|
}
|
|
1184
1243
|
|
|
1185
|
-
class
|
|
1244
|
+
class UiAlertMessagesOverlayService {
|
|
1186
1245
|
overlay;
|
|
1246
|
+
component = null;
|
|
1247
|
+
overlayRef;
|
|
1248
|
+
constructor(component, overlay) {
|
|
1249
|
+
this.overlay = overlay;
|
|
1250
|
+
this.init(component);
|
|
1251
|
+
}
|
|
1252
|
+
attachComponent() {
|
|
1253
|
+
if (!this.component) {
|
|
1254
|
+
this.throwIfNotInitialized();
|
|
1255
|
+
return;
|
|
1256
|
+
}
|
|
1257
|
+
const strategy = this.overlay.position().global();
|
|
1258
|
+
const config = new OverlayConfig({
|
|
1259
|
+
positionStrategy: strategy,
|
|
1260
|
+
});
|
|
1261
|
+
this.overlayRef = this.overlay.create(config);
|
|
1262
|
+
this.overlayRef.attach(new ComponentPortal(this.component));
|
|
1263
|
+
}
|
|
1264
|
+
init(component) {
|
|
1265
|
+
this.component = component;
|
|
1266
|
+
}
|
|
1267
|
+
throwIfNotInitialized() {
|
|
1268
|
+
if (!this.component) {
|
|
1269
|
+
throw new Error('[UiAlertMessagesOverlayService] AlertMessagesComponent has not been initialized. ' +
|
|
1270
|
+
'Call `init(AlertMessagesComponent)` during application startup (e.g. in `app.config.ts`) to enable alert rendering.');
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiAlertMessagesOverlayService, deps: [{ token: i0.Type }, { token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1274
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiAlertMessagesOverlayService, providedIn: 'root' });
|
|
1275
|
+
}
|
|
1276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiAlertMessagesOverlayService, decorators: [{
|
|
1277
|
+
type: Injectable,
|
|
1278
|
+
args: [{
|
|
1279
|
+
providedIn: 'root',
|
|
1280
|
+
}]
|
|
1281
|
+
}], ctorParameters: () => [{ type: i0.Type }, { type: i1.Overlay }] });
|
|
1282
|
+
|
|
1283
|
+
class UiAlertMessagesService {
|
|
1284
|
+
uiAlertMessagesOverlayService;
|
|
1187
1285
|
router;
|
|
1188
1286
|
$alerts = signal([], ...(ngDevMode ? [{ debugName: "$alerts" }] : []));
|
|
1189
1287
|
overlayRef;
|
|
1190
|
-
component = null;
|
|
1191
1288
|
timerSubscriptions = new Map();
|
|
1192
1289
|
timerState = new Map();
|
|
1193
|
-
constructor(
|
|
1194
|
-
this.
|
|
1290
|
+
constructor(uiAlertMessagesOverlayService, router) {
|
|
1291
|
+
this.uiAlertMessagesOverlayService = uiAlertMessagesOverlayService;
|
|
1195
1292
|
this.router = router;
|
|
1196
1293
|
}
|
|
1197
1294
|
success(params) {
|
|
@@ -1272,22 +1369,13 @@ class UiAlertMessagesService {
|
|
|
1272
1369
|
}))
|
|
1273
1370
|
.subscribe();
|
|
1274
1371
|
}
|
|
1275
|
-
init(component) {
|
|
1276
|
-
this.component = component;
|
|
1277
|
-
const strategy = this.overlay.position().global();
|
|
1278
|
-
const config = new OverlayConfig({
|
|
1279
|
-
positionStrategy: strategy,
|
|
1280
|
-
});
|
|
1281
|
-
this.overlayRef = this.overlay.create(config);
|
|
1282
|
-
this.overlayRef.attach(new ComponentPortal(this.component));
|
|
1283
|
-
}
|
|
1284
1372
|
open(alert) {
|
|
1285
|
-
if (!this.component) {
|
|
1286
|
-
|
|
1287
|
-
|
|
1373
|
+
if (!this.uiAlertMessagesOverlayService.component) {
|
|
1374
|
+
this.uiAlertMessagesOverlayService.throwIfNotInitialized();
|
|
1375
|
+
return;
|
|
1288
1376
|
}
|
|
1289
1377
|
if (!this.$alerts().length) {
|
|
1290
|
-
this.
|
|
1378
|
+
this.uiAlertMessagesOverlayService.attachComponent();
|
|
1291
1379
|
}
|
|
1292
1380
|
this.router.events
|
|
1293
1381
|
.pipe(filter((v) => v instanceof NavigationEnd), tap(() => {
|
|
@@ -1313,7 +1401,7 @@ class UiAlertMessagesService {
|
|
|
1313
1401
|
.subscribe();
|
|
1314
1402
|
this.timerSubscriptions.set(alert.id, subscription);
|
|
1315
1403
|
}
|
|
1316
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiAlertMessagesService, deps: [{ token:
|
|
1404
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiAlertMessagesService, deps: [{ token: UiAlertMessagesOverlayService }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1317
1405
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiAlertMessagesService, providedIn: 'root' });
|
|
1318
1406
|
}
|
|
1319
1407
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiAlertMessagesService, decorators: [{
|
|
@@ -1321,7 +1409,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
1321
1409
|
args: [{
|
|
1322
1410
|
providedIn: 'root',
|
|
1323
1411
|
}]
|
|
1324
|
-
}], ctorParameters: () => [{ type:
|
|
1412
|
+
}], ctorParameters: () => [{ type: UiAlertMessagesOverlayService }, { type: i2$1.Router }] });
|
|
1325
1413
|
|
|
1326
1414
|
const avatarSizes = ['small', 'medium', 'large'];
|
|
1327
1415
|
class UiAvatarDirective {
|
|
@@ -1343,7 +1431,7 @@ class UiAvatarDirective {
|
|
|
1343
1431
|
.slice(0, 2)
|
|
1344
1432
|
.map((word) => word[0]?.toUpperCase() || '')
|
|
1345
1433
|
.join('');
|
|
1346
|
-
const colorValue = acronym
|
|
1434
|
+
const colorValue = this.$acronym();
|
|
1347
1435
|
this.renderer.setStyle(this.elementRef.nativeElement, 'background', stringToColorGradient(colorValue));
|
|
1348
1436
|
this.$text.set(acronym);
|
|
1349
1437
|
});
|
|
@@ -1931,25 +2019,42 @@ class UiPopupInstance {
|
|
|
1931
2019
|
}
|
|
1932
2020
|
}
|
|
1933
2021
|
|
|
2022
|
+
class UiPopupBackdropService {
|
|
2023
|
+
tipContainerPortal;
|
|
2024
|
+
backdropPortal;
|
|
2025
|
+
constructor(component, tipComponent) {
|
|
2026
|
+
this.backdropPortal = new ComponentPortal(component);
|
|
2027
|
+
if (tipComponent) {
|
|
2028
|
+
this.tipContainerPortal = new ComponentPortal(tipComponent);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiPopupBackdropService, deps: [{ token: i0.Type }, { token: i0.Type }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2032
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiPopupBackdropService, providedIn: 'root' });
|
|
2033
|
+
}
|
|
2034
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiPopupBackdropService, decorators: [{
|
|
2035
|
+
type: Injectable,
|
|
2036
|
+
args: [{
|
|
2037
|
+
providedIn: 'root',
|
|
2038
|
+
}]
|
|
2039
|
+
}], ctorParameters: () => [{ type: i0.Type }, { type: i0.Type }] });
|
|
2040
|
+
|
|
1934
2041
|
class UiPopupService {
|
|
1935
2042
|
overlay;
|
|
1936
2043
|
injector;
|
|
1937
2044
|
destroyRef;
|
|
1938
2045
|
router;
|
|
2046
|
+
backdropService;
|
|
1939
2047
|
popupInstances = [];
|
|
1940
2048
|
backdropRef;
|
|
1941
|
-
backdropPortal;
|
|
1942
2049
|
backdropPortalRef;
|
|
1943
2050
|
destroyDownloading$ = new Subject();
|
|
1944
2051
|
destroyOutsideClickSubscription$ = new Subject();
|
|
1945
|
-
constructor(overlay, injector, destroyRef, router) {
|
|
2052
|
+
constructor(overlay, injector, destroyRef, router, backdropService) {
|
|
1946
2053
|
this.overlay = overlay;
|
|
1947
2054
|
this.injector = injector;
|
|
1948
2055
|
this.destroyRef = destroyRef;
|
|
1949
2056
|
this.router = router;
|
|
1950
|
-
|
|
1951
|
-
init(component) {
|
|
1952
|
-
this.backdropPortal = new ComponentPortal(component);
|
|
2057
|
+
this.backdropService = backdropService;
|
|
1953
2058
|
}
|
|
1954
2059
|
/**
|
|
1955
2060
|
* Opens a popup with the specified component and options.
|
|
@@ -2098,7 +2203,11 @@ class UiPopupService {
|
|
|
2098
2203
|
positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically(),
|
|
2099
2204
|
scrollStrategy: this.overlay.scrollStrategies.noop(),
|
|
2100
2205
|
});
|
|
2101
|
-
|
|
2206
|
+
if (!this.backdropService.backdropPortal) {
|
|
2207
|
+
throw new Error('[UiPopupService] UiPopupBackdropService has not been initialized. ' +
|
|
2208
|
+
'inject(UiPopupBackdropService) during application startup (e.g. in `app.config.ts`) to enable popup rendering.');
|
|
2209
|
+
}
|
|
2210
|
+
this.backdropPortalRef = this.backdropRef.attach(this.backdropService.backdropPortal);
|
|
2102
2211
|
if (this.backdropPortalRef) {
|
|
2103
2212
|
this.backdropPortalRef.location.nativeElement.classList.add('animate-in');
|
|
2104
2213
|
this.backdropPortalRef.setInput('isStaticBackdrop', isStaticBackdrop);
|
|
@@ -2160,7 +2269,7 @@ class UiPopupService {
|
|
|
2160
2269
|
endTransition: 'scale(1)',
|
|
2161
2270
|
};
|
|
2162
2271
|
}
|
|
2163
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiPopupService, deps: [{ token: i1.Overlay }, { token: i0.Injector }, { token: i0.DestroyRef }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2272
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiPopupService, deps: [{ token: i1.Overlay }, { token: i0.Injector }, { token: i0.DestroyRef }, { token: i2$1.Router }, { token: UiPopupBackdropService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2164
2273
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiPopupService, providedIn: 'root' });
|
|
2165
2274
|
}
|
|
2166
2275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiPopupService, decorators: [{
|
|
@@ -2168,7 +2277,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
2168
2277
|
args: [{
|
|
2169
2278
|
providedIn: 'root',
|
|
2170
2279
|
}]
|
|
2171
|
-
}], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Injector }, { type: i0.DestroyRef }, { type: i2$1.Router }] });
|
|
2280
|
+
}], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Injector }, { type: i0.DestroyRef }, { type: i2$1.Router }, { type: UiPopupBackdropService }] });
|
|
2172
2281
|
|
|
2173
2282
|
class UiPopupContainerDirective {
|
|
2174
2283
|
popupInstance;
|
|
@@ -2276,7 +2385,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
2276
2385
|
}] }, { type: i0.DestroyRef }, { type: UiPopupService }, { type: i0.ElementRef }], propDecorators: { $overflowHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "$overflowHidden", required: false }] }], $shouldClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "$shouldClose", required: false }] }, { type: i0.Output, args: ["$shouldCloseChange"] }], $hasCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "$hasCloseButton", required: false }] }], $isEnableFadeAnimation: [{ type: i0.Input, args: [{ isSignal: true, alias: "$isEnableFadeAnimation", required: false }] }], $iconClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "$iconClose", required: false }] }, { type: i0.Output, args: ["$iconCloseChange"] }] } });
|
|
2277
2386
|
|
|
2278
2387
|
class UiDropdownService extends UiPopupService {
|
|
2279
|
-
tipContainerPortal;
|
|
2280
2388
|
containerSize$ = new BehaviorSubject({
|
|
2281
2389
|
width: 0,
|
|
2282
2390
|
height: 0,
|
|
@@ -2382,12 +2490,6 @@ class UiDropdownService extends UiPopupService {
|
|
|
2382
2490
|
},
|
|
2383
2491
|
},
|
|
2384
2492
|
};
|
|
2385
|
-
init(component, tipComponent) {
|
|
2386
|
-
super.init(component);
|
|
2387
|
-
if (tipComponent) {
|
|
2388
|
-
this.tipContainerPortal = new ComponentPortal(tipComponent);
|
|
2389
|
-
}
|
|
2390
|
-
}
|
|
2391
2493
|
/**
|
|
2392
2494
|
* Opens a tooltip (tip) component attached to a specific HTML element.
|
|
2393
2495
|
* The tooltip displays text content with customizable position and offset.
|
|
@@ -2403,11 +2505,11 @@ class UiDropdownService extends UiPopupService {
|
|
|
2403
2505
|
*
|
|
2404
2506
|
*/
|
|
2405
2507
|
openTip(text, attachedRef, id, position = 'top', offsetY = 0, offsetX = 0) {
|
|
2406
|
-
if (!this.tipContainerPortal) {
|
|
2407
|
-
|
|
2408
|
-
|
|
2508
|
+
if (!this.backdropService.tipContainerPortal) {
|
|
2509
|
+
throw new Error('[UiDropdownService] Tip component is not defined. ' +
|
|
2510
|
+
'inject(UiPopupBackdropService) during application startup (e.g. in `app.config.ts`) to enable tip rendering.');
|
|
2409
2511
|
}
|
|
2410
|
-
const tipComponent = this.tipContainerPortal?.component;
|
|
2512
|
+
const tipComponent = this.backdropService.tipContainerPortal?.component;
|
|
2411
2513
|
if (tipComponent) {
|
|
2412
2514
|
this.openAttached(tipComponent, attachedRef, id, {
|
|
2413
2515
|
options: {
|
|
@@ -3364,7 +3466,7 @@ class UiInputCheckboxDirective {
|
|
|
3364
3466
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
3365
3467
|
$style = input('primary', ...(ngDevMode ? [{ debugName: "$style" }] : []));
|
|
3366
3468
|
$label = input('', ...(ngDevMode ? [{ debugName: "$label" }] : []));
|
|
3367
|
-
$
|
|
3469
|
+
$hasValidators = input(false, ...(ngDevMode ? [{ debugName: "$hasValidators" }] : []));
|
|
3368
3470
|
errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : []));
|
|
3369
3471
|
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : []));
|
|
3370
3472
|
dirty = model(false, ...(ngDevMode ? [{ debugName: "dirty" }] : []));
|
|
@@ -3375,14 +3477,14 @@ class UiInputCheckboxDirective {
|
|
|
3375
3477
|
this.checked.update((val) => !val);
|
|
3376
3478
|
}
|
|
3377
3479
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputCheckboxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3378
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: UiInputCheckboxDirective, isStandalone: true, selector: "app-ui-input", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, $style: { classPropertyName: "$style", publicName: "$style", isSignal: true, isRequired: false, transformFunction: null }, $label: { classPropertyName: "$label", publicName: "$label", isSignal: true, isRequired: false, transformFunction: null }, $
|
|
3480
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: UiInputCheckboxDirective, isStandalone: true, selector: "app-ui-input", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, $style: { classPropertyName: "$style", publicName: "$style", isSignal: true, isRequired: false, transformFunction: null }, $label: { classPropertyName: "$label", publicName: "$label", isSignal: true, isRequired: false, transformFunction: null }, $hasValidators: { classPropertyName: "$hasValidators", publicName: "$hasValidators", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", invalid: "invalidChange", touched: "touchedChange", dirty: "dirtyChange" }, ngImport: i0 });
|
|
3379
3481
|
}
|
|
3380
3482
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputCheckboxDirective, decorators: [{
|
|
3381
3483
|
type: Directive,
|
|
3382
3484
|
args: [{
|
|
3383
3485
|
selector: 'app-ui-input',
|
|
3384
3486
|
}]
|
|
3385
|
-
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }, { type: i0.Output, args: ["invalidChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "$style", required: false }] }], $label: [{ type: i0.Input, args: [{ isSignal: true, alias: "$label", required: false }] }], $
|
|
3487
|
+
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }, { type: i0.Output, args: ["invalidChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "$style", required: false }] }], $label: [{ type: i0.Input, args: [{ isSignal: true, alias: "$label", required: false }] }], $hasValidators: [{ type: i0.Input, args: [{ isSignal: true, alias: "$hasValidators", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }, { type: i0.Output, args: ["dirtyChange"] }] } });
|
|
3386
3488
|
|
|
3387
3489
|
const sizes = ['small', 'medium', 'large'];
|
|
3388
3490
|
class UiInputDirective extends UiFieldBaseDirective {
|
|
@@ -3393,9 +3495,9 @@ class UiInputDirective extends UiFieldBaseDirective {
|
|
|
3393
3495
|
$maxLength = input(undefined, ...(ngDevMode ? [{ debugName: "$maxLength" }] : []));
|
|
3394
3496
|
$inputMode = input('text', ...(ngDevMode ? [{ debugName: "$inputMode" }] : []));
|
|
3395
3497
|
$label = input('', ...(ngDevMode ? [{ debugName: "$label" }] : []));
|
|
3396
|
-
$
|
|
3498
|
+
$focus = model(false, ...(ngDevMode ? [{ debugName: "$focus" }] : []));
|
|
3397
3499
|
$isRounded = input(false, ...(ngDevMode ? [{ debugName: "$isRounded" }] : []));
|
|
3398
|
-
$
|
|
3500
|
+
$hasValidators = input(false, ...(ngDevMode ? [{ debugName: "$hasValidators" }] : []));
|
|
3399
3501
|
$icon = input(null, ...(ngDevMode ? [{ debugName: "$icon" }] : []));
|
|
3400
3502
|
$isError = computed(() => {
|
|
3401
3503
|
return (this.touched() || (this.dirty() && this.touched())) && this.invalid();
|
|
@@ -3422,14 +3524,14 @@ class UiInputDirective extends UiFieldBaseDirective {
|
|
|
3422
3524
|
});
|
|
3423
3525
|
}
|
|
3424
3526
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3425
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: UiInputDirective, isStandalone: true, selector: "app-ui-input", inputs: { $size: { classPropertyName: "$size", publicName: "$size", isSignal: true, isRequired: false, transformFunction: null }, $placeholder: { classPropertyName: "$placeholder", publicName: "$placeholder", isSignal: true, isRequired: false, transformFunction: null }, $maxLength: { classPropertyName: "$maxLength", publicName: "$maxLength", isSignal: true, isRequired: false, transformFunction: null }, $inputMode: { classPropertyName: "$inputMode", publicName: "$inputMode", isSignal: true, isRequired: false, transformFunction: null }, $label: { classPropertyName: "$label", publicName: "$label", isSignal: true, isRequired: false, transformFunction: null }, $
|
|
3527
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: UiInputDirective, isStandalone: true, selector: "app-ui-input", inputs: { $size: { classPropertyName: "$size", publicName: "$size", isSignal: true, isRequired: false, transformFunction: null }, $placeholder: { classPropertyName: "$placeholder", publicName: "$placeholder", isSignal: true, isRequired: false, transformFunction: null }, $maxLength: { classPropertyName: "$maxLength", publicName: "$maxLength", isSignal: true, isRequired: false, transformFunction: null }, $inputMode: { classPropertyName: "$inputMode", publicName: "$inputMode", isSignal: true, isRequired: false, transformFunction: null }, $label: { classPropertyName: "$label", publicName: "$label", isSignal: true, isRequired: false, transformFunction: null }, $focus: { classPropertyName: "$focus", publicName: "$focus", isSignal: true, isRequired: false, transformFunction: null }, $isRounded: { classPropertyName: "$isRounded", publicName: "$isRounded", isSignal: true, isRequired: false, transformFunction: null }, $hasValidators: { classPropertyName: "$hasValidators", publicName: "$hasValidators", isSignal: true, isRequired: false, transformFunction: null }, $icon: { classPropertyName: "$icon", publicName: "$icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { $focus: "$focusChange" }, usesInheritance: true, ngImport: i0 });
|
|
3426
3528
|
}
|
|
3427
3529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputDirective, decorators: [{
|
|
3428
3530
|
type: Directive,
|
|
3429
3531
|
args: [{
|
|
3430
3532
|
selector: 'app-ui-input',
|
|
3431
3533
|
}]
|
|
3432
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { $size: [{ type: i0.Input, args: [{ isSignal: true, alias: "$size", required: false }] }], $placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "$placeholder", required: false }] }], $maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "$maxLength", required: false }] }], $inputMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "$inputMode", required: false }] }], $label: [{ type: i0.Input, args: [{ isSignal: true, alias: "$label", required: false }] }], $
|
|
3534
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { $size: [{ type: i0.Input, args: [{ isSignal: true, alias: "$size", required: false }] }], $placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "$placeholder", required: false }] }], $maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "$maxLength", required: false }] }], $inputMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "$inputMode", required: false }] }], $label: [{ type: i0.Input, args: [{ isSignal: true, alias: "$label", required: false }] }], $focus: [{ type: i0.Input, args: [{ isSignal: true, alias: "$focus", required: false }] }, { type: i0.Output, args: ["$focusChange"] }], $isRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "$isRounded", required: false }] }], $hasValidators: [{ type: i0.Input, args: [{ isSignal: true, alias: "$hasValidators", required: false }] }], $icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "$icon", required: false }] }] } });
|
|
3433
3535
|
|
|
3434
3536
|
class UiInputCountryDirective extends UiInputDirective {
|
|
3435
3537
|
$selectedCountry = signal(emptyCountry, ...(ngDevMode ? [{ debugName: "$selectedCountry" }] : []));
|
|
@@ -4223,5 +4325,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
4223
4325
|
* Generated bundle index. Do not edit.
|
|
4224
4326
|
*/
|
|
4225
4327
|
|
|
4226
|
-
export { Alert, AlertType, AppIconsLibrary,
|
|
4328
|
+
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, navigateByUrl, stringToColorGradient, stringToHslColor };
|
|
4227
4329
|
//# sourceMappingURL=ibragim-dev-org-ui-forge-library.mjs.map
|