@acorex/components 18.10.16 → 18.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,311 @@
1
+ import { MXBaseComponent } from '@acorex/components/common';
2
+ import { afterNextRender, ChangeDetectionStrategy, Component, computed, HostBinding, HostListener, inject, input, output, Renderer2, signal, ViewEncapsulation, } from '@angular/core';
3
+ import { AXMenuService } from './menu.service';
4
+ import { AXMenuItemComponentBase, AXRootMenu } from './menu.types';
5
+ import { AXHtmlUtil, AXUnsubscriber } from '@acorex/core/utils';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Represents a menu item component used within an `ax-menu`.
9
+ * @category Components
10
+ */
11
+ export class AXMenuItemComponent extends MXBaseComponent {
12
+ constructor(renderer) {
13
+ super();
14
+ this.renderer = renderer;
15
+ this.isOpen = signal(false);
16
+ this.hasSubItems = signal(false);
17
+ this.isFirstLevel = signal(false);
18
+ this.root = inject(AXRootMenu);
19
+ this.service = inject(AXMenuService);
20
+ this.scrollableParents = [];
21
+ this.unsuscriber = inject(AXUnsubscriber);
22
+ this.arrowIcon = computed(() => {
23
+ const isRtl = AXHtmlUtil.isRtl(this.getHostElement());
24
+ return this.root.orientation() == 'horizontal' && this.isFirstLevel() ?
25
+ "ax-icon-chevron-down" :
26
+ isRtl ? "ax-icon-chevron-left" : "ax-icon-chevron-right";
27
+ });
28
+ this.onClick = output();
29
+ this.name = input();
30
+ this.data = input();
31
+ this.disabled = input();
32
+ this.color = input();
33
+ //
34
+ afterNextRender(() => {
35
+ this.detectSubItems();
36
+ this.observeMutations();
37
+ this.bindScrollEvents();
38
+ });
39
+ //
40
+ this.service.closeAll$
41
+ .pipe(this.unsuscriber.takeUntilDestroy)
42
+ .subscribe(() => this.close());
43
+ this.service.open$
44
+ .pipe(this.unsuscriber.takeUntilDestroy)
45
+ .subscribe((item) => {
46
+ if (this === item) {
47
+ this.isOpen.set(true);
48
+ this.calculatePosition();
49
+ }
50
+ });
51
+ //
52
+ this.service.close$
53
+ .pipe(this.unsuscriber.takeUntilDestroy)
54
+ .subscribe(item => {
55
+ if (this == item) {
56
+ this.isOpen.set(false);
57
+ }
58
+ });
59
+ //
60
+ this.service.closeExcept$
61
+ .pipe(this.unsuscriber.takeUntilDestroy)
62
+ .subscribe((item) => {
63
+ this.closeExcept(item);
64
+ });
65
+ }
66
+ closeExcept(item) {
67
+ const list = [item];
68
+ //
69
+ let parent = item.parent;
70
+ while (parent != null) {
71
+ list.push(parent);
72
+ parent = parent.parent;
73
+ }
74
+ //
75
+ if (!list.includes(this)) {
76
+ this.close();
77
+ }
78
+ }
79
+ observeMutations() {
80
+ this.mutationObserver = new MutationObserver(() => {
81
+ this.detectSubItems();
82
+ });
83
+ // Start observing changes in child elements
84
+ this.mutationObserver.observe(this.getHostElement(), {
85
+ childList: true,
86
+ subtree: true,
87
+ });
88
+ }
89
+ getText() {
90
+ return this.getHostElement().querySelector('ax-text')?.innerText;
91
+ }
92
+ /**
93
+ * Manually detect all `ax-menu-item` elements and check if this menu item has sub-items.
94
+ */
95
+ detectSubItems() {
96
+ //
97
+ const parentEl = this.getHostElement().parentElement?.parentElement;
98
+ this.parent = parentEl?.tagName == "AX-MENU-ITEM" ? parentEl?.["__axContext__"] : null;
99
+ //
100
+ const tag = this.getHostElement().parentElement?.tagName;
101
+ this.isFirstLevel.set(tag == "AX-MENU" || tag == "AX-CONTEXT-MENU");
102
+ const subItems = this.getHostElement().querySelectorAll('ax-menu-item');
103
+ if (subItems.length > 0) {
104
+ this.hasSubItems.set(true);
105
+ }
106
+ else {
107
+ this.hasSubItems.set(false);
108
+ }
109
+ }
110
+ open() {
111
+ this.service.closeExcept$.next(this);
112
+ if (!this.disabled() && this.hasSubItems()) {
113
+ this.service.open$.next(this);
114
+ }
115
+ }
116
+ close() {
117
+ this.service.close$.next(this);
118
+ }
119
+ /**
120
+ * Calculate the position of the submenu to avoid it going out of the viewport.
121
+ */
122
+ calculatePosition() {
123
+ const submenu = this.getHostElement().querySelector('.ax-menu-items');
124
+ if (!submenu)
125
+ return;
126
+ const submenuRect = submenu.getBoundingClientRect();
127
+ const itemRect = this.getHostElement().getBoundingClientRect();
128
+ const windowWidth = window.innerWidth;
129
+ const windowHeight = window.innerHeight;
130
+ const isRtl = AXHtmlUtil.isRtl(this.getHostElement());
131
+ let top = null;
132
+ let left = null;
133
+ // For first-level menu items
134
+ if (this.isFirstLevel() && this.root.orientation() === 'horizontal') {
135
+ top = itemRect.bottom + submenuRect.height > windowHeight
136
+ ? itemRect.top - submenuRect.height // Open upwards
137
+ : itemRect.bottom; // Open downwards
138
+ if (isRtl) {
139
+ // RTL: Align to the right of the parent item
140
+ left = itemRect.right - submenuRect.width < 0
141
+ ? itemRect.left // Align to the left if not enough space on the right
142
+ : itemRect.right - submenuRect.width; // Open to the left in RTL
143
+ }
144
+ else {
145
+ // LTR: Align to the left of the parent item
146
+ left = itemRect.left + submenuRect.width > windowWidth
147
+ ? itemRect.right - submenuRect.width // Align to the right edge in LTR
148
+ : itemRect.left; // Open to the left
149
+ }
150
+ }
151
+ else {
152
+ // For nested submenus
153
+ if (isRtl) {
154
+ // RTL: Nested submenu opens to the left
155
+ left = itemRect.left - submenuRect.width < 0
156
+ ? itemRect.right // Align to the right if not enough space on the left
157
+ : itemRect.left - submenuRect.width; // Open to the left in RTL
158
+ }
159
+ else {
160
+ // LTR: Nested submenu opens to the right
161
+ left = itemRect.right + submenuRect.width > windowWidth
162
+ ? itemRect.left - submenuRect.width // Open to the left if not enough space
163
+ : itemRect.right; // Open to the right in LTR
164
+ }
165
+ // Adjust top position (align vertically with parent)
166
+ top = itemRect.top + submenuRect.height > windowHeight
167
+ ? itemRect.top - (itemRect.bottom + submenuRect.height - windowHeight) // Adjust upwards
168
+ : itemRect.top; // Align with the parent item
169
+ }
170
+ // Apply calculated styles for RTL/LTR
171
+ this.renderer.setStyle(submenu, 'left', `${left}px`);
172
+ this.renderer.setStyle(submenu, 'top', `${top}px`);
173
+ this.renderer.setStyle(submenu, 'position', 'fixed'); // Fixed position relative to the viewport
174
+ }
175
+ handleClick(e) {
176
+ e.stopPropagation();
177
+ if (this.disabled())
178
+ return;
179
+ //
180
+ const event = {
181
+ component: this,
182
+ htmlElement: this.getHostElement(),
183
+ nativeEvent: e,
184
+ canceled: false,
185
+ item: {
186
+ name: this.name(),
187
+ text: this.getText(),
188
+ data: this.data()
189
+ }
190
+ };
191
+ //
192
+ this.onClick.emit(event);
193
+ this.root.onItemClick.emit(event);
194
+ //
195
+ if (this.hasSubItems() && !event.canceled) {
196
+ this.open();
197
+ }
198
+ else if (!event.canceled) {
199
+ this.service.closeAll$.next();
200
+ this.service.closeAllContextMenu$.next({ sender: this.root });
201
+ }
202
+ }
203
+ handleMouseEnter(event) {
204
+ event.stopPropagation();
205
+ // Cancel the close delay if the mouse re-enters the element
206
+ if (this.mouseLeaveTimeout) {
207
+ clearTimeout(this.mouseLeaveTimeout);
208
+ this.mouseLeaveTimeout = null; // Reset the timeout
209
+ }
210
+ if (!this.isFirstLevel() || this.root.openOn() == 'hover') {
211
+ this.open();
212
+ }
213
+ }
214
+ handleMouseLeave(event) {
215
+ event.stopPropagation();
216
+ if (this.hasSubItems() && this.root.closeOn() === 'leave') {
217
+ // Clear any previous timeout to avoid multiple triggers
218
+ if (this.mouseLeaveTimeout) {
219
+ clearTimeout(this.mouseLeaveTimeout);
220
+ }
221
+ // Set a delay before closing the submenu
222
+ this.mouseLeaveTimeout = setTimeout(() => {
223
+ this.close();
224
+ }, 500); // Adjust the delay (500ms in this case) as per your requirement
225
+ }
226
+ }
227
+ onWindowEvent() {
228
+ this.service.closeAll$.next(); // Close all menus on scroll or resize
229
+ }
230
+ /**
231
+ * Close all menus if clicking outside the root menu and all sub-items.
232
+ */
233
+ onClickOutside(event) {
234
+ const hostElement = this.root.getHostElement();
235
+ if (!hostElement.contains(event.target)) {
236
+ this.service.closeAll$.next(); // Close all menus if click is outside the root and sub-items
237
+ }
238
+ }
239
+ ngOnDestroy() {
240
+ this.removeScrollEvents();
241
+ }
242
+ bindScrollEvents() {
243
+ this.scrollableParents = AXHtmlUtil.getScrollableParents(this.getHostElement());
244
+ this.scrollableParents.forEach((parent) => {
245
+ parent.addEventListener('scroll', this.onContainerScroll.bind(this));
246
+ });
247
+ }
248
+ // Remove scroll event listeners
249
+ removeScrollEvents() {
250
+ this.scrollableParents.forEach((parent) => {
251
+ parent.removeEventListener('scroll', this.onContainerScroll.bind(this));
252
+ });
253
+ }
254
+ /**
255
+ * Handler for scroll events (window or scrollable parent containers)
256
+ */
257
+ onContainerScroll() {
258
+ this.service.closeAll$.next(); // Close all menus on scroll
259
+ }
260
+ /** @ignore */
261
+ get __hostClass() {
262
+ const list = ['ax-el-interactive'];
263
+ if (this.disabled()) {
264
+ list.push('ax-state-disabled');
265
+ }
266
+ if (this.color()) {
267
+ list.push(`ax-el-${this.color()}-blank`);
268
+ }
269
+ return list;
270
+ }
271
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuItemComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
272
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXMenuItemComponent, 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($event)", "window:resize": "onWindowEvent($event)", "document:click": "onClickOutside($event)" }, properties: { "class": "this.__hostClass" } }, providers: [
273
+ {
274
+ provide: AXMenuItemComponentBase,
275
+ useExisting: AXMenuItemComponent
276
+ },
277
+ AXUnsubscriber
278
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-menu-item-prefix\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content select=\"ax-text\"></ng-content>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n@if (hasSubItems()) {\n<i class=\"ax-icon ax-icon-solid {{ arrowIcon() }} ax-menu-item-child-icon\"></i>\n}\n<div class=\"ax-menu-items\" [class.ax-state-open]=\"isOpen()\">\n <ng-content select=\"ax-menu-item,ax-title,ng-container\"></ng-content>\n</div>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
279
+ }
280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuItemComponent, decorators: [{
281
+ type: Component,
282
+ args: [{ selector: 'ax-menu-item', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
283
+ {
284
+ provide: AXMenuItemComponentBase,
285
+ useExisting: AXMenuItemComponent
286
+ },
287
+ AXUnsubscriber
288
+ ], template: "<div class=\"ax-menu-item-prefix\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <ng-content select=\"ax-text\"></ng-content>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n@if (hasSubItems()) {\n<i class=\"ax-icon ax-icon-solid {{ arrowIcon() }} ax-menu-item-child-icon\"></i>\n}\n<div class=\"ax-menu-items\" [class.ax-state-open]=\"isOpen()\">\n <ng-content select=\"ax-menu-item,ax-title,ng-container\"></ng-content>\n</div>" }]
289
+ }], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { handleClick: [{
290
+ type: HostListener,
291
+ args: ["click", ['$event']]
292
+ }], handleMouseEnter: [{
293
+ type: HostListener,
294
+ args: ["mouseenter", ['$event']]
295
+ }], handleMouseLeave: [{
296
+ type: HostListener,
297
+ args: ["mouseleave", ['$event']]
298
+ }], onWindowEvent: [{
299
+ type: HostListener,
300
+ args: ['window:scroll', ['$event']]
301
+ }, {
302
+ type: HostListener,
303
+ args: ['window:resize', ['$event']]
304
+ }], onClickOutside: [{
305
+ type: HostListener,
306
+ args: ['document:click', ['$event']]
307
+ }], __hostClass: [{
308
+ type: HostBinding,
309
+ args: ['class']
310
+ }] } });
311
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS1pdGVtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9tZW51L3NyYy9saWIvbWVudS1pdGVtLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9tZW51L3NyYy9saWIvbWVudS1pdGVtLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBb0IsZUFBZSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDOUUsT0FBTyxFQUNMLGVBQWUsRUFDZix1QkFBdUIsRUFDdkIsU0FBUyxFQUNULFFBQVEsRUFDUixXQUFXLEVBQ1gsWUFBWSxFQUNaLE1BQU0sRUFDTixLQUFLLEVBQ0wsTUFBTSxFQUNOLFNBQVMsRUFDVCxNQUFNLEVBQ04saUJBQWlCLEdBQ2xCLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUMvQyxPQUFPLEVBQXdCLHVCQUF1QixFQUFFLFVBQVUsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUN6RixPQUFPLEVBQUUsVUFBVSxFQUFFLGNBQWMsRUFBRSxNQUFNLG9CQUFvQixDQUFDOztBQUVoRTs7O0dBR0c7QUFjSCxNQUFNLE9BQU8sbUJBQW9CLFNBQVEsZUFBZTtJQWlDdEQsWUFBb0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YXgtdGl0bGUsbmctY29udGFpbmVyXCI+PC9uZy1jb250ZW50PlxuPC9kaXY+Il19
@@ -1,9 +1,11 @@
1
1
  import { MXBaseComponent } from '@acorex/components/common';
