@acorex/components 21.0.2-next.5 → 21.0.2-next.51

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.
Files changed (225) hide show
  1. package/conversation2/README.md +5 -8
  2. package/fesm2022/acorex-components-accordion.mjs +29 -29
  3. package/fesm2022/acorex-components-accordion.mjs.map +1 -1
  4. package/fesm2022/acorex-components-action-sheet.mjs +30 -30
  5. package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
  6. package/fesm2022/acorex-components-alert.mjs +16 -16
  7. package/fesm2022/acorex-components-alert.mjs.map +1 -1
  8. package/fesm2022/acorex-components-aspect-ratio.mjs +5 -5
  9. package/fesm2022/acorex-components-aspect-ratio.mjs.map +1 -1
  10. package/fesm2022/acorex-components-audio-wave.mjs +11 -11
  11. package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
  12. package/fesm2022/acorex-components-autocomplete.mjs +14 -14
  13. package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
  14. package/fesm2022/acorex-components-avatar.mjs +17 -16
  15. package/fesm2022/acorex-components-avatar.mjs.map +1 -1
  16. package/fesm2022/acorex-components-badge.mjs +9 -9
  17. package/fesm2022/acorex-components-badge.mjs.map +1 -1
  18. package/fesm2022/acorex-components-bottom-navigation.mjs +14 -14
  19. package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
  20. package/fesm2022/acorex-components-breadcrumbs.mjs +13 -13
  21. package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
  22. package/fesm2022/acorex-components-button-group.mjs +40 -20
  23. package/fesm2022/acorex-components-button-group.mjs.map +1 -1
  24. package/fesm2022/acorex-components-button.mjs +35 -36
  25. package/fesm2022/acorex-components-button.mjs.map +1 -1
  26. package/fesm2022/acorex-components-calendar.mjs +256 -54
  27. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  28. package/fesm2022/acorex-components-check-box.mjs +10 -10
  29. package/fesm2022/acorex-components-check-box.mjs.map +1 -1
  30. package/fesm2022/acorex-components-chips.mjs +9 -9
  31. package/fesm2022/acorex-components-chips.mjs.map +1 -1
  32. package/fesm2022/acorex-components-circular-progress.mjs +13 -13
  33. package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
  34. package/fesm2022/acorex-components-code-editor.mjs +27 -27
  35. package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
  36. package/fesm2022/acorex-components-color-box.mjs +14 -14
  37. package/fesm2022/acorex-components-color-box.mjs.map +1 -1
  38. package/fesm2022/acorex-components-color-palette.mjs +84 -43
  39. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  40. package/fesm2022/acorex-components-command.mjs +19 -19
  41. package/fesm2022/acorex-components-command.mjs.map +1 -1
  42. package/fesm2022/acorex-components-comment.mjs +35 -35
  43. package/fesm2022/acorex-components-comment.mjs.map +1 -1
  44. package/fesm2022/acorex-components-conversation.mjs +105 -105
  45. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  46. package/fesm2022/acorex-components-conversation2.mjs +11165 -8111
  47. package/fesm2022/acorex-components-conversation2.mjs.map +1 -1
  48. package/fesm2022/acorex-components-cron-job.mjs +51 -51
  49. package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
  50. package/fesm2022/acorex-components-data-list.mjs +31 -31
  51. package/fesm2022/acorex-components-data-list.mjs.map +1 -1
  52. package/fesm2022/acorex-components-data-pager.mjs +93 -104
  53. package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
  54. package/fesm2022/acorex-components-data-table.mjs +69 -57
  55. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  56. package/fesm2022/acorex-components-datetime-box.mjs +174 -39
  57. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  58. package/fesm2022/acorex-components-datetime-input.mjs +30 -38
  59. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  60. package/fesm2022/acorex-components-datetime-picker.mjs +62 -55
  61. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  62. package/fesm2022/acorex-components-decorators.mjs +39 -39
  63. package/fesm2022/acorex-components-decorators.mjs.map +1 -1
  64. package/fesm2022/acorex-components-dialog.mjs +19 -26
  65. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  66. package/fesm2022/acorex-components-drawer.mjs +23 -23
  67. package/fesm2022/acorex-components-drawer.mjs.map +1 -1
  68. package/fesm2022/acorex-components-dropdown-button.mjs +9 -9
  69. package/fesm2022/acorex-components-dropdown.mjs +19 -19
  70. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  71. package/fesm2022/acorex-components-editor.mjs +12 -12
  72. package/fesm2022/acorex-components-editor.mjs.map +1 -1
  73. package/fesm2022/acorex-components-fab.mjs +15 -15
  74. package/fesm2022/acorex-components-fab.mjs.map +1 -1
  75. package/fesm2022/acorex-components-flow-chart.mjs +74 -58
  76. package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
  77. package/fesm2022/acorex-components-form.mjs +30 -30
  78. package/fesm2022/acorex-components-form.mjs.map +1 -1
  79. package/fesm2022/acorex-components-grid-layout-builder.mjs +15 -15
  80. package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
  81. package/fesm2022/acorex-components-image-editor.mjs +87 -87
  82. package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
  83. package/fesm2022/acorex-components-image.mjs +11 -11
  84. package/fesm2022/acorex-components-image.mjs.map +1 -1
  85. package/fesm2022/acorex-components-json-viewer.mjs +12 -12
  86. package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
  87. package/fesm2022/acorex-components-kanban.mjs +23 -23
  88. package/fesm2022/acorex-components-kanban.mjs.map +1 -1
  89. package/fesm2022/acorex-components-kbd.mjs +15 -15
  90. package/fesm2022/acorex-components-kbd.mjs.map +1 -1
  91. package/fesm2022/acorex-components-label.mjs +9 -9
  92. package/fesm2022/acorex-components-list.mjs +15 -15
  93. package/fesm2022/acorex-components-list.mjs.map +1 -1
  94. package/fesm2022/acorex-components-loading-dialog.mjs +19 -19
  95. package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
  96. package/fesm2022/acorex-components-loading.mjs +21 -21
  97. package/fesm2022/acorex-components-loading.mjs.map +1 -1
  98. package/fesm2022/acorex-components-map.mjs +46 -46
  99. package/fesm2022/acorex-components-map.mjs.map +1 -1
  100. package/fesm2022/acorex-components-media-viewer.mjs +82 -82
  101. package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
  102. package/fesm2022/acorex-components-menu.mjs +366 -197
  103. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  104. package/fesm2022/{acorex-components-modal-acorex-components-modal-CcXuJ4IW.mjs → acorex-components-modal-acorex-components-modal-JpPBSiVh.mjs} +28 -28
  105. package/fesm2022/{acorex-components-modal-acorex-components-modal-CcXuJ4IW.mjs.map → acorex-components-modal-acorex-components-modal-JpPBSiVh.mjs.map} +1 -1
  106. package/fesm2022/{acorex-components-modal-modal-content.component-DTZu2zbU.mjs → acorex-components-modal-modal-content.component-DKweXQfl.mjs} +39 -39
  107. package/fesm2022/acorex-components-modal-modal-content.component-DKweXQfl.mjs.map +1 -0
  108. package/fesm2022/acorex-components-modal.mjs +1 -1
  109. package/fesm2022/acorex-components-navbar.mjs +8 -8
  110. package/fesm2022/acorex-components-notification.mjs +28 -28
  111. package/fesm2022/acorex-components-notification.mjs.map +1 -1
  112. package/fesm2022/acorex-components-number-box.mjs +61 -23
  113. package/fesm2022/acorex-components-number-box.mjs.map +1 -1
  114. package/fesm2022/acorex-components-otp.mjs +45 -21
  115. package/fesm2022/acorex-components-otp.mjs.map +1 -1
  116. package/fesm2022/acorex-components-page.mjs +10 -10
  117. package/fesm2022/acorex-components-paint.mjs +53 -53
  118. package/fesm2022/acorex-components-paint.mjs.map +1 -1
  119. package/fesm2022/acorex-components-password-box.mjs +28 -28
  120. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  121. package/fesm2022/acorex-components-pdf-reader.mjs +9 -9
  122. package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
  123. package/fesm2022/acorex-components-phone-box.mjs +19 -19
  124. package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
  125. package/fesm2022/acorex-components-picker.mjs +31 -31
  126. package/fesm2022/acorex-components-picker.mjs.map +1 -1
  127. package/fesm2022/acorex-components-popover.mjs +11 -11
  128. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  129. package/fesm2022/acorex-components-popup.mjs +48 -24
  130. package/fesm2022/acorex-components-popup.mjs.map +1 -1
  131. package/fesm2022/acorex-components-progress-bar.mjs +8 -8
  132. package/fesm2022/acorex-components-qrcode.mjs +37 -20
  133. package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
  134. package/fesm2022/acorex-components-query-builder.mjs +15 -14
  135. package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
  136. package/fesm2022/acorex-components-radio.mjs +9 -9
  137. package/fesm2022/acorex-components-rail-navigation.mjs +28 -28
  138. package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
  139. package/fesm2022/acorex-components-range-slider.mjs +34 -34
  140. package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
  141. package/fesm2022/acorex-components-rate-picker.mjs +17 -17
  142. package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
  143. package/fesm2022/acorex-components-rest-api-generator.mjs +33 -33
  144. package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
  145. package/fesm2022/acorex-components-result.mjs +8 -8
  146. package/fesm2022/acorex-components-routing-progress.mjs +8 -8
  147. package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
  148. package/fesm2022/acorex-components-rrule.mjs +36 -36
  149. package/fesm2022/acorex-components-rrule.mjs.map +1 -1
  150. package/fesm2022/acorex-components-scheduler-picker.mjs +118 -118
  151. package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
  152. package/fesm2022/acorex-components-scheduler.mjs +398 -326
  153. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  154. package/fesm2022/acorex-components-search-box.mjs +9 -9
  155. package/fesm2022/acorex-components-search-box.mjs.map +1 -1
  156. package/fesm2022/acorex-components-select-box.mjs +22 -22
  157. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  158. package/fesm2022/acorex-components-selection-list-2.mjs +12 -12
  159. package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
  160. package/fesm2022/acorex-components-selection-list.mjs +11 -11
  161. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  162. package/fesm2022/acorex-components-side-menu.mjs +455 -97
  163. package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
  164. package/fesm2022/acorex-components-skeleton.mjs +8 -8
  165. package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
  166. package/fesm2022/acorex-components-slider.mjs +7 -7
  167. package/fesm2022/acorex-components-sliding-item.mjs +25 -25
  168. package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
  169. package/fesm2022/acorex-components-step-wizard.mjs +40 -39
  170. package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
  171. package/fesm2022/acorex-components-switch.mjs +12 -12
  172. package/fesm2022/acorex-components-switch.mjs.map +1 -1
  173. package/fesm2022/acorex-components-tabs.mjs +20 -20
  174. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  175. package/fesm2022/acorex-components-tag-box.mjs +19 -19
  176. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  177. package/fesm2022/acorex-components-tag.mjs +8 -8
  178. package/fesm2022/acorex-components-tag.mjs.map +1 -1
  179. package/fesm2022/acorex-components-text-area.mjs +9 -9
  180. package/fesm2022/acorex-components-text-area.mjs.map +1 -1
  181. package/fesm2022/acorex-components-text-box.mjs +12 -12
  182. package/fesm2022/acorex-components-text-box.mjs.map +1 -1
  183. package/fesm2022/acorex-components-time-duration.mjs +34 -32
  184. package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
  185. package/fesm2022/acorex-components-time-line.mjs +19 -19
  186. package/fesm2022/acorex-components-time-line.mjs.map +1 -1
  187. package/fesm2022/acorex-components-toast.mjs +26 -26
  188. package/fesm2022/acorex-components-toast.mjs.map +1 -1
  189. package/fesm2022/acorex-components-toolbar.mjs +13 -13
  190. package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
  191. package/fesm2022/acorex-components-tooltip.mjs +27 -18
  192. package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
  193. package/fesm2022/acorex-components-tree-view.mjs +326 -67
  194. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  195. package/fesm2022/acorex-components-uploader.mjs +17 -17
  196. package/fesm2022/acorex-components-uploader.mjs.map +1 -1
  197. package/fesm2022/acorex-components-video-player.mjs +8 -8
  198. package/fesm2022/acorex-components-video-player.mjs.map +1 -1
  199. package/fesm2022/acorex-components-wysiwyg.mjs +60 -53
  200. package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
  201. package/package.json +5 -4
  202. package/types/acorex-components-button-group.d.ts +9 -3
  203. package/types/acorex-components-button.d.ts +2 -8
  204. package/types/acorex-components-calendar.d.ts +138 -27
  205. package/types/acorex-components-color-palette.d.ts +2 -0
  206. package/types/acorex-components-conversation2.d.ts +1296 -1256
  207. package/types/acorex-components-data-pager.d.ts +6 -25
  208. package/types/acorex-components-data-table.d.ts +12 -2
  209. package/types/acorex-components-datetime-box.d.ts +79 -8
  210. package/types/acorex-components-datetime-input.d.ts +2 -2
  211. package/types/acorex-components-datetime-picker.d.ts +15 -5
  212. package/types/acorex-components-flow-chart.d.ts +4 -0
  213. package/types/acorex-components-menu.d.ts +105 -36
  214. package/types/acorex-components-number-box.d.ts +9 -0
  215. package/types/acorex-components-otp.d.ts +18 -1
  216. package/types/acorex-components-popup.d.ts +11 -1
  217. package/types/acorex-components-qrcode.d.ts +1 -0
  218. package/types/acorex-components-query-builder.d.ts +1 -1
  219. package/types/acorex-components-scheduler.d.ts +23 -2
  220. package/types/acorex-components-side-menu.d.ts +96 -34
  221. package/types/acorex-components-step-wizard.d.ts +2 -1
  222. package/types/acorex-components-time-duration.d.ts +1 -0
  223. package/types/acorex-components-tree-view.d.ts +43 -2
  224. package/types/acorex-components-wysiwyg.d.ts +6 -1
  225. package/fesm2022/acorex-components-modal-modal-content.component-DTZu2zbU.mjs.map +0 -1
