@yuuvis/client-framework 2.1.0 → 2.1.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.
- package/fesm2022/yuuvis-client-framework-forms.mjs +18 -35
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-details.mjs +228 -195
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +41 -21
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-upload-progress.mjs +18 -2
- package/fesm2022/yuuvis-client-framework-upload-progress.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-widget-grid.mjs +2 -3
- package/fesm2022/yuuvis-client-framework-widget-grid.mjs.map +1 -1
- package/forms/lib/elements/datetime-range/datetime-range.component.d.ts +4 -4
- package/forms/lib/elements/range-select-date/date-range-picker/date-range-picker.component.d.ts +3 -3
- package/lib/assets/i18n/de.json +2 -2
- package/lib/assets/i18n/en.json +2 -2
- package/master-details/index.d.ts +1 -0
- package/object-details/index.d.ts +3 -0
- package/object-details/lib/object-details-header/object-details-header.component.d.ts +26 -0
- package/object-details/lib/object-details-shell/object-details-shell.component.d.ts +17 -43
- package/object-details/lib/object-details-shell/object-details-shell.service.d.ts +13 -0
- package/object-details/lib/object-details.component.d.ts +11 -17
- package/object-details/lib/object-details.module.d.ts +12 -0
- package/package.json +4 -4
- package/tile-list/lib/tile-config/tile-config-tile/tile-config-tile.component.d.ts +3 -3
- package/tile-list/lib/tile-config/tile-config.component.d.ts +3 -2
- package/upload-progress/index.d.ts +1 -0
- package/upload-progress/lib/upload-progress/upload-progress.module.d.ts +7 -0
|
@@ -373,7 +373,7 @@ class DatetimeComponent extends AbstractMatFormField {
|
|
|
373
373
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
374
374
|
registerOnTouched() { }
|
|
375
375
|
onValueChange(e) {
|
|
376
|
-
this.propagateChange(
|
|
376
|
+
this.propagateChange(e);
|
|
377
377
|
}
|
|
378
378
|
ngOnInit() {
|
|
379
379
|
this.focusHandled.set(true);
|
|
@@ -420,18 +420,9 @@ class DatetimeRangeComponent extends AbstractMatFormField {
|
|
|
420
420
|
}
|
|
421
421
|
#dRef;
|
|
422
422
|
#checkForEqualsRange(value) {
|
|
423
|
-
const
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}
|
|
427
|
-
if (value.secondValue && typeof value.secondValue === 'string') {
|
|
428
|
-
value.secondValue = removeZ(value.secondValue);
|
|
429
|
-
}
|
|
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
|
-
const firstDate = value.firstValue.slice(0, 10);
|
|
433
|
-
const secondDate = value.secondValue && value.secondValue.slice(0, 10);
|
|
434
|
-
if (firstEndsWith && secondEndsWith && firstDate === secondDate) {
|
|
423
|
+
const firstDate = value.firstValue;
|
|
424
|
+
const secondDate = value.secondValue ? new Date(value.secondValue.getTime() - Utils.DEFAULT_TIME_OFFSET_V2) : undefined;
|
|
425
|
+
if (firstDate.getTime() === secondDate?.getTime()) {
|
|
435
426
|
return {
|
|
436
427
|
operator: Operator.EQUAL,
|
|
437
428
|
firstValue: value.firstValue,
|
|
@@ -441,14 +432,15 @@ class DatetimeRangeComponent extends AbstractMatFormField {
|
|
|
441
432
|
return value;
|
|
442
433
|
}
|
|
443
434
|
writeValue(value) {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
435
|
+
let _value = value && Utils.getDateRangeFrom(value);
|
|
436
|
+
if (_value && (_value.firstValue || _value.secondValue)) {
|
|
437
|
+
_value = this.#checkForEqualsRange(_value);
|
|
438
|
+
this.value = _value;
|
|
439
|
+
const match = this.availableSearchOptions.find((o) => o.value === _value?.operator);
|
|
448
440
|
this.rangeForm.patchValue({
|
|
449
|
-
dateValueFrom:
|
|
441
|
+
dateValueFrom: _value.secondValue && _value.firstValue,
|
|
450
442
|
operator: match ? match.value : this.availableSearchOptions[0].value,
|
|
451
|
-
dateValue:
|
|
443
|
+
dateValue: _value.secondValue || _value.firstValue
|
|
452
444
|
});
|
|
453
445
|
}
|
|
454
446
|
else {
|
|
@@ -462,12 +454,12 @@ class DatetimeRangeComponent extends AbstractMatFormField {
|
|
|
462
454
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
463
455
|
registerOnTouched(fn) { }
|
|
464
456
|
#onValueChange() {
|
|
465
|
-
const dateValue = this.rangeForm.value.dateValue
|
|
457
|
+
const dateValue = this.rangeForm.value.dateValue;
|
|
466
458
|
const operator = this.rangeForm.value.operator;
|
|
467
459
|
if (operator === Operator.INTERVAL_INCLUDE_BOTH) {
|
|
468
|
-
const dateValueFrom = this.rangeForm.value.dateValueFrom
|
|
469
|
-
if (dateValueFrom
|
|
470
|
-
this._isValid = this.rangeForm.valid
|
|
460
|
+
const dateValueFrom = this.rangeForm.value.dateValueFrom;
|
|
461
|
+
if (dateValueFrom && dateValue) {
|
|
462
|
+
this._isValid = this.rangeForm.valid;
|
|
471
463
|
this.value = !this._isValid
|
|
472
464
|
? null
|
|
473
465
|
: {
|
|
@@ -477,7 +469,7 @@ class DatetimeRangeComponent extends AbstractMatFormField {
|
|
|
477
469
|
};
|
|
478
470
|
}
|
|
479
471
|
}
|
|
480
|
-
else {
|
|
472
|
+
else if (dateValue) {
|
|
481
473
|
this._isValid = this.rangeForm.valid;
|
|
482
474
|
this.value = !this._isValid
|
|
483
475
|
? null
|
|
@@ -489,20 +481,11 @@ class DatetimeRangeComponent extends AbstractMatFormField {
|
|
|
489
481
|
}
|
|
490
482
|
this.propagateChange(this.value);
|
|
491
483
|
}
|
|
492
|
-
#toDate(value) {
|
|
493
|
-
if (value instanceof Date)
|
|
494
|
-
return value;
|
|
495
|
-
if (typeof value === 'string') {
|
|
496
|
-
const parsed = new Date(value);
|
|
497
|
-
return isNaN(parsed.getTime()) ? null : parsed;
|
|
498
|
-
}
|
|
499
|
-
return null;
|
|
500
|
-
}
|
|
501
484
|
#getValidator() {
|
|
502
485
|
return (control) => {
|
|
503
486
|
const operator = control.get('operator')?.value;
|
|
504
|
-
const dateValue =
|
|
505
|
-
const dateValueFrom =
|
|
487
|
+
const dateValue = Utils.getDateFrom(control.get('dateValue')?.value);
|
|
488
|
+
const dateValueFrom = Utils.getDateFrom(control.get('dateValueFrom')?.value);
|
|
506
489
|
const singleValueOperators = new Set([Operator.EQUAL, Operator.GREATER_OR_EQUAL, Operator.LESS_OR_EQUAL]);
|
|
507
490
|
const rangeOperators = new Set([Operator.INTERVAL_INCLUDE_BOTH]);
|
|
508
491
|
if (this.situation === Situation.SEARCH && !rangeOperators.has(operator))
|