2
- import { Component, ContentChildren, HostBinding, inject, input, QueryList, ViewEncapsulation, } from '@angular/core';
3
- import { AXRootMenu } from './class/root-menu.class';
4
- import { AXMenuItemComponent } from './menu-item/menu-item.component';
2
+ import { ChangeDetectionStrategy, Component, HostBinding, inject, input, output, ViewEncapsulation, } from '@angular/core';
5
3
  import { AXMenuService } from './menu.service';
4
+ import { AXRootMenu } from './menu.types';
6
5
  import * as i0 from "@angular/core";
6
+ import * as i1 from "@angular/common";
7
+ import * as i2 from "@acorex/components/decorators";
8
+ import * as i3 from "./menu-item.component";
7
9
  /**
8
10
  * Represents a menu component that displays menu items.
9
11
  * @category Components
@@ -12,47 +14,39 @@ export class AXMenuComponent extends MXBaseComponent {
12
14
  constructor() {
13
15
  super(...arguments);
14
16
  this.orientation = input('horizontal');
15
- this.openOn = input('toggle');
17
+ this.openOn = input('hover');
18
+ this.closeOn = input('leave');
16
19
  this.service = inject(AXMenuService);
17
- }
18
- /** @ignore */
19
- ngAfterViewInit() {
20
- this.children.forEach((c) => {
21
- c.isRoot = true;
22
- c.parent = this;
23
- });
20
+ this.onItemClick = output();
21
+ this.items = input([]);
24
22
  }
