@gipisistemas/ngx-core 1.0.14 → 1.0.15

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.
@@ -19191,6 +19191,7 @@ class Sidenav {
19191
19191
  this.arrowType = signal('arrow_left', ...(ngDevMode ? [{ debugName: "arrowType" }] : []));
19192
19192
  this.mode = signal('over', ...(ngDevMode ? [{ debugName: "mode" }] : []));
19193
19193
  this.viewportSize = signal('mobile', ...(ngDevMode ? [{ debugName: "viewportSize" }] : []));
19194
+ this._hoverExpanded = false;
19194
19195
  this.id = input(this._uniqueId, ...(ngDevMode ? [{ debugName: "id" }] : []));
19195
19196
  this.name = input(this._uniqueId, ...(ngDevMode ? [{ debugName: "name" }] : []));
19196
19197
  this._opened = false;
@@ -19225,20 +19226,23 @@ class Sidenav {
19225
19226
  this._applyResponsiveState();
19226
19227
  }
19227
19228
  handleMouseEnter() {
19228
- if (this.viewportSize() === 'tablet' && !this.opened) {
19229
+ if (!this.opened) {
19230
+ this._hoverExpanded = true;
19229
19231
  this.opened = true;
19230
19232
  this._changeDetectorRef.detectChanges();
19231
19233
  }
19232
19234
  }
19233
19235
  handleMouseLeave() {
19234
- if (this.viewportSize() === 'tablet' && this.opened) {
19236
+ if (this._hoverExpanded && this.opened) {
19235
19237
  this.opened = false;
19238
+ this._hoverExpanded = false;
19236
19239
  this._menuLevel.set([]);
19237
19240
  this._changeDetectorRef.detectChanges();
19238
19241
  }
19239
19242
  }
19240
19243
  handleToggleSidenav() {
19241
19244
  this.opened = !this.opened;
19245
+ this._hoverExpanded = false;
19242
19246
  this._menuLevel.set([]);
19243
19247
  this._changeDetectorRef.detectChanges();
19244
19248
  }
@@ -19250,11 +19254,21 @@ class Sidenav {
19250
19254
  this._changeDetectorRef.detectChanges();
19251
19255
  }
19252
19256
  handleMenuItemSelect(menu) {
19257
+ if (!this.opened) {
19258
+ this._menuLevel.set([]);
19259
+ this._changeDetectorRef.detectChanges();
19260
+ menu.action?.();
19261
+ return;
19262
+ }
19253
19263
  if (menu.type === 'COLLAPSABLE') {
19254
19264
  this._menuLevel.update((level) => [...level, menu]);
19265
+ this._changeDetectorRef.detectChanges();
19266
+ return;
19255
19267
  }
19256
- if (this.mode() === 'over' && this.opened && menu.type !== 'COLLAPSABLE') {
19268
+ this._menuLevel.set([]);
19269
+ if (this.mode() === 'over' && this.opened) {
19257
19270
  this.opened = false;
19271
+ this._hoverExpanded = false;
19258
19272
  }
19259
19273
  this._changeDetectorRef.detectChanges();
19260
19274
  menu.action?.();
@@ -19271,10 +19285,12 @@ class Sidenav {
19271
19285
  if (nextViewport === 'desktop') {
19272
19286
  this.mode.set('side');
19273
19287
  this.opened = true;
19288
+ this._hoverExpanded = false;
19274
19289
  }
19275
19290
  else {
19276
19291
  this.mode.set('over');
19277
19292
  this.opened = false;
19293
+ this._hoverExpanded = false;
19278
19294
  }
19279
19295
  this._menuLevel.set([]);
19280
19296
  this._changeDetectorRef.detectChanges();