@acorex/components 22.0.0-next.9 → 22.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/combo-box/README.md +31 -0
- package/fesm2022/acorex-components-action-sheet.mjs +1 -0
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +2 -2
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +10 -12
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-combo-box.mjs +460 -0
- package/fesm2022/acorex-components-combo-box.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs +50 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs.map +1 -0
- package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs → acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs} +2 -2
- package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs.map → acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs.map} +1 -1
- package/fesm2022/acorex-components-conversation.mjs +2034 -7467
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +135 -45
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +14 -16
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +61 -32
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +19 -3
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +7 -4
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +2 -2
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +4 -4
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-fab.mjs +2 -2
- package/fesm2022/acorex-components-fab.mjs.map +1 -1
- package/fesm2022/acorex-components-file-viewer.mjs +27 -27
- package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +238 -36
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +2 -2
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-lookup.mjs +1839 -0
- package/fesm2022/acorex-components-lookup.mjs.map +1 -0
- package/fesm2022/acorex-components-map.mjs +2 -2
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +231 -74
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +9 -2
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +30 -29
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +1 -1
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +7 -6
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +4 -2
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +12 -22
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +15 -4
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +2 -2
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +2 -2
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +9 -2
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +2 -2
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/lookup/README.md +52 -0
- package/package.json +11 -3
- package/select-box/README.md +5 -0
- package/types/acorex-components-action-sheet.d.ts +9 -1
- package/types/acorex-components-combo-box.d.ts +204 -0
- package/types/acorex-components-conversation.d.ts +317 -94
- package/types/acorex-components-data-table.d.ts +35 -3
- package/types/acorex-components-datetime-box.d.ts +2 -0
- package/types/acorex-components-datetime-input.d.ts +24 -5
- package/types/acorex-components-decorators.d.ts +1 -0
- package/types/acorex-components-dialog.d.ts +9 -0
- package/types/acorex-components-grid-layout-builder.d.ts +34 -2
- package/types/acorex-components-lookup.d.ts +624 -0
- package/types/acorex-components-menu.d.ts +28 -4
- package/types/acorex-components-notification.d.ts +11 -1
- package/types/acorex-components-number-box.d.ts +3 -1
- package/types/acorex-components-popover.d.ts +4 -1
- package/types/acorex-components-popup.d.ts +9 -1
- package/types/acorex-components-scheduler.d.ts +2 -4
- package/types/acorex-components-select-box.d.ts +8 -2
- package/types/acorex-components-toast.d.ts +10 -1
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs +0 -106
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NXClickEvent, NXComponent, AXComponent, NXEvent } from '@acorex/cdk/common';
|
|
2
|
+
import { resolveVisualContext, applyVisualContext } from '@acorex/cdk/overlay';
|
|
2
3
|
import { AXDecoratorGenericComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';
|
|
3
4
|
import { isBrowser } from '@acorex/core/platform';
|
|
4
5
|
import { AXTranslatorPipe } from '@acorex/core/translation';
|
|
@@ -105,6 +106,16 @@ class AXMenuItemClickBaseEvent extends NXClickEvent {
|
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
|
|
109
|
+
/** Edge padding when clamping floating menu panels to the viewport. */
|
|
110
|
+
const AX_MENU_VIEWPORT_MARGIN = 8;
|
|
111
|
+
/** Limits a fixed menu panel so it stays within the viewport below `top`. */
|
|
112
|
+
function axFitMenuPanelHeight(renderer, el, top) {
|
|
113
|
+
renderer.setStyle(el, 'max-height', `${Math.max(0, window.innerHeight - top - AX_MENU_VIEWPORT_MARGIN)}px`);
|
|
114
|
+
}
|
|
115
|
+
function axClearMenuPanelHeight(renderer, el) {
|
|
116
|
+
renderer.removeStyle(el, 'max-height');
|
|
117
|
+
}
|
|
118
|
+
|
|
108
119
|
/**
|
|
109
120
|
* Represents a menu item component used within an `ax-menu`.
|
|
110
121
|
* @category Components
|
|
@@ -139,8 +150,16 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
139
150
|
this.unsuscriber = inject(AXUnsubscriber);
|
|
140
151
|
this.renderer = inject(Renderer2);
|
|
141
152
|
this.injector = inject(Injector);
|
|
153
|
+
this.document = inject(DOCUMENT);
|
|
142
154
|
this.zIndexService = inject(AXZIndexService);
|
|
143
155
|
this.zToken = null;
|
|
156
|
+
this.submenuPortalParent = null;
|
|
157
|
+
this.submenuPortalNextSibling = null;
|
|
158
|
+
/** Survives submenu portaling when the DOM parent chain is broken. */
|
|
159
|
+
this.linkedParent = null;
|
|
160
|
+
this.mouseLeaveTimeout = null;
|
|
161
|
+
this.submenuUnlistenEnter = null;
|
|
162
|
+
this.submenuUnlistenLeave = null;
|
|
144
163
|
this.arrowIcon = computed(() => {
|
|
145
164
|
const isRtl = AXHtmlUtil.isRtl(this.nativeElement);
|
|
146
165
|
return this.root.orientation() == 'horizontal' && this.isFirstLevel()
|
|
@@ -159,12 +178,12 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
159
178
|
...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
160
179
|
this.color = input(/* @ts-ignore */
|
|
161
180
|
...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
162
|
-
this.mouseLeaveTimeout = null;
|
|
163
181
|
afterNextRender(() => {
|
|
164
182
|
if (!isPlatformBrowser(this.platformId)) {
|
|
165
183
|
return;
|
|
166
184
|
}
|
|
167
185
|
this.reparentOrphanedChildren();
|
|
186
|
+
this.linkChildItems();
|
|
168
187
|
this.updateDiscoveredSubmenuNodeCount();
|
|
169
188
|
this.childObserver = new MutationObserver((records) => {
|
|
170
189
|
if (!this.hasRelevantChildMutation(records)) {
|
|
@@ -185,6 +204,10 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
185
204
|
this.service.close$.pipe(this.unsuscriber.takeUntilDestroy).subscribe((item) => {
|
|
186
205
|
if (this == item) {
|
|
187
206
|
this.isOpen.set(false);
|
|
207
|
+
this.clearCloseTimeout();
|
|
208
|
+
this.restoreSubmenuPortal();
|
|
209
|
+
this.zIndexService.release(this.zToken);
|
|
210
|
+
this.zToken = null;
|
|
188
211
|
}
|
|
189
212
|
});
|
|
190
213
|
}
|
|
@@ -192,10 +215,13 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
192
215
|
return this.nativeElement.querySelector('ax-text')?.innerText;
|
|
193
216
|
}
|
|
194
217
|
/**
|
|
195
|
-
* Resolves the parent menu item.
|
|
196
|
-
*
|
|
218
|
+
* Resolves the parent menu item. Prefers an explicit link (survives submenu portaling),
|
|
219
|
+
* then DI, then the DOM tree.
|
|
197
220
|
*/
|
|
198
221
|
getParentMenuItem() {
|
|
222
|
+
if (this.linkedParent) {
|
|
223
|
+
return this.linkedParent;
|
|
224
|
+
}
|
|
199
225
|
if (this.parent) {
|
|
200
226
|
return this.parent;
|
|
201
227
|
}
|
|
@@ -203,8 +229,7 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
203
229
|
if (!parentHost || parentHost === this.nativeElement) {
|
|
204
230
|
return null;
|
|
205
231
|
}
|
|
206
|
-
|
|
207
|
-
return ctx instanceof AXMenuItemComponent ? ctx : null;
|
|
232
|
+
return this.getInstanceFromElement(parentHost) ?? null;
|
|
208
233
|
}
|
|
209
234
|
/**
|
|
210
235
|
* Opens the submenu of this menu item if it has sub-items and is not disabled.
|
|
@@ -214,7 +239,13 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
214
239
|
return;
|
|
215
240
|
}
|
|
216
241
|
this.reparentOrphanedChildren();
|
|
242
|
+
this.linkChildItems();
|
|
217
243
|
this.service.closeExcept(this);
|
|
244
|
+
const submenu = this.submenuSlot()?.nativeElement;
|
|
245
|
+
if (submenu) {
|
|
246
|
+
// Portal before `isOpen` so ancestor overflow cannot clip the first paint.
|
|
247
|
+
this.portalSubmenu(submenu);
|
|
248
|
+
}
|
|
218
249
|
if (!this.zToken) {
|
|
219
250
|
this.zToken = this.zIndexService.acquire();
|
|
220
251
|
}
|
|
@@ -224,9 +255,8 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
224
255
|
* Closes the submenu of this menu item if open.
|
|
225
256
|
*/
|
|
226
257
|
close() {
|
|
258
|
+
this.clearCloseTimeout();
|
|
227
259
|
this.service.markClosed(this);
|
|
228
|
-
this.zIndexService.release(this.zToken);
|
|
229
|
-
this.zToken = null;
|
|
230
260
|
}
|
|
231
261
|
/**
|
|
232
262
|
* Positions the submenu after layout so nested levels measure their full height.
|
|
@@ -245,30 +275,35 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
245
275
|
}
|
|
246
276
|
/**
|
|
247
277
|
* Calculate the position of the submenu to avoid it going out of the viewport.
|
|
278
|
+
* Tall panels are height-clamped; the panel is portaled so parent overflow cannot clip it.
|
|
248
279
|
*/
|
|
249
280
|
calculatePosition() {
|
|
250
281
|
const submenu = this.submenuSlot()?.nativeElement;
|
|
251
282
|
if (!submenu)
|
|
252
283
|
return;
|
|
284
|
+
this.portalSubmenu(submenu);
|
|
285
|
+
axClearMenuPanelHeight(this.renderer, submenu);
|
|
253
286
|
const submenuRect = this.measureSubmenuRect(submenu);
|
|
254
287
|
const itemRect = this.nativeElement.getBoundingClientRect();
|
|
255
288
|
const windowWidth = window.innerWidth;
|
|
256
289
|
const windowHeight = window.innerHeight;
|
|
290
|
+
const margin = AX_MENU_VIEWPORT_MARGIN;
|
|
257
291
|
const isRtl = AXHtmlUtil.isRtl(this.nativeElement);
|
|
292
|
+
const effectiveHeight = Math.min(submenuRect.height, Math.max(0, windowHeight - margin * 2));
|
|
258
293
|
let finalTop;
|
|
259
294
|
let finalLeft;
|
|
260
295
|
const preferredTop = this.isFirstLevel() && this.root.orientation() === 'horizontal' ? itemRect.bottom : itemRect.top;
|
|
261
|
-
const alternateTop = itemRect.top -
|
|
262
|
-
if (preferredTop +
|
|
296
|
+
const alternateTop = itemRect.top - effectiveHeight;
|
|
297
|
+
if (preferredTop + effectiveHeight <= windowHeight - margin) {
|
|
263
298
|
finalTop = preferredTop;
|
|
264
299
|
}
|
|
265
|
-
else if (alternateTop >=
|
|
300
|
+
else if (alternateTop >= margin) {
|
|
266
301
|
finalTop = alternateTop;
|
|
267
302
|
}
|
|
268
303
|
else {
|
|
269
|
-
finalTop =
|
|
304
|
+
finalTop = margin;
|
|
270
305
|
}
|
|
271
|
-
finalTop = this.clampVerticalPosition(finalTop,
|
|
306
|
+
finalTop = this.clampVerticalPosition(finalTop, effectiveHeight, windowHeight, margin);
|
|
272
307
|
if (this.isFirstLevel() && this.root.orientation() === 'horizontal') {
|
|
273
308
|
const preferredLeft = isRtl ? itemRect.right - submenuRect.width : itemRect.left;
|
|
274
309
|
const alternateLeft = isRtl ? itemRect.left : itemRect.right - submenuRect.width;
|
|
@@ -280,47 +315,30 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
280
315
|
}
|
|
281
316
|
}
|
|
282
317
|
else {
|
|
283
|
-
const
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
else if (alternateLeftRtl + submenuRect.width <= windowWidth) {
|
|
292
|
-
finalLeft = alternateLeftRtl;
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
finalLeft = 0;
|
|
296
|
-
}
|
|
318
|
+
const preferredLeft = isRtl ? itemRect.left - submenuRect.width : itemRect.right;
|
|
319
|
+
const alternateLeft = isRtl ? itemRect.right : itemRect.left - submenuRect.width;
|
|
320
|
+
if (isRtl ? preferredLeft >= 0 : preferredLeft + submenuRect.width <= windowWidth) {
|
|
321
|
+
finalLeft = preferredLeft;
|
|
322
|
+
}
|
|
323
|
+
else if (isRtl ? alternateLeft + submenuRect.width <= windowWidth : alternateLeft >= 0) {
|
|
324
|
+
finalLeft = alternateLeft;
|
|
297
325
|
}
|
|
298
326
|
else {
|
|
299
|
-
|
|
300
|
-
finalLeft = preferredLeftLtr;
|
|
301
|
-
}
|
|
302
|
-
else if (alternateLeftLtr >= 0) {
|
|
303
|
-
finalLeft = alternateLeftLtr;
|
|
304
|
-
}
|
|
305
|
-
else {
|
|
306
|
-
finalLeft = windowWidth - submenuRect.width;
|
|
307
|
-
}
|
|
327
|
+
finalLeft = isRtl ? 0 : windowWidth - submenuRect.width;
|
|
308
328
|
}
|
|
309
329
|
}
|
|
310
330
|
const isNestedMenu = !(this.isFirstLevel() && this.root.orientation() === 'horizontal');
|
|
311
331
|
if (isNestedMenu) {
|
|
312
332
|
const overlapsParent = finalLeft < itemRect.right && itemRect.left < finalLeft + submenuRect.width;
|
|
313
|
-
if (overlapsParent) {
|
|
314
|
-
|
|
315
|
-
if (shiftedTop + submenuRect.height <= windowHeight) {
|
|
316
|
-
finalTop = shiftedTop;
|
|
317
|
-
}
|
|
333
|
+
if (overlapsParent && itemRect.bottom + effectiveHeight <= windowHeight - margin) {
|
|
334
|
+
finalTop = itemRect.bottom;
|
|
318
335
|
}
|
|
319
336
|
}
|
|
320
|
-
finalTop = this.clampVerticalPosition(finalTop,
|
|
337
|
+
finalTop = this.clampVerticalPosition(finalTop, effectiveHeight, windowHeight, margin);
|
|
321
338
|
this.renderer.setStyle(submenu, 'position', 'fixed');
|
|
322
339
|
this.renderer.setStyle(submenu, 'top', `${finalTop}px`);
|
|
323
340
|
this.renderer.setStyle(submenu, 'left', `${finalLeft}px`);
|
|
341
|
+
axFitMenuPanelHeight(this.renderer, submenu, finalTop);
|
|
324
342
|
if (this.zToken) {
|
|
325
343
|
this.renderer.setStyle(submenu, 'z-index', String(this.zToken.zIndex));
|
|
326
344
|
}
|
|
@@ -334,6 +352,83 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
334
352
|
this.renderer.removeStyle(submenu, 'display');
|
|
335
353
|
return rect;
|
|
336
354
|
}
|
|
355
|
+
/** Moves the submenu under the context-menu backdrop (or body) to escape ancestor overflow. */
|
|
356
|
+
portalSubmenu(submenu) {
|
|
357
|
+
if (!isPlatformBrowser(this.platformId)) {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
submenu.__axMenuOwner__ = this;
|
|
361
|
+
this.bindSubmenuPointerListeners(submenu);
|
|
362
|
+
if (this.submenuPortalParent) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
const parent = submenu.parentElement;
|
|
366
|
+
if (!parent) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
this.submenuPortalParent = parent;
|
|
370
|
+
this.submenuPortalNextSibling = submenu.nextSibling;
|
|
371
|
+
const rootEl = this.root.nativeElement;
|
|
372
|
+
const rootParent = rootEl.parentElement;
|
|
373
|
+
const portalHost = rootEl.tagName === 'AX-CONTEXT-MENU' && rootParent && rootParent !== this.document.body
|
|
374
|
+
? rootParent
|
|
375
|
+
: this.document.body;
|
|
376
|
+
if (submenu.parentElement !== portalHost) {
|
|
377
|
+
portalHost.appendChild(submenu);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
restoreSubmenuPortal() {
|
|
381
|
+
const submenu = this.submenuSlot()?.nativeElement;
|
|
382
|
+
this.unbindSubmenuPointerListeners();
|
|
383
|
+
if (submenu) {
|
|
384
|
+
axClearMenuPanelHeight(this.renderer, submenu);
|
|
385
|
+
delete submenu.__axMenuOwner__;
|
|
386
|
+
}
|
|
387
|
+
if (submenu && this.submenuPortalParent) {
|
|
388
|
+
try {
|
|
389
|
+
this.submenuPortalParent.insertBefore(submenu, this.submenuPortalNextSibling);
|
|
390
|
+
}
|
|
391
|
+
catch {
|
|
392
|
+
// Host may already be torn down while the context menu is closing.
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
this.submenuPortalParent = null;
|
|
396
|
+
this.submenuPortalNextSibling = null;
|
|
397
|
+
}
|
|
398
|
+
/** Keep this item open while the pointer is over its portaled submenu panel. */
|
|
399
|
+
bindSubmenuPointerListeners(submenu) {
|
|
400
|
+
this.unbindSubmenuPointerListeners();
|
|
401
|
+
this.submenuUnlistenEnter = this.renderer.listen(submenu, 'mouseenter', () => {
|
|
402
|
+
this.clearCloseTimeout();
|
|
403
|
+
this.clearAncestorCloseTimeouts();
|
|
404
|
+
});
|
|
405
|
+
this.submenuUnlistenLeave = this.renderer.listen(submenu, 'mouseleave', (event) => {
|
|
406
|
+
this.handlePointerLeave(event);
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
unbindSubmenuPointerListeners() {
|
|
410
|
+
this.submenuUnlistenEnter?.();
|
|
411
|
+
this.submenuUnlistenLeave?.();
|
|
412
|
+
this.submenuUnlistenEnter = null;
|
|
413
|
+
this.submenuUnlistenLeave = null;
|
|
414
|
+
}
|
|
415
|
+
/** Links direct children so parent resolution still works after the panel is portaled. */
|
|
416
|
+
linkChildItems() {
|
|
417
|
+
const submenu = this.submenuSlot()?.nativeElement;
|
|
418
|
+
if (!submenu) {
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
submenu.querySelectorAll(':scope > ax-menu-item').forEach((el) => {
|
|
422
|
+
const child = this.getInstanceFromElement(el);
|
|
423
|
+
if (child) {
|
|
424
|
+
child.linkedParent = this;
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
getInstanceFromElement(el) {
|
|
429
|
+
const ctx = el.__axContext__;
|
|
430
|
+
return ctx instanceof AXMenuItemComponent ? ctx : undefined;
|
|
431
|
+
}
|
|
337
432
|
/**
|
|
338
433
|
* Moves nested `ax-menu-item` nodes rendered by recursive `ngTemplateOutlet` templates
|
|
339
434
|
* into the submenu slot. Angular content queries do not traverse those embedded views.
|
|
@@ -369,7 +464,13 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
369
464
|
});
|
|
370
465
|
}
|
|
371
466
|
updateDiscoveredSubmenuNodeCount() {
|
|
372
|
-
this.
|
|
467
|
+
const fromHost = this.getDirectSubmenuNodes().length;
|
|
468
|
+
const submenu = this.submenuSlot()?.nativeElement;
|
|
469
|
+
const fromPanel = submenu
|
|
470
|
+
? submenu.querySelectorAll(':scope > ax-menu-item, :scope > ax-title, :scope > ax-divider').length
|
|
471
|
+
: 0;
|
|
472
|
+
// After portaling, projected children live in the panel outside this host.
|
|
473
|
+
this.discoveredSubmenuNodeCount.set(Math.max(fromHost, fromPanel));
|
|
373
474
|
}
|
|
374
475
|
scheduleChildRefresh() {
|
|
375
476
|
if (this.childRefreshScheduled) {
|
|
@@ -379,6 +480,7 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
379
480
|
requestAnimationFrame(() => {
|
|
380
481
|
this.childRefreshScheduled = false;
|
|
381
482
|
this.reparentOrphanedChildren();
|
|
483
|
+
this.linkChildItems();
|
|
382
484
|
this.updateDiscoveredSubmenuNodeCount();
|
|
383
485
|
});
|
|
384
486
|
}
|
|
@@ -407,12 +509,12 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
407
509
|
return false;
|
|
408
510
|
}
|
|
409
511
|
/** Keeps the submenu fully inside the viewport vertically. */
|
|
410
|
-
clampVerticalPosition(top, height, windowHeight) {
|
|
411
|
-
if (top + height > windowHeight) {
|
|
412
|
-
top = windowHeight - height;
|
|
512
|
+
clampVerticalPosition(top, height, windowHeight, margin = 0) {
|
|
513
|
+
if (top + height > windowHeight - margin) {
|
|
514
|
+
top = windowHeight - margin - height;
|
|
413
515
|
}
|
|
414
|
-
if (top <
|
|
415
|
-
top =
|
|
516
|
+
if (top < margin) {
|
|
517
|
+
top = margin;
|
|
416
518
|
}
|
|
417
519
|
return top;
|
|
418
520
|
}
|
|
@@ -442,16 +544,17 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
442
544
|
}
|
|
443
545
|
handleMouseEnter(event) {
|
|
444
546
|
event.stopPropagation();
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
this.mouseLeaveTimeout = null;
|
|
448
|
-
}
|
|
547
|
+
this.clearCloseTimeout();
|
|
548
|
+
this.clearAncestorCloseTimeouts();
|
|
449
549
|
if (!this.isFirstLevel() || this.root.openOn() == 'hover') {
|
|
450
550
|
this.open();
|
|
451
551
|
}
|
|
452
552
|
}
|
|
453
553
|
handleMouseLeave(event) {
|
|
454
554
|
event.stopPropagation();
|
|
555
|
+
this.handlePointerLeave(event);
|
|
556
|
+
}
|
|
557
|
+
handlePointerLeave(event) {
|
|
455
558
|
if (!this.hasSubItems() || this.root.closeOn() !== 'leave') {
|
|
456
559
|
return;
|
|
457
560
|
}
|
|
@@ -459,25 +562,54 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
459
562
|
if (relatedTarget instanceof Node && this.containsSubmenuPointer(relatedTarget)) {
|
|
460
563
|
return;
|
|
461
564
|
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
565
|
+
this.scheduleClose();
|
|
566
|
+
}
|
|
567
|
+
scheduleClose() {
|
|
568
|
+
this.clearCloseTimeout();
|
|
465
569
|
this.mouseLeaveTimeout = setTimeout(() => {
|
|
570
|
+
this.mouseLeaveTimeout = null;
|
|
466
571
|
this.close();
|
|
467
572
|
}, 500);
|
|
468
573
|
}
|
|
469
|
-
|
|
574
|
+
clearCloseTimeout() {
|
|
575
|
+
if (this.mouseLeaveTimeout) {
|
|
576
|
+
clearTimeout(this.mouseLeaveTimeout);
|
|
577
|
+
this.mouseLeaveTimeout = null;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
clearAncestorCloseTimeouts() {
|
|
581
|
+
let current = this.getParentMenuItem();
|
|
582
|
+
while (current) {
|
|
583
|
+
current.clearCloseTimeout();
|
|
584
|
+
current = current.getParentMenuItem();
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
/** True when the pointer is still inside this item's submenu tree (including portaled panels). */
|
|
470
588
|
containsSubmenuPointer(node) {
|
|
471
|
-
|
|
472
|
-
if (submenu?.contains(node)) {
|
|
589
|
+
if (this.submenuSlot()?.nativeElement?.contains(node) || this.nativeElement.contains(node)) {
|
|
473
590
|
return true;
|
|
474
591
|
}
|
|
475
|
-
|
|
476
|
-
|
|
592
|
+
const el = node instanceof Element ? node : node.parentElement;
|
|
593
|
+
if (!el) {
|
|
594
|
+
return false;
|
|
595
|
+
}
|
|
596
|
+
const item = this.getInstanceFromElement(el.closest('ax-menu-item') ?? el) ??
|
|
597
|
+
el.closest('.ax-menu-items')?.__axMenuOwner__;
|
|
598
|
+
return !!item && this.isSelfOrAncestorOf(item);
|
|
599
|
+
}
|
|
600
|
+
isSelfOrAncestorOf(item) {
|
|
601
|
+
let current = item;
|
|
602
|
+
while (current) {
|
|
603
|
+
if (current === this) {
|
|
604
|
+
return true;
|
|
605
|
+
}
|
|
606
|
+
current = current.getParentMenuItem();
|
|
477
607
|
}
|
|
478
|
-
return
|
|
608
|
+
return false;
|
|
479
609
|
}
|
|
480
610
|
ngOnDestroy() {
|
|
611
|
+
this.clearCloseTimeout();
|
|
612
|
+
this.unbindSubmenuPointerListeners();
|
|
481
613
|
if (this.isOpen()) {
|
|
482
614
|
this.close();
|
|
483
615
|
}
|
|
@@ -643,6 +775,7 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
643
775
|
const wasOpen = this.nativeElement.classList.contains('ax-state-open');
|
|
644
776
|
this.nativeElement.classList.remove('ax-state-open');
|
|
645
777
|
this.lastOpenPoint = null;
|
|
778
|
+
axClearMenuPanelHeight(this.renderer, this.nativeElement);
|
|
646
779
|
// Drop rendered items before moving DOM nodes back to the original parent.
|
|
647
780
|
// This prevents a large menu tree from being re-parented/removed as a single heavy DOM operation.
|
|
648
781
|
if (wasOpen) {
|
|
@@ -739,6 +872,7 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
739
872
|
const itemRect = this.measureMenuRect(elementRef);
|
|
740
873
|
const windowWidth = window.innerWidth;
|
|
741
874
|
const windowHeight = window.innerHeight;
|
|
875
|
+
const margin = AX_MENU_VIEWPORT_MARGIN;
|
|
742
876
|
const isRtl = AXHtmlUtil.isRtl(elementRef);
|
|
743
877
|
let left;
|
|
744
878
|
if (isRtl) {
|
|
@@ -753,23 +887,22 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
753
887
|
left = point.x - itemRect.width;
|
|
754
888
|
}
|
|
755
889
|
}
|
|
756
|
-
const
|
|
757
|
-
let top;
|
|
758
|
-
if (
|
|
759
|
-
top =
|
|
760
|
-
if (top < 0) {
|
|
761
|
-
top = 0;
|
|
762
|
-
}
|
|
890
|
+
const effectiveHeight = Math.min(itemRect.height, Math.max(0, windowHeight - margin * 2));
|
|
891
|
+
let top = point.y;
|
|
892
|
+
if (top + effectiveHeight > windowHeight - margin) {
|
|
893
|
+
top = windowHeight - margin - effectiveHeight;
|
|
763
894
|
}
|
|
764
|
-
|
|
765
|
-
top =
|
|
895
|
+
if (top < margin) {
|
|
896
|
+
top = margin;
|
|
766
897
|
}
|
|
767
898
|
this.renderer.setStyle(elementRef, 'left', `${left}px`);
|
|
768
899
|
this.renderer.setStyle(elementRef, 'top', `${top}px`);
|
|
769
900
|
this.renderer.setStyle(elementRef, 'position', 'fixed');
|
|
901
|
+
axFitMenuPanelHeight(this.renderer, elementRef, top);
|
|
770
902
|
}
|
|
771
903
|
/** Measures menu size even when an ancestor hides the host with `display: none`. */
|
|
772
904
|
measureMenuRect(elementRef) {
|
|
905
|
+
axClearMenuPanelHeight(this.renderer, elementRef);
|
|
773
906
|
this.renderer.setStyle(elementRef, 'visibility', 'hidden');
|
|
774
907
|
this.renderer.setStyle(elementRef, 'display', 'flex');
|
|
775
908
|
const rect = elementRef.getBoundingClientRect();
|
|
@@ -796,6 +929,26 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
796
929
|
this.createEventListeners(this.backdropElement);
|
|
797
930
|
this.document.body.appendChild(this.backdropElement);
|
|
798
931
|
this.backdropElement.appendChild(this.nativeElement);
|
|
932
|
+
const contextSource = this.resolveContextMenuTarget();
|
|
933
|
+
const context = resolveVisualContext(contextSource, this.document.documentElement);
|
|
934
|
+
applyVisualContext(this.backdropElement, context);
|
|
935
|
+
applyVisualContext(this.nativeElement, context);
|
|
936
|
+
}
|
|
937
|
+
/** @ignore */
|
|
938
|
+
resolveContextMenuTarget() {
|
|
939
|
+
const target = this.target();
|
|
940
|
+
if (!target) {
|
|
941
|
+
return this.document.documentElement;
|
|
942
|
+
}
|
|
943
|
+
if (typeof target === 'string') {
|
|
944
|
+
const el = this.document.querySelector(target);
|
|
945
|
+
return el instanceof HTMLElement ? el : this.document.documentElement;
|
|
946
|
+
}
|
|
947
|
+
if (Array.isArray(target)) {
|
|
948
|
+
const first = target[0];
|
|
949
|
+
return first instanceof HTMLElement ? first : this.document.documentElement;
|
|
950
|
+
}
|
|
951
|
+
return target;
|
|
799
952
|
}
|
|
800
953
|
/** @ignore */
|
|
801
954
|
removeBackdrop() {
|
|
@@ -814,7 +967,11 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
814
967
|
this.close();
|
|
815
968
|
l1();
|
|
816
969
|
});
|
|
817
|
-
const l2 = this.renderer.listen(el, 'wheel', () => {
|
|
970
|
+
const l2 = this.renderer.listen(el, 'wheel', (e) => {
|
|
971
|
+
const target = e.target;
|
|
972
|
+
if (target instanceof Element && (this.nativeElement.contains(target) || target.closest('.ax-menu-items'))) {
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
818
975
|
this.close();
|
|
819
976
|
l2();
|
|
820
977
|
});
|
|
@@ -870,7 +1027,7 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
870
1027
|
provide: AXComponent,
|
|
871
1028
|
useExisting: AXContextMenuComponent,
|
|
872
1029
|
},
|
|
873
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}
|
|
1030
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu,.ax-menu-items{--ax-comp-menu-items-min-width: 12rem;--ax-comp-menu-action-list-hover-decorator-opacity: .7;--ax-comp-menu-action-list-horizontal-min-width: 12rem;--ax-comp-menu-action-list-horizontal-gap: 1.25rem;--ax-comp-menu-action-list-vertical-min-width: 12rem}ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}ax-context-menu.ax-menu-container,.ax-menu-items{--ax-comp-menu-shadow-rest: var(--ax-sys-effect-overlay);--ax-comp-menu-inner-border-rest: var(--ax-sys-inner-border-surface);--ax-comp-menu-contrast-inner-border-rest: var(--ax-sys-contrast-inner-border-surface);--ax-comp-menu-contrast-surface-overlay-rest: var(--ax-sys-contrast-surface-overlay-surface);--ax-comp-menu-backdrop-filter-rest: var(--ax-sys-backdrop-filter-surface);--ax-comp-menu-surface-overlay-rest: var(--ax-sys-surface-overlay-overlay);--ax-comp-action-item-padding-inline: .875rem;opacity:0;display:flex;position:fixed;visibility:hidden;width:max-content;height:max-content;max-height:calc(100dvh - 1rem);flex-direction:column;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;min-width:var(--ax-comp-menu-items-min-width);color:rgba(var(--ax-comp-menu-items-text-color, var(--ax-sys-color-on-lightest-surface)));background-color:rgba(var(--ax-comp-menu-sub-item-bg-color, var(--ax-sys-color-lightest-surface)));background-image:linear-gradient(var(--ax-comp-menu-contrast-surface-overlay-rest),var(--ax-comp-menu-contrast-surface-overlay-rest)),linear-gradient(var(--ax-comp-menu-surface-overlay-rest),var(--ax-comp-menu-surface-overlay-rest));padding-block:var(--ax-comp-menu-items-padding-block, .5rem);border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius));border-color:rgba(var(--ax-comp-menu-items-border-color, var(--ax-sys-color-border-lightest-surface)));box-shadow:var(--ax-comp-menu-contrast-inner-border-rest),var(--ax-comp-menu-inner-border-rest),var(--ax-comp-menu-shadow-rest);backdrop-filter:var(--ax-comp-menu-backdrop-filter-rest);-webkit-backdrop-filter:var(--ax-comp-menu-backdrop-filter-rest);transition-property:opacity,color;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(ax-context-menu.ax-menu-container,.ax-menu-items).ax-state-open{opacity:1;visibility:visible}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item{color:rgba(var(--ax-comp-menu-item-text-color, var(--ax-sys-color-on-surface)))}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-suffix-text-color));--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){color:rgba(var(--ax-comp-menu-item-hover-text-color, var(--ax-sys-color-on-surface)));background-color:rgba(var(--ax-comp-menu-item-hover-bg-color, var(--ax-sys-color-surface)))!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-hover-suffix-text-color))}ax-context-menu.ax-action-list-horizontal{padding-inline:var(--ax-comp-menu-action-list-horizontal-padding-inline, 1rem)}ax-menu>ax-menu-item{--ax-comp-action-item-padding-inline: 0;padding-block:var(--ax-comp-menu-items-padding-block, .5rem)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:.5rem}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-horizontal{min-width:var(--ax-comp-menu-action-list-horizontal-min-width);gap:var(--ax-comp-menu-action-list-horizontal-gap)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-vertical{width:max-content;min-width:var(--ax-comp-menu-action-list-vertical-min-width)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["subItems", "name", "data", "disabled", "color"], outputs: ["onClick"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
874
1031
|
}
|
|
875
1032
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXContextMenuComponent, decorators: [{
|
|
876
1033
|
type: Component,
|
|
@@ -891,7 +1048,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
891
1048
|
AXDecoratorIconComponent,
|
|
892
1049
|
AsyncPipe,
|
|
893
1050
|
AXTranslatorPipe,
|
|
894
|
-
], template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}
|
|
1051
|
+
], template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu,.ax-menu-items{--ax-comp-menu-items-min-width: 12rem;--ax-comp-menu-action-list-hover-decorator-opacity: .7;--ax-comp-menu-action-list-horizontal-min-width: 12rem;--ax-comp-menu-action-list-horizontal-gap: 1.25rem;--ax-comp-menu-action-list-vertical-min-width: 12rem}ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}ax-context-menu.ax-menu-container,.ax-menu-items{--ax-comp-menu-shadow-rest: var(--ax-sys-effect-overlay);--ax-comp-menu-inner-border-rest: var(--ax-sys-inner-border-surface);--ax-comp-menu-contrast-inner-border-rest: var(--ax-sys-contrast-inner-border-surface);--ax-comp-menu-contrast-surface-overlay-rest: var(--ax-sys-contrast-surface-overlay-surface);--ax-comp-menu-backdrop-filter-rest: var(--ax-sys-backdrop-filter-surface);--ax-comp-menu-surface-overlay-rest: var(--ax-sys-surface-overlay-overlay);--ax-comp-action-item-padding-inline: .875rem;opacity:0;display:flex;position:fixed;visibility:hidden;width:max-content;height:max-content;max-height:calc(100dvh - 1rem);flex-direction:column;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;min-width:var(--ax-comp-menu-items-min-width);color:rgba(var(--ax-comp-menu-items-text-color, var(--ax-sys-color-on-lightest-surface)));background-color:rgba(var(--ax-comp-menu-sub-item-bg-color, var(--ax-sys-color-lightest-surface)));background-image:linear-gradient(var(--ax-comp-menu-contrast-surface-overlay-rest),var(--ax-comp-menu-contrast-surface-overlay-rest)),linear-gradient(var(--ax-comp-menu-surface-overlay-rest),var(--ax-comp-menu-surface-overlay-rest));padding-block:var(--ax-comp-menu-items-padding-block, .5rem);border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius));border-color:rgba(var(--ax-comp-menu-items-border-color, var(--ax-sys-color-border-lightest-surface)));box-shadow:var(--ax-comp-menu-contrast-inner-border-rest),var(--ax-comp-menu-inner-border-rest),var(--ax-comp-menu-shadow-rest);backdrop-filter:var(--ax-comp-menu-backdrop-filter-rest);-webkit-backdrop-filter:var(--ax-comp-menu-backdrop-filter-rest);transition-property:opacity,color;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(ax-context-menu.ax-menu-container,.ax-menu-items).ax-state-open{opacity:1;visibility:visible}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item{color:rgba(var(--ax-comp-menu-item-text-color, var(--ax-sys-color-on-surface)))}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-suffix-text-color));--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){color:rgba(var(--ax-comp-menu-item-hover-text-color, var(--ax-sys-color-on-surface)));background-color:rgba(var(--ax-comp-menu-item-hover-bg-color, var(--ax-sys-color-surface)))!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-hover-suffix-text-color))}ax-context-menu.ax-action-list-horizontal{padding-inline:var(--ax-comp-menu-action-list-horizontal-padding-inline, 1rem)}ax-menu>ax-menu-item{--ax-comp-action-item-padding-inline: 0;padding-block:var(--ax-comp-menu-items-padding-block, .5rem)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:.5rem}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-horizontal{min-width:var(--ax-comp-menu-action-list-horizontal-min-width);gap:var(--ax-comp-menu-action-list-horizontal-gap)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-vertical{width:max-content;min-width:var(--ax-comp-menu-action-list-vertical-min-width)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
895
1052
|
}], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], openOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "openOn", required: false }] }], closeOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOn", required: false }] }], closeOnRouteChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnRouteChange", required: false }] }], originalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], onItemClick: [{ type: i0.Output, args: ["onItemClick"] }], onOpening: [{ type: i0.Output, args: ["onOpening"] }], onClose: [{ type: i0.Output, args: ["onClose"] }], onWindowEvent: [{
|
|
896
1053
|
type: HostListener,
|
|
897
1054
|
args: ['window:scroll']
|
|
@@ -954,7 +1111,7 @@ class AXMenuComponent extends NXComponent {
|
|
|
954
1111
|
provide: AXComponent,
|
|
955
1112
|
useExisting: AXMenuComponent,
|
|
956
1113
|
},
|
|
957
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}
|
|
1114
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu,.ax-menu-items{--ax-comp-menu-items-min-width: 12rem;--ax-comp-menu-action-list-hover-decorator-opacity: .7;--ax-comp-menu-action-list-horizontal-min-width: 12rem;--ax-comp-menu-action-list-horizontal-gap: 1.25rem;--ax-comp-menu-action-list-vertical-min-width: 12rem}ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}ax-context-menu.ax-menu-container,.ax-menu-items{--ax-comp-menu-shadow-rest: var(--ax-sys-effect-overlay);--ax-comp-menu-inner-border-rest: var(--ax-sys-inner-border-surface);--ax-comp-menu-contrast-inner-border-rest: var(--ax-sys-contrast-inner-border-surface);--ax-comp-menu-contrast-surface-overlay-rest: var(--ax-sys-contrast-surface-overlay-surface);--ax-comp-menu-backdrop-filter-rest: var(--ax-sys-backdrop-filter-surface);--ax-comp-menu-surface-overlay-rest: var(--ax-sys-surface-overlay-overlay);--ax-comp-action-item-padding-inline: .875rem;opacity:0;display:flex;position:fixed;visibility:hidden;width:max-content;height:max-content;max-height:calc(100dvh - 1rem);flex-direction:column;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;min-width:var(--ax-comp-menu-items-min-width);color:rgba(var(--ax-comp-menu-items-text-color, var(--ax-sys-color-on-lightest-surface)));background-color:rgba(var(--ax-comp-menu-sub-item-bg-color, var(--ax-sys-color-lightest-surface)));background-image:linear-gradient(var(--ax-comp-menu-contrast-surface-overlay-rest),var(--ax-comp-menu-contrast-surface-overlay-rest)),linear-gradient(var(--ax-comp-menu-surface-overlay-rest),var(--ax-comp-menu-surface-overlay-rest));padding-block:var(--ax-comp-menu-items-padding-block, .5rem);border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius));border-color:rgba(var(--ax-comp-menu-items-border-color, var(--ax-sys-color-border-lightest-surface)));box-shadow:var(--ax-comp-menu-contrast-inner-border-rest),var(--ax-comp-menu-inner-border-rest),var(--ax-comp-menu-shadow-rest);backdrop-filter:var(--ax-comp-menu-backdrop-filter-rest);-webkit-backdrop-filter:var(--ax-comp-menu-backdrop-filter-rest);transition-property:opacity,color;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(ax-context-menu.ax-menu-container,.ax-menu-items).ax-state-open{opacity:1;visibility:visible}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item{color:rgba(var(--ax-comp-menu-item-text-color, var(--ax-sys-color-on-surface)))}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-suffix-text-color));--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){color:rgba(var(--ax-comp-menu-item-hover-text-color, var(--ax-sys-color-on-surface)));background-color:rgba(var(--ax-comp-menu-item-hover-bg-color, var(--ax-sys-color-surface)))!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-hover-suffix-text-color))}ax-context-menu.ax-action-list-horizontal{padding-inline:var(--ax-comp-menu-action-list-horizontal-padding-inline, 1rem)}ax-menu>ax-menu-item{--ax-comp-action-item-padding-inline: 0;padding-block:var(--ax-comp-menu-items-padding-block, .5rem)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:.5rem}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-horizontal{min-width:var(--ax-comp-menu-action-list-horizontal-min-width);gap:var(--ax-comp-menu-action-list-horizontal-gap)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-vertical{width:max-content;min-width:var(--ax-comp-menu-action-list-vertical-min-width)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["subItems", "name", "data", "disabled", "color"], outputs: ["onClick"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
958
1115
|
}
|
|
959
1116
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMenuComponent, decorators: [{
|
|
960
1117
|
type: Component,
|
|
@@ -975,7 +1132,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
975
1132
|
AXDecoratorIconComponent,
|
|
976
1133
|
AsyncPipe,
|
|
977
1134
|
AXTranslatorPipe,
|
|
978
|
-
], template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}
|
|
1135
|
+
], template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu,.ax-menu-items{--ax-comp-menu-items-min-width: 12rem;--ax-comp-menu-action-list-hover-decorator-opacity: .7;--ax-comp-menu-action-list-horizontal-min-width: 12rem;--ax-comp-menu-action-list-horizontal-gap: 1.25rem;--ax-comp-menu-action-list-vertical-min-width: 12rem}ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}ax-context-menu.ax-menu-container,.ax-menu-items{--ax-comp-menu-shadow-rest: var(--ax-sys-effect-overlay);--ax-comp-menu-inner-border-rest: var(--ax-sys-inner-border-surface);--ax-comp-menu-contrast-inner-border-rest: var(--ax-sys-contrast-inner-border-surface);--ax-comp-menu-contrast-surface-overlay-rest: var(--ax-sys-contrast-surface-overlay-surface);--ax-comp-menu-backdrop-filter-rest: var(--ax-sys-backdrop-filter-surface);--ax-comp-menu-surface-overlay-rest: var(--ax-sys-surface-overlay-overlay);--ax-comp-action-item-padding-inline: .875rem;opacity:0;display:flex;position:fixed;visibility:hidden;width:max-content;height:max-content;max-height:calc(100dvh - 1rem);flex-direction:column;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;min-width:var(--ax-comp-menu-items-min-width);color:rgba(var(--ax-comp-menu-items-text-color, var(--ax-sys-color-on-lightest-surface)));background-color:rgba(var(--ax-comp-menu-sub-item-bg-color, var(--ax-sys-color-lightest-surface)));background-image:linear-gradient(var(--ax-comp-menu-contrast-surface-overlay-rest),var(--ax-comp-menu-contrast-surface-overlay-rest)),linear-gradient(var(--ax-comp-menu-surface-overlay-rest),var(--ax-comp-menu-surface-overlay-rest));padding-block:var(--ax-comp-menu-items-padding-block, .5rem);border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius));border-color:rgba(var(--ax-comp-menu-items-border-color, var(--ax-sys-color-border-lightest-surface)));box-shadow:var(--ax-comp-menu-contrast-inner-border-rest),var(--ax-comp-menu-inner-border-rest),var(--ax-comp-menu-shadow-rest);backdrop-filter:var(--ax-comp-menu-backdrop-filter-rest);-webkit-backdrop-filter:var(--ax-comp-menu-backdrop-filter-rest);transition-property:opacity,color;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(ax-context-menu.ax-menu-container,.ax-menu-items).ax-state-open{opacity:1;visibility:visible}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item{color:rgba(var(--ax-comp-menu-item-text-color, var(--ax-sys-color-on-surface)))}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-suffix-text-color));--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){color:rgba(var(--ax-comp-menu-item-hover-text-color, var(--ax-sys-color-on-surface)));background-color:rgba(var(--ax-comp-menu-item-hover-bg-color, var(--ax-sys-color-surface)))!important}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:rgba(var(--ax-comp-menu-item-hover-suffix-text-color))}ax-context-menu.ax-action-list-horizontal{padding-inline:var(--ax-comp-menu-action-list-horizontal-padding-inline, 1rem)}ax-menu>ax-menu-item{--ax-comp-action-item-padding-inline: 0;padding-block:var(--ax-comp-menu-items-padding-block, .5rem)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:.5rem}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--ax-comp-menu-items-border-radius, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-horizontal{min-width:var(--ax-comp-menu-action-list-horizontal-min-width);gap:var(--ax-comp-menu-action-list-horizontal-gap)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){padding-inline-end:0!important;margin-inline-start:0!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}ax-menu.ax-action-list-vertical{width:max-content;min-width:var(--ax-comp-menu-action-list-vertical-min-width)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:var(--ax-comp-menu-action-list-hover-decorator-opacity)}}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
979
1136
|
}], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], openOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "openOn", required: false }] }], closeOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOn", required: false }] }], onItemClick: [{ type: i0.Output, args: ["onItemClick"] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], hasArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasArrow", required: false }] }], __hostClass: [{
|
|
980
1137
|
type: HostBinding,
|
|
981
1138
|
args: ['class']
|