25
23
  /** @ignore */
26
24
  get __hostClass() {
27
25
  return `ax-orientation-${this.orientation()}`;
28
26
  }
27
+ close() {
28
+ this.service.closeAll$.next();
29
+ }
29
30
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
30
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXMenuComponent, 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 } }, host: { properties: { "class": "this.__hostClass" } }, providers: [
31
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXMenuComponent, 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 } }, outputs: { onItemClick: "onItemClick" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
32
+ AXMenuService,
31
33
  {
32
34
  provide: AXRootMenu,
33
- useExisting: AXMenuComponent,
34
- },
35
- {
36
- provide: AXMenuService,
37
- },
38
- ], queries: [{ propertyName: "children", predicate: AXMenuItemComponent }], usesInheritance: true, ngImport: i0, template: ` <ng-content select="ax-menu-item,ng-container"></ng-content>`, isInline: true, styles: ["ax-menu{width:100%;font-size:.875rem;line-height:1.25rem;color:inherit;position:relative}ax-menu.ax-orientation-horizontal{display:flex}ax-menu.ax-orientation-horizontal ax-menu-item:not(ax-menu.ax-orientation-horizontal ax-menu-item:last-child){margin-inline-end:1rem}ax-menu.ax-orientation-vertical{display:flex;flex-direction:column}ax-menu.ax-orientation-vertical ax-menu-item{justify-content:space-between}ax-menu.ax-orientation-vertical ax-menu-item:not(ax-menu.ax-orientation-vertical ax-menu-item:last-child){margin-bottom:1rem}ax-menu ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled){color:rgba(var(--ax-color-primary-500))}ax-menu-item{position:relative;display:flex;align-items:center;gap:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;justify-content:space-between;color:rgba(var(--ax-color-text-default))}ax-menu-item .ax-menu-item-text{white-space:nowrap}ax-menu-item:not(ax-menu-item.ax-state-disabled){cursor:pointer}ax-menu-item .ax-menu-item-start-side{display:flex;align-items:center;gap:.5rem}ax-menu-item.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-menu-item.ax-state-selected{color:rgba(var(--ax-color-primary-500))}ax-menu-item .ax-menu-item-child-icon{width:fit-content;line-height:1;font-size:10px}ax-menu-item ax-popover{position:absolute}.ax-menu-item-children{padding-top:.5rem;padding-bottom:.5rem}.ax-menu-item-children:not(.ax-menu-item-children:empty){display:flex;min-width:12rem;flex-direction:column;border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item{padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-suffix{opacity:1}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-suffix{opacity:.75}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item .ax-menu-item-text{flex:1 1 0%}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon:before{-moz-transform:scale(1,-1);-webkit-transform:scale(1,-1);-o-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scaleY(-1)}.ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}\n"], encapsulation: i0.ViewEncapsulation.None }); }
35
+ useExisting: AXMenuComponent
36
+ }
37
+ ], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-title,ng-container\"></ng-content>\n\n<ng-container *ngFor=\"let node of items()\" [ngTemplateOutlet]=\"Recursion\"\n [ngTemplateOutletContext]=\"{ $implicit: node }\">\n</ng-container>\n<ng-template #Recursion let-item>\n @if(item.group?.title)\n {\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 <ax-prefix>\n @if(item.icon)\n {\n <ax-icon [icon]=\"item.icon\">\n </ax-icon>\n }\n </ax-prefix>\n @if(item.text)\n {\n <ax-text>{{ item.text }}</ax-text>\n }\n @if(item.suffix)\n {\n <ax-suffix>\n <ax-text>{{ item.suffix.text }}</ax-text>\n </ax-suffix>\n }\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"Recursion\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n </ax-menu-item>\n @if(item.break)\n {\n <ax-divider></ax-divider>\n }\n</ng-template>", styles: ["ax-context-menu,ax-menu{width:100%;color:inherit;display:flex;width:max-content}ax-context-menu.ax-orientation-horizontal,ax-menu.ax-orientation-horizontal{flex-direction:row!important}ax-context-menu.ax-orientation-vertical,ax-menu.ax-orientation-vertical{flex-direction:column!important}ax-context-menu ax-title,ax-menu ax-title{display:block;padding-inline:1rem;padding-block:.25rem;font-size:.75rem;line-height:1rem;font-weight:bolder;text-transform:uppercase;opacity:.5}ax-context-menu ax-divider,ax-menu ax-divider{margin-top:.25rem;margin-bottom:.25rem;height:.5px;width:100%;background-color:rgba(var(--ax-color-border-default))}ax-context-menu ax-menu-item,ax-menu ax-menu-item{display:flex;align-items:center;font-size:.875rem;line-height:1.25rem;justify-content:space-between;color:rgba(var(--ax-color-text-default));height:2.25rem;cursor:pointer}ax-context-menu ax-menu-item>.ax-menu-item-prefix,ax-menu ax-menu-item>.ax-menu-item-prefix{display:flex;gap:.5rem}ax-context-menu ax-menu-item.ax-state-disabled,ax-menu ax-menu-item.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-context-menu ax-menu-item ax-suffix ax-text,ax-menu ax-menu-item ax-suffix ax-text{color:rgba(var(--ax-color-text-default))!important;opacity:.5!important;font-weight:200!important;padding-inline-start:2rem}ax-context-menu.ax-menu-container,ax-context-menu .ax-menu-items,ax-menu.ax-menu-container,ax-menu .ax-menu-items{padding-block:.5rem;display:flex;opacity:0;visibility:hidden;transition:opacity .3s;width:max-content;min-width:12rem;height:max-content;position:fixed;flex-direction:column;border-radius:0;border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface));--ax-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--ax-shadow-colored: 0 4px 6px -1px var(--ax-shadow-color), 0 2px 4px -2px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-shadow);border-radius:var(--ax-rounded-border-default);z-index:9999}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{opacity:1;visibility:visible}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{padding-inline:1rem;padding-block:.5rem}ax-context-menu.ax-menu-container ax-menu-item ax-prefix,ax-context-menu .ax-menu-items ax-menu-item ax-prefix,ax-menu.ax-menu-container ax-menu-item ax-prefix,ax-menu .ax-menu-items ax-menu-item ax-prefix{width:1rem}ax-context-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled),ax-context-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled),ax-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled),ax-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}ax-context-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-prefix,ax-context-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-suffix,ax-context-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-prefix,ax-context-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-suffix,ax-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-prefix,ax-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-suffix,ax-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-prefix,ax-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-suffix{opacity:1}ax-context-menu.ax-orientation-horizontal{padding-inline:1rem}ax-menu.ax-orientation-horizontal{min-width:12rem;gap:.875rem}ax-menu.ax-orientation-horizontal>ax-menu-item{font-weight:500}ax-menu.ax-orientation-vertical{width:max-content;min-width:12rem}ax-menu.ax-orientation-vertical>ax-menu-item{padding-inline:1rem;font-weight:500}ax-menu>ax-menu-item{padding-block:.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{color:rgba(var(--ax-color-primary-500))}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i3.AXMenuItemComponent, selector: "ax-menu-item", inputs: ["name", "data", "disabled", "color"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
39
38
  }
40
39
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuComponent, decorators: [{
41
40
  type: Component,
42
- args: [{ selector: 'ax-menu', template: ` <ng-content select="ax-menu-item,ng-container"></ng-content>`, encapsulation: ViewEncapsulation.None, providers: [
41
+ args: [{ selector: 'ax-menu', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
42
+ AXMenuService,
43
43
  {
44
44
  provide: AXRootMenu,
45
- useExisting: AXMenuComponent,
46
- },
47
- {
48
- provide: AXMenuService,
49
- },
50
- ], styles: ["ax-menu{width:100%;font-size:.875rem;line-height:1.25rem;color:inherit;position:relative}ax-menu.ax-orientation-horizontal{display:flex}ax-menu.ax-orientation-horizontal ax-menu-item:not(ax-menu.ax-orientation-horizontal ax-menu-item:last-child){margin-inline-end:1rem}ax-menu.ax-orientation-vertical{display:flex;flex-direction:column}ax-menu.ax-orientation-vertical ax-menu-item{justify-content:space-between}ax-menu.ax-orientation-vertical ax-menu-item:not(ax-menu.ax-orientation-vertical ax-menu-item:last-child){margin-bottom:1rem}ax-menu ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled){color:rgba(var(--ax-color-primary-500))}ax-menu-item{position:relative;display:flex;align-items:center;gap:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;justify-content:space-between;color:rgba(var(--ax-color-text-default))}ax-menu-item .ax-menu-item-text{white-space:nowrap}ax-menu-item:not(ax-menu-item.ax-state-disabled){cursor:pointer}ax-menu-item .ax-menu-item-start-side{display:flex;align-items:center;gap:.5rem}ax-menu-item.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-menu-item.ax-state-selected{color:rgba(var(--ax-color-primary-500))}ax-menu-item .ax-menu-item-child-icon{width:fit-content;line-height:1;font-size:10px}ax-menu-item ax-popover{position:absolute}.ax-menu-item-children{padding-top:.5rem;padding-bottom:.5rem}.ax-menu-item-children:not(.ax-menu-item-children:empty){display:flex;min-width:12rem;flex-direction:column;border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item{padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-suffix{opacity:1}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-suffix{opacity:.75}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item .ax-menu-item-text{flex:1 1 0%}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon:before{-moz-transform:scale(1,-1);-webkit-transform:scale(1,-1);-o-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scaleY(-1)}.ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}\n"] }]
51
- }], propDecorators: { children: [{
52
- type: ContentChildren,
53
- args: [AXMenuItemComponent]
54
- }], __hostClass: [{
45
+ useExisting: AXMenuComponent
46
+ }
47
+ ], template: "<ng-content select=\"ax-menu-item,ax-title,ng-container\"></ng-content>\n\n<ng-container *ngFor=\"let node of items()\" [ngTemplateOutlet]=\"Recursion\"\n [ngTemplateOutletContext]=\"{ $implicit: node }\">\n</ng-container>\n<ng-template #Recursion let-item>\n @if(item.group?.title)\n {\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 <ax-prefix>\n @if(item.icon)\n {\n <ax-icon [icon]=\"item.icon\">\n </ax-icon>\n }\n </ax-prefix>\n @if(item.text)\n {\n <ax-text>{{ item.text }}</ax-text>\n }\n @if(item.suffix)\n {\n <ax-suffix>\n <ax-text>{{ item.suffix.text }}</ax-text>\n </ax-suffix>\n }\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"Recursion\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n </ax-menu-item>\n @if(item.break)\n {\n <ax-divider></ax-divider>\n }\n</ng-template>", styles: ["ax-context-menu,ax-menu{width:100%;color:inherit;display:flex;width:max-content}ax-context-menu.ax-orientation-horizontal,ax-menu.ax-orientation-horizontal{flex-direction:row!important}ax-context-menu.ax-orientation-vertical,ax-menu.ax-orientation-vertical{flex-direction:column!important}ax-context-menu ax-title,ax-menu ax-title{display:block;padding-inline:1rem;padding-block:.25rem;font-size:.75rem;line-height:1rem;font-weight:bolder;text-transform:uppercase;opacity:.5}ax-context-menu ax-divider,ax-menu ax-divider{margin-top:.25rem;margin-bottom:.25rem;height:.5px;width:100%;background-color:rgba(var(--ax-color-border-default))}ax-context-menu ax-menu-item,ax-menu ax-menu-item{display:flex;align-items:center;font-size:.875rem;line-height:1.25rem;justify-content:space-between;color:rgba(var(--ax-color-text-default));height:2.25rem;cursor:pointer}ax-context-menu ax-menu-item>.ax-menu-item-prefix,ax-menu ax-menu-item>.ax-menu-item-prefix{display:flex;gap:.5rem}ax-context-menu ax-menu-item.ax-state-disabled,ax-menu ax-menu-item.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-context-menu ax-menu-item ax-suffix ax-text,ax-menu ax-menu-item ax-suffix ax-text{color:rgba(var(--ax-color-text-default))!important;opacity:.5!important;font-weight:200!important;padding-inline-start:2rem}ax-context-menu.ax-menu-container,ax-context-menu .ax-menu-items,ax-menu.ax-menu-container,ax-menu .ax-menu-items{padding-block:.5rem;display:flex;opacity:0;visibility:hidden;transition:opacity .3s;width:max-content;min-width:12rem;height:max-content;position:fixed;flex-direction:column;border-radius:0;border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface));--ax-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--ax-shadow-colored: 0 4px 6px -1px var(--ax-shadow-color), 0 2px 4px -2px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-shadow);border-radius:var(--ax-rounded-border-default);z-index:9999}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{opacity:1;visibility:visible}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{padding-inline:1rem;padding-block:.5rem}ax-context-menu.ax-menu-container ax-menu-item ax-prefix,ax-context-menu .ax-menu-items ax-menu-item ax-prefix,ax-menu.ax-menu-container ax-menu-item ax-prefix,ax-menu .ax-menu-items ax-menu-item ax-prefix{width:1rem}ax-context-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled),ax-context-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled),ax-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled),ax-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}ax-context-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-prefix,ax-context-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-suffix,ax-context-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-prefix,ax-context-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-suffix,ax-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-prefix,ax-menu.ax-menu-container ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-suffix,ax-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-prefix,ax-menu .ax-menu-items ax-menu-item:hover:not(ax-context-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-context-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled,ax-menu.ax-menu-container ax-menu-item:hover.ax-state-disabled,ax-menu .ax-menu-items ax-menu-item:hover.ax-state-disabled) ax-suffix{opacity:1}ax-context-menu.ax-orientation-horizontal{padding-inline:1rem}ax-menu.ax-orientation-horizontal{min-width:12rem;gap:.875rem}ax-menu.ax-orientation-horizontal>ax-menu-item{font-weight:500}ax-menu.ax-orientation-vertical{width:max-content;min-width:12rem}ax-menu.ax-orientation-vertical>ax-menu-item{padding-inline:1rem;font-weight:500}ax-menu>ax-menu-item{padding-block:.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{color:rgba(var(--ax-color-primary-500))}\n"] }]
48
+ }], propDecorators: { __hostClass: [{
55
49
  type: HostBinding,
56
50
  args: ['class']
57
51
  }] } });
