@acorex/components 22.0.0-next.14 → 22.0.0-next.16

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.
@@ -105,6 +105,16 @@ class AXMenuItemClickBaseEvent extends NXClickEvent {
105
105
  }
106
106
  }
107
107
 
108
+ /** Edge padding when clamping floating menu panels to the viewport. */
109
+ const AX_MENU_VIEWPORT_MARGIN = 8;
110
+ /** Limits a fixed menu panel so it stays within the viewport below `top`. */
111
+ function axFitMenuPanelHeight(renderer, el, top) {
112
+ renderer.setStyle(el, 'max-height', `${Math.max(0, window.innerHeight - top - AX_MENU_VIEWPORT_MARGIN)}px`);
113
+ }
114
+ function axClearMenuPanelHeight(renderer, el) {
115
+ renderer.removeStyle(el, 'max-height');
116
+ }
117
+
108
118
  /**
109
119
  * Represents a menu item component used within an `ax-menu`.
110
120
  * @category Components
@@ -139,8 +149,16 @@ class AXMenuItemComponent extends NXComponent {
139
149
  this.unsuscriber = inject(AXUnsubscriber);
140
150
  this.renderer = inject(Renderer2);
141
151
  this.injector = inject(Injector);
152
+ this.document = inject(DOCUMENT);
142
153
  this.zIndexService = inject(AXZIndexService);
143
154
  this.zToken = null;
155
+ this.submenuPortalParent = null;
156
+ this.submenuPortalNextSibling = null;
157
+ /** Survives submenu portaling when the DOM parent chain is broken. */
158
+ this.linkedParent = null;
159
+ this.mouseLeaveTimeout = null;
160
+ this.submenuUnlistenEnter = null;
161
+ this.submenuUnlistenLeave = null;
144
162
  this.arrowIcon = computed(() => {
145
163
  const isRtl = AXHtmlUtil.isRtl(this.nativeElement);
146
164
  return this.root.orientation() == 'horizontal' && this.isFirstLevel()
@@ -159,12 +177,12 @@ class AXMenuItemComponent extends NXComponent {
159
177
  ...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
160
178
  this.color = input(/* @ts-ignore */
161
179
  ...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
162
- this.mouseLeaveTimeout = null;
163
180
  afterNextRender(() => {
164
181
  if (!isPlatformBrowser(this.platformId)) {
165
182
  return;
166
183
  }
167
184
  this.reparentOrphanedChildren();
185
+ this.linkChildItems();
168
186
  this.updateDiscoveredSubmenuNodeCount();
169
187
  this.childObserver = new MutationObserver((records) => {
170
188
  if (!this.hasRelevantChildMutation(records)) {
@@ -185,6 +203,10 @@ class AXMenuItemComponent extends NXComponent {
185
203
  this.service.close$.pipe(this.unsuscriber.takeUntilDestroy).subscribe((item) => {
186
204
  if (this == item) {
187
205
  this.isOpen.set(false);
206
+ this.clearCloseTimeout();
207
+ this.restoreSubmenuPortal();
208
+ this.zIndexService.release(this.zToken);
209
+ this.zToken = null;
188
210
  }
189
211
  });
190
212
  }
@@ -192,10 +214,13 @@ class AXMenuItemComponent extends NXComponent {
192
214
  return this.nativeElement.querySelector('ax-text')?.innerText;
193
215
  }
194
216
  /**
195
- * Resolves the parent menu item. Items rendered via recursive `ngTemplateOutlet` do not
196
- * receive a DI parent, so we fall back to the DOM tree after reparenting.
217
+ * Resolves the parent menu item. Prefers an explicit link (survives submenu portaling),
218
+ * then DI, then the DOM tree.
197
219
  */
198
220
  getParentMenuItem() {
221
+ if (this.linkedParent) {
222
+ return this.linkedParent;
223
+ }
199
224
  if (this.parent) {
200
225
  return this.parent;
201
226
  }
@@ -203,8 +228,7 @@ class AXMenuItemComponent extends NXComponent {
203
228
  if (!parentHost || parentHost === this.nativeElement) {
204
229
  return null;
205
230
  }
206
- const ctx = parentHost.__axContext__;
207
- return ctx instanceof AXMenuItemComponent ? ctx : null;
231
+ return this.getInstanceFromElement(parentHost) ?? null;
208
232
  }
209
233
  /**
210
234
  * Opens the submenu of this menu item if it has sub-items and is not disabled.
@@ -214,7 +238,13 @@ class AXMenuItemComponent extends NXComponent {
214
238
  return;
215
239
  }
216
240
  this.reparentOrphanedChildren();
241
+ this.linkChildItems();
217
242
  this.service.closeExcept(this);
243
+ const submenu = this.submenuSlot()?.nativeElement;
244
+ if (submenu) {
245
+ // Portal before `isOpen` so ancestor overflow cannot clip the first paint.
246
+ this.portalSubmenu(submenu);
247
+ }
218
248
  if (!this.zToken) {
219
249
  this.zToken = this.zIndexService.acquire();
220
250
  }
@@ -224,9 +254,8 @@ class AXMenuItemComponent extends NXComponent {
224
254
  * Closes the submenu of this menu item if open.
225
255
  */
226
256
  close() {
257
+ this.clearCloseTimeout();
227
258
  this.service.markClosed(this);
228
- this.zIndexService.release(this.zToken);
229
- this.zToken = null;
230
259
  }
231
260
  /**
232
261
  * Positions the submenu after layout so nested levels measure their full height.
@@ -245,30 +274,35 @@ class AXMenuItemComponent extends NXComponent {
245
274
  }
246
275
  /**
247
276
  * Calculate the position of the submenu to avoid it going out of the viewport.
277
+ * Tall panels are height-clamped; the panel is portaled so parent overflow cannot clip it.
248
278
  */
249
279
  calculatePosition() {
250
280
  const submenu = this.submenuSlot()?.nativeElement;
251
281
  if (!submenu)
252
282
  return;
283
+ this.portalSubmenu(submenu);
284
+ axClearMenuPanelHeight(this.renderer, submenu);
253
285
  const submenuRect = this.measureSubmenuRect(submenu);
254
286
  const itemRect = this.nativeElement.getBoundingClientRect();
255
287
  const windowWidth = window.innerWidth;
256
288
  const windowHeight = window.innerHeight;
289
+ const margin = AX_MENU_VIEWPORT_MARGIN;
257
290
  const isRtl = AXHtmlUtil.isRtl(this.nativeElement);
291
+ const effectiveHeight = Math.min(submenuRect.height, Math.max(0, windowHeight - margin * 2));
258
292
  let finalTop;
259
293
  let finalLeft;
260
294
  const preferredTop = this.isFirstLevel() && this.root.orientation() === 'horizontal' ? itemRect.bottom : itemRect.top;
261
- const alternateTop = itemRect.top - submenuRect.height;
262
- if (preferredTop + submenuRect.height <= windowHeight) {
295
+ const alternateTop = itemRect.top - effectiveHeight;
296
+ if (preferredTop + effectiveHeight <= windowHeight - margin) {
263
297
  finalTop = preferredTop;
264
298
  }
265
- else if (alternateTop >= 0) {
299
+ else if (alternateTop >= margin) {
266
300
  finalTop = alternateTop;
267
301
  }
268
302
  else {
269
- finalTop = windowHeight - submenuRect.height;
303
+ finalTop = margin;
270
304
  }
271
- finalTop = this.clampVerticalPosition(finalTop, submenuRect.height, windowHeight);
305
+ finalTop = this.clampVerticalPosition(finalTop, effectiveHeight, windowHeight, margin);
272
306
  if (this.isFirstLevel() && this.root.orientation() === 'horizontal') {
273
307
  const preferredLeft = isRtl ? itemRect.right - submenuRect.width : itemRect.left;
274
308
  const alternateLeft = isRtl ? itemRect.left : itemRect.right - submenuRect.width;
@@ -280,47 +314,30 @@ class AXMenuItemComponent extends NXComponent {
280
314
  }
281
315
  }
282
316
  else {
283
- const preferredLeftRtl = itemRect.left - submenuRect.width;
284
- const alternateLeftRtl = itemRect.right;
285
- const preferredLeftLtr = itemRect.right;
286
- const alternateLeftLtr = itemRect.left - submenuRect.width;
287
- if (isRtl) {
288
- if (preferredLeftRtl >= 0) {
289
- finalLeft = preferredLeftRtl;
290
- }
291
- else if (alternateLeftRtl + submenuRect.width <= windowWidth) {
292
- finalLeft = alternateLeftRtl;
293
- }
294
- else {
295
- finalLeft = 0;
296
- }
317
+ const preferredLeft = isRtl ? itemRect.left - submenuRect.width : itemRect.right;
318
+ const alternateLeft = isRtl ? itemRect.right : itemRect.left - submenuRect.width;
319
+ if (isRtl ? preferredLeft >= 0 : preferredLeft + submenuRect.width <= windowWidth) {
320
+ finalLeft = preferredLeft;
321
+ }
322
+ else if (isRtl ? alternateLeft + submenuRect.width <= windowWidth : alternateLeft >= 0) {
323
+ finalLeft = alternateLeft;
297
324
  }
298
325
  else {
299
- if (preferredLeftLtr + submenuRect.width <= windowWidth) {
300
- finalLeft = preferredLeftLtr;
301
- }
302
- else if (alternateLeftLtr >= 0) {
303
- finalLeft = alternateLeftLtr;
304
- }
305
- else {
306
- finalLeft = windowWidth - submenuRect.width;
307
- }
326
+ finalLeft = isRtl ? 0 : windowWidth - submenuRect.width;
308
327
  }
309
328
  }
310
329
  const isNestedMenu = !(this.isFirstLevel() && this.root.orientation() === 'horizontal');
311
330
  if (isNestedMenu) {
312
331
  const overlapsParent = finalLeft < itemRect.right && itemRect.left < finalLeft + submenuRect.width;
313
- if (overlapsParent) {
314
- const shiftedTop = itemRect.bottom;
315
- if (shiftedTop + submenuRect.height <= windowHeight) {
316
- finalTop = shiftedTop;
317
- }
332
+ if (overlapsParent && itemRect.bottom + effectiveHeight <= windowHeight - margin) {
333
+ finalTop = itemRect.bottom;
318
334
  }
319
335
  }
320
- finalTop = this.clampVerticalPosition(finalTop, submenuRect.height, windowHeight);
336
+ finalTop = this.clampVerticalPosition(finalTop, effectiveHeight, windowHeight, margin);
321
337
  this.renderer.setStyle(submenu, 'position', 'fixed');
322
338
  this.renderer.setStyle(submenu, 'top', `${finalTop}px`);
323
339
  this.renderer.setStyle(submenu, 'left', `${finalLeft}px`);
340
+ axFitMenuPanelHeight(this.renderer, submenu, finalTop);
324
341
  if (this.zToken) {
325
342
  this.renderer.setStyle(submenu, 'z-index', String(this.zToken.zIndex));
326
343
  }
@@ -334,6 +351,83 @@ class AXMenuItemComponent extends NXComponent {
334
351
  this.renderer.removeStyle(submenu, 'display');
335
352
  return rect;
336
353
  }
354
+ /** Moves the submenu under the context-menu backdrop (or body) to escape ancestor overflow. */
355
+ portalSubmenu(submenu) {
356
+ if (!isPlatformBrowser(this.platformId)) {
357
+ return;
358
+ }
359
+ submenu.__axMenuOwner__ = this;
360
+ this.bindSubmenuPointerListeners(submenu);
361
+ if (this.submenuPortalParent) {
362
+ return;
363
+ }
364
+ const parent = submenu.parentElement;
365
+ if (!parent) {
366
+ return;
367
+ }
368
+ this.submenuPortalParent = parent;
369
+ this.submenuPortalNextSibling = submenu.nextSibling;
370
+ const rootEl = this.root.nativeElement;
371
+ const rootParent = rootEl.parentElement;
372
+ const portalHost = rootEl.tagName === 'AX-CONTEXT-MENU' && rootParent && rootParent !== this.document.body
373
+ ? rootParent
374
+ : this.document.body;
375
+ if (submenu.parentElement !== portalHost) {
376
+ portalHost.appendChild(submenu);
377
+ }
378
+ }
379
+ restoreSubmenuPortal() {
380
+ const submenu = this.submenuSlot()?.nativeElement;
381
+ this.unbindSubmenuPointerListeners();
382
+ if (submenu) {
383
+ axClearMenuPanelHeight(this.renderer, submenu);
384
+ delete submenu.__axMenuOwner__;
385
+ }
386
+ if (submenu && this.submenuPortalParent) {
387
+ try {
388
+ this.submenuPortalParent.insertBefore(submenu, this.submenuPortalNextSibling);
389
+ }
390
+ catch {
391
+ // Host may already be torn down while the context menu is closing.
392
+ }
393
+ }
394
+ this.submenuPortalParent = null;
395
+ this.submenuPortalNextSibling = null;
396
+ }
397
+ /** Keep this item open while the pointer is over its portaled submenu panel. */
398
+ bindSubmenuPointerListeners(submenu) {
399
+ this.unbindSubmenuPointerListeners();
400
+ this.submenuUnlistenEnter = this.renderer.listen(submenu, 'mouseenter', () => {
401
+ this.clearCloseTimeout();
402
+ this.clearAncestorCloseTimeouts();
403
+ });
404
+ this.submenuUnlistenLeave = this.renderer.listen(submenu, 'mouseleave', (event) => {
405
+ this.handlePointerLeave(event);
406
+ });
407
+ }
408
+ unbindSubmenuPointerListeners() {
409
+ this.submenuUnlistenEnter?.();
410
+ this.submenuUnlistenLeave?.();
411
+ this.submenuUnlistenEnter = null;
412
+ this.submenuUnlistenLeave = null;
413
+ }
414
+ /** Links direct children so parent resolution still works after the panel is portaled. */
415
+ linkChildItems() {
416
+ const submenu = this.submenuSlot()?.nativeElement;
417
+ if (!submenu) {
418
+ return;
419
+ }
420
+ submenu.querySelectorAll(':scope > ax-menu-item').forEach((el) => {
421
+ const child = this.getInstanceFromElement(el);
422
+ if (child) {
423
+ child.linkedParent = this;
424
+ }
425
+ });
426
+ }
427
+ getInstanceFromElement(el) {
428
+ const ctx = el.__axContext__;
429
+ return ctx instanceof AXMenuItemComponent ? ctx : undefined;
430
+ }
337
431
  /**
338
432
  * Moves nested `ax-menu-item` nodes rendered by recursive `ngTemplateOutlet` templates
339
433
  * into the submenu slot. Angular content queries do not traverse those embedded views.
@@ -369,7 +463,13 @@ class AXMenuItemComponent extends NXComponent {
369
463
  });
370
464
  }
371
465
  updateDiscoveredSubmenuNodeCount() {
372
- this.discoveredSubmenuNodeCount.set(this.getDirectSubmenuNodes().length);
466
+ const fromHost = this.getDirectSubmenuNodes().length;
467
+ const submenu = this.submenuSlot()?.nativeElement;
468
+ const fromPanel = submenu
469
+ ? submenu.querySelectorAll(':scope > ax-menu-item, :scope > ax-title, :scope > ax-divider').length
470
+ : 0;
471
+ // After portaling, projected children live in the panel outside this host.
472
+ this.discoveredSubmenuNodeCount.set(Math.max(fromHost, fromPanel));
373
473
  }
374
474
  scheduleChildRefresh() {
375
475
  if (this.childRefreshScheduled) {
@@ -379,6 +479,7 @@ class AXMenuItemComponent extends NXComponent {
379
479
  requestAnimationFrame(() => {
380
480
  this.childRefreshScheduled = false;
381
481
  this.reparentOrphanedChildren();
482
+ this.linkChildItems();
382
483
  this.updateDiscoveredSubmenuNodeCount();
383
484
  });
384
485
  }
@@ -407,12 +508,12 @@ class AXMenuItemComponent extends NXComponent {
407
508
  return false;
408
509
  }
409
510
  /** Keeps the submenu fully inside the viewport vertically. */
410
- clampVerticalPosition(top, height, windowHeight) {
411
- if (top + height > windowHeight) {
412
- top = windowHeight - height;
511
+ clampVerticalPosition(top, height, windowHeight, margin = 0) {
512
+ if (top + height > windowHeight - margin) {
513
+ top = windowHeight - margin - height;
413
514
  }
414
- if (top < 0) {
415
- top = 0;
515
+ if (top < margin) {
516
+ top = margin;
416
517
  }
417
518
  return top;
418
519
  }
@@ -442,16 +543,17 @@ class AXMenuItemComponent extends NXComponent {
442
543
  }
443
544
  handleMouseEnter(event) {
444
545
  event.stopPropagation();
445
- if (this.mouseLeaveTimeout) {
446
- clearTimeout(this.mouseLeaveTimeout);
447
- this.mouseLeaveTimeout = null;
448
- }
546
+ this.clearCloseTimeout();
547
+ this.clearAncestorCloseTimeouts();
449
548
  if (!this.isFirstLevel() || this.root.openOn() == 'hover') {
450
549
  this.open();
451
550
  }
452
551
  }
453
552
  handleMouseLeave(event) {
454
553
  event.stopPropagation();
554
+ this.handlePointerLeave(event);
555
+ }
556
+ handlePointerLeave(event) {
455
557
  if (!this.hasSubItems() || this.root.closeOn() !== 'leave') {
456
558
  return;
457
559
  }
@@ -459,25 +561,54 @@ class AXMenuItemComponent extends NXComponent {
459
561
  if (relatedTarget instanceof Node && this.containsSubmenuPointer(relatedTarget)) {
460
562
  return;
461
563
  }
462
- if (this.mouseLeaveTimeout) {
463
- clearTimeout(this.mouseLeaveTimeout);
464
- }
564
+ this.scheduleClose();
565
+ }
566
+ scheduleClose() {
567
+ this.clearCloseTimeout();
465
568
  this.mouseLeaveTimeout = setTimeout(() => {
569
+ this.mouseLeaveTimeout = null;
466
570
  this.close();
467
571
  }, 500);
468
572
  }
469
- /** True when the pointer moved into this item's submenu panel or a nested open submenu. */
573
+ clearCloseTimeout() {
574
+ if (this.mouseLeaveTimeout) {
575
+ clearTimeout(this.mouseLeaveTimeout);
576
+ this.mouseLeaveTimeout = null;
577
+ }
578
+ }
579
+ clearAncestorCloseTimeouts() {
580
+ let current = this.getParentMenuItem();
581
+ while (current) {
582
+ current.clearCloseTimeout();
583
+ current = current.getParentMenuItem();
584
+ }
585
+ }
586
+ /** True when the pointer is still inside this item's submenu tree (including portaled panels). */
470
587
  containsSubmenuPointer(node) {
471
- const submenu = this.submenuSlot()?.nativeElement;
472
- if (submenu?.contains(node)) {
588
+ if (this.submenuSlot()?.nativeElement?.contains(node) || this.nativeElement.contains(node)) {
473
589
  return true;
474
590
  }
475
- if (this.nativeElement.contains(node)) {
476
- return true;
591
+ const el = node instanceof Element ? node : node.parentElement;
592
+ if (!el) {
593
+ return false;
477
594
  }
478
- return this.getDirectSubmenuNodes().some((child) => child.contains(node));
595
+ const item = this.getInstanceFromElement(el.closest('ax-menu-item') ?? el) ??
596
+ el.closest('.ax-menu-items')?.__axMenuOwner__;
597
+ return !!item && this.isSelfOrAncestorOf(item);
598
+ }
599
+ isSelfOrAncestorOf(item) {
600
+ let current = item;
601
+ while (current) {
602
+ if (current === this) {
603
+ return true;
604
+ }
605
+ current = current.getParentMenuItem();
606
+ }
607
+ return false;
479
608
  }
480
609
  ngOnDestroy() {
610
+ this.clearCloseTimeout();
611
+ this.unbindSubmenuPointerListeners();
481
612
  if (this.isOpen()) {
482
613
  this.close();
483
614
  }
@@ -643,6 +774,7 @@ class AXContextMenuComponent extends NXComponent {
643
774
  const wasOpen = this.nativeElement.classList.contains('ax-state-open');
644
775
  this.nativeElement.classList.remove('ax-state-open');
645
776
  this.lastOpenPoint = null;
777
+ axClearMenuPanelHeight(this.renderer, this.nativeElement);
646
778
  // Drop rendered items before moving DOM nodes back to the original parent.
647
779
  // This prevents a large menu tree from being re-parented/removed as a single heavy DOM operation.
648
780
  if (wasOpen) {
@@ -739,6 +871,7 @@ class AXContextMenuComponent extends NXComponent {
739
871
  const itemRect = this.measureMenuRect(elementRef);
740
872
  const windowWidth = window.innerWidth;
741
873
  const windowHeight = window.innerHeight;
874
+ const margin = AX_MENU_VIEWPORT_MARGIN;
742
875
  const isRtl = AXHtmlUtil.isRtl(elementRef);
743
876
  let left;
744
877
  if (isRtl) {
@@ -753,23 +886,22 @@ class AXContextMenuComponent extends NXComponent {
753
886
  left = point.x - itemRect.width;
754
887
  }
755
888
  }
756
- const bottom = point.y + itemRect.height;
757
- let top;
758
- if (bottom > windowHeight) {
759
- top = point.y - itemRect.height;
760
- if (top < 0) {
761
- top = 0;
762
- }
889
+ const effectiveHeight = Math.min(itemRect.height, Math.max(0, windowHeight - margin * 2));
890
+ let top = point.y;
891
+ if (top + effectiveHeight > windowHeight - margin) {
892
+ top = windowHeight - margin - effectiveHeight;
763
893
  }
764
- else {
765
- top = point.y;
894
+ if (top < margin) {
895
+ top = margin;
766
896
  }
767
897
  this.renderer.setStyle(elementRef, 'left', `${left}px`);
768
898
  this.renderer.setStyle(elementRef, 'top', `${top}px`);
769
899
  this.renderer.setStyle(elementRef, 'position', 'fixed');
900
+ axFitMenuPanelHeight(this.renderer, elementRef, top);
770
901
  }
771
902
  /** Measures menu size even when an ancestor hides the host with `display: none`. */
772
903
  measureMenuRect(elementRef) {
904
+ axClearMenuPanelHeight(this.renderer, elementRef);
773
905
  this.renderer.setStyle(elementRef, 'visibility', 'hidden');
774
906
  this.renderer.setStyle(elementRef, 'display', 'flex');
775
907
  const rect = elementRef.getBoundingClientRect();
@@ -814,7 +946,12 @@ class AXContextMenuComponent extends NXComponent {
814
946
  this.close();
815
947
  l1();
816
948
  });
817
- const l2 = this.renderer.listen(el, 'wheel', () => {
949
+ const l2 = this.renderer.listen(el, 'wheel', (e) => {
950
+ const target = e.target;
951
+ if (target instanceof Element &&
952
+ (this.nativeElement.contains(target) || target.closest('.ax-menu-items'))) {
953
+ return;
954
+ }
818
955
  this.close();
819
956
  l2();
820
957
  });
@@ -870,7 +1007,7 @@ class AXContextMenuComponent extends NXComponent {
870
1007
  provide: AXComponent,
871
1008
  useExisting: AXContextMenuComponent,
872
1009
  },
873
- ], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;position:fixed;display:flex;height:max-content;width:max-content;flex-direction:column;border-style:var(--tw-border-style);border-width:1px;--tw-border-style: solid;border-style:solid;padding-block:calc(var(--spacing, .25rem) * 2);opacity:0%;transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));min-width:calc(var(--spacing, .25rem) * 48);border-radius:var(--radius-default, var(--ax-sys-border-radius));border-color:var(--color-border-lightest, rgba(var(--ax-sys-color-border-lightest-surface)));background-color:var(--color-lightest, rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-lightest, rgba(var(--ax-sys-color-on-lightest-surface)));box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){background-color:var(--ax-comp-bg);color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item ax-suffix ax-text{--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}ax-context-menu.ax-action-list-horizontal{padding-inline:calc(var(--spacing, .25rem) * 4)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:calc(var(--spacing, .25rem) * 2)}ax-menu.ax-action-list-horizontal{min-width:calc(var(--spacing, .25rem) * 48);gap:calc(var(--spacing, .25rem) * 5)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){margin-inline-end:calc(var(--spacing, .25rem) * 0)!important;padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu.ax-action-list-vertical{width:max-content;min-width:calc(var(--spacing, .25rem) * 48)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu>ax-menu-item{padding-block:calc(var(--spacing, .25rem) * 2)}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--radius-default, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:70%}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["subItems", "name", "data", "disabled", "color"], outputs: ["onClick"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
1010
+ ], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu,.ax-menu-items{--ax-comp-menu-items-min-width: 12rem;--ax-comp-menu-action-list-hover-decorator-opacity: .7;--ax-comp-menu-action-list-horizontal-min-width: 12rem;--ax-comp-menu-action-list-horizontal-gap: 1.25rem;--ax-comp-menu-action-list-vertical-min-width: 12rem}ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}ax-context-menu.ax-menu-container,.ax-menu-items{--ax-comp-action-item-padding-inline: .875rem;visibility:hidden;position:fixed;display:flex;height:max-content;max-height:calc(100dvh - 1rem);width:max-content;flex-direction:column;overflow-x:hidden;overflow-y:auto;opacity:0%;overscroll-behavior:contain;min-width:var(--ax-comp-menu-items-min-width);color:rgba(var(--ax-comp-menu-items-text-color, var(--ax-sys-color-on-lightest-surface)));background-color:rgba(var(--ax-comp-menu-sub-item-bg-color, var(--ax-sys-color-lightest-surface)));padding-block:var(--ax-comp-menu-items-padding-block, .5rem);border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius));border-color:rgba(var(--ax-comp-menu-items-border-color, var(--ax-sys-color-border-lightest-surface)));--ax-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--ax-shadow-colored: 0 4px 6px -1px var(--ax-shadow-color), 0 2px 4px -2px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 #0000),var(--ax-ring-shadow, 0 0 #0000),var(--ax-shadow);transition-property:opacity,color;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(ax-context-menu.ax-menu-container,.ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item{color:rgba(var(--ax-comp-menu-item-text-color, var(--ax-sys-color-on-surface)))}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-suffix-text-color));--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){color:rgba(var(--ax-comp-menu-item-hover-text-color, var(--ax-sys-color-on-surface)));background-color:rgba(var(--ax-comp-menu-item-hover-bg-color, var(--ax-sys-color-surface)))!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-hover-suffix-text-color))}ax-context-menu.ax-action-list-horizontal{padding-inline:var(--ax-comp-menu-action-list-horizontal-padding-inline, 1rem)}ax-menu>ax-menu-item{--ax-comp-action-item-padding-inline: 0;padding-block:var(--ax-comp-menu-items-padding-block, .5rem)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:.5rem}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-horizontal{min-width:var(--ax-comp-menu-action-list-horizontal-min-width);gap:var(--ax-comp-menu-action-list-horizontal-gap)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-vertical{width:max-content;min-width:var(--ax-comp-menu-action-list-vertical-min-width)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["subItems", "name", "data", "disabled", "color"], outputs: ["onClick"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
874
1011
  }
875
1012
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXContextMenuComponent, decorators: [{
876
1013
  type: Component,
@@ -891,7 +1028,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
891
1028
  AXDecoratorIconComponent,
892
1029
  AsyncPipe,
893
1030
  AXTranslatorPipe,
894
- ], template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;position:fixed;display:flex;height:max-content;width:max-content;flex-direction:column;border-style:var(--tw-border-style);border-width:1px;--tw-border-style: solid;border-style:solid;padding-block:calc(var(--spacing, .25rem) * 2);opacity:0%;transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));min-width:calc(var(--spacing, .25rem) * 48);border-radius:var(--radius-default, var(--ax-sys-border-radius));border-color:var(--color-border-lightest, rgba(var(--ax-sys-color-border-lightest-surface)));background-color:var(--color-lightest, rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-lightest, rgba(var(--ax-sys-color-on-lightest-surface)));box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){background-color:var(--ax-comp-bg);color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item ax-suffix ax-text{--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}ax-context-menu.ax-action-list-horizontal{padding-inline:calc(var(--spacing, .25rem) * 4)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:calc(var(--spacing, .25rem) * 2)}ax-menu.ax-action-list-horizontal{min-width:calc(var(--spacing, .25rem) * 48);gap:calc(var(--spacing, .25rem) * 5)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){margin-inline-end:calc(var(--spacing, .25rem) * 0)!important;padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu.ax-action-list-vertical{width:max-content;min-width:calc(var(--spacing, .25rem) * 48)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu>ax-menu-item{padding-block:calc(var(--spacing, .25rem) * 2)}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--radius-default, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:70%}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
1031
+ ], template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu,.ax-menu-items{--ax-comp-menu-items-min-width: 12rem;--ax-comp-menu-action-list-hover-decorator-opacity: .7;--ax-comp-menu-action-list-horizontal-min-width: 12rem;--ax-comp-menu-action-list-horizontal-gap: 1.25rem;--ax-comp-menu-action-list-vertical-min-width: 12rem}ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}ax-context-menu.ax-menu-container,.ax-menu-items{--ax-comp-action-item-padding-inline: .875rem;visibility:hidden;position:fixed;display:flex;height:max-content;max-height:calc(100dvh - 1rem);width:max-content;flex-direction:column;overflow-x:hidden;overflow-y:auto;opacity:0%;overscroll-behavior:contain;min-width:var(--ax-comp-menu-items-min-width);color:rgba(var(--ax-comp-menu-items-text-color, var(--ax-sys-color-on-lightest-surface)));background-color:rgba(var(--ax-comp-menu-sub-item-bg-color, var(--ax-sys-color-lightest-surface)));padding-block:var(--ax-comp-menu-items-padding-block, .5rem);border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius));border-color:rgba(var(--ax-comp-menu-items-border-color, var(--ax-sys-color-border-lightest-surface)));--ax-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--ax-shadow-colored: 0 4px 6px -1px var(--ax-shadow-color), 0 2px 4px -2px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 #0000),var(--ax-ring-shadow, 0 0 #0000),var(--ax-shadow);transition-property:opacity,color;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(ax-context-menu.ax-menu-container,.ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item{color:rgba(var(--ax-comp-menu-item-text-color, var(--ax-sys-color-on-surface)))}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-suffix-text-color));--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){color:rgba(var(--ax-comp-menu-item-hover-text-color, var(--ax-sys-color-on-surface)));background-color:rgba(var(--ax-comp-menu-item-hover-bg-color, var(--ax-sys-color-surface)))!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-hover-suffix-text-color))}ax-context-menu.ax-action-list-horizontal{padding-inline:var(--ax-comp-menu-action-list-horizontal-padding-inline, 1rem)}ax-menu>ax-menu-item{--ax-comp-action-item-padding-inline: 0;padding-block:var(--ax-comp-menu-items-padding-block, .5rem)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:.5rem}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-horizontal{min-width:var(--ax-comp-menu-action-list-horizontal-min-width);gap:var(--ax-comp-menu-action-list-horizontal-gap)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-vertical{width:max-content;min-width:var(--ax-comp-menu-action-list-vertical-min-width)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
895
1032
  }], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], openOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "openOn", required: false }] }], closeOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOn", required: false }] }], closeOnRouteChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnRouteChange", required: false }] }], originalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], onItemClick: [{ type: i0.Output, args: ["onItemClick"] }], onOpening: [{ type: i0.Output, args: ["onOpening"] }], onClose: [{ type: i0.Output, args: ["onClose"] }], onWindowEvent: [{
896
1033
  type: HostListener,
897
1034
  args: ['window:scroll']
@@ -954,7 +1091,7 @@ class AXMenuComponent extends NXComponent {
954
1091
  provide: AXComponent,
955
1092
  useExisting: AXMenuComponent,
956
1093
  },
957
- ], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;position:fixed;display:flex;height:max-content;width:max-content;flex-direction:column;border-style:var(--tw-border-style);border-width:1px;--tw-border-style: solid;border-style:solid;padding-block:calc(var(--spacing, .25rem) * 2);opacity:0%;transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));min-width:calc(var(--spacing, .25rem) * 48);border-radius:var(--radius-default, var(--ax-sys-border-radius));border-color:var(--color-border-lightest, rgba(var(--ax-sys-color-border-lightest-surface)));background-color:var(--color-lightest, rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-lightest, rgba(var(--ax-sys-color-on-lightest-surface)));box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){background-color:var(--ax-comp-bg);color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item ax-suffix ax-text{--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}ax-context-menu.ax-action-list-horizontal{padding-inline:calc(var(--spacing, .25rem) * 4)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:calc(var(--spacing, .25rem) * 2)}ax-menu.ax-action-list-horizontal{min-width:calc(var(--spacing, .25rem) * 48);gap:calc(var(--spacing, .25rem) * 5)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){margin-inline-end:calc(var(--spacing, .25rem) * 0)!important;padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu.ax-action-list-vertical{width:max-content;min-width:calc(var(--spacing, .25rem) * 48)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu>ax-menu-item{padding-block:calc(var(--spacing, .25rem) * 2)}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--radius-default, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:70%}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["subItems", "name", "data", "disabled", "color"], outputs: ["onClick"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
1094
+ ], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu,.ax-menu-items{--ax-comp-menu-items-min-width: 12rem;--ax-comp-menu-action-list-hover-decorator-opacity: .7;--ax-comp-menu-action-list-horizontal-min-width: 12rem;--ax-comp-menu-action-list-horizontal-gap: 1.25rem;--ax-comp-menu-action-list-vertical-min-width: 12rem}ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}ax-context-menu.ax-menu-container,.ax-menu-items{--ax-comp-action-item-padding-inline: .875rem;visibility:hidden;position:fixed;display:flex;height:max-content;max-height:calc(100dvh - 1rem);width:max-content;flex-direction:column;overflow-x:hidden;overflow-y:auto;opacity:0%;overscroll-behavior:contain;min-width:var(--ax-comp-menu-items-min-width);color:rgba(var(--ax-comp-menu-items-text-color, var(--ax-sys-color-on-lightest-surface)));background-color:rgba(var(--ax-comp-menu-sub-item-bg-color, var(--ax-sys-color-lightest-surface)));padding-block:var(--ax-comp-menu-items-padding-block, .5rem);border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius));border-color:rgba(var(--ax-comp-menu-items-border-color, var(--ax-sys-color-border-lightest-surface)));--ax-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--ax-shadow-colored: 0 4px 6px -1px var(--ax-shadow-color), 0 2px 4px -2px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 #0000),var(--ax-ring-shadow, 0 0 #0000),var(--ax-shadow);transition-property:opacity,color;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(ax-context-menu.ax-menu-container,.ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item{color:rgba(var(--ax-comp-menu-item-text-color, var(--ax-sys-color-on-surface)))}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-suffix-text-color));--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){color:rgba(var(--ax-comp-menu-item-hover-text-color, var(--ax-sys-color-on-surface)));background-color:rgba(var(--ax-comp-menu-item-hover-bg-color, var(--ax-sys-color-surface)))!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-hover-suffix-text-color))}ax-context-menu.ax-action-list-horizontal{padding-inline:var(--ax-comp-menu-action-list-horizontal-padding-inline, 1rem)}ax-menu>ax-menu-item{--ax-comp-action-item-padding-inline: 0;padding-block:var(--ax-comp-menu-items-padding-block, .5rem)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:.5rem}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-horizontal{min-width:var(--ax-comp-menu-action-list-horizontal-min-width);gap:var(--ax-comp-menu-action-list-horizontal-gap)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-vertical{width:max-content;min-width:var(--ax-comp-menu-action-list-vertical-min-width)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["subItems", "name", "data", "disabled", "color"], outputs: ["onClick"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
958
1095
  }
959
1096
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMenuComponent, decorators: [{
960
1097
  type: Component,
@@ -975,7 +1112,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
975
1112
  AXDecoratorIconComponent,
976
1113
  AsyncPipe,
977
1114
  AXTranslatorPipe,
978
- ], template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;position:fixed;display:flex;height:max-content;width:max-content;flex-direction:column;border-style:var(--tw-border-style);border-width:1px;--tw-border-style: solid;border-style:solid;padding-block:calc(var(--spacing, .25rem) * 2);opacity:0%;transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));min-width:calc(var(--spacing, .25rem) * 48);border-radius:var(--radius-default, var(--ax-sys-border-radius));border-color:var(--color-border-lightest, rgba(var(--ax-sys-color-border-lightest-surface)));background-color:var(--color-lightest, rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-lightest, rgba(var(--ax-sys-color-on-lightest-surface)));box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){background-color:var(--ax-comp-bg);color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item ax-suffix ax-text{--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}ax-context-menu.ax-action-list-horizontal{padding-inline:calc(var(--spacing, .25rem) * 4)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:calc(var(--spacing, .25rem) * 2)}ax-menu.ax-action-list-horizontal{min-width:calc(var(--spacing, .25rem) * 48);gap:calc(var(--spacing, .25rem) * 5)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){margin-inline-end:calc(var(--spacing, .25rem) * 0)!important;padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu.ax-action-list-vertical{width:max-content;min-width:calc(var(--spacing, .25rem) * 48)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu>ax-menu-item{padding-block:calc(var(--spacing, .25rem) * 2)}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--radius-default, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:70%}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
1115
+ ], template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu,.ax-menu-items{--ax-comp-menu-items-min-width: 12rem;--ax-comp-menu-action-list-hover-decorator-opacity: .7;--ax-comp-menu-action-list-horizontal-min-width: 12rem;--ax-comp-menu-action-list-horizontal-gap: 1.25rem;--ax-comp-menu-action-list-vertical-min-width: 12rem}ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}ax-context-menu.ax-menu-container,.ax-menu-items{--ax-comp-action-item-padding-inline: .875rem;visibility:hidden;position:fixed;display:flex;height:max-content;max-height:calc(100dvh - 1rem);width:max-content;flex-direction:column;overflow-x:hidden;overflow-y:auto;opacity:0%;overscroll-behavior:contain;min-width:var(--ax-comp-menu-items-min-width);color:rgba(var(--ax-comp-menu-items-text-color, var(--ax-sys-color-on-lightest-surface)));background-color:rgba(var(--ax-comp-menu-sub-item-bg-color, var(--ax-sys-color-lightest-surface)));padding-block:var(--ax-comp-menu-items-padding-block, .5rem);border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius));border-color:rgba(var(--ax-comp-menu-items-border-color, var(--ax-sys-color-border-lightest-surface)));--ax-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--ax-shadow-colored: 0 4px 6px -1px var(--ax-shadow-color), 0 2px 4px -2px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 #0000),var(--ax-ring-shadow, 0 0 #0000),var(--ax-shadow);transition-property:opacity,color;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(ax-context-menu.ax-menu-container,.ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item{color:rgba(var(--ax-comp-menu-item-text-color, var(--ax-sys-color-on-surface)))}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-suffix-text-color));--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){color:rgba(var(--ax-comp-menu-item-hover-text-color, var(--ax-sys-color-on-surface)));background-color:rgba(var(--ax-comp-menu-item-hover-bg-color, var(--ax-sys-color-surface)))!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-hover-suffix-text-color))}ax-context-menu.ax-action-list-horizontal{padding-inline:var(--ax-comp-menu-action-list-horizontal-padding-inline, 1rem)}ax-menu>ax-menu-item{--ax-comp-action-item-padding-inline: 0;padding-block:var(--ax-comp-menu-items-padding-block, .5rem)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:.5rem}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-horizontal{min-width:var(--ax-comp-menu-action-list-horizontal-min-width);gap:var(--ax-comp-menu-action-list-horizontal-gap)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-vertical{width:max-content;min-width:var(--ax-comp-menu-action-list-vertical-min-width)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
979
1116
  }], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], openOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "openOn", required: false }] }], closeOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOn", required: false }] }], onItemClick: [{ type: i0.Output, args: ["onItemClick"] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], hasArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasArrow", required: false }] }], __hostClass: [{
980
1117
  type: HostBinding,
981
1118
  args: ['class']
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-menu.mjs","sources":["../../../../packages/components/menu/src/lib/menu.service.ts","../../../../packages/components/menu/src/lib/menu.types.ts","../../../../packages/components/menu/src/lib/menu-item.component.ts","../../../../packages/components/menu/src/lib/menu-item.component.html","../../../../packages/components/menu/src/lib/context-menu.component.ts","../../../../packages/components/menu/src/lib/menu.component.html","../../../../packages/components/menu/src/lib/menu.component.ts","../../../../packages/components/menu/src/lib/menu.module.ts","../../../../packages/components/menu/src/acorex-components-menu.ts"],"sourcesContent":["import { AXHtmlUtil, AXPoint } from '@acorex/core/utils';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, DOCUMENT, inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Subject } from 'rxjs';\nimport { AXMenuItemComponentBase, AXRootMenu } from './menu.types';\n\n@Injectable()\nexport class AXMenuService {\n public closeAll$: Subject<void> = new Subject();\n public open$: Subject<AXMenuItemComponentBase> = new Subject();\n public close$: Subject<AXMenuItemComponentBase> = new Subject();\n\n public openContextMenu$ = new Subject<{ sender: AXRootMenu; point: AXPoint }>();\n public closeAllContextMenu$ = new Subject<{ sender: AXRootMenu }>();\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly document = inject(DOCUMENT);\n private readonly platformId = inject(PLATFORM_ID);\n\n private readonly openItems = new Set<AXMenuItemComponentBase>();\n private globalListenersBound = false;\n private rootElement?: HTMLElement;\n private scrollableParents: HTMLElement[] = [];\n\n private readonly onDocumentClick = (event: MouseEvent) => {\n if (this.rootElement && !this.rootElement.contains(event.target as Node)) {\n this.closeAll$.next();\n }\n };\n\n private readonly onWindowOrScrollEvent = () => {\n this.closeAll$.next();\n };\n\n constructor() {\n this.closeAll$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.openItems.clear();\n });\n }\n\n /**\n * Registers a single set of document/window/scroll listeners for the whole menu tree.\n */\n initGlobalListeners(rootElement: HTMLElement) {\n if (!isPlatformBrowser(this.platformId) || this.globalListenersBound) {\n return;\n }\n this.globalListenersBound = true;\n this.rootElement = rootElement;\n\n this.document.addEventListener('click', this.onDocumentClick);\n window.addEventListener('scroll', this.onWindowOrScrollEvent, { capture: true });\n window.addEventListener('resize', this.onWindowOrScrollEvent);\n\n this.scrollableParents = AXHtmlUtil.getScrollableParents(rootElement);\n this.scrollableParents.forEach((parent) => {\n parent.addEventListener('scroll', this.onWindowOrScrollEvent);\n });\n\n this.destroyRef.onDestroy(() => {\n this.document.removeEventListener('click', this.onDocumentClick);\n window.removeEventListener('scroll', this.onWindowOrScrollEvent, { capture: true });\n window.removeEventListener('resize', this.onWindowOrScrollEvent);\n this.scrollableParents.forEach((parent) => {\n parent.removeEventListener('scroll', this.onWindowOrScrollEvent);\n });\n });\n }\n\n /**\n * Closes open submenus that are not on the ancestor path of the item being opened.\n */\n closeExcept(opener: AXMenuItemComponentBase) {\n const keepOpen = new Set<AXMenuItemComponentBase>();\n let current: AXMenuItemComponentBase | null | undefined = opener;\n while (current) {\n keepOpen.add(current);\n current = current.getParentMenuItem?.() ?? current.parent ?? null;\n }\n\n for (const openItem of [...this.openItems]) {\n if (!keepOpen.has(openItem)) {\n this.markClosed(openItem);\n }\n }\n }\n\n markOpen(item: AXMenuItemComponentBase) {\n this.openItems.add(item);\n this.open$.next(item);\n }\n\n markClosed(item: AXMenuItemComponentBase) {\n this.openItems.delete(item);\n this.close$.next(item);\n }\n}\n","import { AXOrientation, AXStyleColorType, NXClickEvent, NXComponent } from '@acorex/cdk/common';\nimport { OutputEmitterRef, WritableSignal } from '@angular/core';\nimport { IsActiveMatchOptions, UrlTree } from '@angular/router';\n\nexport type AXMenuOpenTrigger = 'click' | 'hover';\nexport type AXMenuCloseTrigger = 'click' | 'leave';\n\nexport abstract class AXRootMenu {\n orientation: WritableSignal<AXOrientation>;\n openOn: WritableSignal<AXMenuOpenTrigger>;\n closeOn: WritableSignal<AXMenuCloseTrigger>;\n onItemClick: OutputEmitterRef<AXMenuItemClickBaseEvent>;\n nativeElement: HTMLDivElement;\n hasArrow: WritableSignal<boolean>;\n}\n\nexport abstract class AXMenuItemComponentBase {\n parent?: AXMenuItemComponentBase | null;\n\n /** Resolves the parent item, including for `ngTemplateOutlet`-created nested items. */\n getParentMenuItem?(): AXMenuItemComponentBase | null | undefined;\n}\n\n/** Shared tree item shape for `ax-menu`, `ax-context-menu`, and `ax-side-menu`. */\nexport interface AXMenuItem {\n text: string;\n name?: string;\n icon?: string;\n data?: unknown;\n disabled?: boolean;\n items?: AXMenuItem[];\n color?: AXStyleColorType;\n suffix?: {\n text: string;\n };\n /** Side-menu alias for `suffix.text`. */\n suffixText?: string;\n break?: boolean;\n group?: {\n name?: string;\n title?: string;\n };\n title?: string;\n routerLink?: string | any[] | UrlTree;\n routerLinkActive?: string | string[];\n routerLinkActiveOptions?: { exact: boolean } | IsActiveMatchOptions;\n href?: string;\n target?: '_blank' | '_self' | '_parent' | '_top';\n active?: boolean;\n isLoading?: boolean;\n isCollapsed?: boolean;\n toggleOnClick?: boolean;\n}\n\nexport class AXMenuItemClickBaseEvent<T extends NXComponent = NXComponent> extends NXClickEvent<T> {\n item: {\n name?: string;\n text: string;\n data?: any;\n };\n canceled = false;\n}\n","import { AXComponent, AXStyleColorType, NXComponent } from '@acorex/cdk/common';\nimport { AXHtmlUtil, AXUnsubscriber } from '@acorex/core/utils';\nimport { AXZIndexService, AXZToken } from '@acorex/core/z-index';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n Component,\n computed,\n contentChildren,\n DestroyRef,\n ElementRef,\n HostBinding,\n HostListener,\n inject,\n Injector,\n input,\n OnDestroy,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXMenuService } from './menu.service';\nimport { AXMenuItemClickBaseEvent, AXMenuItemComponentBase, AXRootMenu } from './menu.types';\n\nexport type AXMenuItemClickEvent = AXMenuItemClickBaseEvent<AXMenuItemComponent>;\n\n/**\n * Represents a menu item component used within an `ax-menu`.\n * @category Components\n */\n@Component({\n selector: 'ax-menu-item',\n templateUrl: './menu-item.component.html',\n encapsulation: ViewEncapsulation.None,\n\n providers: [\n {\n provide: AXMenuItemComponentBase,\n useExisting: AXMenuItemComponent,\n },\n AXUnsubscriber,\n {\n provide: AXComponent,\n useExisting: AXMenuItemComponent,\n },\n ],\n})\nexport class AXMenuItemComponent extends NXComponent implements OnDestroy {\n protected isOpen = signal(false);\n\n readonly parent = inject(AXMenuItemComponent, { optional: true, skipSelf: true });\n\n protected isFirstLevel = computed(() => this.getParentMenuItem() == null);\n\n private readonly childMenuItems = contentChildren(AXMenuItemComponent, { descendants: false });\n private readonly discoveredSubmenuNodeCount = signal(0);\n private readonly submenuSlot = viewChild<ElementRef<HTMLElement>>('submenuSlot');\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n private childObserver: MutationObserver | null = null;\n private childRefreshScheduled = false;\n\n /**\n * Nested items from the data model. Required for recursive `ngTemplateOutlet` templates\n * because `contentChildren` does not traverse those embedded views.\n */\n subItems = input<readonly unknown[]>([]);\n\n protected hasSubItems = computed(\n () =>\n (this.subItems()?.length ?? 0) > 0 || this.childMenuItems().length > 0 || this.discoveredSubmenuNodeCount() > 0,\n );\n\n protected root = inject(AXRootMenu);\n\n private service = inject(AXMenuService);\n\n private unsuscriber = inject(AXUnsubscriber);\n private renderer = inject(Renderer2);\n private injector = inject(Injector);\n private zIndexService = inject(AXZIndexService);\n private zToken: AXZToken | null = null;\n\n protected arrowIcon = computed<string>(() => {\n const isRtl = AXHtmlUtil.isRtl(this.nativeElement);\n return this.root.orientation() == 'horizontal' && this.isFirstLevel()\n ? 'ax-icon-chevron-down'\n : isRtl\n ? 'ax-icon-chevron-left'\n : 'ax-icon-chevron-right';\n });\n\n onClick = output<AXMenuItemClickEvent>();\n\n name = input<string>();\n data = input<any>();\n disabled = input<boolean>();\n color = input<AXStyleColorType>();\n\n constructor() {\n super();\n\n afterNextRender(() => {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n this.reparentOrphanedChildren();\n this.updateDiscoveredSubmenuNodeCount();\n this.childObserver = new MutationObserver((records) => {\n if (!this.hasRelevantChildMutation(records)) {\n return;\n }\n this.scheduleChildRefresh();\n });\n this.childObserver.observe(this.nativeElement, { childList: true, subtree: true });\n this.destroyRef.onDestroy(() => this.childObserver?.disconnect());\n });\n\n this.service.closeAll$.pipe(this.unsuscriber.takeUntilDestroy).subscribe(() => this.close());\n\n this.service.open$.pipe(this.unsuscriber.takeUntilDestroy).subscribe((item) => {\n if ((this as any) === item) {\n this.isOpen.set(true);\n this.schedulePositionCalculation();\n }\n });\n\n this.service.close$.pipe(this.unsuscriber.takeUntilDestroy).subscribe((item) => {\n if ((this as any) == item) {\n this.isOpen.set(false);\n }\n });\n }\n\n private getText(): string {\n return this.nativeElement.querySelector<HTMLDivElement>('ax-text')?.innerText;\n }\n\n /**\n * Resolves the parent menu item. Items rendered via recursive `ngTemplateOutlet` do not\n * receive a DI parent, so we fall back to the DOM tree after reparenting.\n */\n getParentMenuItem(): AXMenuItemComponent | null {\n if (this.parent) {\n return this.parent;\n }\n\n const parentHost = this.nativeElement.parentElement?.closest('ax-menu-item');\n if (!parentHost || parentHost === this.nativeElement) {\n return null;\n }\n\n const ctx = (parentHost as HTMLElement & { __axContext__?: unknown }).__axContext__;\n return ctx instanceof AXMenuItemComponent ? ctx : null;\n }\n\n /**\n * Opens the submenu of this menu item if it has sub-items and is not disabled.\n */\n open() {\n if (this.disabled() || !this.hasSubItems()) {\n return;\n }\n\n this.reparentOrphanedChildren();\n this.service.closeExcept(this);\n\n if (!this.zToken) {\n this.zToken = this.zIndexService.acquire();\n }\n this.service.markOpen(this);\n }\n\n /**\n * Closes the submenu of this menu item if open.\n */\n close() {\n this.service.markClosed(this);\n this.zIndexService.release(this.zToken);\n this.zToken = null;\n }\n\n /**\n * Positions the submenu after layout so nested levels measure their full height.\n */\n private schedulePositionCalculation() {\n afterNextRender(\n () => {\n if (this.isOpen()) {\n this.calculatePosition();\n afterNextRender(\n () => {\n if (this.isOpen()) {\n this.calculatePosition();\n }\n },\n { injector: this.injector },\n );\n }\n },\n { injector: this.injector },\n );\n }\n\n /**\n * Calculate the position of the submenu to avoid it going out of the viewport.\n */\n private calculatePosition() {\n const submenu = this.submenuSlot()?.nativeElement;\n if (!submenu) return;\n\n const submenuRect = this.measureSubmenuRect(submenu);\n const itemRect = this.nativeElement.getBoundingClientRect();\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n\n const isRtl = AXHtmlUtil.isRtl(this.nativeElement);\n\n let finalTop: number;\n let finalLeft: number;\n\n const preferredTop =\n this.isFirstLevel() && this.root.orientation() === 'horizontal' ? itemRect.bottom : itemRect.top;\n\n const alternateTop = itemRect.top - submenuRect.height;\n\n if (preferredTop + submenuRect.height <= windowHeight) {\n finalTop = preferredTop;\n } else if (alternateTop >= 0) {\n finalTop = alternateTop;\n } else {\n finalTop = windowHeight - submenuRect.height;\n }\n\n finalTop = this.clampVerticalPosition(finalTop, submenuRect.height, windowHeight);\n\n if (this.isFirstLevel() && this.root.orientation() === 'horizontal') {\n const preferredLeft = isRtl ? itemRect.right - submenuRect.width : itemRect.left;\n const alternateLeft = isRtl ? itemRect.left : itemRect.right - submenuRect.width;\n\n if (preferredLeft >= 0 && preferredLeft + submenuRect.width <= windowWidth) {\n finalLeft = preferredLeft;\n } else {\n finalLeft = Math.max(0, Math.min(alternateLeft, windowWidth - submenuRect.width));\n }\n } else {\n const preferredLeftRtl = itemRect.left - submenuRect.width;\n const alternateLeftRtl = itemRect.right;\n\n const preferredLeftLtr = itemRect.right;\n const alternateLeftLtr = itemRect.left - submenuRect.width;\n\n if (isRtl) {\n if (preferredLeftRtl >= 0) {\n finalLeft = preferredLeftRtl;\n } else if (alternateLeftRtl + submenuRect.width <= windowWidth) {\n finalLeft = alternateLeftRtl;\n } else {\n finalLeft = 0;\n }\n } else {\n if (preferredLeftLtr + submenuRect.width <= windowWidth) {\n finalLeft = preferredLeftLtr;\n } else if (alternateLeftLtr >= 0) {\n finalLeft = alternateLeftLtr;\n } else {\n finalLeft = windowWidth - submenuRect.width;\n }\n }\n }\n\n const isNestedMenu = !(this.isFirstLevel() && this.root.orientation() === 'horizontal');\n if (isNestedMenu) {\n const overlapsParent = finalLeft < itemRect.right && itemRect.left < finalLeft + submenuRect.width;\n if (overlapsParent) {\n const shiftedTop = itemRect.bottom;\n if (shiftedTop + submenuRect.height <= windowHeight) {\n finalTop = shiftedTop;\n }\n }\n }\n\n finalTop = this.clampVerticalPosition(finalTop, submenuRect.height, windowHeight);\n\n this.renderer.setStyle(submenu, 'position', 'fixed');\n this.renderer.setStyle(submenu, 'top', `${finalTop}px`);\n this.renderer.setStyle(submenu, 'left', `${finalLeft}px`);\n if (this.zToken) {\n this.renderer.setStyle(submenu, 'z-index', String(this.zToken.zIndex));\n }\n }\n\n /** Measures submenu size using the same flex layout as the rendered menu. */\n private measureSubmenuRect(submenu: HTMLElement): DOMRect {\n this.renderer.setStyle(submenu, 'visibility', 'hidden');\n this.renderer.setStyle(submenu, 'display', 'flex');\n const rect = submenu.getBoundingClientRect();\n this.renderer.removeStyle(submenu, 'visibility');\n this.renderer.removeStyle(submenu, 'display');\n return rect;\n }\n\n /**\n * Moves nested `ax-menu-item` nodes rendered by recursive `ngTemplateOutlet` templates\n * into the submenu slot. Angular content queries do not traverse those embedded views.\n */\n private reparentOrphanedChildren() {\n const container = this.submenuSlot()?.nativeElement;\n if (!container) {\n return;\n }\n\n for (const el of this.getDirectSubmenuNodes()) {\n if (!container.contains(el)) {\n try {\n container.appendChild(el);\n } catch {\n // HierarchyRequestError when the node is already being moved.\n }\n }\n }\n }\n\n /**\n * Nested submenu nodes rendered by custom recursive templates (direct children of this item only).\n */\n private getDirectSubmenuNodes(): HTMLElement[] {\n return Array.from(this.nativeElement.querySelectorAll<HTMLElement>('ax-menu-item, ax-title, ax-divider')).filter(\n (el) => {\n if (el === this.nativeElement) {\n return false;\n }\n\n if (el.tagName === 'AX-MENU-ITEM') {\n return el.parentElement?.closest('ax-menu-item') === this.nativeElement;\n }\n\n return el.closest('ax-menu-item') === this.nativeElement;\n },\n );\n }\n\n private updateDiscoveredSubmenuNodeCount() {\n this.discoveredSubmenuNodeCount.set(this.getDirectSubmenuNodes().length);\n }\n\n private scheduleChildRefresh() {\n if (this.childRefreshScheduled) {\n return;\n }\n this.childRefreshScheduled = true;\n requestAnimationFrame(() => {\n this.childRefreshScheduled = false;\n this.reparentOrphanedChildren();\n this.updateDiscoveredSubmenuNodeCount();\n });\n }\n\n private hasRelevantChildMutation(records: MutationRecord[]): boolean {\n for (const record of records) {\n if (\n this.nodeListContainsMenuStructuralNode(record.addedNodes) ||\n this.nodeListContainsMenuStructuralNode(record.removedNodes)\n ) {\n return true;\n }\n }\n return false;\n }\n\n private nodeListContainsMenuStructuralNode(nodes: NodeList): boolean {\n for (const node of Array.from(nodes)) {\n if (!(node instanceof Element)) {\n continue;\n }\n const tagName = node.tagName;\n if (tagName === 'AX-MENU-ITEM' || tagName === 'AX-TITLE' || tagName === 'AX-DIVIDER') {\n return true;\n }\n if (node.querySelector?.('ax-menu-item,ax-title,ax-divider')) {\n return true;\n }\n }\n return false;\n }\n\n /** Keeps the submenu fully inside the viewport vertically. */\n private clampVerticalPosition(top: number, height: number, windowHeight: number): number {\n if (top + height > windowHeight) {\n top = windowHeight - height;\n }\n if (top < 0) {\n top = 0;\n }\n return top;\n }\n\n @HostListener('click', ['$event'])\n handleClick(e: MouseEvent) {\n e.stopPropagation();\n if (this.disabled()) return;\n\n const event = {\n sender: this,\n nativeEvent: e,\n canceled: false,\n item: {\n name: this.name(),\n text: this.getText(),\n data: this.data(),\n },\n } as AXMenuItemClickEvent;\n\n this.onClick.emit(event);\n this.root.onItemClick.emit({ ...event, ...{ sender: this.root as any } });\n\n if (this.hasSubItems() && !event.canceled) {\n this.open();\n } else if (!event.canceled) {\n this.service.closeAll$.next();\n this.service.closeAllContextMenu$.next({ sender: this.root });\n }\n }\n\n @HostListener('mouseenter', ['$event'])\n handleMouseEnter(event: MouseEvent) {\n event.stopPropagation();\n if (this.mouseLeaveTimeout) {\n clearTimeout(this.mouseLeaveTimeout);\n this.mouseLeaveTimeout = null;\n }\n if (!this.isFirstLevel() || this.root.openOn() == 'hover') {\n this.open();\n }\n }\n\n private mouseLeaveTimeout: ReturnType<typeof setTimeout> | null = null;\n\n @HostListener('mouseleave', ['$event'])\n handleMouseLeave(event: MouseEvent) {\n event.stopPropagation();\n\n if (!this.hasSubItems() || this.root.closeOn() !== 'leave') {\n return;\n }\n\n const relatedTarget = event.relatedTarget;\n if (relatedTarget instanceof Node && this.containsSubmenuPointer(relatedTarget)) {\n return;\n }\n\n if (this.mouseLeaveTimeout) {\n clearTimeout(this.mouseLeaveTimeout);\n }\n\n this.mouseLeaveTimeout = setTimeout(() => {\n this.close();\n }, 500);\n }\n\n /** True when the pointer moved into this item's submenu panel or a nested open submenu. */\n private containsSubmenuPointer(node: Node): boolean {\n const submenu = this.submenuSlot()?.nativeElement;\n if (submenu?.contains(node)) {\n return true;\n }\n\n if (this.nativeElement.contains(node)) {\n return true;\n }\n\n return this.getDirectSubmenuNodes().some((child) => child.contains(node));\n }\n\n ngOnDestroy() {\n if (this.isOpen()) {\n this.close();\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n get __hostClass(): string[] {\n const list: string[] = ['ax-action-item'];\n if (this.disabled()) {\n list.push('ax-state-disabled');\n }\n list.push(`${this.color() ?? 'ax-default'}`);\n\n return list;\n }\n}\n","<div class=\"ax-action-item-prefix\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content select=\"ax-text\"></ng-content>\n</div>\n<div class=\"ax-action-item-suffix\">\n <ng-content select=\"ax-suffix\"></ng-content>\n @if (hasSubItems() && (!isFirstLevel() || root.hasArrow())) {\n <i class=\"ax-icon ax-icon-solid {{ arrowIcon() }} \"></i>\n }\n</div>\n<div\n #submenuSlot\n class=\"ax-menu-items ax-action-list ax-action-list-vertical\"\n [class.ax-state-open]=\"isOpen()\"\n>\n <ng-content select=\"ax-menu-item,ax-title,ax-divider,ng-container,[ngTemplateOutlet]\"></ng-content>\n</div>\n","import { AXComponent, AXOrientation, NXComponent, NXEvent } from '@acorex/cdk/common';\nimport { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\nimport { isBrowser } from '@acorex/core/platform';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { AXHtmlUtil, AXPoint } from '@acorex/core/utils';\nimport { AXZIndexService, AXZToken } from '@acorex/core/z-index';\nimport { AsyncPipe, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n Component,\n DestroyRef,\n DOCUMENT,\n HostBinding,\n HostListener,\n inject,\n Injector,\n input,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationStart, Router } from '@angular/router';\nimport { cloneDeep } from 'lodash-es';\nimport { filter } from 'rxjs/operators';\nimport { AXMenuItemComponent } from './menu-item.component';\nimport { AXMenuService } from './menu.service';\nimport { AXMenuCloseTrigger, AXMenuItem, AXMenuItemClickBaseEvent, AXMenuOpenTrigger, AXRootMenu } from './menu.types';\n\nexport class AXContextMenuOpeningEvent extends NXEvent<AXContextMenuComponent> {\n items: AXMenuItem[];\n canceled = false;\n targetElement: HTMLElement;\n}\nexport type AXContextMenuItemsClickEvent = AXMenuItemClickBaseEvent<AXContextMenuComponent>;\n\n/**\n * Represents a menu component that displays context menu.\n * @category Components\n */\n@Component({\n selector: 'ax-context-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.css'],\n\n encapsulation: ViewEncapsulation.None,\n providers: [\n AXMenuService,\n {\n provide: AXRootMenu,\n useExisting: AXContextMenuComponent,\n },\n {\n provide: AXComponent,\n useExisting: AXContextMenuComponent,\n },\n ],\n imports: [\n NgTemplateOutlet,\n AXDecoratorGenericComponent,\n AXMenuItemComponent,\n AXDecoratorIconComponent,\n AsyncPipe,\n AXTranslatorPipe,\n ],\n})\nexport class AXContextMenuComponent extends NXComponent {\n // Inputs and Outputs\n\n readonly orientation = input<AXOrientation>('vertical');\n readonly openOn = input<AXMenuOpenTrigger>('hover');\n readonly closeOn = input<AXMenuCloseTrigger>('click');\n /** When true, closes the menu on router navigation (e.g. side-menu route changes). */\n readonly closeOnRouteChange = input(false);\n readonly originalItems = input<AXMenuItem[]>([], { alias: 'items' });\n readonly target = input<HTMLElement | HTMLElement[] | string>();\n\n onItemClick = output<AXContextMenuItemsClickEvent>();\n onOpening = output<AXContextMenuOpeningEvent>();\n /** Emitted when the menu closes (backdrop, item click, scroll, another menu opening, etc.). */\n onClose = output<void>();\n\n hasArrow = signal<boolean>(true);\n\n // Injected Services\n\n private service = inject(AXMenuService);\n private renderer = inject(Renderer2);\n private document = inject(DOCUMENT);\n private platformID = inject(PLATFORM_ID);\n private zIndexService = inject(AXZIndexService);\n private injector = inject(Injector);\n private zToken: AXZToken | null = null;\n private lastOpenPoint: AXPoint | null = null;\n private router = inject(Router, { optional: true });\n private destroyRef = inject(DestroyRef);\n\n // Constructor (Dependency Injection)\n\n /** @ignore */\n constructor() {\n super();\n //\n afterNextRender(() => {\n this.bindContextEvent();\n this.service.initGlobalListeners(this.nativeElement);\n });\n\n this.setupCloseOnRouteChange();\n\n this.service.closeAllContextMenu$.subscribe(() => {\n this.service.closeAll$.next();\n this.close();\n });\n\n this.service.openContextMenu$.subscribe((e) => {\n if ((e.sender as any) == this) {\n this.internalShowAt(e.point);\n }\n });\n }\n\n // Lifecycle Hooks\n\n ngOnDestroy() {\n if (isBrowser()) {\n this.removeContextEvent();\n }\n }\n\n /**\n * Refreshes the context menu by rebinding event listeners to target elements.\n */\n refresh() {\n this.bindContextEvent();\n }\n\n /**\n * Shows the context menu at a specific point.\n * @param point - The coordinates where the menu should appear\n * @param targetElement - Optional target element for the context menu\n * @param event - Optional opening event with menu items\n */\n showAt(point: AXPoint, targetElement?: HTMLElement, event?: AXContextMenuOpeningEvent) {\n const sender = this as any as AXRootMenu;\n this.service.closeAllContextMenu$.next({ sender });\n if (isPlatformBrowser(this.platformID)) {\n if (!targetElement) {\n targetElement = this.document.elementFromPoint(point.x, point.y) as HTMLElement;\n }\n if (!event) {\n event = {\n sender: this,\n canceled: false,\n targetElement: targetElement,\n items: cloneDeep(this.originalItems()),\n };\n if (event.canceled) return;\n }\n this.onOpening.emit(event);\n this.items.set(event.items);\n }\n this.service.openContextMenu$.next({ sender, point });\n }\n\n /**\n * Closes the context menu and removes the backdrop.\n */\n close() {\n const wasOpen = this.nativeElement.classList.contains('ax-state-open');\n this.nativeElement.classList.remove('ax-state-open');\n this.lastOpenPoint = null;\n // Drop rendered items before moving DOM nodes back to the original parent.\n // This prevents a large menu tree from being re-parented/removed as a single heavy DOM operation.\n if (wasOpen) {\n this.items.set([]);\n }\n this.removeBackdrop();\n // Release z-index token\n this.zIndexService.release(this.zToken);\n this.zToken = null;\n if (wasOpen) {\n this.onClose.emit();\n }\n }\n\n // Private Properties\n\n private backdropElement!: HTMLElement;\n private originalNextSibling: Node | null = null;\n private originalParent: HTMLElement | null = null;\n\n protected items = signal<AXMenuItem[]>([]);\n\n // Private Methods (Internal Logic)\n\n /** @ignore */\n private setupCloseOnRouteChange() {\n if (!this.router || !isPlatformBrowser(this.platformID)) {\n return;\n }\n\n this.router.events\n .pipe(\n filter((event): event is NavigationStart => event instanceof NavigationStart),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe(() => {\n if (this.closeOnRouteChange()) {\n this.close();\n }\n });\n }\n\n /** @ignore */\n private getTargetElements(): HTMLElement[] {\n if (isPlatformBrowser(this.platformID)) {\n const elements: HTMLElement[] =\n typeof this.target() == 'string'\n ? Array.from(this.document.querySelectorAll<HTMLElement>(this.target() as string))\n : Array.isArray(this.target())\n ? (this.target() as HTMLElement[])\n : [this.target() as HTMLElement];\n\n return elements;\n }\n return null;\n }\n\n /** @ignore */\n private bindContextEvent() {\n this.getTargetElements().forEach((e) => {\n e?.addEventListener('contextmenu', this.handleContextMenu.bind(this));\n });\n }\n\n /** @ignore */\n private removeContextEvent() {\n this.getTargetElements().forEach((e) => {\n e?.removeEventListener('contextmenu', this.handleContextMenu.bind(this));\n });\n }\n\n /** @ignore */\n private handleContextMenu(e: MouseEvent) {\n e.preventDefault();\n e.stopPropagation();\n //\n if (isPlatformBrowser(this.platformID)) {\n const elementsUnderMouse = this.document.elementsFromPoint(e.x, e.y) as HTMLElement[];\n const targetElements = this.getTargetElements();\n const targetElement = elementsUnderMouse.find((target) => targetElements.includes(target));\n //\n const event: AXContextMenuOpeningEvent = {\n sender: this,\n canceled: false,\n targetElement: targetElement,\n items: cloneDeep(this.originalItems()),\n };\n //\n if (!event.canceled) {\n this.showAt({ x: e.clientX, y: e.clientY }, targetElement, event);\n }\n }\n }\n\n /** @ignore */\n private internalShowAt(point: AXPoint) {\n this.lastOpenPoint = point;\n const elementRef = this.nativeElement;\n elementRef.classList.add('ax-state-open');\n this.positionAtPoint(point);\n this.createBackdrop();\n\n // Items may render after the signal update (e.g. compact side-menu); reposition once laid out.\n afterNextRender(\n () => {\n if (this.lastOpenPoint && elementRef.classList.contains('ax-state-open')) {\n this.positionAtPoint(this.lastOpenPoint);\n }\n },\n { injector: this.injector },\n );\n }\n\n /**\n * Positions the menu at `point`, flipping when it would overflow the viewport.\n * Uses a temporary visible layout pass so parents that hide the host (e.g. side-menu `display: none`) do not yield a zero-sized rect.\n */\n private positionAtPoint(point: AXPoint) {\n const elementRef = this.nativeElement;\n const itemRect = this.measureMenuRect(elementRef);\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n\n const isRtl = AXHtmlUtil.isRtl(elementRef);\n\n let left: number;\n if (isRtl) {\n left = point.x - itemRect.width;\n if (left < 0) {\n left = point.x;\n }\n } else {\n left = point.x;\n if (left + itemRect.width > windowWidth) {\n left = point.x - itemRect.width;\n }\n }\n\n const bottom = point.y + itemRect.height;\n let top: number;\n\n if (bottom > windowHeight) {\n top = point.y - itemRect.height;\n if (top < 0) {\n top = 0;\n }\n } else {\n top = point.y;\n }\n\n this.renderer.setStyle(elementRef, 'left', `${left}px`);\n this.renderer.setStyle(elementRef, 'top', `${top}px`);\n this.renderer.setStyle(elementRef, 'position', 'fixed');\n }\n\n /** Measures menu size even when an ancestor hides the host with `display: none`. */\n private measureMenuRect(elementRef: HTMLElement): DOMRect {\n this.renderer.setStyle(elementRef, 'visibility', 'hidden');\n this.renderer.setStyle(elementRef, 'display', 'flex');\n const rect = elementRef.getBoundingClientRect();\n this.renderer.removeStyle(elementRef, 'visibility');\n this.renderer.removeStyle(elementRef, 'display');\n return rect;\n }\n\n /** @ignore */\n private createBackdrop() {\n if (!this.originalParent) {\n this.originalParent = this.nativeElement.parentElement;\n this.originalNextSibling = this.nativeElement.nextSibling;\n }\n\n // Acquire z-index token\n this.zToken = this.zIndexService.acquire();\n\n this.backdropElement = this.renderer.createElement('div');\n this.renderer.setStyle(this.backdropElement, 'position', 'fixed');\n this.renderer.setStyle(this.backdropElement, 'top', '0');\n this.renderer.setStyle(this.backdropElement, 'left', '0');\n this.renderer.setStyle(this.backdropElement, 'width', '100%');\n this.renderer.setStyle(this.backdropElement, 'height', '100%');\n this.renderer.setStyle(this.backdropElement, 'z-index', String(this.zToken.zIndex));\n this.renderer.setStyle(this.backdropElement, 'background', 'transparent');\n\n this.createEventListeners(this.backdropElement);\n\n this.document.body.appendChild(this.backdropElement);\n this.backdropElement.appendChild(this.nativeElement);\n }\n\n /** @ignore */\n private removeBackdrop() {\n if (this.backdropElement) {\n if (this.originalParent) {\n this.renderer.insertBefore(this.originalParent, this.nativeElement, this.originalNextSibling);\n }\n if (this.backdropElement.parentNode) {\n this.renderer.removeChild(this.backdropElement.parentNode, this.backdropElement);\n }\n this.backdropElement = null;\n }\n }\n\n private createEventListeners(el: HTMLElement) {\n const l1 = this.renderer.listen(el, 'click', () => {\n this.close();\n l1();\n });\n\n const l2 = this.renderer.listen(el, 'wheel', () => {\n this.close();\n l2();\n });\n\n const l3 = this.renderer.listen(el, 'contextmenu', (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n const x = e.clientX;\n const y = e.clientY;\n\n // Close first so the full-screen backdrop is gone; otherwise the next target never\n // receives contextmenu (conversation list / message list / etc.).\n this.close();\n\n if (isPlatformBrowser(this.platformID)) {\n requestAnimationFrame(() => {\n const under = this.document.elementFromPoint(x, y) as HTMLElement | null;\n if (!under || under === this.document.body || under === this.document.documentElement) {\n return;\n }\n const forward = new MouseEvent('contextmenu', {\n bubbles: true,\n cancelable: true,\n view: this.document.defaultView ?? undefined,\n clientX: x,\n clientY: y,\n screenX: e.screenX,\n screenY: e.screenY,\n button: 2,\n buttons: 2,\n });\n under.dispatchEvent(forward);\n });\n }\n\n l3();\n });\n }\n\n // Host Listeners (UI Interaction Handling)\n\n /** @ignore */\n @HostListener('window:scroll')\n @HostListener('window:resize')\n onWindowEvent() {\n const sender = this as any as AXRootMenu;\n this.service.closeAllContextMenu$.next({ sender: sender }); // Close all menus on scroll or resize\n }\n\n /** @ignore */\n @HostBinding('class')\n get __hostClass(): any {\n return ['ax-menu-container', `ax-orientation-${this.orientation()}`, 'ax-action-list', 'ax-action-list-vertical'];\n }\n}\n","<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n","import { AXComponent, AXOrientation, NXComponent } from '@acorex/cdk/common';\nimport { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport { afterNextRender, Component, HostBinding, inject, input, output, ViewEncapsulation } from '@angular/core';\nimport { AXMenuItemComponent } from './menu-item.component';\nimport { AXMenuService } from './menu.service';\nimport { AXMenuCloseTrigger, AXMenuItem, AXMenuItemClickBaseEvent, AXMenuOpenTrigger, AXRootMenu } from './menu.types';\n\nexport type AXMenuItemsClickEvent = AXMenuItemClickBaseEvent<AXMenuComponent>;\n\n/**\n * Represents a menu component that displays menu items.\n * @category Components\n */\n@Component({\n selector: 'ax-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.css'],\n encapsulation: ViewEncapsulation.None,\n\n providers: [\n AXMenuService,\n {\n provide: AXRootMenu,\n useExisting: AXMenuComponent,\n },\n {\n provide: AXComponent,\n useExisting: AXMenuComponent,\n },\n ],\n imports: [\n NgTemplateOutlet,\n AXDecoratorGenericComponent,\n AXMenuItemComponent,\n AXDecoratorIconComponent,\n AsyncPipe,\n AXTranslatorPipe,\n ],\n})\nexport class AXMenuComponent extends NXComponent {\n constructor() {\n super();\n afterNextRender(() => {\n this.service.initGlobalListeners(this.nativeElement);\n });\n }\n\n orientation = input<AXOrientation>('horizontal');\n\n openOn = input<AXMenuOpenTrigger>('hover');\n\n closeOn = input<AXMenuCloseTrigger>('leave');\n\n service = inject(AXMenuService);\n\n onItemClick = output<AXMenuItemsClickEvent>();\n\n items = input<AXMenuItem[]>([]);\n\n hasArrow = input<boolean>(true);\n\n /** @ignore */\n @HostBinding('class')\n get __hostClass(): string[] {\n return [\n 'ax-root-menu',\n 'ax-action-list',\n `ax-action-list-${this.orientation()}`,\n `${!this.hasArrow() ? 'ax-hide-arrow' : ''}`,\n ];\n }\n\n /**\n * Closes all open menus and submenus for this root menu.\n *\n * @returns void - No return value. All open menu overlays are closed and hidden.\n */\n public close() {\n this.service.closeAll$.next();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AXContextMenuComponent } from './context-menu.component';\nimport { AXMenuItemComponent } from './menu-item.component';\nimport { AXMenuComponent } from './menu.component';\n\n@NgModule({\n imports: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent],\n exports: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent],\n})\nexport class AXMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAQa,aAAa,CAAA;AA2BxB,IAAA,WAAA,GAAA;AA1BO,QAAA,IAAA,CAAA,SAAS,GAAkB,IAAI,OAAO,EAAE;AACxC,QAAA,IAAA,CAAA,KAAK,GAAqC,IAAI,OAAO,EAAE;AACvD,QAAA,IAAA,CAAA,MAAM,GAAqC,IAAI,OAAO,EAAE;AAExD,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAA0C;AACxE,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,OAAO,EAA0B;AAElD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAEhC,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,GAAG,EAA2B;QACvD,IAAA,CAAA,oBAAoB,GAAG,KAAK;QAE5B,IAAA,CAAA,iBAAiB,GAAkB,EAAE;AAE5B,QAAA,IAAA,CAAA,eAAe,GAAG,CAAC,KAAiB,KAAI;AACvD,YAAA,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE;AACxE,gBAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;YACvB;AACF,QAAA,CAAC;QAEgB,IAAA,CAAA,qBAAqB,GAAG,MAAK;AAC5C,YAA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AE3D,YAAY,EAAA,OAAA,EAAA,CAHQ,eAAe,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;;2FAG3D,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,eAAe,EAAE,sBAAsB,CAAC;AACvE,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,eAAe,EAAE,sBAAsB,CAAC;AACxE,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-menu.mjs","sources":["../../../../packages/components/menu/src/lib/menu.service.ts","../../../../packages/components/menu/src/lib/menu.types.ts","../../../../packages/components/menu/src/lib/menu-viewport.ts","../../../../packages/components/menu/src/lib/menu-item.component.ts","../../../../packages/components/menu/src/lib/menu-item.component.html","../../../../packages/components/menu/src/lib/context-menu.component.ts","../../../../packages/components/menu/src/lib/menu.component.html","../../../../packages/components/menu/src/lib/menu.component.ts","../../../../packages/components/menu/src/lib/menu.module.ts","../../../../packages/components/menu/src/acorex-components-menu.ts"],"sourcesContent":["import { AXHtmlUtil, AXPoint } from '@acorex/core/utils';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, DOCUMENT, inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Subject } from 'rxjs';\nimport { AXMenuItemComponentBase, AXRootMenu } from './menu.types';\n\n@Injectable()\nexport class AXMenuService {\n public closeAll$: Subject<void> = new Subject();\n public open$: Subject<AXMenuItemComponentBase> = new Subject();\n public close$: Subject<AXMenuItemComponentBase> = new Subject();\n\n public openContextMenu$ = new Subject<{ sender: AXRootMenu; point: AXPoint }>();\n public closeAllContextMenu$ = new Subject<{ sender: AXRootMenu }>();\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly document = inject(DOCUMENT);\n private readonly platformId = inject(PLATFORM_ID);\n\n private readonly openItems = new Set<AXMenuItemComponentBase>();\n private globalListenersBound = false;\n private rootElement?: HTMLElement;\n private scrollableParents: HTMLElement[] = [];\n\n private readonly onDocumentClick = (event: MouseEvent) => {\n if (this.rootElement && !this.rootElement.contains(event.target as Node)) {\n this.closeAll$.next();\n }\n };\n\n private readonly onWindowOrScrollEvent = () => {\n this.closeAll$.next();\n };\n\n constructor() {\n this.closeAll$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.openItems.clear();\n });\n }\n\n /**\n * Registers a single set of document/window/scroll listeners for the whole menu tree.\n */\n initGlobalListeners(rootElement: HTMLElement) {\n if (!isPlatformBrowser(this.platformId) || this.globalListenersBound) {\n return;\n }\n this.globalListenersBound = true;\n this.rootElement = rootElement;\n\n this.document.addEventListener('click', this.onDocumentClick);\n window.addEventListener('scroll', this.onWindowOrScrollEvent, { capture: true });\n window.addEventListener('resize', this.onWindowOrScrollEvent);\n\n this.scrollableParents = AXHtmlUtil.getScrollableParents(rootElement);\n this.scrollableParents.forEach((parent) => {\n parent.addEventListener('scroll', this.onWindowOrScrollEvent);\n });\n\n this.destroyRef.onDestroy(() => {\n this.document.removeEventListener('click', this.onDocumentClick);\n window.removeEventListener('scroll', this.onWindowOrScrollEvent, { capture: true });\n window.removeEventListener('resize', this.onWindowOrScrollEvent);\n this.scrollableParents.forEach((parent) => {\n parent.removeEventListener('scroll', this.onWindowOrScrollEvent);\n });\n });\n }\n\n /**\n * Closes open submenus that are not on the ancestor path of the item being opened.\n */\n closeExcept(opener: AXMenuItemComponentBase) {\n const keepOpen = new Set<AXMenuItemComponentBase>();\n let current: AXMenuItemComponentBase | null | undefined = opener;\n while (current) {\n keepOpen.add(current);\n current = current.getParentMenuItem?.() ?? current.parent ?? null;\n }\n\n for (const openItem of [...this.openItems]) {\n if (!keepOpen.has(openItem)) {\n this.markClosed(openItem);\n }\n }\n }\n\n markOpen(item: AXMenuItemComponentBase) {\n this.openItems.add(item);\n this.open$.next(item);\n }\n\n markClosed(item: AXMenuItemComponentBase) {\n this.openItems.delete(item);\n this.close$.next(item);\n }\n}\n","import { AXOrientation, AXStyleColorType, NXClickEvent, NXComponent } from '@acorex/cdk/common';\nimport { OutputEmitterRef, WritableSignal } from '@angular/core';\nimport { IsActiveMatchOptions, UrlTree } from '@angular/router';\n\nexport type AXMenuOpenTrigger = 'click' | 'hover';\nexport type AXMenuCloseTrigger = 'click' | 'leave';\n\nexport abstract class AXRootMenu {\n orientation: WritableSignal<AXOrientation>;\n openOn: WritableSignal<AXMenuOpenTrigger>;\n closeOn: WritableSignal<AXMenuCloseTrigger>;\n onItemClick: OutputEmitterRef<AXMenuItemClickBaseEvent>;\n nativeElement: HTMLDivElement;\n hasArrow: WritableSignal<boolean>;\n}\n\nexport abstract class AXMenuItemComponentBase {\n parent?: AXMenuItemComponentBase | null;\n\n /** Resolves the parent item, including for `ngTemplateOutlet`-created nested items. */\n getParentMenuItem?(): AXMenuItemComponentBase | null | undefined;\n}\n\n/** Shared tree item shape for `ax-menu`, `ax-context-menu`, and `ax-side-menu`. */\nexport interface AXMenuItem {\n text: string;\n name?: string;\n icon?: string;\n data?: unknown;\n disabled?: boolean;\n items?: AXMenuItem[];\n color?: AXStyleColorType;\n suffix?: {\n text: string;\n };\n /** Side-menu alias for `suffix.text`. */\n suffixText?: string;\n break?: boolean;\n group?: {\n name?: string;\n title?: string;\n };\n title?: string;\n routerLink?: string | any[] | UrlTree;\n routerLinkActive?: string | string[];\n routerLinkActiveOptions?: { exact: boolean } | IsActiveMatchOptions;\n href?: string;\n target?: '_blank' | '_self' | '_parent' | '_top';\n active?: boolean;\n isLoading?: boolean;\n isCollapsed?: boolean;\n toggleOnClick?: boolean;\n}\n\nexport class AXMenuItemClickBaseEvent<T extends NXComponent = NXComponent> extends NXClickEvent<T> {\n item: {\n name?: string;\n text: string;\n data?: any;\n };\n canceled = false;\n}\n","import { Renderer2 } from '@angular/core';\n\n/** Edge padding when clamping floating menu panels to the viewport. */\nexport const AX_MENU_VIEWPORT_MARGIN = 8;\n\n/** Limits a fixed menu panel so it stays within the viewport below `top`. */\nexport function axFitMenuPanelHeight(renderer: Renderer2, el: HTMLElement, top: number): void {\n renderer.setStyle(el, 'max-height', `${Math.max(0, window.innerHeight - top - AX_MENU_VIEWPORT_MARGIN)}px`);\n}\n\nexport function axClearMenuPanelHeight(renderer: Renderer2, el: HTMLElement): void {\n renderer.removeStyle(el, 'max-height');\n}\n","import { AXComponent, AXStyleColorType, NXComponent } from '@acorex/cdk/common';\nimport { AXHtmlUtil, AXUnsubscriber } from '@acorex/core/utils';\nimport { AXZIndexService, AXZToken } from '@acorex/core/z-index';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n Component,\n computed,\n contentChildren,\n DestroyRef,\n DOCUMENT,\n ElementRef,\n HostBinding,\n HostListener,\n inject,\n Injector,\n input,\n OnDestroy,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXMenuService } from './menu.service';\nimport { AXMenuItemClickBaseEvent, AXMenuItemComponentBase, AXRootMenu } from './menu.types';\nimport { AX_MENU_VIEWPORT_MARGIN, axClearMenuPanelHeight, axFitMenuPanelHeight } from './menu-viewport';\n\nexport type AXMenuItemClickEvent = AXMenuItemClickBaseEvent<AXMenuItemComponent>;\n\ntype AXMenuOwnerHost = HTMLElement & { __axMenuOwner__?: AXMenuItemComponent };\n\n/**\n * Represents a menu item component used within an `ax-menu`.\n * @category Components\n */\n@Component({\n selector: 'ax-menu-item',\n templateUrl: './menu-item.component.html',\n encapsulation: ViewEncapsulation.None,\n\n providers: [\n {\n provide: AXMenuItemComponentBase,\n useExisting: AXMenuItemComponent,\n },\n AXUnsubscriber,\n {\n provide: AXComponent,\n useExisting: AXMenuItemComponent,\n },\n ],\n})\nexport class AXMenuItemComponent extends NXComponent implements OnDestroy {\n protected isOpen = signal(false);\n\n readonly parent = inject(AXMenuItemComponent, { optional: true, skipSelf: true });\n\n protected isFirstLevel = computed(() => this.getParentMenuItem() == null);\n\n private readonly childMenuItems = contentChildren(AXMenuItemComponent, { descendants: false });\n private readonly discoveredSubmenuNodeCount = signal(0);\n private readonly submenuSlot = viewChild<ElementRef<HTMLElement>>('submenuSlot');\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n private childObserver: MutationObserver | null = null;\n private childRefreshScheduled = false;\n\n /**\n * Nested items from the data model. Required for recursive `ngTemplateOutlet` templates\n * because `contentChildren` does not traverse those embedded views.\n */\n subItems = input<readonly unknown[]>([]);\n\n protected hasSubItems = computed(\n () =>\n (this.subItems()?.length ?? 0) > 0 || this.childMenuItems().length > 0 || this.discoveredSubmenuNodeCount() > 0,\n );\n\n protected root = inject(AXRootMenu);\n\n private service = inject(AXMenuService);\n\n private unsuscriber = inject(AXUnsubscriber);\n private renderer = inject(Renderer2);\n private injector = inject(Injector);\n private document = inject(DOCUMENT);\n private zIndexService = inject(AXZIndexService);\n private zToken: AXZToken | null = null;\n private submenuPortalParent: HTMLElement | null = null;\n private submenuPortalNextSibling: ChildNode | null = null;\n /** Survives submenu portaling when the DOM parent chain is broken. */\n private linkedParent: AXMenuItemComponent | null = null;\n private mouseLeaveTimeout: ReturnType<typeof setTimeout> | null = null;\n private submenuUnlistenEnter: (() => void) | null = null;\n private submenuUnlistenLeave: (() => void) | null = null;\n\n protected arrowIcon = computed<string>(() => {\n const isRtl = AXHtmlUtil.isRtl(this.nativeElement);\n return this.root.orientation() == 'horizontal' && this.isFirstLevel()\n ? 'ax-icon-chevron-down'\n : isRtl\n ? 'ax-icon-chevron-left'\n : 'ax-icon-chevron-right';\n });\n\n onClick = output<AXMenuItemClickEvent>();\n\n name = input<string>();\n data = input<any>();\n disabled = input<boolean>();\n color = input<AXStyleColorType>();\n\n constructor() {\n super();\n\n afterNextRender(() => {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n this.reparentOrphanedChildren();\n this.linkChildItems();\n this.updateDiscoveredSubmenuNodeCount();\n this.childObserver = new MutationObserver((records) => {\n if (!this.hasRelevantChildMutation(records)) {\n return;\n }\n this.scheduleChildRefresh();\n });\n this.childObserver.observe(this.nativeElement, { childList: true, subtree: true });\n this.destroyRef.onDestroy(() => this.childObserver?.disconnect());\n });\n\n this.service.closeAll$.pipe(this.unsuscriber.takeUntilDestroy).subscribe(() => this.close());\n\n this.service.open$.pipe(this.unsuscriber.takeUntilDestroy).subscribe((item) => {\n if ((this as any) === item) {\n this.isOpen.set(true);\n this.schedulePositionCalculation();\n }\n });\n\n this.service.close$.pipe(this.unsuscriber.takeUntilDestroy).subscribe((item) => {\n if ((this as any) == item) {\n this.isOpen.set(false);\n this.clearCloseTimeout();\n this.restoreSubmenuPortal();\n this.zIndexService.release(this.zToken);\n this.zToken = null;\n }\n });\n }\n\n private getText(): string {\n return this.nativeElement.querySelector<HTMLDivElement>('ax-text')?.innerText;\n }\n\n /**\n * Resolves the parent menu item. Prefers an explicit link (survives submenu portaling),\n * then DI, then the DOM tree.\n */\n getParentMenuItem(): AXMenuItemComponent | null {\n if (this.linkedParent) {\n return this.linkedParent;\n }\n if (this.parent) {\n return this.parent;\n }\n\n const parentHost = this.nativeElement.parentElement?.closest('ax-menu-item');\n if (!parentHost || parentHost === this.nativeElement) {\n return null;\n }\n\n return this.getInstanceFromElement(parentHost) ?? null;\n }\n\n /**\n * Opens the submenu of this menu item if it has sub-items and is not disabled.\n */\n open() {\n if (this.disabled() || !this.hasSubItems()) {\n return;\n }\n\n this.reparentOrphanedChildren();\n this.linkChildItems();\n this.service.closeExcept(this);\n\n const submenu = this.submenuSlot()?.nativeElement;\n if (submenu) {\n // Portal before `isOpen` so ancestor overflow cannot clip the first paint.\n this.portalSubmenu(submenu);\n }\n\n if (!this.zToken) {\n this.zToken = this.zIndexService.acquire();\n }\n this.service.markOpen(this);\n }\n\n /**\n * Closes the submenu of this menu item if open.\n */\n close() {\n this.clearCloseTimeout();\n this.service.markClosed(this);\n }\n\n /**\n * Positions the submenu after layout so nested levels measure their full height.\n */\n private schedulePositionCalculation() {\n afterNextRender(\n () => {\n if (this.isOpen()) {\n this.calculatePosition();\n afterNextRender(\n () => {\n if (this.isOpen()) {\n this.calculatePosition();\n }\n },\n { injector: this.injector },\n );\n }\n },\n { injector: this.injector },\n );\n }\n\n /**\n * Calculate the position of the submenu to avoid it going out of the viewport.\n * Tall panels are height-clamped; the panel is portaled so parent overflow cannot clip it.\n */\n private calculatePosition() {\n const submenu = this.submenuSlot()?.nativeElement;\n if (!submenu) return;\n\n this.portalSubmenu(submenu);\n axClearMenuPanelHeight(this.renderer, submenu);\n\n const submenuRect = this.measureSubmenuRect(submenu);\n const itemRect = this.nativeElement.getBoundingClientRect();\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const margin = AX_MENU_VIEWPORT_MARGIN;\n const isRtl = AXHtmlUtil.isRtl(this.nativeElement);\n const effectiveHeight = Math.min(submenuRect.height, Math.max(0, windowHeight - margin * 2));\n\n let finalTop: number;\n let finalLeft: number;\n\n const preferredTop =\n this.isFirstLevel() && this.root.orientation() === 'horizontal' ? itemRect.bottom : itemRect.top;\n const alternateTop = itemRect.top - effectiveHeight;\n\n if (preferredTop + effectiveHeight <= windowHeight - margin) {\n finalTop = preferredTop;\n } else if (alternateTop >= margin) {\n finalTop = alternateTop;\n } else {\n finalTop = margin;\n }\n\n finalTop = this.clampVerticalPosition(finalTop, effectiveHeight, windowHeight, margin);\n\n if (this.isFirstLevel() && this.root.orientation() === 'horizontal') {\n const preferredLeft = isRtl ? itemRect.right - submenuRect.width : itemRect.left;\n const alternateLeft = isRtl ? itemRect.left : itemRect.right - submenuRect.width;\n\n if (preferredLeft >= 0 && preferredLeft + submenuRect.width <= windowWidth) {\n finalLeft = preferredLeft;\n } else {\n finalLeft = Math.max(0, Math.min(alternateLeft, windowWidth - submenuRect.width));\n }\n } else {\n const preferredLeft = isRtl ? itemRect.left - submenuRect.width : itemRect.right;\n const alternateLeft = isRtl ? itemRect.right : itemRect.left - submenuRect.width;\n\n if (isRtl ? preferredLeft >= 0 : preferredLeft + submenuRect.width <= windowWidth) {\n finalLeft = preferredLeft;\n } else if (isRtl ? alternateLeft + submenuRect.width <= windowWidth : alternateLeft >= 0) {\n finalLeft = alternateLeft;\n } else {\n finalLeft = isRtl ? 0 : windowWidth - submenuRect.width;\n }\n }\n\n const isNestedMenu = !(this.isFirstLevel() && this.root.orientation() === 'horizontal');\n if (isNestedMenu) {\n const overlapsParent = finalLeft < itemRect.right && itemRect.left < finalLeft + submenuRect.width;\n if (overlapsParent && itemRect.bottom + effectiveHeight <= windowHeight - margin) {\n finalTop = itemRect.bottom;\n }\n }\n\n finalTop = this.clampVerticalPosition(finalTop, effectiveHeight, windowHeight, margin);\n\n this.renderer.setStyle(submenu, 'position', 'fixed');\n this.renderer.setStyle(submenu, 'top', `${finalTop}px`);\n this.renderer.setStyle(submenu, 'left', `${finalLeft}px`);\n axFitMenuPanelHeight(this.renderer, submenu, finalTop);\n if (this.zToken) {\n this.renderer.setStyle(submenu, 'z-index', String(this.zToken.zIndex));\n }\n }\n\n /** Measures submenu size using the same flex layout as the rendered menu. */\n private measureSubmenuRect(submenu: HTMLElement): DOMRect {\n this.renderer.setStyle(submenu, 'visibility', 'hidden');\n this.renderer.setStyle(submenu, 'display', 'flex');\n const rect = submenu.getBoundingClientRect();\n this.renderer.removeStyle(submenu, 'visibility');\n this.renderer.removeStyle(submenu, 'display');\n return rect;\n }\n\n /** Moves the submenu under the context-menu backdrop (or body) to escape ancestor overflow. */\n private portalSubmenu(submenu: HTMLElement) {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n\n (submenu as AXMenuOwnerHost).__axMenuOwner__ = this;\n this.bindSubmenuPointerListeners(submenu);\n\n if (this.submenuPortalParent) {\n return;\n }\n\n const parent = submenu.parentElement;\n if (!parent) {\n return;\n }\n\n this.submenuPortalParent = parent;\n this.submenuPortalNextSibling = submenu.nextSibling;\n\n const rootEl = this.root.nativeElement;\n const rootParent = rootEl.parentElement;\n const portalHost =\n rootEl.tagName === 'AX-CONTEXT-MENU' && rootParent && rootParent !== this.document.body\n ? rootParent\n : this.document.body;\n\n if (submenu.parentElement !== portalHost) {\n portalHost.appendChild(submenu);\n }\n }\n\n private restoreSubmenuPortal() {\n const submenu = this.submenuSlot()?.nativeElement;\n this.unbindSubmenuPointerListeners();\n\n if (submenu) {\n axClearMenuPanelHeight(this.renderer, submenu);\n delete (submenu as AXMenuOwnerHost).__axMenuOwner__;\n }\n\n if (submenu && this.submenuPortalParent) {\n try {\n this.submenuPortalParent.insertBefore(submenu, this.submenuPortalNextSibling);\n } catch {\n // Host may already be torn down while the context menu is closing.\n }\n }\n\n this.submenuPortalParent = null;\n this.submenuPortalNextSibling = null;\n }\n\n /** Keep this item open while the pointer is over its portaled submenu panel. */\n private bindSubmenuPointerListeners(submenu: HTMLElement) {\n this.unbindSubmenuPointerListeners();\n this.submenuUnlistenEnter = this.renderer.listen(submenu, 'mouseenter', () => {\n this.clearCloseTimeout();\n this.clearAncestorCloseTimeouts();\n });\n this.submenuUnlistenLeave = this.renderer.listen(submenu, 'mouseleave', (event: MouseEvent) => {\n this.handlePointerLeave(event);\n });\n }\n\n private unbindSubmenuPointerListeners() {\n this.submenuUnlistenEnter?.();\n this.submenuUnlistenLeave?.();\n this.submenuUnlistenEnter = null;\n this.submenuUnlistenLeave = null;\n }\n\n /** Links direct children so parent resolution still works after the panel is portaled. */\n private linkChildItems() {\n const submenu = this.submenuSlot()?.nativeElement;\n if (!submenu) {\n return;\n }\n\n submenu.querySelectorAll(':scope > ax-menu-item').forEach((el) => {\n const child = this.getInstanceFromElement(el);\n if (child) {\n child.linkedParent = this;\n }\n });\n }\n\n private getInstanceFromElement(el: Element): AXMenuItemComponent | undefined {\n const ctx = (el as HTMLElement & { __axContext__?: unknown }).__axContext__;\n return ctx instanceof AXMenuItemComponent ? ctx : undefined;\n }\n\n /**\n * Moves nested `ax-menu-item` nodes rendered by recursive `ngTemplateOutlet` templates\n * into the submenu slot. Angular content queries do not traverse those embedded views.\n */\n private reparentOrphanedChildren() {\n const container = this.submenuSlot()?.nativeElement;\n if (!container) {\n return;\n }\n\n for (const el of this.getDirectSubmenuNodes()) {\n if (!container.contains(el)) {\n try {\n container.appendChild(el);\n } catch {\n // HierarchyRequestError when the node is already being moved.\n }\n }\n }\n }\n\n /**\n * Nested submenu nodes rendered by custom recursive templates (direct children of this item only).\n */\n private getDirectSubmenuNodes(): HTMLElement[] {\n return Array.from(this.nativeElement.querySelectorAll<HTMLElement>('ax-menu-item, ax-title, ax-divider')).filter(\n (el) => {\n if (el === this.nativeElement) {\n return false;\n }\n\n if (el.tagName === 'AX-MENU-ITEM') {\n return el.parentElement?.closest('ax-menu-item') === this.nativeElement;\n }\n\n return el.closest('ax-menu-item') === this.nativeElement;\n },\n );\n }\n\n private updateDiscoveredSubmenuNodeCount() {\n const fromHost = this.getDirectSubmenuNodes().length;\n const submenu = this.submenuSlot()?.nativeElement;\n const fromPanel = submenu\n ? submenu.querySelectorAll(':scope > ax-menu-item, :scope > ax-title, :scope > ax-divider').length\n : 0;\n // After portaling, projected children live in the panel outside this host.\n this.discoveredSubmenuNodeCount.set(Math.max(fromHost, fromPanel));\n }\n\n private scheduleChildRefresh() {\n if (this.childRefreshScheduled) {\n return;\n }\n this.childRefreshScheduled = true;\n requestAnimationFrame(() => {\n this.childRefreshScheduled = false;\n this.reparentOrphanedChildren();\n this.linkChildItems();\n this.updateDiscoveredSubmenuNodeCount();\n });\n }\n\n private hasRelevantChildMutation(records: MutationRecord[]): boolean {\n for (const record of records) {\n if (\n this.nodeListContainsMenuStructuralNode(record.addedNodes) ||\n this.nodeListContainsMenuStructuralNode(record.removedNodes)\n ) {\n return true;\n }\n }\n return false;\n }\n\n private nodeListContainsMenuStructuralNode(nodes: NodeList): boolean {\n for (const node of Array.from(nodes)) {\n if (!(node instanceof Element)) {\n continue;\n }\n const tagName = node.tagName;\n if (tagName === 'AX-MENU-ITEM' || tagName === 'AX-TITLE' || tagName === 'AX-DIVIDER') {\n return true;\n }\n if (node.querySelector?.('ax-menu-item,ax-title,ax-divider')) {\n return true;\n }\n }\n return false;\n }\n\n /** Keeps the submenu fully inside the viewport vertically. */\n private clampVerticalPosition(top: number, height: number, windowHeight: number, margin = 0): number {\n if (top + height > windowHeight - margin) {\n top = windowHeight - margin - height;\n }\n if (top < margin) {\n top = margin;\n }\n return top;\n }\n\n @HostListener('click', ['$event'])\n handleClick(e: MouseEvent) {\n e.stopPropagation();\n if (this.disabled()) return;\n\n const event = {\n sender: this,\n nativeEvent: e,\n canceled: false,\n item: {\n name: this.name(),\n text: this.getText(),\n data: this.data(),\n },\n } as AXMenuItemClickEvent;\n\n this.onClick.emit(event);\n this.root.onItemClick.emit({ ...event, ...{ sender: this.root as any } });\n\n if (this.hasSubItems() && !event.canceled) {\n this.open();\n } else if (!event.canceled) {\n this.service.closeAll$.next();\n this.service.closeAllContextMenu$.next({ sender: this.root });\n }\n }\n\n @HostListener('mouseenter', ['$event'])\n handleMouseEnter(event: MouseEvent) {\n event.stopPropagation();\n this.clearCloseTimeout();\n this.clearAncestorCloseTimeouts();\n if (!this.isFirstLevel() || this.root.openOn() == 'hover') {\n this.open();\n }\n }\n\n @HostListener('mouseleave', ['$event'])\n handleMouseLeave(event: MouseEvent) {\n event.stopPropagation();\n this.handlePointerLeave(event);\n }\n\n private handlePointerLeave(event: MouseEvent) {\n if (!this.hasSubItems() || this.root.closeOn() !== 'leave') {\n return;\n }\n\n const relatedTarget = event.relatedTarget;\n if (relatedTarget instanceof Node && this.containsSubmenuPointer(relatedTarget)) {\n return;\n }\n\n this.scheduleClose();\n }\n\n private scheduleClose() {\n this.clearCloseTimeout();\n this.mouseLeaveTimeout = setTimeout(() => {\n this.mouseLeaveTimeout = null;\n this.close();\n }, 500);\n }\n\n private clearCloseTimeout() {\n if (this.mouseLeaveTimeout) {\n clearTimeout(this.mouseLeaveTimeout);\n this.mouseLeaveTimeout = null;\n }\n }\n\n private clearAncestorCloseTimeouts() {\n let current = this.getParentMenuItem();\n while (current) {\n current.clearCloseTimeout();\n current = current.getParentMenuItem();\n }\n }\n\n /** True when the pointer is still inside this item's submenu tree (including portaled panels). */\n private containsSubmenuPointer(node: Node): boolean {\n if (this.submenuSlot()?.nativeElement?.contains(node) || this.nativeElement.contains(node)) {\n return true;\n }\n\n const el = node instanceof Element ? node : node.parentElement;\n if (!el) {\n return false;\n }\n\n const item =\n this.getInstanceFromElement(el.closest('ax-menu-item') ?? el) ??\n (el.closest('.ax-menu-items') as AXMenuOwnerHost | null)?.__axMenuOwner__;\n\n return !!item && this.isSelfOrAncestorOf(item);\n }\n\n private isSelfOrAncestorOf(item: AXMenuItemComponent): boolean {\n let current: AXMenuItemComponent | null = item;\n while (current) {\n if (current === this) {\n return true;\n }\n current = current.getParentMenuItem();\n }\n return false;\n }\n\n ngOnDestroy() {\n this.clearCloseTimeout();\n this.unbindSubmenuPointerListeners();\n if (this.isOpen()) {\n this.close();\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n get __hostClass(): string[] {\n const list: string[] = ['ax-action-item'];\n if (this.disabled()) {\n list.push('ax-state-disabled');\n }\n list.push(`${this.color() ?? 'ax-default'}`);\n\n return list;\n }\n}\n","<div class=\"ax-action-item-prefix\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content select=\"ax-text\"></ng-content>\n</div>\n<div class=\"ax-action-item-suffix\">\n <ng-content select=\"ax-suffix\"></ng-content>\n @if (hasSubItems() && (!isFirstLevel() || root.hasArrow())) {\n <i class=\"ax-icon ax-icon-solid {{ arrowIcon() }} \"></i>\n }\n</div>\n<div\n #submenuSlot\n class=\"ax-menu-items ax-action-list ax-action-list-vertical\"\n [class.ax-state-open]=\"isOpen()\"\n>\n <ng-content select=\"ax-menu-item,ax-title,ax-divider,ng-container,[ngTemplateOutlet]\"></ng-content>\n</div>\n","import { AXComponent, AXOrientation, NXComponent, NXEvent } from '@acorex/cdk/common';\nimport { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\nimport { isBrowser } from '@acorex/core/platform';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { AXHtmlUtil, AXPoint } from '@acorex/core/utils';\nimport { AXZIndexService, AXZToken } from '@acorex/core/z-index';\nimport { AsyncPipe, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n Component,\n DestroyRef,\n DOCUMENT,\n HostBinding,\n HostListener,\n inject,\n Injector,\n input,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationStart, Router } from '@angular/router';\nimport { cloneDeep } from 'lodash-es';\nimport { filter } from 'rxjs/operators';\nimport { AXMenuItemComponent } from './menu-item.component';\nimport { AXMenuService } from './menu.service';\nimport { AXMenuCloseTrigger, AXMenuItem, AXMenuItemClickBaseEvent, AXMenuOpenTrigger, AXRootMenu } from './menu.types';\nimport { AX_MENU_VIEWPORT_MARGIN, axClearMenuPanelHeight, axFitMenuPanelHeight } from './menu-viewport';\n\nexport class AXContextMenuOpeningEvent extends NXEvent<AXContextMenuComponent> {\n items: AXMenuItem[];\n canceled = false;\n targetElement: HTMLElement;\n}\nexport type AXContextMenuItemsClickEvent = AXMenuItemClickBaseEvent<AXContextMenuComponent>;\n\n/**\n * Represents a menu component that displays context menu.\n * @category Components\n */\n@Component({\n selector: 'ax-context-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.css'],\n\n encapsulation: ViewEncapsulation.None,\n providers: [\n AXMenuService,\n {\n provide: AXRootMenu,\n useExisting: AXContextMenuComponent,\n },\n {\n provide: AXComponent,\n useExisting: AXContextMenuComponent,\n },\n ],\n imports: [\n NgTemplateOutlet,\n AXDecoratorGenericComponent,\n AXMenuItemComponent,\n AXDecoratorIconComponent,\n AsyncPipe,\n AXTranslatorPipe,\n ],\n})\nexport class AXContextMenuComponent extends NXComponent {\n // Inputs and Outputs\n\n readonly orientation = input<AXOrientation>('vertical');\n readonly openOn = input<AXMenuOpenTrigger>('hover');\n readonly closeOn = input<AXMenuCloseTrigger>('click');\n /** When true, closes the menu on router navigation (e.g. side-menu route changes). */\n readonly closeOnRouteChange = input(false);\n readonly originalItems = input<AXMenuItem[]>([], { alias: 'items' });\n readonly target = input<HTMLElement | HTMLElement[] | string>();\n\n onItemClick = output<AXContextMenuItemsClickEvent>();\n onOpening = output<AXContextMenuOpeningEvent>();\n /** Emitted when the menu closes (backdrop, item click, scroll, another menu opening, etc.). */\n onClose = output<void>();\n\n hasArrow = signal<boolean>(true);\n\n // Injected Services\n\n private service = inject(AXMenuService);\n private renderer = inject(Renderer2);\n private document = inject(DOCUMENT);\n private platformID = inject(PLATFORM_ID);\n private zIndexService = inject(AXZIndexService);\n private injector = inject(Injector);\n private zToken: AXZToken | null = null;\n private lastOpenPoint: AXPoint | null = null;\n private router = inject(Router, { optional: true });\n private destroyRef = inject(DestroyRef);\n\n // Constructor (Dependency Injection)\n\n /** @ignore */\n constructor() {\n super();\n //\n afterNextRender(() => {\n this.bindContextEvent();\n this.service.initGlobalListeners(this.nativeElement);\n });\n\n this.setupCloseOnRouteChange();\n\n this.service.closeAllContextMenu$.subscribe(() => {\n this.service.closeAll$.next();\n this.close();\n });\n\n this.service.openContextMenu$.subscribe((e) => {\n if ((e.sender as any) == this) {\n this.internalShowAt(e.point);\n }\n });\n }\n\n // Lifecycle Hooks\n\n ngOnDestroy() {\n if (isBrowser()) {\n this.removeContextEvent();\n }\n }\n\n /**\n * Refreshes the context menu by rebinding event listeners to target elements.\n */\n refresh() {\n this.bindContextEvent();\n }\n\n /**\n * Shows the context menu at a specific point.\n * @param point - The coordinates where the menu should appear\n * @param targetElement - Optional target element for the context menu\n * @param event - Optional opening event with menu items\n */\n showAt(point: AXPoint, targetElement?: HTMLElement, event?: AXContextMenuOpeningEvent) {\n const sender = this as any as AXRootMenu;\n this.service.closeAllContextMenu$.next({ sender });\n if (isPlatformBrowser(this.platformID)) {\n if (!targetElement) {\n targetElement = this.document.elementFromPoint(point.x, point.y) as HTMLElement;\n }\n if (!event) {\n event = {\n sender: this,\n canceled: false,\n targetElement: targetElement,\n items: cloneDeep(this.originalItems()),\n };\n if (event.canceled) return;\n }\n this.onOpening.emit(event);\n this.items.set(event.items);\n }\n this.service.openContextMenu$.next({ sender, point });\n }\n\n /**\n * Closes the context menu and removes the backdrop.\n */\n close() {\n const wasOpen = this.nativeElement.classList.contains('ax-state-open');\n this.nativeElement.classList.remove('ax-state-open');\n this.lastOpenPoint = null;\n axClearMenuPanelHeight(this.renderer, this.nativeElement);\n // Drop rendered items before moving DOM nodes back to the original parent.\n // This prevents a large menu tree from being re-parented/removed as a single heavy DOM operation.\n if (wasOpen) {\n this.items.set([]);\n }\n this.removeBackdrop();\n // Release z-index token\n this.zIndexService.release(this.zToken);\n this.zToken = null;\n if (wasOpen) {\n this.onClose.emit();\n }\n }\n\n // Private Properties\n\n private backdropElement!: HTMLElement;\n private originalNextSibling: Node | null = null;\n private originalParent: HTMLElement | null = null;\n\n protected items = signal<AXMenuItem[]>([]);\n\n // Private Methods (Internal Logic)\n\n /** @ignore */\n private setupCloseOnRouteChange() {\n if (!this.router || !isPlatformBrowser(this.platformID)) {\n return;\n }\n\n this.router.events\n .pipe(\n filter((event): event is NavigationStart => event instanceof NavigationStart),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe(() => {\n if (this.closeOnRouteChange()) {\n this.close();\n }\n });\n }\n\n /** @ignore */\n private getTargetElements(): HTMLElement[] {\n if (isPlatformBrowser(this.platformID)) {\n const elements: HTMLElement[] =\n typeof this.target() == 'string'\n ? Array.from(this.document.querySelectorAll<HTMLElement>(this.target() as string))\n : Array.isArray(this.target())\n ? (this.target() as HTMLElement[])\n : [this.target() as HTMLElement];\n\n return elements;\n }\n return null;\n }\n\n /** @ignore */\n private bindContextEvent() {\n this.getTargetElements().forEach((e) => {\n e?.addEventListener('contextmenu', this.handleContextMenu.bind(this));\n });\n }\n\n /** @ignore */\n private removeContextEvent() {\n this.getTargetElements().forEach((e) => {\n e?.removeEventListener('contextmenu', this.handleContextMenu.bind(this));\n });\n }\n\n /** @ignore */\n private handleContextMenu(e: MouseEvent) {\n e.preventDefault();\n e.stopPropagation();\n //\n if (isPlatformBrowser(this.platformID)) {\n const elementsUnderMouse = this.document.elementsFromPoint(e.x, e.y) as HTMLElement[];\n const targetElements = this.getTargetElements();\n const targetElement = elementsUnderMouse.find((target) => targetElements.includes(target));\n //\n const event: AXContextMenuOpeningEvent = {\n sender: this,\n canceled: false,\n targetElement: targetElement,\n items: cloneDeep(this.originalItems()),\n };\n //\n if (!event.canceled) {\n this.showAt({ x: e.clientX, y: e.clientY }, targetElement, event);\n }\n }\n }\n\n /** @ignore */\n private internalShowAt(point: AXPoint) {\n this.lastOpenPoint = point;\n const elementRef = this.nativeElement;\n elementRef.classList.add('ax-state-open');\n this.positionAtPoint(point);\n this.createBackdrop();\n\n // Items may render after the signal update (e.g. compact side-menu); reposition once laid out.\n afterNextRender(\n () => {\n if (this.lastOpenPoint && elementRef.classList.contains('ax-state-open')) {\n this.positionAtPoint(this.lastOpenPoint);\n }\n },\n { injector: this.injector },\n );\n }\n\n /**\n * Positions the menu at `point`, flipping when it would overflow the viewport.\n * Uses a temporary visible layout pass so parents that hide the host (e.g. side-menu `display: none`) do not yield a zero-sized rect.\n */\n private positionAtPoint(point: AXPoint) {\n const elementRef = this.nativeElement;\n const itemRect = this.measureMenuRect(elementRef);\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n const margin = AX_MENU_VIEWPORT_MARGIN;\n const isRtl = AXHtmlUtil.isRtl(elementRef);\n\n let left: number;\n if (isRtl) {\n left = point.x - itemRect.width;\n if (left < 0) {\n left = point.x;\n }\n } else {\n left = point.x;\n if (left + itemRect.width > windowWidth) {\n left = point.x - itemRect.width;\n }\n }\n\n const effectiveHeight = Math.min(itemRect.height, Math.max(0, windowHeight - margin * 2));\n let top = point.y;\n if (top + effectiveHeight > windowHeight - margin) {\n top = windowHeight - margin - effectiveHeight;\n }\n if (top < margin) {\n top = margin;\n }\n\n this.renderer.setStyle(elementRef, 'left', `${left}px`);\n this.renderer.setStyle(elementRef, 'top', `${top}px`);\n this.renderer.setStyle(elementRef, 'position', 'fixed');\n axFitMenuPanelHeight(this.renderer, elementRef, top);\n }\n\n /** Measures menu size even when an ancestor hides the host with `display: none`. */\n private measureMenuRect(elementRef: HTMLElement): DOMRect {\n axClearMenuPanelHeight(this.renderer, elementRef);\n this.renderer.setStyle(elementRef, 'visibility', 'hidden');\n this.renderer.setStyle(elementRef, 'display', 'flex');\n const rect = elementRef.getBoundingClientRect();\n this.renderer.removeStyle(elementRef, 'visibility');\n this.renderer.removeStyle(elementRef, 'display');\n return rect;\n }\n\n /** @ignore */\n private createBackdrop() {\n if (!this.originalParent) {\n this.originalParent = this.nativeElement.parentElement;\n this.originalNextSibling = this.nativeElement.nextSibling;\n }\n\n // Acquire z-index token\n this.zToken = this.zIndexService.acquire();\n\n this.backdropElement = this.renderer.createElement('div');\n this.renderer.setStyle(this.backdropElement, 'position', 'fixed');\n this.renderer.setStyle(this.backdropElement, 'top', '0');\n this.renderer.setStyle(this.backdropElement, 'left', '0');\n this.renderer.setStyle(this.backdropElement, 'width', '100%');\n this.renderer.setStyle(this.backdropElement, 'height', '100%');\n this.renderer.setStyle(this.backdropElement, 'z-index', String(this.zToken.zIndex));\n this.renderer.setStyle(this.backdropElement, 'background', 'transparent');\n\n this.createEventListeners(this.backdropElement);\n\n this.document.body.appendChild(this.backdropElement);\n this.backdropElement.appendChild(this.nativeElement);\n }\n\n /** @ignore */\n private removeBackdrop() {\n if (this.backdropElement) {\n if (this.originalParent) {\n this.renderer.insertBefore(this.originalParent, this.nativeElement, this.originalNextSibling);\n }\n if (this.backdropElement.parentNode) {\n this.renderer.removeChild(this.backdropElement.parentNode, this.backdropElement);\n }\n this.backdropElement = null;\n }\n }\n\n private createEventListeners(el: HTMLElement) {\n const l1 = this.renderer.listen(el, 'click', () => {\n this.close();\n l1();\n });\n\n const l2 = this.renderer.listen(el, 'wheel', (e: WheelEvent) => {\n const target = e.target;\n if (\n target instanceof Element &&\n (this.nativeElement.contains(target) || target.closest('.ax-menu-items'))\n ) {\n return;\n }\n this.close();\n l2();\n });\n\n const l3 = this.renderer.listen(el, 'contextmenu', (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n const x = e.clientX;\n const y = e.clientY;\n\n // Close first so the full-screen backdrop is gone; otherwise the next target never\n // receives contextmenu (conversation list / message list / etc.).\n this.close();\n\n if (isPlatformBrowser(this.platformID)) {\n requestAnimationFrame(() => {\n const under = this.document.elementFromPoint(x, y) as HTMLElement | null;\n if (!under || under === this.document.body || under === this.document.documentElement) {\n return;\n }\n const forward = new MouseEvent('contextmenu', {\n bubbles: true,\n cancelable: true,\n view: this.document.defaultView ?? undefined,\n clientX: x,\n clientY: y,\n screenX: e.screenX,\n screenY: e.screenY,\n button: 2,\n buttons: 2,\n });\n under.dispatchEvent(forward);\n });\n }\n\n l3();\n });\n }\n\n // Host Listeners (UI Interaction Handling)\n\n /** @ignore */\n @HostListener('window:scroll')\n @HostListener('window:resize')\n onWindowEvent() {\n const sender = this as any as AXRootMenu;\n this.service.closeAllContextMenu$.next({ sender: sender }); // Close all menus on scroll or resize\n }\n\n /** @ignore */\n @HostBinding('class')\n get __hostClass(): any {\n return ['ax-menu-container', `ax-orientation-${this.orientation()}`, 'ax-action-list', 'ax-action-list-vertical'];\n }\n}\n","<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n","import { AXComponent, AXOrientation, NXComponent } from '@acorex/cdk/common';\nimport { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport { afterNextRender, Component, HostBinding, inject, input, output, ViewEncapsulation } from '@angular/core';\nimport { AXMenuItemComponent } from './menu-item.component';\nimport { AXMenuService } from './menu.service';\nimport { AXMenuCloseTrigger, AXMenuItem, AXMenuItemClickBaseEvent, AXMenuOpenTrigger, AXRootMenu } from './menu.types';\n\nexport type AXMenuItemsClickEvent = AXMenuItemClickBaseEvent<AXMenuComponent>;\n\n/**\n * Represents a menu component that displays menu items.\n * @category Components\n */\n@Component({\n selector: 'ax-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.css'],\n encapsulation: ViewEncapsulation.None,\n\n providers: [\n AXMenuService,\n {\n provide: AXRootMenu,\n useExisting: AXMenuComponent,\n },\n {\n provide: AXComponent,\n useExisting: AXMenuComponent,\n },\n ],\n imports: [\n NgTemplateOutlet,\n AXDecoratorGenericComponent,\n AXMenuItemComponent,\n AXDecoratorIconComponent,\n AsyncPipe,\n AXTranslatorPipe,\n ],\n})\nexport class AXMenuComponent extends NXComponent {\n constructor() {\n super();\n afterNextRender(() => {\n this.service.initGlobalListeners(this.nativeElement);\n });\n }\n\n orientation = input<AXOrientation>('horizontal');\n\n openOn = input<AXMenuOpenTrigger>('hover');\n\n closeOn = input<AXMenuCloseTrigger>('leave');\n\n service = inject(AXMenuService);\n\n onItemClick = output<AXMenuItemsClickEvent>();\n\n items = input<AXMenuItem[]>([]);\n\n hasArrow = input<boolean>(true);\n\n /** @ignore */\n @HostBinding('class')\n get __hostClass(): string[] {\n return [\n 'ax-root-menu',\n 'ax-action-list',\n `ax-action-list-${this.orientation()}`,\n `${!this.hasArrow() ? 'ax-hide-arrow' : ''}`,\n ];\n }\n\n /**\n * Closes all open menus and submenus for this root menu.\n *\n * @returns void - No return value. All open menu overlays are closed and hidden.\n */\n public close() {\n this.service.closeAll$.next();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AXContextMenuComponent } from './context-menu.component';\nimport { AXMenuItemComponent } from './menu-item.component';\nimport { AXMenuComponent } from './menu.component';\n\n@NgModule({\n imports: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent],\n exports: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent],\n})\nexport class AXMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAQa,aAAa,CAAA;AA2BxB,IAAA,WAAA,GAAA;AA1BO,QAAA,IAAA,CAAA,SAAS,GAAkB,IAAI,OAAO,EAAE;AACxC,QAAA,IAAA,CAAA,KAAK,GAAqC,IAAI,OAAO,EAAE;AACvD,QAAA,IAAA,CAAA,MAAM,GAAqC,IAAI,OAAO,EAAE;AAExD,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAA0C;AACxE,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,OAAO,EAA0B;AAElD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAA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AC;AACvE,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,eAAe,EAAE,sBAAsB,CAAC;AACxE,iBAAA;;;ACRD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@acorex/components",
3
- "version": "22.0.0-next.14",
3
+ "version": "22.0.0-next.16",
4
4
  "peerDependencies": {
5
- "@acorex/core": "22.0.0-next.14",
6
- "@acorex/cdk": "22.0.0-next.14",
5
+ "@acorex/core": "22.0.0-next.16",
6
+ "@acorex/cdk": "22.0.0-next.16",
7
7
  "polytype": ">=0.17.0",
8
8
  "angular-imask": ">=7.6.1",
9
9
  "imask": ">=7.6.1",
@@ -175,8 +175,16 @@ declare class AXMenuItemComponent extends NXComponent implements OnDestroy {
175
175
  private unsuscriber;
176
176
  private renderer;
177
177
  private injector;
178
+ private document;
178
179
  private zIndexService;
179
180
  private zToken;
181
+ private submenuPortalParent;
182
+ private submenuPortalNextSibling;
183
+ /** Survives submenu portaling when the DOM parent chain is broken. */
184
+ private linkedParent;
185
+ private mouseLeaveTimeout;
186
+ private submenuUnlistenEnter;
187
+ private submenuUnlistenLeave;
180
188
  protected arrowIcon: _angular_core.Signal<string>;
181
189
  onClick: _angular_core.OutputEmitterRef<AXMenuItemClickEvent>;
182
190
  name: _angular_core.InputSignal<string>;
@@ -186,8 +194,8 @@ declare class AXMenuItemComponent extends NXComponent implements OnDestroy {
186
194
  constructor();
187
195
  private getText;
188
196
  /**
189
- * Resolves the parent menu item. Items rendered via recursive `ngTemplateOutlet` do not
190
- * receive a DI parent, so we fall back to the DOM tree after reparenting.
197
+ * Resolves the parent menu item. Prefers an explicit link (survives submenu portaling),
198
+ * then DI, then the DOM tree.
191
199
  */
192
200
  getParentMenuItem(): AXMenuItemComponent | null;
193
201
  /**
@@ -204,10 +212,20 @@ declare class AXMenuItemComponent extends NXComponent implements OnDestroy {
204
212
  private schedulePositionCalculation;
205
213
  /**
206
214
  * Calculate the position of the submenu to avoid it going out of the viewport.
215
+ * Tall panels are height-clamped; the panel is portaled so parent overflow cannot clip it.
207
216
  */
208
217
  private calculatePosition;
209
218
  /** Measures submenu size using the same flex layout as the rendered menu. */
210
219
  private measureSubmenuRect;
220
+ /** Moves the submenu under the context-menu backdrop (or body) to escape ancestor overflow. */
221
+ private portalSubmenu;
222
+ private restoreSubmenuPortal;
223
+ /** Keep this item open while the pointer is over its portaled submenu panel. */
224
+ private bindSubmenuPointerListeners;
225
+ private unbindSubmenuPointerListeners;
226
+ /** Links direct children so parent resolution still works after the panel is portaled. */
227
+ private linkChildItems;
228
+ private getInstanceFromElement;
211
229
  /**
212
230
  * Moves nested `ax-menu-item` nodes rendered by recursive `ngTemplateOutlet` templates
213
231
  * into the submenu slot. Angular content queries do not traverse those embedded views.
@@ -225,10 +243,14 @@ declare class AXMenuItemComponent extends NXComponent implements OnDestroy {
225
243
  private clampVerticalPosition;
226
244
  handleClick(e: MouseEvent): void;
227
245
  handleMouseEnter(event: MouseEvent): void;
228
- private mouseLeaveTimeout;
229
246
  handleMouseLeave(event: MouseEvent): void;
230
- /** True when the pointer moved into this item's submenu panel or a nested open submenu. */
247
+ private handlePointerLeave;
248
+ private scheduleClose;
249
+ private clearCloseTimeout;
250
+ private clearAncestorCloseTimeouts;
251
+ /** True when the pointer is still inside this item's submenu tree (including portaled panels). */
231
252
  private containsSubmenuPointer;
253
+ private isSelfOrAncestorOf;
232
254
  ngOnDestroy(): void;
233
255
  /** @ignore */
234
256
  get __hostClass(): string[];