@morozeckiy/dd-lib 0.9.8 → 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.
@@ -435,9 +435,7 @@ class ValidatorsService {
435
435
  }
436
436
  }
437
437
  else if (key && !presetErrors.includes(key)) {
438
- return typeof error[key] === 'string' ? error[key] : 'Неверно заполнено поле' +
439
- '' +
440
- '';
438
+ return typeof error[key] === 'string' ? error[key] : 'Неверно заполнено поле';
441
439
  }
442
440
  }
443
441
  return '';
@@ -4470,6 +4468,7 @@ class LibTabsFragmentComponent {
4470
4468
  this.getFragment();
4471
4469
  }
4472
4470
  if (this.tabs && this.noFragment) {
4471
+ console.log(this.tabs.map(t => this.rout && t.path ? `${this.rout}/${t.path}` : t.path));
4473
4472
  this.tabsPath = this.tabs.map(t => this.rout && t.path ? `${this.rout}/${t.path}` : t.path).filter(f => !!f);
4474
4473
  this.getPath();
4475
4474
  }
@@ -4492,7 +4491,8 @@ class LibTabsFragmentComponent {
4492
4491
  this.router.navigate([this.rout], { fragment: tab.fragment });
4493
4492
  }
4494
4493
  else if (this.rout && this.noFragment) {
4495
- const route = tab.path ? [this.rout, tab.path] : [this.rout];
4494
+ const path = tab.path?.includes('/') ? tab.path?.split('/') : [tab.path];
4495
+ const route = tab.path ? [this.rout, ...path] : [this.rout];
4496
4496
  this.router.navigate(route);
4497
4497
  }
4498
4498
  else if (!this.rout && tab.path) {
@@ -4559,7 +4559,7 @@ class LibTabsFragmentComponent {
4559
4559
  }
4560
4560
  getPath() {
4561
4561
  this.activeFragment = this.tabs?.[0]?.id || 0;
4562
- const activePath = this.tabsPath?.find(f => `/${f}` === this.location.path())?.replace(`${this.rout}/`, '');
4562
+ const activePath = this.tabsPath?.find(f => `/${f}` === location.pathname)?.replace(`${this.rout}/`, '');
4563
4563
  if (activePath) {
4564
4564
  this.activeFragment = this.tabs?.length ? this.tabs.find(f => f.path === activePath)?.id : 0;
4565
4565
  if (this.needInitEvent) {