58
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcy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ICAgIDwvYXgtbWVudS1pdGVtPlxuICAgIEBpZihpdGVtLmJyZWFrKVxuICAgIHtcbiAgICA8YXgtZGl2aWRlcj48L2F4LWRpdmlkZXI+XG4gICAgfVxuPC9uZy10ZW1wbGF0ZT4iXX0=
@@ -1,4 +1,3 @@
1
- import { AXButtonModule } from '@acorex/components/button';
2
1
  import { AXDecoratorModule } from '@acorex/components/decorators';
3
2
  import { AXLoadingModule } from '@acorex/components/loading';
4
3
  import { AXPopoverModule } from '@acorex/components/popover';
@@ -6,23 +5,24 @@ import { AXTranslationModule } from '@acorex/core/translation';
6
5
  import { OverlayModule } from '@angular/cdk/overlay';
7
6
  import { CommonModule } from '@angular/common';
8
7
  import { NgModule } from '@angular/core';
9
- import { AXMenuItemComponent } from './menu-item/menu-item.component';
10
8
  import { AXMenuComponent } from './menu.component';
9
+ import { AXContextMenuComponent } from './context-menu.component';
10
+ import { AXMenuItemComponent } from './menu-item.component';
11
11
  import * as i0 from "@angular/core";
