@solcre-org/core-ui 2.15.16 → 2.15.17

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.
@@ -15653,13 +15653,19 @@ class MainNavService {
15653
15653
  renderer;
15654
15654
  constructor(rendererFactory) {
15655
15655
  this.renderer = rendererFactory.createRenderer(null, null);
15656
- const savedState = this.getSidebarState();
15656
+ const isMobile = typeof window !== 'undefined' && window.innerWidth <= 768;
15657
+ let savedState = this.getSidebarState();
15658
+ if (isMobile) {
15659
+ savedState = SidebarState.COLLAPSED;
15660
+ sessionStorage.setItem(this.SIDEBAR_STATE, savedState);
15661
+ }
15662
+ else if (!savedState) {
15663
+ savedState = SidebarState.EXPANDED;
15664
+ sessionStorage.setItem(this.SIDEBAR_STATE, savedState);
15665
+ }
15657
15666
  const isCollapsed = savedState === SidebarState.COLLAPSED;
15658
15667
  this.isCollapsedSubject.next(isCollapsed);
15659
15668
  this.updateBodyClass(isCollapsed);
15660
- if (!savedState) {
15661
- this.setSidebarState(SidebarState.EXPANDED);
15662
- }
15663
15669
  }
15664
15670
  setSidebarState(state) {
15665
15671
  sessionStorage.setItem(this.SIDEBAR_STATE, state);
@@ -15682,15 +15688,19 @@ class MainNavService {
15682
15688
  this.setSidebarState(SidebarState.COLLAPSED);
15683
15689
  }
15684
15690
  clearSidebarState() {
15691
+ const isMobile = typeof window !== 'undefined' && window.innerWidth <= 768;
15685
15692
  sessionStorage.removeItem(this.SIDEBAR_STATE);
15686
- this.isCollapsedSubject.next(false);
15687
- this.updateBodyClass(false);
15693
+ const isCollapsed = isMobile;
15694
+ this.isCollapsedSubject.next(isCollapsed);
15695
+ this.updateBodyClass(isCollapsed);
15688
15696
  }
15689
15697
  updateBodyClass(isCollapsed) {
15690
15698
  if (isCollapsed) {
15691
15699
  this.renderer.removeClass(document.body, 'nav-expanded');
15700
+ this.renderer.addClass(document.body, 'nav-collapsed');
15692
15701
  }
15693
15702
  else {
15703
+ this.renderer.removeClass(document.body, 'nav-collapsed');
15694
15704
  this.renderer.addClass(document.body, 'nav-expanded');
15695
15705
  }
15696
15706
  }
@@ -15707,11 +15717,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
15707
15717
  // Este archivo es generado automáticamente por scripts/update-version.js
15708
15718
  // No edites manualmente este archivo
15709
15719
  const VERSION = {
15710
- full: '2.15.16',
15720
+ full: '2.15.17',
15711
15721
  major: 2,
15712
15722
  minor: 15,
15713
- patch: 16,
15714
- timestamp: '2025-10-15T13:19:12.026Z',
15723
+ patch: 17,
15724
+ timestamp: '2025-10-15T13:49:10.034Z',
15715
15725
  buildDate: '15/10/2025'
15716
15726
  };
15717
15727
 
@@ -15911,6 +15921,9 @@ class MainNavComponent {
15911
15921
  return true;
15912
15922
  }
15913
15923
  logout() {
15924
+ document.body.classList.remove('nav-expanded', 'bottom-nav-open', 'bottom-nav-closing');
15925
+ document.documentElement.classList.remove('nav-expanded');
15926
+ this.mainNavService.clearSidebarState();
15914
15927
  if (this.navConfig().customLogout) {
15915
15928
  this.onLogout.emit();
15916
15929
  return;