@morozeckiy/dd-lib 0.9.7 → 0.9.9
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.
|
@@ -401,7 +401,6 @@ class ValidatorsService {
|
|
|
401
401
|
}
|
|
402
402
|
static getErrorText(error) {
|
|
403
403
|
const presetErrors = ['minlength', 'maxlength', 'email', 'required', 'pattern', 'min', 'max', 'notEquivalent'];
|
|
404
|
-
console.log(error);
|
|
405
404
|
if (error) {
|
|
406
405
|
const key = Object.keys(error)?.[0];
|
|
407
406
|
if (key && presetErrors.includes(key)) {
|
|
@@ -436,9 +435,7 @@ class ValidatorsService {
|
|
|
436
435
|
}
|
|
437
436
|
}
|
|
438
437
|
else if (key && !presetErrors.includes(key)) {
|
|
439
|
-
return typeof error[key] === 'string' ? error[key] : 'Неверно заполнено поле'
|
|
440
|
-
'' +
|
|
441
|
-
'';
|
|
438
|
+
return typeof error[key] === 'string' ? error[key] : 'Неверно заполнено поле';
|
|
442
439
|
}
|
|
443
440
|
}
|
|
444
441
|
return '';
|
|
@@ -2154,7 +2151,6 @@ class LibCommonInputTextComponent {
|
|
|
2154
2151
|
}
|
|
2155
2152
|
ngAfterViewChecked() {
|
|
2156
2153
|
this.changeDetection.markForCheck();
|
|
2157
|
-
console.log(this.control);
|
|
2158
2154
|
this.errorText = ValidatorsService.getErrorText(this.control?.errors);
|
|
2159
2155
|
}
|
|
2160
2156
|
get invalidState() {
|
|
@@ -4472,6 +4468,7 @@ class LibTabsFragmentComponent {
|
|
|
4472
4468
|
this.getFragment();
|
|
4473
4469
|
}
|
|
4474
4470
|
if (this.tabs && this.noFragment) {
|
|
4471
|
+
console.log(this.tabs.map(t => this.rout && t.path ? `${this.rout}/${t.path}` : t.path));
|
|
4475
4472
|
this.tabsPath = this.tabs.map(t => this.rout && t.path ? `${this.rout}/${t.path}` : t.path).filter(f => !!f);
|
|
4476
4473
|
this.getPath();
|
|
4477
4474
|
}
|
|
@@ -4494,7 +4491,8 @@ class LibTabsFragmentComponent {
|
|
|
4494
4491
|
this.router.navigate([this.rout], { fragment: tab.fragment });
|
|
4495
4492
|
}
|
|
4496
4493
|
else if (this.rout && this.noFragment) {
|
|
4497
|
-
const
|
|
4494
|
+
const path = tab.path?.includes('/') ? tab.path?.split('/') : [tab.path];
|
|
4495
|
+
const route = tab.path ? [this.rout, ...path] : [this.rout];
|
|
4498
4496
|
this.router.navigate(route);
|
|
4499
4497
|
}
|
|
4500
4498
|
else if (!this.rout && tab.path) {
|
|
@@ -4561,7 +4559,7 @@ class LibTabsFragmentComponent {
|
|
|
4561
4559
|
}
|
|
4562
4560
|
getPath() {
|
|
4563
4561
|
this.activeFragment = this.tabs?.[0]?.id || 0;
|
|
4564
|
-
const activePath = this.tabsPath?.find(f => `/${f}` ===
|
|
4562
|
+
const activePath = this.tabsPath?.find(f => `/${f}` === location.pathname)?.replace(`${this.rout}/`, '');
|
|
4565
4563
|
if (activePath) {
|
|
4566
4564
|
this.activeFragment = this.tabs?.length ? this.tabs.find(f => f.path === activePath)?.id : 0;
|
|
4567
4565
|
if (this.needInitEvent) {
|
|
@@ -4946,7 +4944,6 @@ class LibDateRangeComponent {
|
|
|
4946
4944
|
this.endDateStr = '';
|
|
4947
4945
|
}
|
|
4948
4946
|
this.onPeriodChange();
|
|
4949
|
-
console.error(errorMessage);
|
|
4950
4947
|
}
|
|
4951
4948
|
onPeriodChange() {
|
|
4952
4949
|
if (this.selectedPeriod.start && this.selectedPeriod.end) {
|