12
- const COMPONENT = [AXMenuItemComponent, AXMenuComponent];
12
+ const COMPONENT = [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent];
13
13
  const MODULES = [AXDecoratorModule, AXLoadingModule, AXTranslationModule, OverlayModule, AXPopoverModule];
14
14
  export class AXMenuModule {
15
15
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
16
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, declarations: [AXMenuItemComponent, AXMenuComponent], imports: [CommonModule, AXDecoratorModule, AXLoadingModule, AXTranslationModule, OverlayModule, AXPopoverModule, AXButtonModule], exports: [AXMenuItemComponent, AXMenuComponent] }); }
17
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, imports: [CommonModule, MODULES, AXButtonModule] }); }
16
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, declarations: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent], imports: [CommonModule, AXDecoratorModule, AXLoadingModule, AXTranslationModule, OverlayModule, AXPopoverModule], exports: [AXMenuItemComponent, AXMenuComponent, AXContextMenuComponent] }); }
17
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, imports: [CommonModule, MODULES] }); }
18
18
  }
19
19
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, decorators: [{
20
20
  type: NgModule,
21
21
  args: [{
22
22
  declarations: [...COMPONENT],
23
- imports: [CommonModule, ...MODULES, AXButtonModule],
23
+ imports: [CommonModule, ...MODULES],
24
24
  exports: [...COMPONENT],
25
25
  providers: [],
26
26
  }]
27
27
  }] });
