@ardium-ui/ui 5.0.0-alpha.97 → 5.0.0-alpha.98
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.
|
@@ -5,7 +5,7 @@ import * as i0 from '@angular/core';
|
|
|
5
5
|
import { signal, computed, InjectionToken, Directive, Input, HostBinding, input, output, ViewChildren, viewChild, contentChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, inject, ViewContainerRef, TemplateRef, forwardRef, HostListener, NgModule, effect, viewChildren, Pipe, model, ElementRef, ChangeDetectorRef, ContentChildren, Renderer2, linkedSignal, untracked, contentChildren, Injectable, Injector } from '@angular/core';
|
|
6
6
|
import { Validators, NG_VALUE_ACCESSOR, TouchedChangeEvent } from '@angular/forms';
|
|
7
7
|
import * as i4 from '@ardium-ui/devkit';
|
|
8
|
-
import { arraySignal, coerceBooleanProperty, coerceNumberProperty,
|
|
8
|
+
import { arraySignal, coerceBooleanProperty, coerceNumberProperty, trackBoundControl, coerceArrayProperty, ArdiumClickOutsideModule, ArdiumEscapeHTMLModule, FileSystemService, FileSystemMethod, ArdiumFilePipesModule, coerceDateProperty, getUTCDate as getUTCDate$1, ArdiumHoldModule } from '@ardium-ui/devkit';
|
|
9
9
|
import { isDefined, any, isPrimitive, isAnyString, isNull, isNumber, isString, isArray, isFunction, isRegExp, evaluate, isObject, isPromise, isDate } from 'simple-bool';
|
|
10
10
|
import { resolvePath } from 'resolve-object-path';
|
|
11
11
|
import { TakeChance } from 'take-chance';
|
|
@@ -392,7 +392,7 @@ class _NgModelComponentBase extends _FocusableComponentBase {
|
|
|
392
392
|
super(...arguments);
|
|
393
393
|
this._shouldEmitTouched = false;
|
|
394
394
|
//! form field related
|
|
395
|
-
this.control =
|
|
395
|
+
this.control = trackBoundControl(this);
|
|
396
396
|
this.htmlId = input(TakeChance.id());
|
|
397
397
|
this.htmlName = input(undefined);
|
|
398
398
|
this._hasError = input(undefined, {
|
|
@@ -6524,10 +6524,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
6524
6524
|
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
6525
6525
|
|
|
6526
6526
|
function isMonthOutOfRange(month, year, min, max) {
|
|
6527
|
-
const dateForMinComparison =
|
|
6527
|
+
const dateForMinComparison = getUTCDate$1(year, month + 1, 0); // last day of month
|
|
6528
6528
|
if (isDefined(min) && dateForMinComparison < min)
|
|
6529
6529
|
return -1;
|
|
6530
|
-
const dateForMaxComparison =
|
|
6530
|
+
const dateForMaxComparison = getUTCDate$1(year, month, 1); // first day of month
|
|
6531
6531
|
if (isDefined(max) && dateForMaxComparison > max)
|
|
6532
6532
|
return 1;
|
|
6533
6533
|
return 0;
|
|
@@ -7022,10 +7022,10 @@ function getCalendarYearsArray(startYear, yearCount, min, max) {
|
|
|
7022
7022
|
return new Array(yearCount).fill(startYear).map((v, i) => ({ value: v + i, valueDate: new Date(v + i, 1, 1), disabled: !!isYearOutOfRange(v + i, min, max) }));
|
|
7023
7023
|
}
|
|
7024
7024
|
function isYearOutOfRange(year, min, max) {
|
|
7025
|
-
const dateForMinComparison =
|
|
7025
|
+
const dateForMinComparison = getUTCDate$1(year, 11, 31);
|
|
7026
7026
|
if (isDefined(min) && dateForMinComparison < min)
|
|
7027
7027
|
return -1;
|
|
7028
|
-
const dateForMaxComparison =
|
|
7028
|
+
const dateForMaxComparison = getUTCDate$1(year, 0, 1);
|
|
7029
7029
|
if (isDefined(max) && dateForMaxComparison > max)
|
|
7030
7030
|
return 1;
|
|
7031
7031
|
return 0;
|
|
@@ -7711,10 +7711,10 @@ class _AbstractCalendar extends _FormFieldComponentBase {
|
|
|
7711
7711
|
this.yearSelect = output();
|
|
7712
7712
|
this.monthSelect = output();
|
|
7713
7713
|
this.min = input(this._DEFAULTS.min, {
|
|
7714
|
-
transform: v => (v === null ? null : coerceDateProperty(v, this._DEFAULTS.min)),
|
|
7714
|
+
transform: v => (v === null ? null : coerceDateProperty(v, this._DEFAULTS.min, true)),
|
|
7715
7715
|
});
|
|
7716
7716
|
this.max = input(this._DEFAULTS.max, {
|
|
7717
|
-
transform: v => (v === null ? null : coerceDateProperty(v, this._DEFAULTS.max)),
|
|
7717
|
+
transform: v => (v === null ? null : coerceDateProperty(v, this._DEFAULTS.max, true)),
|
|
7718
7718
|
});
|
|
7719
7719
|
this.UTC = input(this._DEFAULTS.UTC, { transform: v => coerceBooleanProperty(v) });
|
|
7720
7720
|
this._UTCAfterInit = signal(this._DEFAULTS.UTC);
|
|
@@ -7810,7 +7810,7 @@ class _AbstractCalendar extends _FormFieldComponentBase {
|
|
|
7810
7810
|
}
|
|
7811
7811
|
//! selecting days
|
|
7812
7812
|
isDayOutOfRange(day, month = this.activeMonth(), year = this.activeYear()) {
|
|
7813
|
-
const dayDate =
|
|
7813
|
+
const dayDate = getUTCDate$1(year, month, day);
|
|
7814
7814
|
return isDayOutOfRange(dayDate, this.min(), this.max());
|
|
7815
7815
|
}
|
|
7816
7816
|
selectDay(day) {
|
|
@@ -13829,7 +13829,7 @@ class ArdiumFormFieldNativeInputAdapterDirective {
|
|
|
13829
13829
|
this.isSuccess = input(false, { transform: v => coerceBooleanProperty(v) });
|
|
13830
13830
|
this.disabled = input(false, { transform: v => coerceBooleanProperty(v) });
|
|
13831
13831
|
//! form field related
|
|
13832
|
-
this.control =
|
|
13832
|
+
this.control = trackBoundControl(this, { attachValueAccessor: false });
|
|
13833
13833
|
this.htmlId = input(TakeChance.id());
|
|
13834
13834
|
this._hasError = input(undefined, {
|
|
13835
13835
|
transform: v => coerceBooleanProperty(v),
|