@@ -2,11 +2,14 @@ import { NXClickEvent, NXComponent, AXComponent, NXEvent } from '@acorex/cdk/com
2
2
  import { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';
3
3
  import { isBrowser } from '@acorex/core/platform';
4
4
  import { AXTranslatorPipe } from '@acorex/core/translation';
5
- import { AXUnsubscriber, AXHtmlUtil } from '@acorex/core/utils';
5
+ import { AXHtmlUtil, AXUnsubscriber } from '@acorex/core/utils';
6
6
  import { AXZIndexService } from '@acorex/core/z-index';
7
7
  import { isPlatformBrowser, NgTemplateOutlet, AsyncPipe } from '@angular/common';
8
8
  import * as i0 from '@angular/core';
9
- import { Injectable, signal, inject, Renderer2, computed, output, input, afterNextRender, HostBinding, HostListener, ChangeDetectionStrategy, ViewEncapsulation, Component, DOCUMENT, PLATFORM_ID, NgModule } from '@angular/core';
9
+ import { inject, DestroyRef, DOCUMENT, PLATFORM_ID, Injectable, signal, computed, contentChildren, viewChild, input, Renderer2, Injector, output, afterNextRender, HostBinding, HostListener, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
10
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
11
+ import { Router, NavigationStart } from '@angular/router';
12
+ import { filter } from 'rxjs/operators';
10
13
  import { cloneDeep } from 'lodash-es';
11
14
  import { Subject } from 'rxjs';
12
15
 
@@ -15,23 +18,86 @@ class AXMenuService {
15
18
  this.closeAll$ = new Subject();
16
19
  this.open$ = new Subject();
17
20
  this.close$ = new Subject();
18
- this.closeExcept$ = new Subject();
19
21
  this.openContextMenu$ = new Subject();
20
22
  this.closeAllContextMenu$ = new Subject();
23
+ this.destroyRef = inject(DestroyRef);
24
+ this.document = inject(DOCUMENT);
25
+ this.platformId = inject(PLATFORM_ID);
26
+ this.openItems = new Set();
27
+ this.globalListenersBound = false;
28
+ this.scrollableParents = [];
29
+ this.onDocumentClick = (event) => {
30
+ if (this.rootElement && !this.rootElement.contains(event.target)) {
31
+ this.closeAll$.next();
32
+ }
33
+ };
34
+ this.onWindowOrScrollEvent = () => {
35
+ this.closeAll$.next();
36
+ };
37
+ this.closeAll$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
38
+ this.openItems.clear();
39
+ });
40
+ }
41
+ /**
42
+ * Registers a single set of document/window/scroll listeners for the whole menu tree.
43
+ */
44
+ initGlobalListeners(rootElement) {
45
+ if (!isPlatformBrowser(this.platformId) || this.globalListenersBound) {
46
+ return;
47
+ }
48
+ this.globalListenersBound = true;
49
+ this.rootElement = rootElement;
50
+ this.document.addEventListener('click', this.onDocumentClick);
51
+ window.addEventListener('scroll', this.onWindowOrScrollEvent, { capture: true });
52
+ window.addEventListener('resize', this.onWindowOrScrollEvent);
53
+ this.scrollableParents = AXHtmlUtil.getScrollableParents(rootElement);
54
+ this.scrollableParents.forEach((parent) => {
55
+ parent.addEventListener('scroll', this.onWindowOrScrollEvent);
56
+ });
57
+ this.destroyRef.onDestroy(() => {
58
+ this.document.removeEventListener('click', this.onDocumentClick);
59
+ window.removeEventListener('scroll', this.onWindowOrScrollEvent, { capture: true });
60
+ window.removeEventListener('resize', this.onWindowOrScrollEvent);
61
+ this.scrollableParents.forEach((parent) => {
62
+ parent.removeEventListener('scroll', this.onWindowOrScrollEvent);
63
+ });
64
+ });
65
+ }
66
+ /**
67
+ * Closes open submenus that are not on the ancestor path of the item being opened.
68
+ */
69
+ closeExcept(opener) {
70
+ const keepOpen = new Set();
71
+ let current = opener;
72
+ while (current) {
73
+ keepOpen.add(current);
74
+ current = current.getParentMenuItem?.() ?? current.parent ?? null;
75
+ }
76
+ for (const openItem of [...this.openItems]) {
77
+ if (!keepOpen.has(openItem)) {
78
+ this.markClosed(openItem);
79
+ }
80
+ }
21
81
  }