28
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvbWVudS9zcmMvbGliL21lbnUubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNsRSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDN0QsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQzdELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLDBCQUEwQixDQUFD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IH0gZnJvbSAnQGFuZ3VsYXIvY2RrL292ZXJsYXknO1xuaW1wb3J0IHsgQ29tbW9uTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29tbW9uJztcbmltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCB7IEFYTWVudUNvbXBvbmVudCB9IGZyb20gJy4vbWVudS5jb21wb25lbnQnO1xuaW1wb3J0IHsgQVhDb250ZXh0TWVudUNvbXBvbmVudCB9IGZyb20gJy4vY29udGV4dC1tZW51LmNvbXBvbmVudCc7XG5pbXBvcnQgeyBBWE1lbnVJdGVtQ29tcG9uZW50IH0gZnJvbSAnLi9tZW51LWl0ZW0uY29tcG9uZW50JztcblxuY29uc3QgQ09NUE9ORU5UID0gW0FYTWVudUl0ZW1Db21wb25lbnQsIEFYTWVudUNvbXBvbmVudCwgQVhDb250ZXh0TWVudUNvbXBvbmVudF07XG5jb25zdCBNT0RVTEVTID0gW0FYRGVjb3JhdG9yTW9kdWxlLCBBWExvYWRpbmdNb2R1bGUsIEFYVHJhbnNsYXRpb25Nb2R1bGUsIE92ZXJsYXlNb2R1bGUsIEFYUG9wb3Zlck1vZHVsZV07XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogWy4uLkNPTVBPTkVOVF0sXG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGUsIC4uLk1PRFVMRVNdLFxuICBleHBvcnRzOiBbLi4uQ09NUE9ORU5UXSxcbiAgcHJvdmlkZXJzOiBbXSxcbn0pXG5leHBvcnQgY2xhc3MgQVhNZW51TW9kdWxlIHsgfVxuIl19
@@ -1,17 +1,19 @@
1
1
  import { Injectable } from '@angular/core';
