@yuuvis/client-framework 2.0.14 → 2.1.0
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/fesm2022/yuuvis-client-framework-forms.mjs +11 -9
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-summary.mjs +1 -1
- package/fesm2022/yuuvis-client-framework-object-summary.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-overflow-menu.mjs +19 -8
- package/fesm2022/yuuvis-client-framework-overflow-menu.mjs.map +1 -1
- package/overflow-menu/lib/overflow-menu.component.d.ts +3 -1
- package/overflow-menu/lib/overflow-menu.interface.d.ts +1 -1
- package/package.json +8 -8
|
@@ -427,10 +427,10 @@ class DatetimeRangeComponent extends AbstractMatFormField {
|
|
|
427
427
|
if (value.secondValue && typeof value.secondValue === 'string') {
|
|
428
428
|
value.secondValue = removeZ(value.secondValue);
|
|
429
429
|
}
|
|
430
|
-
const firstEndsWith = value.firstValue.endsWith(
|
|
431
|
-
const secondEndsWith = value.secondValue.endsWith(
|
|
430
|
+
const firstEndsWith = value.firstValue.endsWith(Utils.DEFAULT_RANGE_TIME_V1);
|
|
431
|
+
const secondEndsWith = value.secondValue && value.secondValue.endsWith(Utils.DEFAULT_RANGE_TIME_V2);
|
|
432
432
|
const firstDate = value.firstValue.slice(0, 10);
|
|
433
|
-
const secondDate = value.secondValue.slice(0, 10);
|
|
433
|
+
const secondDate = value.secondValue && value.secondValue.slice(0, 10);
|
|
434
434
|
if (firstEndsWith && secondEndsWith && firstDate === secondDate) {
|
|
435
435
|
return {
|
|
436
436
|
operator: Operator.EQUAL,
|
|
@@ -505,7 +505,7 @@ class DatetimeRangeComponent extends AbstractMatFormField {
|
|
|
505
505
|
const dateValueFrom = this.#toDate(control.get('dateValueFrom')?.value);
|
|
506
506
|
const singleValueOperators = new Set([Operator.EQUAL, Operator.GREATER_OR_EQUAL, Operator.LESS_OR_EQUAL]);
|
|
507
507
|
const rangeOperators = new Set([Operator.INTERVAL_INCLUDE_BOTH]);
|
|
508
|
-
if (this.situation === Situation.SEARCH)
|
|
508
|
+
if (this.situation === Situation.SEARCH && !rangeOperators.has(operator))
|
|
509
509
|
return null;
|
|
510
510
|
if (singleValueOperators.has(operator)) {
|
|
511
511
|
if (!Utils.isValidDate(dateValue)) {
|
|
@@ -540,11 +540,13 @@ class DatetimeRangeComponent extends AbstractMatFormField {
|
|
|
540
540
|
}
|
|
541
541
|
ngOnInit() {
|
|
542
542
|
this.rangeForm.setValidators(this.#getValidator());
|
|
543
|
-
this.rangeForm.statusChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe(
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
543
|
+
this.rangeForm.statusChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe({
|
|
544
|
+
next: () => {
|
|
545
|
+
if (this.ngControl?.control) {
|
|
546
|
+
// this.errorState = this.situation === Situation.SEARCH || this._isValid;
|
|
547
|
+
this.errorState = !!this.rangeForm.errors;
|
|
548
|
+
this.ngControl.control.setErrors(this.rangeForm.errors);
|
|
549
|
+
}
|
|
548
550
|
}
|
|
549
551
|
});
|
|
550
552
|
this.rangeForm.updateValueAndValidity();
|