@ifsworld/granite-components 4.0.0-beta.17 → 4.0.0-beta.18

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.
@@ -1173,7 +1173,6 @@
1173
1173
  var _MenuBaseComponent = /** @class */ (function () {
1174
1174
  function _MenuBaseComponent(_changeDetectorRef) {
1175
1175
  this._changeDetectorRef = _changeDetectorRef;
1176
- this.openOnHover = true;
1177
1176
  /**
1178
1177
  * Event emitted when the menu is closed
1179
1178
  */
@@ -1197,7 +1196,13 @@
1197
1196
  this._animationDone = new rxjs.Subject();
1198
1197
  this._menuEmpty$ = new rxjs.BehaviorSubject(false);
1199
1198
  // eslint-disable-next-line @typescript-eslint/member-ordering
1200
- this._isMenuEmpty$ = this._menuEmpty$;
1199
+ this._isMenuEmpty$ = rxjs.combineLatest([
1200
+ this._menuEmpty$,
1201
+ this._animationDone,
1202
+ ]).pipe(operators.filter(function (_b) {
1203
+ var _c = __read(_b, 2), m = _c[0], a = _c[1];
1204
+ return m && a != null;
1205
+ }), operators.map(function () { return true; }));
1201
1206
  /** Only the direct descendant menu items. */
1202
1207
  this._directDescendantItems = new core.QueryList();
1203
1208
  /** Subscription to tab events on the menu panel */
@@ -1500,7 +1505,6 @@
1500
1505
  yPosition: [{ type: core.Input }],
1501
1506
  title: [{ type: core.Input }],
1502
1507
  closeLabel: [{ type: core.Input }],
1503
- openOnHover: [{ type: core.Input }],
1504
1508
  templateRef: [{ type: core.ViewChild, args: [core.TemplateRef,] }],
1505
1509
  _allItems: [{ type: core.ContentChildren, args: [GraniteMenuItemComponent, { descendants: true },] }],
1506
1510
  closed: [{ type: core.Output }]
@@ -1589,6 +1593,7 @@
1589
1593
  this._menuItemInstance = _menuItemInstance;
1590
1594
  this._dir = _dir;
1591
1595
  this._focusMonitor = _focusMonitor;
1596
+ this.openOnHover = true;
1592
1597
  /** Whether the associated menu is open */
1593
1598
  this._isMenuOpen = false;
1594
1599
  // Tracking input type is necessary so it's possible to only auto-focus
@@ -2077,7 +2082,7 @@
2077
2082
  */
2078
2083
  GraniteMenuTriggerForDirective.prototype._openOnHover = function () {
2079
2084
  var _a, _b;
2080
- return (this.menu.openOnHover &&
2085
+ return (this.openOnHover &&
2081
2086
  ((_a = this._parentMenu._clientOutput) === null || _a === void 0 ? void 0 : _a.device) === 'desktop' && ((_b = this._parentMenu._clientInput) === null || _b === void 0 ? void 0 : _b.devices.includes('mouse')));
2082
2087
  };
2083
2088
  /**
@@ -2086,7 +2091,7 @@
2086
2091
  */
2087
2092
  GraniteMenuTriggerForDirective.prototype._toggleOnSubmenuClick = function () {
2088
2093
  var _a, _b;
2089
- return (!this.menu.openOnHover ||
2094
+ return (!this.openOnHover ||
2090
2095
  (((_a = this._parentMenu._clientOutput) === null || _a === void 0 ? void 0 : _a.device) === 'desktop' &&
2091
2096
  !((_b = this._parentMenu._clientInput) === null || _b === void 0 ? void 0 : _b.devices.includes('mouse'))));
2092
2097
  };
@@ -2218,7 +2223,8 @@
2218
2223
  { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
2219
2224
  ]; };
2220
2225
  GraniteMenuTriggerForDirective.propDecorators = {
2221
- menu: [{ type: core.Input, args: ['graniteMenuTriggerFor',] }]
2226
+ menu: [{ type: core.Input, args: ['graniteMenuTriggerFor',] }],
2227
+ openOnHover: [{ type: core.Input }]
2222
2228
  };
2223
2229
 
2224
2230
  var GraniteMenuTouchCloseComponent = /** @class */ (function () {