@ibragim-dev-org/ui-forge-library 1.2.9 → 1.3.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,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';
|
|
@@ -37,11 +37,8 @@ class DateUtils {
|
|
|
37
37
|
const y = date.getFullYear();
|
|
38
38
|
return isUsaDateFormat ? `${m}/${d}/${y}` : `${d}/${m}/${y}`;
|
|
39
39
|
}
|
|
40
|
-
static isUsaDateFormat() {
|
|
41
|
-
|
|
42
|
-
const localeFromNavigator = typeof navigator !== 'undefined' ? navigator.language : undefined;
|
|
43
|
-
const locale = (localeFromIntl || localeFromNavigator || '').toLowerCase();
|
|
44
|
-
return locale === 'en-us' || locale.startsWith('en-us-');
|
|
40
|
+
static isUsaDateFormat(format = undefined) {
|
|
41
|
+
return format === 'usa';
|
|
45
42
|
}
|
|
46
43
|
static setMonthSafe(date, month) {
|
|
47
44
|
const d = new Date(date);
|
|
@@ -546,6 +543,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
546
543
|
}]
|
|
547
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 }] }] } });
|
|
548
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
|
+
|
|
549
586
|
class CenterEllipsisPipe {
|
|
550
587
|
transform(value, visibleStart = 4, visibleEnd = 4) {
|
|
551
588
|
if (!value) {
|
|
@@ -1164,6 +1201,7 @@ class UiDailyCalendarDirective {
|
|
|
1164
1201
|
weekDaysEuropean = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
|
1165
1202
|
weekDaysUsa = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
1166
1203
|
$isRangeSelection = input(false, ...(ngDevMode ? [{ debugName: "$isRangeSelection" }] : []));
|
|
1204
|
+
$dateFormat = input(undefined, ...(ngDevMode ? [{ debugName: "$dateFormat" }] : []));
|
|
1167
1205
|
$minDate = input(undefined, ...(ngDevMode ? [{ debugName: "$minDate" }] : []));
|
|
1168
1206
|
$maxDate = input(undefined, ...(ngDevMode ? [{ debugName: "$maxDate" }] : []));
|
|
1169
1207
|
get weekDays() {
|
|
@@ -1318,7 +1356,7 @@ class UiDailyCalendarDirective {
|
|
|
1318
1356
|
this.$hoverDate.set(date);
|
|
1319
1357
|
}
|
|
1320
1358
|
isUsaDateFormat() {
|
|
1321
|
-
return DateUtils.isUsaDateFormat();
|
|
1359
|
+
return DateUtils.isUsaDateFormat(this.$dateFormat());
|
|
1322
1360
|
}
|
|
1323
1361
|
select(date) {
|
|
1324
1362
|
if (this.isDisabledDate(date)) {
|
|
@@ -1352,14 +1390,14 @@ class UiDailyCalendarDirective {
|
|
|
1352
1390
|
}
|
|
1353
1391
|
}
|
|
1354
1392
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiDailyCalendarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1355
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: UiDailyCalendarDirective, isStandalone: true, selector: "app-ui-daily-calendar", inputs: { $isRangeSelection: { classPropertyName: "$isRangeSelection", publicName: "$isRangeSelection", isSignal: true, isRequired: false, transformFunction: null }, $minDate: { classPropertyName: "$minDate", publicName: "$minDate", isSignal: true, isRequired: false, transformFunction: null }, $maxDate: { classPropertyName: "$maxDate", publicName: "$maxDate", isSignal: true, isRequired: false, transformFunction: null }, $dateStart: { classPropertyName: "$dateStart", publicName: "$dateStart", isSignal: true, isRequired: false, transformFunction: null }, $dateEnd: { classPropertyName: "$dateEnd", publicName: "$dateEnd", isSignal: true, isRequired: false, transformFunction: null }, $currentMonth: { classPropertyName: "$currentMonth", publicName: "$currentMonth", isSignal: true, isRequired: true, transformFunction: null }, $currentYear: { classPropertyName: "$currentYear", publicName: "$currentYear", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { $dateStart: "$dateStartChange", $dateEnd: "$dateEndChange", $currentMonth: "$currentMonthChange", $currentYear: "$currentYearChange", $onRangeSelect: "$onRangeSelect", $onSelect: "$onSelect" }, ngImport: i0 });
|
|
1393
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: UiDailyCalendarDirective, isStandalone: true, selector: "app-ui-daily-calendar", inputs: { $isRangeSelection: { classPropertyName: "$isRangeSelection", publicName: "$isRangeSelection", isSignal: true, isRequired: false, transformFunction: null }, $dateFormat: { classPropertyName: "$dateFormat", publicName: "$dateFormat", isSignal: true, isRequired: false, transformFunction: null }, $minDate: { classPropertyName: "$minDate", publicName: "$minDate", isSignal: true, isRequired: false, transformFunction: null }, $maxDate: { classPropertyName: "$maxDate", publicName: "$maxDate", isSignal: true, isRequired: false, transformFunction: null }, $dateStart: { classPropertyName: "$dateStart", publicName: "$dateStart", isSignal: true, isRequired: false, transformFunction: null }, $dateEnd: { classPropertyName: "$dateEnd", publicName: "$dateEnd", isSignal: true, isRequired: false, transformFunction: null }, $currentMonth: { classPropertyName: "$currentMonth", publicName: "$currentMonth", isSignal: true, isRequired: true, transformFunction: null }, $currentYear: { classPropertyName: "$currentYear", publicName: "$currentYear", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { $dateStart: "$dateStartChange", $dateEnd: "$dateEndChange", $currentMonth: "$currentMonthChange", $currentYear: "$currentYearChange", $onRangeSelect: "$onRangeSelect", $onSelect: "$onSelect" }, ngImport: i0 });
|
|
1356
1394
|
}
|
|
1357
1395
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiDailyCalendarDirective, decorators: [{
|
|
1358
1396
|
type: Directive,
|
|
1359
1397
|
args: [{
|
|
1360
1398
|
selector: 'app-ui-daily-calendar',
|
|
1361
1399
|
}]
|
|
1362
|
-
}], propDecorators: { $isRangeSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "$isRangeSelection", required: false }] }], $minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "$minDate", required: false }] }], $maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "$maxDate", required: false }] }], $dateStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "$dateStart", required: false }] }, { type: i0.Output, args: ["$dateStartChange"] }], $dateEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "$dateEnd", required: false }] }, { type: i0.Output, args: ["$dateEndChange"] }], $currentMonth: [{ type: i0.Input, args: [{ isSignal: true, alias: "$currentMonth", required: true }] }, { type: i0.Output, args: ["$currentMonthChange"] }], $currentYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "$currentYear", required: true }] }, { type: i0.Output, args: ["$currentYearChange"] }], $onRangeSelect: [{ type: i0.Output, args: ["$onRangeSelect"] }], $onSelect: [{ type: i0.Output, args: ["$onSelect"] }] } });
|
|
1400
|
+
}], propDecorators: { $isRangeSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "$isRangeSelection", required: false }] }], $dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "$dateFormat", required: false }] }], $minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "$minDate", required: false }] }], $maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "$maxDate", required: false }] }], $dateStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "$dateStart", required: false }] }, { type: i0.Output, args: ["$dateStartChange"] }], $dateEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "$dateEnd", required: false }] }, { type: i0.Output, args: ["$dateEndChange"] }], $currentMonth: [{ type: i0.Input, args: [{ isSignal: true, alias: "$currentMonth", required: true }] }, { type: i0.Output, args: ["$currentMonthChange"] }], $currentYear: [{ type: i0.Input, args: [{ isSignal: true, alias: "$currentYear", required: true }] }, { type: i0.Output, args: ["$currentYearChange"] }], $onRangeSelect: [{ type: i0.Output, args: ["$onRangeSelect"] }], $onSelect: [{ type: i0.Output, args: ["$onSelect"] }] } });
|
|
1363
1401
|
|
|
1364
1402
|
class UiMonthlyCalendarDirective {
|
|
1365
1403
|
$date = model(new Date(), ...(ngDevMode ? [{ debugName: "$date" }] : []));
|
|
@@ -1470,6 +1508,7 @@ class UiCalendarDropdownDirective {
|
|
|
1470
1508
|
isRangeSelection = false;
|
|
1471
1509
|
minDate = undefined;
|
|
1472
1510
|
maxDate = undefined;
|
|
1511
|
+
dateFormat = undefined;
|
|
1473
1512
|
$close = signal(false, ...(ngDevMode ? [{ debugName: "$close" }] : []));
|
|
1474
1513
|
$height = signal(0, ...(ngDevMode ? [{ debugName: "$height" }] : []));
|
|
1475
1514
|
$width = signal(0, ...(ngDevMode ? [{ debugName: "$width" }] : []));
|
|
@@ -1539,7 +1578,7 @@ class UiCalendarDropdownDirective {
|
|
|
1539
1578
|
this.$width.set(size.width);
|
|
1540
1579
|
}
|
|
1541
1580
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiCalendarDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1542
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: UiCalendarDropdownDirective, isStandalone: true, selector: "app-ui-calendar-dropdown-calendar", inputs: { action: "action", rangeSelect: "rangeSelect", startDate: "startDate", endDate: "endDate", isRangeSelection: "isRangeSelection", minDate: "minDate", maxDate: "maxDate" }, usesOnChanges: true, ngImport: i0 });
|
|
1581
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: UiCalendarDropdownDirective, isStandalone: true, selector: "app-ui-calendar-dropdown-calendar", inputs: { action: "action", rangeSelect: "rangeSelect", startDate: "startDate", endDate: "endDate", isRangeSelection: "isRangeSelection", minDate: "minDate", maxDate: "maxDate", dateFormat: "dateFormat" }, usesOnChanges: true, ngImport: i0 });
|
|
1543
1582
|
}
|
|
1544
1583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiCalendarDropdownDirective, decorators: [{
|
|
1545
1584
|
type: Directive,
|
|
@@ -1560,6 +1599,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
1560
1599
|
type: Input
|
|
1561
1600
|
}], maxDate: [{
|
|
1562
1601
|
type: Input
|
|
1602
|
+
}], dateFormat: [{
|
|
1603
|
+
type: Input
|
|
1563
1604
|
}] } });
|
|
1564
1605
|
|
|
1565
1606
|
const typescript = {
|
|
@@ -3253,6 +3294,7 @@ class UiInputDirective extends UiFieldBaseDirective {
|
|
|
3253
3294
|
renderer;
|
|
3254
3295
|
$size = input('medium', ...(ngDevMode ? [{ debugName: "$size" }] : []));
|
|
3255
3296
|
$placeholder = input('', ...(ngDevMode ? [{ debugName: "$placeholder" }] : []));
|
|
3297
|
+
$maxLength = input(undefined, ...(ngDevMode ? [{ debugName: "$maxLength" }] : []));
|
|
3256
3298
|
$inputMode = input('text', ...(ngDevMode ? [{ debugName: "$inputMode" }] : []));
|
|
3257
3299
|
$label = input('', ...(ngDevMode ? [{ debugName: "$label" }] : []));
|
|
3258
3300
|
$shouldFocusedAfterViewInit = input(false, ...(ngDevMode ? [{ debugName: "$shouldFocusedAfterViewInit" }] : []));
|
|
@@ -3284,14 +3326,14 @@ class UiInputDirective extends UiFieldBaseDirective {
|
|
|
3284
3326
|
});
|
|
3285
3327
|
}
|
|
3286
3328
|
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 });
|
|
3287
|
-
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 }, $inputMode: { classPropertyName: "$inputMode", publicName: "$inputMode", isSignal: true, isRequired: false, transformFunction: null }, $label: { classPropertyName: "$label", publicName: "$label", isSignal: true, isRequired: false, transformFunction: null }, $shouldFocusedAfterViewInit: { classPropertyName: "$shouldFocusedAfterViewInit", publicName: "$shouldFocusedAfterViewInit", isSignal: true, isRequired: false, transformFunction: null }, $isRounded: { classPropertyName: "$isRounded", publicName: "$isRounded", isSignal: true, isRequired: false, transformFunction: null }, $hideValidatorErrors: { classPropertyName: "$hideValidatorErrors", publicName: "$hideValidatorErrors", isSignal: true, isRequired: false, transformFunction: null }, $icon: { classPropertyName: "$icon", publicName: "$icon", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
3329
|
+
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 }, $shouldFocusedAfterViewInit: { classPropertyName: "$shouldFocusedAfterViewInit", publicName: "$shouldFocusedAfterViewInit", isSignal: true, isRequired: false, transformFunction: null }, $isRounded: { classPropertyName: "$isRounded", publicName: "$isRounded", isSignal: true, isRequired: false, transformFunction: null }, $hideValidatorErrors: { classPropertyName: "$hideValidatorErrors", publicName: "$hideValidatorErrors", isSignal: true, isRequired: false, transformFunction: null }, $icon: { classPropertyName: "$icon", publicName: "$icon", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
3288
3330
|
}
|
|
3289
3331
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputDirective, decorators: [{
|
|
3290
3332
|
type: Directive,
|
|
3291
3333
|
args: [{
|
|
3292
3334
|
selector: 'app-ui-input',
|
|
3293
3335
|
}]
|
|
3294
|
-
}], 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 }] }], $inputMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "$inputMode", required: false }] }], $label: [{ type: i0.Input, args: [{ isSignal: true, alias: "$label", required: false }] }], $shouldFocusedAfterViewInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "$shouldFocusedAfterViewInit", required: false }] }], $isRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "$isRounded", required: false }] }], $hideValidatorErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "$hideValidatorErrors", required: false }] }], $icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "$icon", required: false }] }] } });
|
|
3336
|
+
}], 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 }] }], $shouldFocusedAfterViewInit: [{ type: i0.Input, args: [{ isSignal: true, alias: "$shouldFocusedAfterViewInit", required: false }] }], $isRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "$isRounded", required: false }] }], $hideValidatorErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "$hideValidatorErrors", required: false }] }], $icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "$icon", required: false }] }] } });
|
|
3295
3337
|
|
|
3296
3338
|
class UiInputCountryDirective extends UiInputDirective {
|
|
3297
3339
|
$selectedCountry = signal(emptyCountry, ...(ngDevMode ? [{ debugName: "$selectedCountry" }] : []));
|
|
@@ -3354,6 +3396,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
3354
3396
|
class UIInputDateDirective extends UiInputDirective {
|
|
3355
3397
|
$isOpen = signal(false, ...(ngDevMode ? [{ debugName: "$isOpen" }] : []));
|
|
3356
3398
|
$isRangeSelection = input(false, ...(ngDevMode ? [{ debugName: "$isRangeSelection" }] : []));
|
|
3399
|
+
$dateFormat = input(undefined, ...(ngDevMode ? [{ debugName: "$dateFormat" }] : []));
|
|
3357
3400
|
$dividePattern = input('/', ...(ngDevMode ? [{ debugName: "$dividePattern" }] : []));
|
|
3358
3401
|
$minDate = input(undefined, ...(ngDevMode ? [{ debugName: "$minDate" }] : []));
|
|
3359
3402
|
$maxDate = input(undefined, ...(ngDevMode ? [{ debugName: "$maxDate" }] : []));
|
|
@@ -3372,7 +3415,7 @@ class UIInputDateDirective extends UiInputDirective {
|
|
|
3372
3415
|
return day + pattern + month + pattern + date.getFullYear();
|
|
3373
3416
|
}
|
|
3374
3417
|
isUsaDateFormat() {
|
|
3375
|
-
return DateUtils.isUsaDateFormat();
|
|
3418
|
+
return DateUtils.isUsaDateFormat(this.$dateFormat());
|
|
3376
3419
|
}
|
|
3377
3420
|
setRangeDates(dates) {
|
|
3378
3421
|
if (!dates.start) {
|
|
@@ -3435,14 +3478,14 @@ class UIInputDateDirective extends UiInputDirective {
|
|
|
3435
3478
|
return formatSingle(limited);
|
|
3436
3479
|
}
|
|
3437
3480
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UIInputDateDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3438
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.1", type: UIInputDateDirective, isStandalone: true, selector: "app-ui-input-date", inputs: { $isRangeSelection: { classPropertyName: "$isRangeSelection", publicName: "$isRangeSelection", isSignal: true, isRequired: false, transformFunction: null }, $dividePattern: { classPropertyName: "$dividePattern", publicName: "$dividePattern", isSignal: true, isRequired: false, transformFunction: null }, $minDate: { classPropertyName: "$minDate", publicName: "$minDate", isSignal: true, isRequired: false, transformFunction: null }, $maxDate: { classPropertyName: "$maxDate", publicName: "$maxDate", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "$inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
|
|
3481
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.1", type: UIInputDateDirective, isStandalone: true, selector: "app-ui-input-date", inputs: { $isRangeSelection: { classPropertyName: "$isRangeSelection", publicName: "$isRangeSelection", isSignal: true, isRequired: false, transformFunction: null }, $dateFormat: { classPropertyName: "$dateFormat", publicName: "$dateFormat", isSignal: true, isRequired: false, transformFunction: null }, $dividePattern: { classPropertyName: "$dividePattern", publicName: "$dividePattern", isSignal: true, isRequired: false, transformFunction: null }, $minDate: { classPropertyName: "$minDate", publicName: "$minDate", isSignal: true, isRequired: false, transformFunction: null }, $maxDate: { classPropertyName: "$maxDate", publicName: "$maxDate", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "$inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
|
|
3439
3482
|
}
|
|
3440
3483
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UIInputDateDirective, decorators: [{
|
|
3441
3484
|
type: Directive,
|
|
3442
3485
|
args: [{
|
|
3443
3486
|
selector: 'app-ui-input-date',
|
|
3444
3487
|
}]
|
|
3445
|
-
}], propDecorators: { $isRangeSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "$isRangeSelection", required: false }] }], $dividePattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "$dividePattern", required: false }] }], $minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "$minDate", required: false }] }], $maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "$maxDate", required: false }] }], $inputElement: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
3488
|
+
}], propDecorators: { $isRangeSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "$isRangeSelection", required: false }] }], $dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "$dateFormat", required: false }] }], $dividePattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "$dividePattern", required: false }] }], $minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "$minDate", required: false }] }], $maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "$maxDate", required: false }] }], $inputElement: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
3446
3489
|
|
|
3447
3490
|
class UIPhoneNumberDirective extends UiInputDirective {
|
|
3448
3491
|
$selectedCountry = signal(emptyCountry, ...(ngDevMode ? [{ debugName: "$selectedCountry" }] : []));
|
|
@@ -3601,6 +3644,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
3601
3644
|
}] } });
|
|
3602
3645
|
|
|
3603
3646
|
class UiInputTimeDirective extends UiInputDirective {
|
|
3647
|
+
$timeFormat = input(undefined, ...(ngDevMode ? [{ debugName: "$timeFormat" }] : []));
|
|
3604
3648
|
get times() {
|
|
3605
3649
|
const items = [];
|
|
3606
3650
|
for (let hour = 0; hour < 24; hour++) {
|
|
@@ -3610,7 +3654,7 @@ class UiInputTimeDirective extends UiInputDirective {
|
|
|
3610
3654
|
return items;
|
|
3611
3655
|
}
|
|
3612
3656
|
get inputMode() {
|
|
3613
|
-
return this.
|
|
3657
|
+
return this.is12HourFormat() ? 'text' : 'numeric';
|
|
3614
3658
|
}
|
|
3615
3659
|
$inputElement = viewChild('input', ...(ngDevMode ? [{ debugName: "$inputElement" }] : []));
|
|
3616
3660
|
$isOpen = signal(false, ...(ngDevMode ? [{ debugName: "$isOpen" }] : []));
|
|
@@ -3628,7 +3672,7 @@ class UiInputTimeDirective extends UiInputDirective {
|
|
|
3628
3672
|
const oldMeridiemLength = this.extractMeridiem(oldValue).length;
|
|
3629
3673
|
const newMeridiemLength = this.extractMeridiem(newValue).length;
|
|
3630
3674
|
const meridiemAdded = newMeridiemLength > oldMeridiemLength;
|
|
3631
|
-
const meridiemFormatted = this.
|
|
3675
|
+
const meridiemFormatted = this.is12HourFormat() && oldValue !== newValue;
|
|
3632
3676
|
super.onInput(newValue);
|
|
3633
3677
|
inputElement.value = newValue;
|
|
3634
3678
|
if (colonAdded || meridiemAdded || meridiemFormatted) {
|
|
@@ -3642,7 +3686,7 @@ class UiInputTimeDirective extends UiInputDirective {
|
|
|
3642
3686
|
if (!value) {
|
|
3643
3687
|
return '';
|
|
3644
3688
|
}
|
|
3645
|
-
if (this.
|
|
3689
|
+
if (this.is12HourFormat()) {
|
|
3646
3690
|
return this.mask12HourTime(value);
|
|
3647
3691
|
}
|
|
3648
3692
|
const digits = value.replace(/\D/g, '').slice(0, 4);
|
|
@@ -3731,11 +3775,11 @@ class UiInputTimeDirective extends UiInputDirective {
|
|
|
3731
3775
|
}
|
|
3732
3776
|
return '';
|
|
3733
3777
|
}
|
|
3734
|
-
|
|
3735
|
-
return
|
|
3778
|
+
is12HourFormat() {
|
|
3779
|
+
return this.$timeFormat() === '12h';
|
|
3736
3780
|
}
|
|
3737
3781
|
formatTime(hour, minute) {
|
|
3738
|
-
if (!this.
|
|
3782
|
+
if (!this.is12HourFormat()) {
|
|
3739
3783
|
return `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
|
|
3740
3784
|
}
|
|
3741
3785
|
const period = hour >= 12 ? 'PM' : 'AM';
|
|
@@ -3743,14 +3787,14 @@ class UiInputTimeDirective extends UiInputDirective {
|
|
|
3743
3787
|
return `${normalizedHour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')} ${period}`;
|
|
3744
3788
|
}
|
|
3745
3789
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputTimeDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3746
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.1", type: UiInputTimeDirective, isStandalone: true, selector: "app-ui-input-time", viewQueries: [{ propertyName: "$inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
|
|
3790
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.1", type: UiInputTimeDirective, isStandalone: true, selector: "app-ui-input-time", inputs: { $timeFormat: { classPropertyName: "$timeFormat", publicName: "$timeFormat", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "$inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
|
|
3747
3791
|
}
|
|
3748
3792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiInputTimeDirective, decorators: [{
|
|
3749
3793
|
type: Directive,
|
|
3750
3794
|
args: [{
|
|
3751
3795
|
selector: 'app-ui-input-time',
|
|
3752
3796
|
}]
|
|
3753
|
-
}], propDecorators: { $inputElement: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
3797
|
+
}], propDecorators: { $timeFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "$timeFormat", required: false }] }], $inputElement: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
3754
3798
|
|
|
3755
3799
|
class UiValidationErrorsDirective {
|
|
3756
3800
|
$isError = input(false, ...(ngDevMode ? [{ debugName: "$isError" }] : []));
|
|
@@ -3767,7 +3811,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
3767
3811
|
|
|
3768
3812
|
class UiTimeDropdownDirective {
|
|
3769
3813
|
$close = signal(false, ...(ngDevMode ? [{ debugName: "$close" }] : []));
|
|
3770
|
-
is12HourFormat = new Intl.DateTimeFormat(undefined, { hour: 'numeric' }).resolvedOptions().hour12 ?? false;
|
|
3771
3814
|
$hourForm = signal('', ...(ngDevMode ? [{ debugName: "$hourForm" }] : []));
|
|
3772
3815
|
$minuteForm = signal('', ...(ngDevMode ? [{ debugName: "$minuteForm" }] : []));
|
|
3773
3816
|
$periodForm = signal('', ...(ngDevMode ? [{ debugName: "$periodForm" }] : []));
|
|
@@ -3776,39 +3819,28 @@ class UiTimeDropdownDirective {
|
|
|
3776
3819
|
$period = form(this.$periodForm);
|
|
3777
3820
|
action = () => { };
|
|
3778
3821
|
initialValue = null;
|
|
3822
|
+
timeFormat = undefined;
|
|
3823
|
+
get is12HourFormat() {
|
|
3824
|
+
return this.timeFormat === '12h';
|
|
3825
|
+
}
|
|
3779
3826
|
ngOnInit() {
|
|
3780
3827
|
this.setInitialTime();
|
|
3781
3828
|
}
|
|
3782
|
-
onHourInput(
|
|
3783
|
-
const
|
|
3784
|
-
if (!inputElement) {
|
|
3785
|
-
return;
|
|
3786
|
-
}
|
|
3787
|
-
const newValue = this.normalizeHourInput(inputElement.value);
|
|
3788
|
-
inputElement.value = newValue;
|
|
3829
|
+
onHourInput(_) {
|
|
3830
|
+
const newValue = this.normalizeHourInput(this.$hour().value());
|
|
3789
3831
|
this.$hour().value.set(newValue);
|
|
3790
3832
|
this.emitTime();
|
|
3791
3833
|
}
|
|
3792
|
-
onMinuteInput(
|
|
3793
|
-
const
|
|
3794
|
-
if (!inputElement) {
|
|
3795
|
-
return;
|
|
3796
|
-
}
|
|
3797
|
-
const newValue = this.normalizeMinuteInput(inputElement.value);
|
|
3798
|
-
inputElement.value = newValue;
|
|
3834
|
+
onMinuteInput(_) {
|
|
3835
|
+
const newValue = this.normalizeMinuteInput(this.$minute().value());
|
|
3799
3836
|
this.$minute().value.set(newValue);
|
|
3800
3837
|
this.emitTime();
|
|
3801
3838
|
}
|
|
3802
|
-
onPeriodInput(
|
|
3839
|
+
onPeriodInput(_) {
|
|
3803
3840
|
if (!this.is12HourFormat) {
|
|
3804
3841
|
return;
|
|
3805
3842
|
}
|
|
3806
|
-
const
|
|
3807
|
-
if (!inputElement) {
|
|
3808
|
-
return;
|
|
3809
|
-
}
|
|
3810
|
-
const newValue = this.normalizePeriodInput(inputElement.value);
|
|
3811
|
-
inputElement.value = newValue;
|
|
3843
|
+
const newValue = this.normalizePeriodInput(this.$period().value());
|
|
3812
3844
|
this.$period().value.set(newValue);
|
|
3813
3845
|
this.emitTime();
|
|
3814
3846
|
}
|
|
@@ -4006,7 +4038,7 @@ class UiTimeDropdownDirective {
|
|
|
4006
4038
|
this.action(time);
|
|
4007
4039
|
}
|
|
4008
4040
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiTimeDropdownDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4009
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: UiTimeDropdownDirective, isStandalone: true, selector: "app-ui-time-dropdown", inputs: { action: "action", initialValue: "initialValue" }, ngImport: i0 });
|
|
4041
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: UiTimeDropdownDirective, isStandalone: true, selector: "app-ui-time-dropdown", inputs: { action: "action", initialValue: "initialValue", timeFormat: "timeFormat" }, ngImport: i0 });
|
|
4010
4042
|
}
|
|
4011
4043
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiTimeDropdownDirective, decorators: [{
|
|
4012
4044
|
type: Directive,
|
|
@@ -4017,6 +4049,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
4017
4049
|
type: Input
|
|
4018
4050
|
}], initialValue: [{
|
|
4019
4051
|
type: Input
|
|
4052
|
+
}], timeFormat: [{
|
|
4053
|
+
type: Input
|
|
4020
4054
|
}] } });
|
|
4021
4055
|
|
|
4022
4056
|
/*
|
|
@@ -4027,5 +4061,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
4027
4061
|
* Generated bundle index. Do not edit.
|
|
4028
4062
|
*/
|
|
4029
4063
|
|
|
4030
|
-
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 };
|
|
4064
|
+
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 };
|
|
4031
4065
|
//# sourceMappingURL=ibragim-dev-org-ui-forge-library.mjs.map
|