2
- import { BehaviorSubject } from 'rxjs';
2
+ import { Subject } from 'rxjs';
3
3
  import * as i0 from "@angular/core";
4
4
  export class AXMenuService {
5
5
  constructor() {
6
- this.activeMenus$ = new BehaviorSubject([]);
6
+ this.closeAll$ = new Subject();
7
+ this.open$ = new Subject();
8
+ this.close$ = new Subject();
9
+ this.closeExcept$ = new Subject();
10
+ this.openContextMenu$ = new Subject();
11
+ this.closeAllContextMenu$ = new Subject();
7
12
  }
8
13
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
9
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuService, providedIn: 'root' }); }
14
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuService }); }
10
15
  }
11
16
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuService, decorators: [{
12
- type: Injectable,
13
- args: [{
14
- providedIn: 'root',
15
- }]
17
+ type: Injectable
16
18
  }] });
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL21lbnUvc3JjL2xpYi9tZW51LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sTUFBTSxDQUFDOztBQU12QyxNQUFNLE9BQU8sYUFBYTtJQUgxQjtRQUlFLGlCQUFZLEdBQTJDLElBQUksZUFBZSxDQUF3QixFQUFFLENBQUMsQ0FBQztLQUN2Rzs4R0FGWSxhQUFhO2tIQUFiLGFBQWEsY0FGWixNQUFNOzsyRkFFUCxhQUFhO2tCQUh6QixVQUFVO21CQUFDO29CQUNWLFVBQVUsRU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@ -0,0 +1,22 @@
1
+ import { AXClickEvent, AXEvent } from '@acorex/components/common';
2
+ export class AXRootMenu {
3
+ }
4
+ export class AXMenuItemComponentBase {
5
+ }
6
+ export class AXMenuItem {
7
+ }
8
+ export class AXMenuItemClickEventItemData {
9
+ }
10
+ export class AXMenuItemClickEvent extends AXClickEvent {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.canceled = false;
14
+ }
15
+ }
16
+ export class AXContextMenuOpeningEvent extends AXEvent {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.canceled = false;
20
+ }
21
+ }
22
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS50eXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9tZW51L3NyYy9saWIvbWVudS50eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE9BQU8sRUFBb0QsTUFBTSwyQkFBMkIsQ0FBQztBQU9wSCxNQUFNLE9BQWdCLFVBQVU7Q0FNL0I7QUFFRCxNQUFNLE9BQWdCLHVCQUF1QjtDQUM1QztBQUdELE1BQU0sT0FBZ0IsVUFBVTtDQWdCL0I7QUFFRCxNQUFNLE9BQWdCLDRCQUE0QjtDQUlqRDtBQUVELE1BQU0sT0FBTyxvQkFBcUIsU0FBUSxZQUFZO0lBQXREOztRQUVFLGFBQVEsR0FBRyxLQUFLLENBQUM7SUFDbkIsQ0FBQztDQUFBO0FBRUQsTUFBTSxPQUFPLHlCQUEwQixTQUFRLE9BQU87SUFBdEQ7O1FBRUUsYUFBUSxHQUFHLEtBQUssQ0FBQztJQUNuQixDQUFDO0NBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBWENsaWNrRXZlbnQsIEFYRXZlbnQsIEFYT3JpZW50YXRpb24sIEFY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