@coreui/angular-pro 4.3.2 → 4.3.3

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.
@@ -11350,8 +11350,11 @@ class SidebarComponent {
11350
11350
  * Toggle the visibility of sidebar component. [docs]
11351
11351
  */
11352
11352
  set visible(value) {
11353
- this._visible = coerceBooleanProperty(value);
11354
- this.visibleChange.emit(this._visible);
11353
+ const visible = coerceBooleanProperty(value);
11354
+ if (this._visible !== visible) {
11355
+ this._visible = visible;
11356
+ this.visibleChange.emit(this._visible);
11357
+ }
11355
11358
  }
11356
11359
  get visible() {
11357
11360
  return this._visible;
@@ -11368,6 +11371,9 @@ class SidebarComponent {
11368
11371
  this.unfoldable = newState.unfoldable;
11369
11372
  }
11370
11373
  }
11374
+ else {
11375
+ this.visible = (newState.visible ?? this.visible) && !this.overlaid;
11376
+ }
11371
11377
  this.state = {
11372
11378
  ...this.state,
11373
11379
  ...newState
@@ -11389,7 +11395,7 @@ class SidebarComponent {
11389
11395
  sidebar: true,
11390
11396
  'sidebar-fixed': this.position === 'fixed' && !mobile,
11391
11397
  'sidebar-narrow': this.narrow && !this.unfoldable,
11392
- 'sidebar-narrow-unfoldable': unfoldable,
11398
+ 'sidebar-narrow-unfoldable': this.unfoldable,
11393
11399
  'sidebar-overlaid': this.overlaid,
11394
11400
  [`sidebar-${this.placement}`]: !!this.placement,
11395
11401
  [`sidebar-${this.colorScheme}`]: !!this.colorScheme,
@@ -11453,12 +11459,13 @@ class SidebarComponent {
11453
11459
  const layoutChanges = this.breakpointObserver.observe([onMobile]);
11454
11460
  this.layoutChangeSubscription = layoutChanges.subscribe((result) => {
11455
11461
  const isOnMobile = result.breakpoints[onMobile];
11462
+ const isUnfoldable = isOnMobile ? false : this.unfoldable;
11456
11463
  if (this.onMobile !== isOnMobile) {
11457
11464
  this.onMobile = isOnMobile;
11458
11465
  this.sidebarService.toggle({
11459
11466
  mobile: isOnMobile,
11460
- unfoldable: isOnMobile ? false : this.unfoldable,
11461
- visible: isOnMobile ? false : this.visible,
11467
+ unfoldable: isUnfoldable,
11468
+ visible: (!isOnMobile) || isUnfoldable,
11462
11469
  sidebar: this
11463
11470
  });
11464
11471
  }
@@ -11476,7 +11483,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
11476
11483
  args: [{
11477
11484
  selector: 'c-sidebar',
11478
11485
  exportAs: 'cSidebar',
11479
- template: '<ng-content></ng-content>',
11486
+ template: '<ng-content></ng-content>'
11480
11487
  }]
11481
11488
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
11482
11489
  type: Inject,