22
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
23
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXMenuService }); }
82
+ markOpen(item) {
83
+ this.openItems.add(item);
84
+ this.open$.next(item);
85
+ }
86
+ markClosed(item) {
87
+ this.openItems.delete(item);
88
+ this.close$.next(item);
89
+ }
90
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
91
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMenuService }); }
24
92
  }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXMenuService, decorators: [{
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMenuService, decorators: [{
26
94
  type: Injectable
27
- }] });
95
+ }], ctorParameters: () => [] });
28
96
 
29
97
  class AXRootMenu {
30
98
  }
31
99
  class AXMenuItemComponentBase {
32
100
  }
33
- class AXMenuItem {
34
- }
35
101
  class AXMenuItemClickBaseEvent extends NXClickEvent {
36
102
  constructor() {
37
103
  super(...arguments);
@@ -46,15 +112,29 @@ class AXMenuItemClickBaseEvent extends NXClickEvent {
46
112
  class AXMenuItemComponent extends NXComponent {
47
113
  constructor() {
48
114
  super();
49
- this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
50
- this.hasSubItems = signal(false, ...(ngDevMode ? [{ debugName: "hasSubItems" }] : []));
51
- this.isFirstLevel = signal(false, ...(ngDevMode ? [{ debugName: "isFirstLevel" }] : []));
115
+ this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
116
+ this.parent = inject(AXMenuItemComponent, { optional: true, skipSelf: true });
117
+ this.isFirstLevel = computed(() => this.getParentMenuItem() == null, ...(ngDevMode ? [{ debugName: "isFirstLevel" }] : /* istanbul ignore next */ []));
118
+ this.childMenuItems = contentChildren(AXMenuItemComponent, { ...(ngDevMode ? { debugName: "childMenuItems" } : /* istanbul ignore next */ {}), descendants: false });
119
+ this.discoveredSubmenuNodeCount = signal(0, ...(ngDevMode ? [{ debugName: "discoveredSubmenuNodeCount" }] : /* istanbul ignore next */ []));
120
+ this.submenuSlot = viewChild('submenuSlot', ...(ngDevMode ? [{ debugName: "submenuSlot" }] : /* istanbul ignore next */ []));
121
+ this.platformId = inject(PLATFORM_ID);
122
+ this.destroyRef = inject(DestroyRef);
123
+ this.childObserver = null;
124
+ this.childRefreshScheduled = false;
125
+ /**
126
+ * Nested items from the data model. Required for recursive `ngTemplateOutlet` templates
127
+ * because `contentChildren` does not traverse those embedded views.
128
+ */
129
+ this.subItems = input([], ...(ngDevMode ? [{ debugName: "subItems" }] : /* istanbul ignore next */ []));
130
+ this.hasSubItems = computed(() => (this.subItems()?.length ?? 0) > 0 ||
131
+ this.childMenuItems().length > 0 ||
132
+ this.discoveredSubmenuNodeCount() > 0, ...(ngDevMode ? [{ debugName: "hasSubItems" }] : /* istanbul ignore next */ []));
52
133
  this.root = inject(AXRootMenu);
53
- this.isRoot = () => this.parent == null;
54
134
  this.service = inject(AXMenuService);
55
- this.scrollableParents = [];
56
135
  this.unsuscriber = inject(AXUnsubscriber);
57
136
  this.renderer = inject(Renderer2);
137
+ this.injector = inject(Injector);
58
138
  this.zIndexService = inject(AXZIndexService);
59
139
  this.zToken = null;
60
140
  this.arrowIcon = computed(() => {
@@ -64,150 +144,124 @@ class AXMenuItemComponent extends NXComponent {
64
144
  : isRtl
65
145
  ? 'ax-icon-chevron-left'
66
146
  : 'ax-icon-chevron-right';
67
- }, ...(ngDevMode ? [{ debugName: "arrowIcon" }] : []));
147
+ }, ...(ngDevMode ? [{ debugName: "arrowIcon" }] : /* istanbul ignore next */ []));
68
148
  this.onClick = output();
69
- this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : []));
70
- this.data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : []));
71
- this.disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : []));
72
- this.color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : []));
73
- //
149
+ this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
150
+ this.data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : /* istanbul ignore next */ []));
151
+ this.disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
152
+ this.color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
153
+ this.mouseLeaveTimeout = null;
74
154
  afterNextRender(() => {
75
- this.detectSubItems();
76
- this.observeMutations();
77
- this.bindScrollEvents();
155
+ if (!isPlatformBrowser(this.platformId)) {
156
+ return;
157
+ }
158
+ this.reparentOrphanedChildren();
159
+ this.updateDiscoveredSubmenuNodeCount();
160
+ this.childObserver = new MutationObserver((records) => {
161
+ if (!this.hasRelevantChildMutation(records)) {
162
+ return;
163
+ }
164
+ this.scheduleChildRefresh();
165
+ });
166
+ this.childObserver.observe(this.nativeElement, { childList: true, subtree: true });
167
+ this.destroyRef.onDestroy(() => this.childObserver?.disconnect());
78
168
  });
79
- //
80
169
  this.service.closeAll$.pipe(this.unsuscriber.takeUntilDestroy).subscribe(() => this.close());
81
170
  this.service.open$.pipe(this.unsuscriber.takeUntilDestroy).subscribe((item) => {
82
171
  if (this === item) {
83
172
  this.isOpen.set(true);
84
- this.calculatePosition();
173
+ this.schedulePositionCalculation();
85
174
  }
86
175
  });
87
- //
88
176
  this.service.close$.pipe(this.unsuscriber.takeUntilDestroy).subscribe((item) => {
89
177
  if (this == item) {
90
178
  this.isOpen.set(false);
91
179
  }
92
180
  });
93
- //
94
- this.service.closeExcept$.pipe(this.unsuscriber.takeUntilDestroy).subscribe((item) => {
95
- this.closeExcept(item);
96
- });
97
- }
98
- closeExcept(item) {
99
- const list = [item];
100
- // TODO: Check for better solution
101
- const parentEl = this.nativeElement.parentElement?.parentElement;
102
- this.parent = parentEl?.tagName == 'AX-MENU-ITEM' ? parentEl?.['__axContext__'] : null;
103
- //
104
- let parent = item.parent;
105
- while (parent != null) {
106
- list.push(parent);
107
- parent = parent.parent;
108
- }
109
- //
110
- if (!list.includes(this)) {
111
- this.close();
112
- }
113
- }
114
- observeMutations() {
115
- this.mutationObserver = new MutationObserver(() => {
116
- this.detectSubItems();
117
- });
118
- // Start observing changes in child elements
119
- this.mutationObserver.observe(this.nativeElement, {
120
- childList: true,
121
- subtree: true,
122
- });
123
181
  }
124
182
  getText() {
125
183
  return this.nativeElement.querySelector('ax-text')?.innerText;
126
184
  }
127
185
  /**
128
- * Manually detect all `ax-menu-item` elements and check if this menu item has sub-items.
186
+ * Resolves the parent menu item. Items rendered via recursive `ngTemplateOutlet` do not
187
+ * receive a DI parent, so we fall back to the DOM tree after reparenting.
129
188
  */
