@acorex/components 18.11.0 → 18.11.1
Sign up to get free protection for your applications and to get access to all the features.
- package/action-sheet/lib/action-sheet.class.d.ts +8 -0
- package/common/index.d.ts +1 -0
- package/common/lib/types/base/component.types.d.ts +8 -0
- package/common/lib/types/base/events.types.d.ts +21 -0
- package/common/lib/types/base/index.d.ts +2 -0
- package/esm2022/action-sheet/lib/action-sheet.class.mjs +1 -1
- package/esm2022/action-sheet/lib/action-sheet.component.mjs +3 -3
- package/esm2022/common/index.mjs +2 -1
- package/esm2022/common/lib/components/base-component.class.mjs +1 -1
- package/esm2022/common/lib/types/base/component.types.mjs +27 -0
- package/esm2022/common/lib/types/base/events.types.mjs +19 -0
- package/esm2022/common/lib/types/base/index.mjs +3 -0
- package/esm2022/menu/lib/context-menu.component.mjs +101 -50
- package/esm2022/menu/lib/menu-item.component.mjs +23 -24
- package/esm2022/menu/lib/menu.component.mjs +6 -6
- package/esm2022/menu/lib/menu.types.mjs +3 -11
- package/fesm2022/acorex-components-action-sheet.mjs +2 -2
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +47 -3
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +128 -86
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/menu/lib/context-menu.component.d.ts +27 -16
- package/menu/lib/menu-item.component.d.ts +6 -6
- package/menu/lib/menu.component.d.ts +5 -4
- package/menu/lib/menu.types.d.ts +9 -14
- package/package.json +29 -29
@@ -1,9 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { NXClickEvent, NXComponent, NXEvent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { Injectable, signal, inject, computed, output, input, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, HostListener, HostBinding, NgModule } from '@angular/core';
|
3
|
+
import { Injectable, signal, inject, Renderer2, computed, output, input, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, HostListener, HostBinding, NgModule } from '@angular/core';
|
4
4
|
import { Subject } from 'rxjs';
|
5
5
|
import { AXUnsubscriber, AXHtmlUtil } from '@acorex/core/utils';
|
6
6
|
import { cloneDeep } from 'lodash-es';
|
7
|
+
import { isBrowser } from '@acorex/core/platform';
|
7
8
|
import * as i1 from '@angular/common';
|
8
9
|
import { CommonModule } from '@angular/common';
|
9
10
|
import * as i2 from '@acorex/components/decorators';
|
@@ -19,15 +20,7 @@ class AXMenuItemComponentBase {
|
|
19
20
|
}
|
20
21
|
class AXMenuItem {
|
21
22
|
}
|
22
|
-
class
|
23
|
-
}
|
24
|
-
class AXMenuItemClickEvent extends AXClickEvent {
|
25
|
-
constructor() {
|
26
|
-
super(...arguments);
|
27
|
-
this.canceled = false;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
class AXContextMenuOpeningEvent extends AXEvent {
|
23
|
+
class AXMenuItemClickBaseEvent extends NXClickEvent {
|
31
24
|
constructor() {
|
32
25
|
super(...arguments);
|
33
26
|
this.canceled = false;
|
@@ -54,10 +47,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
54
47
|
* Represents a menu item component used within an `ax-menu`.
|
55
48
|
* @category Components
|
56
49
|
*/
|
57
|
-
class AXMenuItemComponent extends
|
58
|
-
constructor(
|
50
|
+
class AXMenuItemComponent extends NXComponent {
|
51
|
+
constructor() {
|
59
52
|
super();
|
60
|
-
this.renderer = renderer;
|
61
53
|
this.isOpen = signal(false);
|
62
54
|
this.hasSubItems = signal(false);
|
63
55
|
this.isFirstLevel = signal(false);
|
@@ -65,8 +57,9 @@ class AXMenuItemComponent extends MXBaseComponent {
|
|
65
57
|
this.service = inject(AXMenuService);
|
66
58
|
this.scrollableParents = [];
|
67
59
|
this.unsuscriber = inject(AXUnsubscriber);
|
60
|
+
this.renderer = inject(Renderer2);
|
68
61
|
this.arrowIcon = computed(() => {
|
69
|
-
const isRtl = AXHtmlUtil.isRtl(this.
|
62
|
+
const isRtl = AXHtmlUtil.isRtl(this.nativeElement);
|
70
63
|
return this.root.orientation() == 'horizontal' && this.isFirstLevel() ?
|
71
64
|
"ax-icon-chevron-down" :
|
72
65
|
isRtl ? "ax-icon-chevron-left" : "ax-icon-chevron-right";
|
@@ -127,25 +120,25 @@ class AXMenuItemComponent extends MXBaseComponent {
|
|
127
120
|
this.detectSubItems();
|
128
121
|
});
|
129
122
|
// Start observing changes in child elements
|
130
|
-
this.mutationObserver.observe(this.
|
123
|
+
this.mutationObserver.observe(this.nativeElement, {
|
131
124
|
childList: true,
|
132
125
|
subtree: true,
|
133
126
|
});
|
134
127
|
}
|
135
128
|
getText() {
|
136
|
-
return this.
|
129
|
+
return this.nativeElement.querySelector('ax-text')?.innerText;
|
137
130
|
}
|
138
131
|
/**
|
139
132
|
* Manually detect all `ax-menu-item` elements and check if this menu item has sub-items.
|
140
133
|
*/
|
141
134
|
detectSubItems() {
|
142
135
|
//
|
143
|
-
const parentEl = this.
|
136
|
+
const parentEl = this.nativeElement.parentElement?.parentElement;
|
144
137
|
this.parent = parentEl?.tagName == "AX-MENU-ITEM" ? parentEl?.["__axContext__"] : null;
|
145
138
|
//
|
146
|
-
const tag = this.
|
139
|
+
const tag = this.nativeElement.parentElement?.tagName;
|
147
140
|
this.isFirstLevel.set(tag == "AX-MENU" || tag == "AX-CONTEXT-MENU");
|
148
|
-
const subItems = this.
|
141
|
+
const subItems = this.nativeElement.querySelectorAll('ax-menu-item');
|
149
142
|
if (subItems.length > 0) {
|
150
143
|
this.hasSubItems.set(true);
|
151
144
|
}
|
@@ -166,14 +159,14 @@ class AXMenuItemComponent extends MXBaseComponent {
|
|
166
159
|
* Calculate the position of the submenu to avoid it going out of the viewport.
|
167
160
|
*/
|
168
161
|
calculatePosition() {
|
169
|
-
const submenu = this.
|
162
|
+
const submenu = this.nativeElement.querySelector('.ax-menu-items');
|
170
163
|
if (!submenu)
|
171
164
|
return;
|
172
165
|
const submenuRect = submenu.getBoundingClientRect();
|
173
|
-
const itemRect = this.
|
166
|
+
const itemRect = this.nativeElement.getBoundingClientRect();
|
174
167
|
const windowWidth = window.innerWidth;
|
175
168
|
const windowHeight = window.innerHeight;
|
176
|
-
const isRtl = AXHtmlUtil.isRtl(this.
|
169
|
+
const isRtl = AXHtmlUtil.isRtl(this.nativeElement);
|
177
170
|
let top = null;
|
178
171
|
let left = null;
|
179
172
|
// For first-level menu items
|
@@ -224,8 +217,7 @@ class AXMenuItemComponent extends MXBaseComponent {
|
|
224
217
|
return;
|
225
218
|
//
|
226
219
|
const event = {
|
227
|
-
|
228
|
-
htmlElement: this.getHostElement(),
|
220
|
+
sender: this,
|
229
221
|
nativeEvent: e,
|
230
222
|
canceled: false,
|
231
223
|
item: {
|
@@ -236,7 +228,7 @@ class AXMenuItemComponent extends MXBaseComponent {
|
|
236
228
|
};
|
237
229
|
//
|
238
230
|
this.onClick.emit(event);
|
239
|
-
this.root.onItemClick.emit(event);
|
231
|
+
this.root.onItemClick.emit({ ...event, ...{ sender: this.root } });
|
240
232
|
//
|
241
233
|
if (this.hasSubItems() && !event.canceled) {
|
242
234
|
this.open();
|
@@ -277,7 +269,7 @@ class AXMenuItemComponent extends MXBaseComponent {
|
|
277
269
|
* Close all menus if clicking outside the root menu and all sub-items.
|
278
270
|
*/
|
279
271
|
onClickOutside(event) {
|
280
|
-
const hostElement = this.root.
|
272
|
+
const hostElement = this.root.nativeElement;
|
281
273
|
if (!hostElement.contains(event.target)) {
|
282
274
|
this.service.closeAll$.next(); // Close all menus if click is outside the root and sub-items
|
283
275
|
}
|
@@ -286,7 +278,7 @@ class AXMenuItemComponent extends MXBaseComponent {
|
|
286
278
|
this.removeScrollEvents();
|
287
279
|
}
|
288
280
|
bindScrollEvents() {
|
289
|
-
this.scrollableParents = AXHtmlUtil.getScrollableParents(this.
|
281
|
+
this.scrollableParents = AXHtmlUtil.getScrollableParents(this.nativeElement);
|
290
282
|
this.scrollableParents.forEach((parent) => {
|
291
283
|
parent.addEventListener('scroll', this.onContainerScroll.bind(this));
|
292
284
|
});
|
@@ -305,7 +297,7 @@ class AXMenuItemComponent extends MXBaseComponent {
|
|
305
297
|
}
|
306
298
|
/** @ignore */
|
307
299
|
get __hostClass() {
|
308
|
-
const list = ['ax-el-interactive'];
|
300
|
+
const list = ['ax-el-interactive', 'ax-action-item'];
|
309
301
|
if (this.disabled()) {
|
310
302
|
list.push('ax-state-disabled');
|
311
303
|
}
|
@@ -314,14 +306,14 @@ class AXMenuItemComponent extends MXBaseComponent {
|
|
314
306
|
}
|
315
307
|
return list;
|
316
308
|
}
|
317
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuItemComponent, deps: [
|
309
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
318
310
|
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: [
|
319
311
|
{
|
320
312
|
provide: AXMenuItemComponentBase,
|
321
313
|
useExisting: AXMenuItemComponent
|
322
314
|
},
|
323
315
|
AXUnsubscriber
|
324
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-
|
316
|
+
], 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()) {\n <i class=\"ax-icon ax-icon-solid {{ arrowIcon() }} ax-menu-item-child-icon\"></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,ng-container\"></ng-content>\n</div>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
325
317
|
}
|
326
318
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuItemComponent, decorators: [{
|
327
319
|
type: Component,
|
@@ -331,8 +323,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
331
323
|
useExisting: AXMenuItemComponent
|
332
324
|
},
|
333
325
|
AXUnsubscriber
|
334
|
-
], template: "<div class=\"ax-
|
335
|
-
}], ctorParameters: () => [
|
326
|
+
], 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()) {\n <i class=\"ax-icon ax-icon-solid {{ arrowIcon() }} ax-menu-item-child-icon\"></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,ng-container\"></ng-content>\n</div>" }]
|
327
|
+
}], ctorParameters: () => [], propDecorators: { handleClick: [{
|
336
328
|
type: HostListener,
|
337
329
|
args: ["click", ['$event']]
|
338
330
|
}], handleMouseEnter: [{
|
@@ -355,16 +347,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
355
347
|
args: ['class']
|
356
348
|
}] } });
|
357
349
|
|
350
|
+
class AXContextMenuOpeningEvent extends NXEvent {
|
351
|
+
constructor() {
|
352
|
+
super(...arguments);
|
353
|
+
this.canceled = false;
|
354
|
+
}
|
355
|
+
}
|
358
356
|
/**
|
359
357
|
* Represents a menu component that displays context menu.
|
360
358
|
* @category Components
|
361
359
|
*/
|
362
|
-
class AXContextMenuComponent extends
|
360
|
+
class AXContextMenuComponent extends NXComponent {
|
363
361
|
// Constructor (Dependency Injection)
|
364
362
|
/** @ignore */
|
365
|
-
constructor(
|
363
|
+
constructor() {
|
366
364
|
super();
|
367
|
-
this.renderer = renderer;
|
368
365
|
// Inputs and Outputs
|
369
366
|
this.orientation = input('vertical');
|
370
367
|
this.openOn = input('hover');
|
@@ -375,14 +372,11 @@ class AXContextMenuComponent extends MXBaseComponent {
|
|
375
372
|
this.onOpening = output();
|
376
373
|
// Injected Services
|
377
374
|
this.service = inject(AXMenuService);
|
378
|
-
|
379
|
-
this.scrollableParents = [];
|
375
|
+
this.renderer = inject(Renderer2);
|
380
376
|
this.items = signal([]);
|
377
|
+
//
|
381
378
|
afterNextRender(() => {
|
382
|
-
|
383
|
-
this.target().addEventListener('contextmenu', this.handleContextMenu.bind(this));
|
384
|
-
}
|
385
|
-
this.bindScrollEvents();
|
379
|
+
this.bindContextEvent();
|
386
380
|
});
|
387
381
|
this.service.closeAllContextMenu$.subscribe(() => {
|
388
382
|
this.service.closeAll$.next();
|
@@ -396,7 +390,9 @@ class AXContextMenuComponent extends MXBaseComponent {
|
|
396
390
|
}
|
397
391
|
// Lifecycle Hooks
|
398
392
|
ngOnDestroy() {
|
399
|
-
|
393
|
+
if (isBrowser()) {
|
394
|
+
this.removeContextEvent();
|
395
|
+
}
|
400
396
|
}
|
401
397
|
// Public Methods
|
402
398
|
showAt(point) {
|
@@ -405,20 +401,44 @@ class AXContextMenuComponent extends MXBaseComponent {
|
|
405
401
|
this.service.openContextMenu$.next({ sender, point });
|
406
402
|
}
|
407
403
|
close() {
|
408
|
-
|
409
|
-
|
404
|
+
this.nativeElement.classList.remove('ax-state-open');
|
405
|
+
this.removeBackdrop();
|
410
406
|
}
|
411
407
|
// Private Methods (Internal Logic)
|
412
408
|
/** @ignore */
|
409
|
+
getTargetElements() {
|
410
|
+
const elements = typeof this.target() == 'string' ?
|
411
|
+
Array.from(document.querySelectorAll(this.target())) :
|
412
|
+
Array.isArray(this.target()) ?
|
413
|
+
this.target() :
|
414
|
+
[this.target()];
|
415
|
+
return elements;
|
416
|
+
}
|
417
|
+
/** @ignore */
|
418
|
+
bindContextEvent() {
|
419
|
+
this.getTargetElements().forEach((e) => {
|
420
|
+
e.addEventListener('contextmenu', this.handleContextMenu.bind(this));
|
421
|
+
});
|
422
|
+
}
|
423
|
+
/** @ignore */
|
424
|
+
removeContextEvent() {
|
425
|
+
this.getTargetElements().forEach((e) => {
|
426
|
+
e.removeEventListener('contextmenu', this.handleContextMenu.bind(this));
|
427
|
+
});
|
428
|
+
}
|
429
|
+
/** @ignore */
|
413
430
|
handleContextMenu(e) {
|
414
431
|
e.preventDefault();
|
415
432
|
e.stopPropagation();
|
416
433
|
//
|
434
|
+
const elementsUnderMouse = document.elementsFromPoint(e.x, e.y);
|
435
|
+
const targetElements = this.getTargetElements();
|
436
|
+
const targetElement = targetElements.find(target => elementsUnderMouse.includes(target));
|
437
|
+
//
|
417
438
|
const event = {
|
418
|
-
|
419
|
-
htmlElement: this.getHostElement(),
|
420
|
-
nativeEvent: e,
|
439
|
+
sender: this,
|
421
440
|
canceled: false,
|
441
|
+
targetElement: targetElement,
|
422
442
|
items: cloneDeep(this.orginalItems()),
|
423
443
|
};
|
424
444
|
this.onOpening.emit(event);
|
@@ -428,14 +448,15 @@ class AXContextMenuComponent extends MXBaseComponent {
|
|
428
448
|
this.showAt({ x: e.clientX, y: e.clientY });
|
429
449
|
}
|
430
450
|
}
|
451
|
+
/** @ignore */
|
431
452
|
internalShowAt(point) {
|
432
|
-
const elementRef = this.
|
453
|
+
const elementRef = this.nativeElement;
|
433
454
|
elementRef.classList.add('ax-state-open');
|
434
455
|
const itemRect = elementRef.getBoundingClientRect();
|
435
456
|
const windowWidth = window.innerWidth;
|
436
457
|
const windowHeight = window.innerHeight;
|
437
458
|
// Detect RTL (Right-To-Left) mode
|
438
|
-
const isRtl = AXHtmlUtil.isRtl(
|
459
|
+
const isRtl = AXHtmlUtil.isRtl(elementRef);
|
439
460
|
let left;
|
440
461
|
if (isRtl) {
|
441
462
|
left = point.x - itemRect.width;
|
@@ -463,48 +484,69 @@ class AXContextMenuComponent extends MXBaseComponent {
|
|
463
484
|
this.renderer.setStyle(elementRef, 'left', `${left}px`);
|
464
485
|
this.renderer.setStyle(elementRef, 'top', `${top}px`);
|
465
486
|
this.renderer.setStyle(elementRef, 'position', 'fixed');
|
487
|
+
this.createBackdrop();
|
466
488
|
}
|
467
|
-
|
468
|
-
|
469
|
-
this.
|
470
|
-
|
489
|
+
/** @ignore */
|
490
|
+
createBackdrop() {
|
491
|
+
this.backdropElement = this.renderer.createElement('div');
|
492
|
+
this.renderer.setStyle(this.backdropElement, 'position', 'fixed');
|
493
|
+
this.renderer.setStyle(this.backdropElement, 'top', '0');
|
494
|
+
this.renderer.setStyle(this.backdropElement, 'left', '0');
|
495
|
+
this.renderer.setStyle(this.backdropElement, 'width', '100%');
|
496
|
+
this.renderer.setStyle(this.backdropElement, 'height', '100%');
|
497
|
+
this.renderer.setStyle(this.backdropElement, 'z-index', '999'); // Ensure it's below the context menu
|
498
|
+
this.renderer.setStyle(this.backdropElement, 'background', 'transparent');
|
499
|
+
const l1 = this.renderer.listen(this.backdropElement, 'click', () => {
|
500
|
+
this.close();
|
501
|
+
l1();
|
471
502
|
});
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
parent.removeEventListener('scroll', this.onContainerScroll.bind(this));
|
503
|
+
const l2 = this.renderer.listen(this.backdropElement, 'wheel', () => {
|
504
|
+
this.close();
|
505
|
+
l2();
|
476
506
|
});
|
507
|
+
const l3 = this.renderer.listen(this.backdropElement, 'contextmenu', (e) => {
|
508
|
+
this.close();
|
509
|
+
// Get all elements under the mouse pointer
|
510
|
+
const elementsUnderMouse = document.elementsFromPoint(e.x, e.y);
|
511
|
+
const targetElements = this.getTargetElements();
|
512
|
+
if (targetElements.some(target => elementsUnderMouse.includes(target))) {
|
513
|
+
e.preventDefault();
|
514
|
+
setTimeout(() => {
|
515
|
+
//this.internalShowAt({ x: e.x, y: e.y });
|
516
|
+
this.handleContextMenu(e);
|
517
|
+
});
|
518
|
+
}
|
519
|
+
l3();
|
520
|
+
});
|
521
|
+
document.body.appendChild(this.backdropElement);
|
477
522
|
}
|
478
|
-
onContainerScroll() {
|
479
|
-
this.service.closeAllContextMenu$.next({ sender: this });
|
480
|
-
}
|
481
|
-
// Host Listeners (UI Interaction Handling)
|
482
523
|
/** @ignore */
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
524
|
+
removeBackdrop() {
|
525
|
+
if (this.backdropElement) {
|
526
|
+
if (this.backdropElement.parentNode) {
|
527
|
+
this.backdropElement.parentNode.removeChild(this.backdropElement);
|
528
|
+
}
|
529
|
+
this.backdropElement = null;
|
488
530
|
}
|
489
531
|
}
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
}
|
532
|
+
// Host Listeners (UI Interaction Handling)
|
533
|
+
/** @ignore */
|
534
|
+
onWindowEvent() {
|
535
|
+
const sender = this;
|
536
|
+
this.service.closeAllContextMenu$.next({ sender: sender }); // Close all menus on scroll or resize
|
495
537
|
}
|
496
538
|
/** @ignore */
|
497
539
|
get __hostClass() {
|
498
|
-
return ['ax-menu-container', `ax-orientation-${this.orientation()}
|
540
|
+
return ['ax-menu-container', `ax-orientation-${this.orientation()}`, 'ax-action-list', 'ax-action-list-vertical'];
|
499
541
|
}
|
500
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXContextMenuComponent, deps: [
|
501
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXContextMenuComponent, 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 }, orginalItems: { classPropertyName: "orginalItems", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onItemClick: "onItemClick", onOpening: "onOpening" }, host: { listeners: { "
|
542
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
543
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXContextMenuComponent, 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 }, orginalItems: { classPropertyName: "orginalItems", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onItemClick: "onItemClick", onOpening: "onOpening" }, host: { listeners: { "window:scroll": "onWindowEvent($event)", "window:resize": "onWindowEvent($event)" }, properties: { "class": "this.__hostClass" } }, providers: [
|
502
544
|
AXMenuService,
|
503
545
|
{
|
504
546
|
provide: AXRootMenu,
|
505
547
|
useExisting: AXContextMenuComponent
|
506
548
|
}
|
507
|
-
], 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.
|
549
|
+
], 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.items\" [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-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-action-list-horizontal{padding-inline:1rem}ax-menu.ax-action-list-horizontal{min-width:12rem;gap:.875rem}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){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover{background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover>.ax-action-item-prefix{color:rgba(var(--ax-color-primary-500))}ax-menu.ax-action-list-horizontal>ax-menu-item:hover>.ax-action-item-suffix{color:rgba(var(--ax-color-primary-500))}ax-menu.ax-action-list-vertical{width:max-content;min-width:12rem}ax-menu.ax-action-list-vertical>ax-menu-item{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: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["name", "data", "disabled", "color"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
508
550
|
}
|
509
551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXContextMenuComponent, decorators: [{
|
510
552
|
type: Component,
|
@@ -514,13 +556,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
514
556
|
provide: AXRootMenu,
|
515
557
|
useExisting: AXContextMenuComponent
|
516
558
|
}
|
517
|
-
], 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.
|
518
|
-
}], ctorParameters: () => [
|
559
|
+
], 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.items\" [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-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-action-list-horizontal{padding-inline:1rem}ax-menu.ax-action-list-horizontal{min-width:12rem;gap:.875rem}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){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover{background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover>.ax-action-item-prefix{color:rgba(var(--ax-color-primary-500))}ax-menu.ax-action-list-horizontal>ax-menu-item:hover>.ax-action-item-suffix{color:rgba(var(--ax-color-primary-500))}ax-menu.ax-action-list-vertical{width:max-content;min-width:12rem}ax-menu.ax-action-list-vertical>ax-menu-item{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"] }]
|
560
|
+
}], ctorParameters: () => [], propDecorators: { onWindowEvent: [{
|
519
561
|
type: HostListener,
|
520
|
-
args: ['
|
521
|
-
}
|
562
|
+
args: ['window:scroll', ['$event']]
|
563
|
+
}, {
|
522
564
|
type: HostListener,
|
523
|
-
args: ['
|
565
|
+
args: ['window:resize', ['$event']]
|
524
566
|
}], __hostClass: [{
|
525
567
|
type: HostBinding,
|
526
568
|
args: ['class']
|
@@ -530,7 +572,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
530
572
|
* Represents a menu component that displays menu items.
|
531
573
|
* @category Components
|
532
574
|
*/
|
533
|
-
class AXMenuComponent extends
|
575
|
+
class AXMenuComponent extends NXComponent {
|
534
576
|
constructor() {
|
535
577
|
super(...arguments);
|
536
578
|
this.orientation = input('horizontal');
|
@@ -542,7 +584,7 @@ class AXMenuComponent extends MXBaseComponent {
|
|
542
584
|
}
|
543
585
|
/** @ignore */
|
544
586
|
get __hostClass() {
|
545
|
-
return `ax-
|
587
|
+
return `ax-action-list-${this.orientation()} ax-action-list`;
|
546
588
|
}
|
547
589
|
close() {
|
548
590
|
this.service.closeAll$.next();
|
@@ -554,7 +596,7 @@ class AXMenuComponent extends MXBaseComponent {
|
|
554
596
|
provide: AXRootMenu,
|
555
597
|
useExisting: AXMenuComponent
|
556
598
|
}
|
557
|
-
], 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.
|
599
|
+
], 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.items\" [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-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-action-list-horizontal{padding-inline:1rem}ax-menu.ax-action-list-horizontal{min-width:12rem;gap:.875rem}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){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover{background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover>.ax-action-item-prefix{color:rgba(var(--ax-color-primary-500))}ax-menu.ax-action-list-horizontal>ax-menu-item:hover>.ax-action-item-suffix{color:rgba(var(--ax-color-primary-500))}ax-menu.ax-action-list-vertical{width:max-content;min-width:12rem}ax-menu.ax-action-list-vertical>ax-menu-item{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: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["name", "data", "disabled", "color"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
558
600
|
}
|
559
601
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuComponent, decorators: [{
|
560
602
|
type: Component,
|
@@ -564,7 +606,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
564
606
|
provide: AXRootMenu,
|
565
607
|
useExisting: AXMenuComponent
|
566
608
|
}
|
567
|
-
], 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.
|
609
|
+
], 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.items\" [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-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-action-list-horizontal{padding-inline:1rem}ax-menu.ax-action-list-horizontal{min-width:12rem;gap:.875rem}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){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover{background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover>.ax-action-item-prefix{color:rgba(var(--ax-color-primary-500))}ax-menu.ax-action-list-horizontal>ax-menu-item:hover>.ax-action-item-suffix{color:rgba(var(--ax-color-primary-500))}ax-menu.ax-action-list-vertical{width:max-content;min-width:12rem}ax-menu.ax-action-list-vertical>ax-menu-item{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"] }]
|
568
610
|
}], propDecorators: { __hostClass: [{
|
569
611
|
type: HostBinding,
|
570
612
|
args: ['class']
|
@@ -591,5 +633,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
591
633
|
* Generated bundle index. Do not edit.
|
592
634
|
*/
|
593
635
|
|
594
|
-
export { AXContextMenuComponent, AXContextMenuOpeningEvent, AXMenuComponent, AXMenuItem,
|
636
|
+
export { AXContextMenuComponent, AXContextMenuOpeningEvent, AXMenuComponent, AXMenuItem, AXMenuItemClickBaseEvent, AXMenuItemComponent, AXMenuItemComponentBase, AXMenuModule, AXMenuService, AXRootMenu };
|
595
637
|
//# sourceMappingURL=acorex-components-menu.mjs.map
|