130
- detectSubItems() {
131
- //
132
- const parentEl = this.nativeElement.parentElement?.parentElement;
133
- this.parent = parentEl?.tagName == 'AX-MENU-ITEM' ? parentEl?.['__axContext__'] : null;
134
- //
135
- const tag = this.nativeElement.parentElement?.tagName;
136
- this.isFirstLevel.set(tag == 'AX-MENU' || tag == 'AX-CONTEXT-MENU');
137
- const subItems = this.nativeElement.querySelectorAll('ax-menu-item');
138
- if (subItems.length > 0) {
139
- this.hasSubItems.set(true);
189
+ getParentMenuItem() {
190
+ if (this.parent) {
191
+ return this.parent;
140
192
  }
141
- else {
142
- this.hasSubItems.set(false);
193
+ const parentHost = this.nativeElement.parentElement?.closest('ax-menu-item');
194
+ if (!parentHost || parentHost === this.nativeElement) {
195
+ return null;
143
196
  }
197
+ const ctx = parentHost.__axContext__;
198
+ return ctx instanceof AXMenuItemComponent ? ctx : null;
144
199
  }
145
200
  /**
146
201
  * Opens the submenu of this menu item if it has sub-items and is not disabled.
147
- *
148
- * Inherited behavior: Uses the injected service to notify other items to close.
149
- *
150
- * @returns void - No return value. Triggers submenu opening side-effects.
151
202
  */
152
203
  open() {
153
- this.service.closeExcept$.next(this);
154
- if (!this.disabled() && this.hasSubItems()) {
155
- // Acquire z-index token for this submenu
156
- if (!this.zToken) {
157
- this.zToken = this.zIndexService.acquire();
158
- }
159
- this.service.open$.next(this);
204
+ if (this.disabled() || !this.hasSubItems()) {
205
+ return;
160
206
  }
207
+ this.reparentOrphanedChildren();
208
+ this.service.closeExcept(this);
209
+ if (!this.zToken) {
210
+ this.zToken = this.zIndexService.acquire();
211
+ }
212
+ this.service.markOpen(this);
161
213
  }
162
214
  /**
163
215
  * Closes the submenu of this menu item if open.
164
- *
165
- * @returns void - No return value. Triggers submenu closing side-effects.
166
216
  */
167
217
  close() {
168
- this.service.close$.next(this);
169
- // Release z-index token
218
+ this.service.markClosed(this);
170
219
  this.zIndexService.release(this.zToken);
171
220
  this.zToken = null;
172
221
  }
222
+ /**
223
+ * Positions the submenu after layout so nested levels measure their full height.
224
+ */
225
+ schedulePositionCalculation() {
226
+ afterNextRender(() => {
227
+ if (this.isOpen()) {
228
+ this.calculatePosition();
229
+ afterNextRender(() => {
230
+ if (this.isOpen()) {
231
+ this.calculatePosition();
232
+ }
233
+ }, { injector: this.injector });
234
+ }
235
+ }, { injector: this.injector });
236
+ }
173
237
  /**
174
238
  * Calculate the position of the submenu to avoid it going out of the viewport.
175
239
  */
176
240
  calculatePosition() {
177
- const submenu = this.nativeElement.querySelector('.ax-menu-items');
241
+ const submenu = this.submenuSlot()?.nativeElement;
178
242
  if (!submenu)
179
243
  return;
180
- // Temporarily show the menu to measure its dimensions, but keep it invisible
181
- this.renderer.setStyle(submenu, 'visibility', 'hidden');
182
- this.renderer.setStyle(submenu, 'display', 'block');
183
- const submenuRect = submenu.getBoundingClientRect();
244
+ const submenuRect = this.measureSubmenuRect(submenu);
184
245
  const itemRect = this.nativeElement.getBoundingClientRect();
185
246
  const windowWidth = window.innerWidth;
186
247
  const windowHeight = window.innerHeight;
187
- // Reset temporary styles
188
- this.renderer.removeStyle(submenu, 'visibility');
189
- this.renderer.removeStyle(submenu, 'display');
190
248
  const isRtl = AXHtmlUtil.isRtl(this.nativeElement);
191
249
  let finalTop;
192
250
  let finalLeft;
193
- // --- 1. VERTICAL POSITIONING ---
194
251
  const preferredTop = this.isFirstLevel() && this.root.orientation() === 'horizontal'
195
- ? itemRect.bottom // For horizontal menu, open below
196
- : itemRect.top; // For vertical menu, align with parent top
197
- const alternateTop = itemRect.top - submenuRect.height; // Position for opening upwards
252
+ ? itemRect.bottom
253
+ : itemRect.top;
254
+ const alternateTop = itemRect.top - submenuRect.height;
198
255
  if (preferredTop + submenuRect.height <= windowHeight) {
199
256
  finalTop = preferredTop;
200
257
  }
201
- else if (this.isFirstLevel() && this.root.orientation() === 'horizontal' && alternateTop >= 0) {
258
+ else if (alternateTop >= 0) {
202
259
  finalTop = alternateTop;
203
260
  }
204
261
  else {
205
262
  finalTop = windowHeight - submenuRect.height;
206
263
  }
207
- if (finalTop < 0) {
208
- finalTop = 0;
209
- }
210
- // --- 2. HORIZONTAL POSITIONING ---
264
+ finalTop = this.clampVerticalPosition(finalTop, submenuRect.height, windowHeight);
211
265
  if (this.isFirstLevel() && this.root.orientation() === 'horizontal') {
212
266
  const preferredLeft = isRtl ? itemRect.right - submenuRect.width : itemRect.left;
213
267
  const alternateLeft = isRtl ? itemRect.left : itemRect.right - submenuRect.width;
@@ -246,7 +300,6 @@ class AXMenuItemComponent extends NXComponent {
246
300
  }
247
301
  }
248
302
  }
249
- // --- 3. NEW: OVERLAP-AWARE VERTICAL SHIFT ---
250
303
  const isNestedMenu = !(this.isFirstLevel() && this.root.orientation() === 'horizontal');
251
304
  if (isNestedMenu) {
252
305
  const overlapsParent = finalLeft < itemRect.right && itemRect.left < finalLeft + submenuRect.width;
@@ -257,20 +310,109 @@ class AXMenuItemComponent extends NXComponent {
257
310
  }
258
311
  }
259
312
  }
260
- // --- 4. APPLY FINAL STYLES ---
313
+ finalTop = this.clampVerticalPosition(finalTop, submenuRect.height, windowHeight);
261
314
  this.renderer.setStyle(submenu, 'position', 'fixed');
262
315
  this.renderer.setStyle(submenu, 'top', `${finalTop}px`);
263
316
  this.renderer.setStyle(submenu, 'left', `${finalLeft}px`);
264
- // Apply z-index from token
265
317
  if (this.zToken) {
266
318
  this.renderer.setStyle(submenu, 'z-index', String(this.zToken.zIndex));
267
319
  }
268
320
  }
321
+ /** Measures submenu size using the same flex layout as the rendered menu. */
322
+ measureSubmenuRect(submenu) {
323
+ this.renderer.setStyle(submenu, 'visibility', 'hidden');
324
+ this.renderer.setStyle(submenu, 'display', 'flex');
325
+ const rect = submenu.getBoundingClientRect();
326
+ this.renderer.removeStyle(submenu, 'visibility');
327
+ this.renderer.removeStyle(submenu, 'display');
328
+ return rect;
329
+ }
330
+ /**
331
+ * Moves nested `ax-menu-item` nodes rendered by recursive `ngTemplateOutlet` templates
332
+ * into the submenu slot. Angular content queries do not traverse those embedded views.
333
+ */
334
+ reparentOrphanedChildren() {
335
+ const container = this.submenuSlot()?.nativeElement;
336
+ if (!container) {
337
+ return;
338
+ }
339
+ for (const el of this.getDirectSubmenuNodes()) {
340
+ if (!container.contains(el)) {
341
+ try {
342
+ container.appendChild(el);
343
+ }
344
+ catch {
345
+ // HierarchyRequestError when the node is already being moved.
346
+ }
347
+ }
348
+ }
349
+ }
350
+ /**
351
+ * Nested submenu nodes rendered by custom recursive templates (direct children of this item only).
352
+ */
353
+ getDirectSubmenuNodes() {
354
+ return Array.from(this.nativeElement.querySelectorAll('ax-menu-item, ax-title, ax-divider')).filter((el) => {
355
+ if (el === this.nativeElement) {
356
+ return false;
357
+ }
358
+ if (el.tagName === 'AX-MENU-ITEM') {
359
+ return el.parentElement?.closest('ax-menu-item') === this.nativeElement;
360
+ }
361
+ return el.closest('ax-menu-item') === this.nativeElement;
362
+ });
363
+ }
364
+ updateDiscoveredSubmenuNodeCount() {
365
+ this.discoveredSubmenuNodeCount.set(this.getDirectSubmenuNodes().length);
366
+ }
367
+ scheduleChildRefresh() {
368
+ if (this.childRefreshScheduled) {
369
+ return;
370
+ }
371
+ this.childRefreshScheduled = true;
372
+ requestAnimationFrame(() => {
373
+ this.childRefreshScheduled = false;
374
+ this.reparentOrphanedChildren();
375
+ this.updateDiscoveredSubmenuNodeCount();
376
+ });
377
+ }
378
+ hasRelevantChildMutation(records) {
379
+ for (const record of records) {
380
+ if (this.nodeListContainsMenuStructuralNode(record.addedNodes) ||
381
+ this.nodeListContainsMenuStructuralNode(record.removedNodes)) {
382
+ return true;
383
+ }
384
+ }
385
+ return false;
386
+ }
387
+ nodeListContainsMenuStructuralNode(nodes) {
388
+ for (const node of Array.from(nodes)) {
389
+ if (!(node instanceof Element)) {
390
+ continue;
391
+ }
392
+ const tagName = node.tagName;
393
+ if (tagName === 'AX-MENU-ITEM' || tagName === 'AX-TITLE' || tagName === 'AX-DIVIDER') {
394
+ return true;
395
+ }
396
+ if (node.querySelector?.('ax-menu-item,ax-title,ax-divider')) {
397
+ return true;
398
+ }
399
+ }
400
+ return false;
401
+ }
402
+ /** Keeps the submenu fully inside the viewport vertically. */
403
+ clampVerticalPosition(top, height, windowHeight) {
404
+ if (top + height > windowHeight) {
405
+ top = windowHeight - height;
406
+ }
407
+ if (top < 0) {
408
+ top = 0;
409
+ }
410
+ return top;
411
+ }
269
412
  handleClick(e) {
270
413
  e.stopPropagation();
271
414
  if (this.disabled())
272
415
  return;
273
- //
274
416
  const event = {
275
417
  sender: this,
276
418
  nativeEvent: e,
@@ -281,10 +423,8 @@ class AXMenuItemComponent extends NXComponent {
281
423
  data: this.data(),
282
424
  },
283
425
  };
284
- //
285
426
  this.onClick.emit(event);
286
427
  this.root.onItemClick.emit({ ...event, ...{ sender: this.root } });
287
- //
288
428
  if (this.hasSubItems() && !event.canceled) {
289
429
  this.open();
290
430
  }
@@ -295,10 +435,9 @@ class AXMenuItemComponent extends NXComponent {
295
435
  }
296
436
  handleMouseEnter(event) {
297
437
  event.stopPropagation();
298
- // Cancel the close delay if the mouse re-enters the element
299
438
  if (this.mouseLeaveTimeout) {
300
439
  clearTimeout(this.mouseLeaveTimeout);
301
- this.mouseLeaveTimeout = null; // Reset the timeout
440
+ this.mouseLeaveTimeout = null;
302
441
  }
303
442
  if (!this.isFirstLevel() || this.root.openOn() == 'hover') {
304
443
  this.open();
@@ -306,49 +445,35 @@ class AXMenuItemComponent extends NXComponent {
306
445
  }
307
446
  handleMouseLeave(event) {
308
447
  event.stopPropagation();
309
- if (this.hasSubItems() && this.root.closeOn() === 'leave') {
310
- // Clear any previous timeout to avoid multiple triggers
311
- if (this.mouseLeaveTimeout) {
312
- clearTimeout(this.mouseLeaveTimeout);
313
- }
314
- // Set a delay before closing the submenu
315
- this.mouseLeaveTimeout = setTimeout(() => {
316
- this.close();
317
- }, 500); // Adjust the delay (500ms in this case) as per your requirement
448
+ if (!this.hasSubItems() || this.root.closeOn() !== 'leave') {
449
+ return;
318
450
  }
451
+ const relatedTarget = event.relatedTarget;
452
+ if (relatedTarget instanceof Node && this.containsSubmenuPointer(relatedTarget)) {
453
+ return;
454
+ }
455
+ if (this.mouseLeaveTimeout) {
456
+ clearTimeout(this.mouseLeaveTimeout);
457
+ }
458
+ this.mouseLeaveTimeout = setTimeout(() => {
459
+ this.close();
460
+ }, 500);
319
461
  }
320
- onWindowEvent() {
321
- this.service.closeAll$.next(); // Close all menus on scroll or resize
322
- }
323
- /**
324
- * Close all menus if clicking outside the root menu and all sub-items.
325
- */
326
- onClickOutside(event) {
327
- const hostElement = this.root.nativeElement;
328
- if (!hostElement.contains(event.target)) {
329
- this.service.closeAll$.next(); // Close all menus if click is outside the root and sub-items
462
+ /** True when the pointer moved into this item's submenu panel or a nested open submenu. */
463
+ containsSubmenuPointer(node) {
464
+ const submenu = this.submenuSlot()?.nativeElement;
465
+ if (submenu?.contains(node)) {
466
+ return true;
467
+ }
468
+ if (this.nativeElement.contains(node)) {
469
+ return true;
330
470
  }
471
+ return this.getDirectSubmenuNodes().some((child) => child.contains(node));
331
472
  }
332
473
  ngOnDestroy() {
333
- this.removeScrollEvents();
334
- }
335
- bindScrollEvents() {
336
- this.scrollableParents = AXHtmlUtil.getScrollableParents(this.nativeElement);
337
- this.scrollableParents.forEach((parent) => {
338
- parent.addEventListener('scroll', this.onContainerScroll.bind(this));
339
- });
340
- }
341
- // Remove scroll event listeners
342
- removeScrollEvents() {
343
- this.scrollableParents.forEach((parent) => {
344
- parent.removeEventListener('scroll', this.onContainerScroll.bind(this));
345
- });
346
- }
347
- /**
348
- * Handler for scroll events (window or scrollable parent containers)
349
- */
350
- onContainerScroll() {
351
- this.service.closeAll$.next(); // Close all menus on scroll
474
+ if (this.isOpen()) {
475
+ this.close();
476
+ }
352
477
  }
353
478
  /** @ignore */
354
479
  get __hostClass() {
@@ -356,11 +481,11 @@ class AXMenuItemComponent extends NXComponent {
356
481
  if (this.disabled()) {
357
482
  list.push('ax-state-disabled');
358
483
  }
359
- list.push(`ax-${this.color() ?? 'ax-default'}`);
484
+ list.push(`${this.color() ?? 'ax-default'}`);
360
485
  return list;
361
486
  }
362
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
363
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: AXMenuItemComponent, isStandalone: true, selector: "ax-menu-item", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, host: { listeners: { "click": "handleClick($event)", "mouseenter": "handleMouseEnter($event)", "mouseleave": "handleMouseLeave($event)", "window:scroll": "onWindowEvent()", "window:resize": "onWindowEvent()", "document:click": "onClickOutside($event)" }, properties: { "class": "this.__hostClass" } }, providers: [
487
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
488
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMenuItemComponent, isStandalone: true, selector: "ax-menu-item", inputs: { subItems: { classPropertyName: "subItems", publicName: "subItems", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, host: { listeners: { "click": "handleClick($event)", "mouseenter": "handleMouseEnter($event)", "mouseleave": "handleMouseLeave($event)" }, properties: { "class": "this.__hostClass" } }, providers: [
364
489
  {
365
490
  provide: AXMenuItemComponentBase,
366
491
  useExisting: AXMenuItemComponent,
@@ -370,9 +495,9 @@ class AXMenuItemComponent extends NXComponent {
370
495
  provide: AXComponent,
371
496
  useExisting: AXMenuItemComponent,
372
497
  },
373
- ], usesInheritance: true, ngImport: i0, template: "<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() && (!isRoot() || root?.hasArrow())) {\n <i class=\"ax-icon ax-icon-solid {{ arrowIcon() }} \"></i>\n }\n</div>\n<div class=\"ax-menu-items ax-action-list ax-action-list-vertical\" [class.ax-state-open]=\"isOpen()\">\n <ng-content select=\"ax-menu-item,ax-title,ax-divider,ng-container\"></ng-content>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
498
+ ], queries: [{ propertyName: "childMenuItems", predicate: AXMenuItemComponent, isSignal: true }], viewQueries: [{ propertyName: "submenuSlot", first: true, predicate: ["submenuSlot"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<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", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
374
499
  }
375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXMenuItemComponent, decorators: [{
500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMenuItemComponent, decorators: [{
376
501
  type: Component,
377
502
  args: [{ selector: 'ax-menu-item', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
378
503
  {
@@ -384,8 +509,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
384
509
  provide: AXComponent,
385
510
  useExisting: AXMenuItemComponent,
386
511
  },
387
- ], template: "<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() && (!isRoot() || root?.hasArrow())) {\n <i class=\"ax-icon ax-icon-solid {{ arrowIcon() }} \"></i>\n }\n</div>\n<div class=\"ax-menu-items ax-action-list ax-action-list-vertical\" [class.ax-state-open]=\"isOpen()\">\n <ng-content select=\"ax-menu-item,ax-title,ax-divider,ng-container\"></ng-content>\n</div>\n" }]
388
- }], ctorParameters: () => [], propDecorators: { onClick: [{ type: i0.Output, args: ["onClick"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], handleClick: [{
512
+ ], template: "<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" }]
513
+ }], ctorParameters: () => [], propDecorators: { childMenuItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AXMenuItemComponent), { ...{ descendants: false }, isSignal: true }] }], submenuSlot: [{ type: i0.ViewChild, args: ['submenuSlot', { isSignal: true }] }], subItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "subItems", required: false }] }], onClick: [{ type: i0.Output, args: ["onClick"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], handleClick: [{
389
514
  type: HostListener,
390
515
  args: ['click', ['$event']]
391
516
  }], handleMouseEnter: [{
@@ -394,15 +519,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
394
519
  }], handleMouseLeave: [{
395
520
  type: HostListener,
396
521
  args: ['mouseleave', ['$event']]
397
- }], onWindowEvent: [{
398
- type: HostListener,
399
- args: ['window:scroll']
400
- }, {
401
- type: HostListener,
402
- args: ['window:resize']
403
- }], onClickOutside: [{
404
- type: HostListener,
405
- args: ['document:click', ['$event']]
406
522
  }], __hostClass: [{
407
523
  type: HostBinding,
408
524
  args: ['class']
@@ -424,30 +540,38 @@ class AXContextMenuComponent extends NXComponent {
424
540
  constructor() {
425
541
  super();
426
542
  // Inputs and Outputs
427
- this.orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
428
- this.openOn = input('hover', ...(ngDevMode ? [{ debugName: "openOn" }] : []));
429
- this.closeOn = input('click', ...(ngDevMode ? [{ debugName: "closeOn" }] : []));
430
- this.originalItems = input([], { ...(ngDevMode ? { debugName: "originalItems" } : {}), alias: 'items' });
431
- this.target = input(...(ngDevMode ? [undefined, { debugName: "target" }] : []));
543
+ this.orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
544
+ this.openOn = input('hover', ...(ngDevMode ? [{ debugName: "openOn" }] : /* istanbul ignore next */ []));
545
+ this.closeOn = input('click', ...(ngDevMode ? [{ debugName: "closeOn" }] : /* istanbul ignore next */ []));
546
+ /** When true, closes the menu on router navigation (e.g. side-menu route changes). */
547
+ this.closeOnRouteChange = input(false, ...(ngDevMode ? [{ debugName: "closeOnRouteChange" }] : /* istanbul ignore next */ []));
548
+ this.originalItems = input([], { ...(ngDevMode ? { debugName: "originalItems" } : /* istanbul ignore next */ {}), alias: 'items' });
549
+ this.target = input(...(ngDevMode ? [undefined, { debugName: "target" }] : /* istanbul ignore next */ []));
432
550
  this.onItemClick = output();
433
551
  this.onOpening = output();
434
552
  /** Emitted when the menu closes (backdrop, item click, scroll, another menu opening, etc.). */
435
553
  this.onClose = output();
436
- this.hasArrow = signal(true, ...(ngDevMode ? [{ debugName: "hasArrow" }] : []));
554
+ this.hasArrow = signal(true, ...(ngDevMode ? [{ debugName: "hasArrow" }] : /* istanbul ignore next */ []));
437
555
  // Injected Services
438
556
  this.service = inject(AXMenuService);
439
557
  this.renderer = inject(Renderer2);
440
558
  this.document = inject(DOCUMENT);
441
559
  this.platformID = inject(PLATFORM_ID);
442
560
  this.zIndexService = inject(AXZIndexService);
561
+ this.injector = inject(Injector);
443
562
  this.zToken = null;
563
+ this.lastOpenPoint = null;
564
+ this.router = inject(Router, { optional: true });
565
+ this.destroyRef = inject(DestroyRef);
444
566
  this.originalNextSibling = null;
445
567
  this.originalParent = null;
446
- this.items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : []));
568
+ this.items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
447
569
  //
448
570
  afterNextRender(() => {
449
571
  this.bindContextEvent();
572
+ this.service.initGlobalListeners(this.nativeElement);
450
573
  });
574
+ this.setupCloseOnRouteChange();
451
575
  this.service.closeAllContextMenu$.subscribe(() => {
452
576
  this.service.closeAll$.next();
453
577
  this.close();
@@ -479,7 +603,6 @@ class AXContextMenuComponent extends NXComponent {
479
603
  showAt(point, targetElement, event) {
480
604
  const sender = this;
481
605
  this.service.closeAllContextMenu$.next({ sender });
482
- this.service.openContextMenu$.next({ sender, point });
483
606
  if (isPlatformBrowser(this.platformID)) {
484
607
  if (!targetElement) {
485
608
  targetElement = this.document.elementFromPoint(point.x, point.y);
@@ -497,6 +620,7 @@ class AXContextMenuComponent extends NXComponent {
497
620
  this.onOpening.emit(event);
498
621
  this.items.set(event.items);
499
622
  }
623
+ this.service.openContextMenu$.next({ sender, point });
500
624
  }
501
625
  /**
502
626
  * Closes the context menu and removes the backdrop.
@@ -504,6 +628,12 @@ class AXContextMenuComponent extends NXComponent {
504
628
  close() {
505
629
  const wasOpen = this.nativeElement.classList.contains('ax-state-open');
506
630
  this.nativeElement.classList.remove('ax-state-open');
631
+ this.lastOpenPoint = null;
632
+ // Drop rendered items before moving DOM nodes back to the original parent.
633
+ // This prevents a large menu tree from being re-parented/removed as a single heavy DOM operation.
634
+ if (wasOpen) {
635
+ this.items.set([]);
636
+ }
507
637
  this.removeBackdrop();
508
638
  // Release z-index token
509
639
  this.zIndexService.release(this.zToken);
@@ -514,6 +644,19 @@ class AXContextMenuComponent extends NXComponent {
514
644
  }
515
645
  // Private Methods (Internal Logic)
516
646
  /** @ignore */
647
+ setupCloseOnRouteChange() {
648
+ if (!this.router || !isPlatformBrowser(this.platformID)) {
649
+ return;
650
+ }
651
+ this.router.events
652
+ .pipe(filter((event) => event instanceof NavigationStart), takeUntilDestroyed(this.destroyRef))
653
+ .subscribe(() => {
654
+ if (this.closeOnRouteChange()) {
655
+ this.close();
656
+ }
657
+ });
658
+ }
659
+ /** @ignore */
517
660
  getTargetElements() {
518
661
  if (isPlatformBrowser(this.platformID)) {
519
662
  const elements = typeof this.target() == 'string'
@@ -561,12 +704,27 @@ class AXContextMenuComponent extends NXComponent {
561
704
  }
562
705
  /** @ignore */
563
706
  internalShowAt(point) {
707
+ this.lastOpenPoint = point;
564
708
  const elementRef = this.nativeElement;
565
709
  elementRef.classList.add('ax-state-open');
566
- const itemRect = elementRef.getBoundingClientRect();
710
+ this.positionAtPoint(point);
711
+ this.createBackdrop();
712
+ // Items may render after the signal update (e.g. compact side-menu); reposition once laid out.
713
+ afterNextRender(() => {
714
+ if (this.lastOpenPoint && elementRef.classList.contains('ax-state-open')) {
715
+ this.positionAtPoint(this.lastOpenPoint);
716
+ }
717
+ }, { injector: this.injector });
718
+ }
719
+ /**
720
+ * Positions the menu at `point`, flipping when it would overflow the viewport.
721
+ * 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.
722
+ */
723
+ positionAtPoint(point) {
724
+ const elementRef = this.nativeElement;
725
+ const itemRect = this.measureMenuRect(elementRef);
567
726
  const windowWidth = window.innerWidth;
568
727
  const windowHeight = window.innerHeight;
569
- // Detect RTL (Right-To-Left) mode
570
728
  const isRtl = AXHtmlUtil.isRtl(elementRef);
571
729
  let left;
572
730
  if (isRtl) {
@@ -595,7 +753,15 @@ class AXContextMenuComponent extends NXComponent {
595
753
  this.renderer.setStyle(elementRef, 'left', `${left}px`);
596
754
  this.renderer.setStyle(elementRef, 'top', `${top}px`);
597
755
  this.renderer.setStyle(elementRef, 'position', 'fixed');
598
- this.createBackdrop();
756
+ }
757
+ /** Measures menu size even when an ancestor hides the host with `display: none`. */
758
+ measureMenuRect(elementRef) {
759
+ this.renderer.setStyle(elementRef, 'visibility', 'hidden');
760
+ this.renderer.setStyle(elementRef, 'display', 'flex');
761
+ const rect = elementRef.getBoundingClientRect();
762
+ this.renderer.removeStyle(elementRef, 'visibility');
763
+ this.renderer.removeStyle(elementRef, 'display');
764
+ return rect;
599
765
  }
600
766
  /** @ignore */
601
767
  createBackdrop() {
@@ -679,8 +845,8 @@ class AXContextMenuComponent extends NXComponent {
679
845
  get __hostClass() {
680
846
  return ['ax-menu-container', `ax-orientation-${this.orientation()}`, 'ax-action-list', 'ax-action-list-vertical'];
681
847
  }
682
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
683
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: AXContextMenuComponent, isStandalone: true, selector: "ax-context-menu", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, openOn: { classPropertyName: "openOn", publicName: "openOn", isSignal: true, isRequired: false, transformFunction: null }, closeOn: { classPropertyName: "closeOn", publicName: "closeOn", isSignal: true, isRequired: false, transformFunction: null }, originalItems: { classPropertyName: "originalItems", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onItemClick: "onItemClick", onOpening: "onOpening", onClose: "onClose" }, host: { listeners: { "window:scroll": "onWindowEvent()", "window:resize": "onWindowEvent()" }, properties: { "class": "this.__hostClass" } }, providers: [
848
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
849
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXContextMenuComponent, isStandalone: true, selector: "ax-context-menu", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, openOn: { classPropertyName: "openOn", publicName: "openOn", isSignal: true, isRequired: false, transformFunction: null }, closeOn: { classPropertyName: "closeOn", publicName: "closeOn", isSignal: true, isRequired: false, transformFunction: null }, closeOnRouteChange: { classPropertyName: "closeOnRouteChange", publicName: "closeOnRouteChange", isSignal: true, isRequired: false, transformFunction: null }, originalItems: { classPropertyName: "originalItems", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onItemClick: "onItemClick", onOpening: "onOpening", onClose: "onClose" }, host: { listeners: { "window:scroll": "onWindowEvent()", "window:resize": "onWindowEvent()" }, properties: { "class": "this.__hostClass" } }, providers: [
684
850
  AXMenuService,
685
851
  {
686
852
  provide: AXRootMenu,
@@ -690,9 +856,9 @@ class AXContextMenuComponent extends NXComponent {
690
856
  provide: AXComponent,
691
857
  useExisting: AXContextMenuComponent,
692
858
  },
693
- ], 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 [name]=\"item.name\" [data]=\"item.data\" [disabled]=\"item.disabled\" [color]=\"item.color\">\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: ["@reference \"../../../../styles/themes/default.css\";@layer components{ax-context-menu,ax-menu{@apply flex w-max text-inherit;}ax-context-menu.ax-menu-container,ax-context-menu .ax-menu-items,ax-menu.ax-menu-container,ax-menu .ax-menu-items{@apply text-on-lightest bg-lightest border-border-lightest invisible fixed flex h-max w-max min-w-48 flex-col rounded-lg border py-2 opacity-0 shadow transition-all;}ax-context-menu.ax-menu-container.ax-state-open,ax-context-menu .ax-menu-items.ax-state-open,ax-menu.ax-menu-container.ax-state-open,ax-menu .ax-menu-items.ax-state-open{@apply visible opacity-100;}ax-context-menu.ax-menu-container ax-menu-item,ax-context-menu .ax-menu-items ax-menu-item,ax-menu.ax-menu-container ax-menu-item,ax-menu .ax-menu-items ax-menu-item{@apply text-(--ax-comp-bg);}ax-context-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled),ax-context-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled),ax-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled),ax-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled){@apply bg-(--ax-comp-bg) text-(--ax-comp-bg);}ax-context-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-context-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{@apply text-(--ax-comp-bg);}ax-context-menu.ax-menu-container ax-menu-item ax-suffix ax-text,ax-context-menu .ax-menu-items ax-menu-item ax-suffix ax-text,ax-menu.ax-menu-container ax-menu-item ax-suffix ax-text,ax-menu .ax-menu-items ax-menu-item ax-suffix ax-text{@apply font-normal!;}ax-context-menu.ax-action-list-horizontal{@apply px-4;}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){@apply gap-2;}ax-menu.ax-action-list-horizontal{@apply min-w-48 gap-5;}ax-menu.ax-action-list-horizontal>ax-title{@apply hidden;}ax-menu.ax-action-list-horizontal>ax-menu-item{@apply font-medium;}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{@apply ps-0!;}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){@apply me-0! ps-0!;}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item:hover.ax-state-disabled){@apply bg-transparent!;}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item:hover.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:hover.ax-state-disabled)>.ax-action-item-suffix{@apply opacity-70;}ax-menu.ax-action-list-vertical{@apply w-max min-w-48;}ax-menu.ax-action-list-vertical>ax-menu-item{@apply font-medium;}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item:hover.ax-state-disabled){@apply bg-transparent!;}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item:hover.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:hover.ax-state-disabled)>.ax-action-item-suffix{@apply opacity-70;}ax-menu>ax-menu-item{@apply py-2;}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled){@apply rounded-lg;}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled)>ax-text{@apply opacity-70;}}\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: ["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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
859
+ ], 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: ["ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}ax-context-menu.ax-menu-container,ax-context-menu .ax-menu-items,ax-menu.ax-menu-container,ax-menu .ax-menu-items{visibility:hidden;position:fixed;display:flex;height:max-content;width:max-content;min-width:calc(var(--spacing, .25rem) * 48);flex-direction:column;border-radius:var(--radius-default, var(--ax-sys-border-radius));border-width:1px;border-style:solid;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)));padding-block:calc(var(--spacing, .25rem) * 2);opacity:0;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;transition-property:all;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}ax-context-menu.ax-menu-container.ax-state-open,ax-context-menu .ax-menu-items.ax-state-open,ax-menu.ax-menu-container.ax-state-open,ax-menu .ax-menu-items.ax-state-open{visibility:visible;opacity:1}ax-context-menu.ax-menu-container ax-menu-item,ax-context-menu .ax-menu-items ax-menu-item,ax-menu.ax-menu-container ax-menu-item,ax-menu .ax-menu-items ax-menu-item{color:var(--ax-comp-bg)}ax-context-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled),ax-context-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled),ax-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled),ax-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled){background-color:var(--ax-comp-bg);color:var(--ax-comp-bg)}ax-context-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-context-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:var(--ax-comp-bg)}ax-context-menu.ax-menu-container ax-menu-item ax-suffix ax-text,ax-context-menu .ax-menu-items ax-menu-item ax-suffix ax-text,ax-menu.ax-menu-container ax-menu-item ax-suffix ax-text,ax-menu .ax-menu-items ax-menu-item ax-suffix ax-text{font-weight: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{font-weight:500}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start: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:0!important;padding-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:.7}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{font-weight: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:.7}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:.7}\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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
694
860
  }
695
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXContextMenuComponent, decorators: [{
861
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXContextMenuComponent, decorators: [{
696
862
  type: Component,
697
863
  args: [{ selector: 'ax-context-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
698
864
  AXMenuService,
@@ -711,8 +877,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
711
877
  AXDecoratorIconComponent,
712
878
  AsyncPipe,
713
879
  AXTranslatorPipe,
714
- ], 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 [name]=\"item.name\" [data]=\"item.data\" [disabled]=\"item.disabled\" [color]=\"item.color\">\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: ["@reference \"../../../../styles/themes/default.css\";@layer components{ax-context-menu,ax-menu{@apply flex w-max text-inherit;}ax-context-menu.ax-menu-container,ax-context-menu .ax-menu-items,ax-menu.ax-menu-container,ax-menu .ax-menu-items{@apply text-on-lightest bg-lightest border-border-lightest invisible fixed flex h-max w-max min-w-48 flex-col rounded-lg border py-2 opacity-0 shadow transition-all;}ax-context-menu.ax-menu-container.ax-state-open,ax-context-menu .ax-menu-items.ax-state-open,ax-menu.ax-menu-container.ax-state-open,ax-menu .ax-menu-items.ax-state-open{@apply visible opacity-100;}ax-context-menu.ax-menu-container ax-menu-item,ax-context-menu .ax-menu-items ax-menu-item,ax-menu.ax-menu-container ax-menu-item,ax-menu .ax-menu-items ax-menu-item{@apply text-(--ax-comp-bg);}ax-context-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled),ax-context-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled),ax-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled),ax-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled){@apply bg-(--ax-comp-bg) text-(--ax-comp-bg);}ax-context-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-context-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{@apply text-(--ax-comp-bg);}ax-context-menu.ax-menu-container ax-menu-item ax-suffix ax-text,ax-context-menu .ax-menu-items ax-menu-item ax-suffix ax-text,ax-menu.ax-menu-container ax-menu-item ax-suffix ax-text,ax-menu .ax-menu-items ax-menu-item ax-suffix ax-text{@apply font-normal!;}ax-context-menu.ax-action-list-horizontal{@apply px-4;}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){@apply gap-2;}ax-menu.ax-action-list-horizontal{@apply min-w-48 gap-5;}ax-menu.ax-action-list-horizontal>ax-title{@apply hidden;}ax-menu.ax-action-list-horizontal>ax-menu-item{@apply font-medium;}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{@apply ps-0!;}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){@apply me-0! ps-0!;}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item:hover.ax-state-disabled){@apply bg-transparent!;}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item:hover.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:hover.ax-state-disabled)>.ax-action-item-suffix{@apply opacity-70;}ax-menu.ax-action-list-vertical{@apply w-max min-w-48;}ax-menu.ax-action-list-vertical>ax-menu-item{@apply font-medium;}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item:hover.ax-state-disabled){@apply bg-transparent!;}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item:hover.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:hover.ax-state-disabled)>.ax-action-item-suffix{@apply opacity-70;}ax-menu>ax-menu-item{@apply py-2;}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled){@apply rounded-lg;}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled)>ax-text{@apply opacity-70;}}\n"] }]
715
- }], 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 }] }], 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: [{
880
+ ], 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: ["ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}ax-context-menu.ax-menu-container,ax-context-menu .ax-menu-items,ax-menu.ax-menu-container,ax-menu .ax-menu-items{visibility:hidden;position:fixed;display:flex;height:max-content;width:max-content;min-width:calc(var(--spacing, .25rem) * 48);flex-direction:column;border-radius:var(--radius-default, var(--ax-sys-border-radius));border-width:1px;border-style:solid;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)));padding-block:calc(var(--spacing, .25rem) * 2);opacity:0;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;transition-property:all;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}ax-context-menu.ax-menu-container.ax-state-open,ax-context-menu .ax-menu-items.ax-state-open,ax-menu.ax-menu-container.ax-state-open,ax-menu .ax-menu-items.ax-state-open{visibility:visible;opacity:1}ax-context-menu.ax-menu-container ax-menu-item,ax-context-menu .ax-menu-items ax-menu-item,ax-menu.ax-menu-container ax-menu-item,ax-menu .ax-menu-items ax-menu-item{color:var(--ax-comp-bg)}ax-context-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled),ax-context-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled),ax-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled),ax-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled){background-color:var(--ax-comp-bg);color:var(--ax-comp-bg)}ax-context-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-context-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-menu.ax-menu-container ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text,ax-menu .ax-menu-items ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:var(--ax-comp-bg)}ax-context-menu.ax-menu-container ax-menu-item ax-suffix ax-text,ax-context-menu .ax-menu-items ax-menu-item ax-suffix ax-text,ax-menu.ax-menu-container ax-menu-item ax-suffix ax-text,ax-menu .ax-menu-items ax-menu-item ax-suffix ax-text{font-weight: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{font-weight:500}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start: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:0!important;padding-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:.7}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{font-weight: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:.7}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:.7}\n"] }]
881
+ }], 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: [{
716
882
  type: HostListener,
717
883
  args: ['window:scroll']
718
884
  }, {
@@ -729,14 +895,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
729
895
  */
730
896
  class AXMenuComponent extends NXComponent {
731
897
  constructor() {
732
- super(...arguments);
733
- this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
734
- this.openOn = input('hover', ...(ngDevMode ? [{ debugName: "openOn" }] : []));
735
- this.closeOn = input('leave', ...(ngDevMode ? [{ debugName: "closeOn" }] : []));
898
+ super();
899
+ this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
900
+ this.openOn = input('hover', ...(ngDevMode ? [{ debugName: "openOn" }] : /* istanbul ignore next */ []));
901
+ this.closeOn = input('leave', ...(ngDevMode ? [{ debugName: "closeOn" }] : /* istanbul ignore next */ []));
736
902
  this.service = inject(AXMenuService);
737
903
  this.onItemClick = output();
738
- this.items = input([], ...(ngDevMode ? [{ debugName: "items" }] : []));
739
- this.hasArrow = input(true, ...(ngDevMode ? [{ debugName: "hasArrow" }] : []));
904
+ this.items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
905
+ this.hasArrow = input(true, ...(ngDevMode ? [{ debugName: "hasArrow" }] : /* istanbul ignore next */ []));
906
+ afterNextRender(() => {
907
+ this.service.initGlobalListeners(this.nativeElement);
908
+ });
740
909
  }
741
910
  /** @ignore */
742
911
  get __hostClass() {
@@ -755,8 +924,8 @@ class AXMenuComponent extends NXComponent {
755
924
  close() {
756
925
  this.service.closeAll$.next();
757
926
  }
758
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
759
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: AXMenuComponent, isStandalone: true, selector: "ax-menu", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, openOn: { classPropertyName: "openOn", publicName: "openOn", isSignal: true, isRequired: false, transformFunction: null }, closeOn: { classPropertyName: "closeOn", publicName: "closeOn", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, hasArrow: { classPropertyName: "hasArrow", publicName: "hasArrow", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onItemClick: "onItemClick" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
927
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
928
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMenuComponent, isStandalone: true, selector: "ax-menu", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, openOn: { classPropertyName: "openOn", publicName: "openOn", isSignal: true, isRequired: false, transformFunction: null }, closeOn: { classPropertyName: "closeOn", publicName: "closeOn", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, hasArrow: { classPropertyName: "hasArrow", publicName: "hasArrow", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onItemClick: "onItemClick" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
760
929
  AXMenuService,
761
930
  {
762
931
  provide: AXRootMenu,
@@ -766,9 +935,9 @@ class AXMenuComponent extends NXComponent {
766
935
  provide: AXComponent,
767
936
  useExisting: AXMenuComponent,
768
937
  },
769
- ], 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 [name]=\"item.name\" [data]=\"item.data\" [disabled]=\"item.disabled\" [color]=\"item.color\">\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{@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-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-font-weight:initial}}}@layer components{ax-context-menu,ax-menu{width:max-content;color:inherit;display:flex}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;width:max-content;height:max-content;min-width:calc(var(--spacing,.25rem) * 48);border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));padding-block:calc(var(--spacing,.25rem) * 2);color:rgba(var(--ax-sys-color-on-lightest-surface));opacity:0;--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);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));flex-direction:column;display:flex;position:fixed}: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:1}: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:hover.ax-state-disabled){background-color:#0000!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal>ax-menu-item:hover.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:hover.ax-state-disabled)>.ax-action-item-suffix{opacity:.7}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:hover.ax-state-disabled){background-color:#0000!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical>ax-menu-item:hover.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:hover.ax-state-disabled)>.ax-action-item-suffix{opacity:.7}ax-menu>ax-menu-item{padding-block:calc(var(--spacing,.25rem) * 2)}ax-menu>ax-menu-item:hover:not(ax-menu>ax-menu-item:hover.ax-state-disabled){border-radius:var(--radius-lg,.5rem)}ax-menu>ax-menu-item:hover:not(ax-menu>ax-menu-item:hover.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu>ax-menu-item:hover.ax-state-disabled)>ax-text{opacity:.7}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.3.0 | 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: ["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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
938
+ ], 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: ["ax-context-menu,ax-menu{width:max-content;color:inherit;display:flex}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;width:max-content;height:max-content;min-width:calc(var(--spacing,.25rem) * 48);border-radius:var(--radius-default,var(--ax-sys-border-radius));border-style:solid;border-width:1px;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)));padding-block:calc(var(--spacing,.25rem) * 2);opacity:0;transition-property:all;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function);flex-direction:column;display:flex;position:fixed;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a}: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:1}: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{font-weight: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{font-weight:500}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start: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:0!important;padding-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:#0000!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:.7}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{font-weight: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:#0000!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:.7}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:.7}\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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
770
939
  }
771
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXMenuComponent, decorators: [{
940
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMenuComponent, decorators: [{
772
941
  type: Component,
773
942
  args: [{ selector: 'ax-menu', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
774
943
  AXMenuService,
@@ -787,18 +956,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
787
956
  AXDecoratorIconComponent,
788
957
  AsyncPipe,
789
958
  AXTranslatorPipe,
790
- ], 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 [name]=\"item.name\" [data]=\"item.data\" [disabled]=\"item.disabled\" [color]=\"item.color\">\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{@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-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-font-weight:initial}}}@layer components{ax-context-menu,ax-menu{width:max-content;color:inherit;display:flex}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;width:max-content;height:max-content;min-width:calc(var(--spacing,.25rem) * 48);border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-lightest-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));padding-block:calc(var(--spacing,.25rem) * 2);color:rgba(var(--ax-sys-color-on-lightest-surface));opacity:0;--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);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));flex-direction:column;display:flex;position:fixed}: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:1}: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:hover.ax-state-disabled){background-color:#0000!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal>ax-menu-item:hover.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:hover.ax-state-disabled)>.ax-action-item-suffix{opacity:.7}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:hover.ax-state-disabled){background-color:#0000!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical>ax-menu-item:hover.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:hover.ax-state-disabled)>.ax-action-item-suffix{opacity:.7}ax-menu>ax-menu-item{padding-block:calc(var(--spacing,.25rem) * 2)}ax-menu>ax-menu-item:hover:not(ax-menu>ax-menu-item:hover.ax-state-disabled){border-radius:var(--radius-lg,.5rem)}ax-menu>ax-menu-item:hover:not(ax-menu>ax-menu-item:hover.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu>ax-menu-item:hover.ax-state-disabled)>ax-text{opacity:.7}}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-font-weight{syntax:\"*\";inherits:false}\n/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */\n"] }]
791
- }], 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: [{
959
+ ], 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: ["ax-context-menu,ax-menu{width:max-content;color:inherit;display:flex}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;width:max-content;height:max-content;min-width:calc(var(--spacing,.25rem) * 48);border-radius:var(--radius-default,var(--ax-sys-border-radius));border-style:solid;border-width:1px;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)));padding-block:calc(var(--spacing,.25rem) * 2);opacity:0;transition-property:all;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function);flex-direction:column;display:flex;position:fixed;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a}: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:1}: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{font-weight: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{font-weight:500}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start: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:0!important;padding-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:#0000!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:.7}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{font-weight: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:#0000!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:.7}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:.7}\n"] }]
960
+ }], 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: [{
792
961
  type: HostBinding,
793
962
  args: ['class']
794
963
  }] } });
795
964
 
796
965
  class AXMenuModule {
797
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
798
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: AXMenuModule, imports: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent], exports: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent] }); }
799
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXMenuModule, imports: [AXMenuComponent, AXContextMenuComponent] }); }
966
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
967
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXMenuModule, imports: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent], exports: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent] }); }
968
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMenuModule, imports: [AXMenuComponent, AXContextMenuComponent] }); }
800
969
  }
801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXMenuModule, decorators: [{
970
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMenuModule, decorators: [{
802
971
  type: NgModule,
803
972
  args: [{
804
973
  imports: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent],
@@ -810,5 +979,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
810
979
  * Generated bundle index. Do not edit.
811
980
  */
812
981
 
813
- export { AXContextMenuComponent, AXContextMenuOpeningEvent, AXMenuComponent, AXMenuItem, AXMenuItemClickBaseEvent, AXMenuItemComponent, AXMenuItemComponentBase, AXMenuModule, AXMenuService, AXRootMenu };
982
+ export { AXContextMenuComponent, AXContextMenuOpeningEvent, AXMenuComponent, AXMenuItemClickBaseEvent, AXMenuItemComponent, AXMenuItemComponentBase, AXMenuModule, AXMenuService, AXRootMenu };
814
983
  //# sourceMappingURL=acorex-components-menu.mjs.map