@acorex/components 22.0.0-next.9 → 22.0.1-next.0
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 +35 -0
- package/emoji/README.md +3 -0
- package/emojipicker/README.md +3 -0
- package/fesm2022/acorex-components-accordion.mjs +4 -4
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +1 -0
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +2 -2
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +291 -267
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-bubble.mjs +71 -0
- package/fesm2022/acorex-components-bubble.mjs.map +1 -0
- package/fesm2022/acorex-components-button-group.mjs +12 -5
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +6 -6
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +328 -127
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +2 -2
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-combo-box.mjs +973 -0
- package/fesm2022/acorex-components-combo-box.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-DDkiZfPb.mjs +19058 -0
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-DDkiZfPb.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-COUB9zrM.mjs +50 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-COUB9zrM.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-image-picker-editor-dialog.component-COT96F_v.mjs +87 -0
- package/fesm2022/acorex-components-conversation-image-picker-editor-dialog.component-COT96F_v.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-picker-rename-file-dialog.component-CH3Q6Hry.mjs +65 -0
- package/fesm2022/acorex-components-conversation-picker-rename-file-dialog.component-CH3Q6Hry.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation.mjs +1 -22920
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +1 -1
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +4 -4
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +310 -90
- 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-datetime-picker.mjs +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +57 -11
- 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-button.mjs +1 -1
- package/fesm2022/acorex-components-dropdown-button.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-emoji.mjs +74 -0
- package/fesm2022/acorex-components-emoji.mjs.map +1 -0
- package/fesm2022/acorex-components-emojipicker.mjs +425 -0
- package/fesm2022/acorex-components-emojipicker.mjs.map +1 -0
- package/fesm2022/acorex-components-fab.mjs +5 -5
- package/fesm2022/acorex-components-fab.mjs.map +1 -1
- package/fesm2022/acorex-components-file-viewer.mjs +359 -109
- package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +22 -6
- package/fesm2022/acorex-components-form.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-highlight.mjs +80 -0
- package/fesm2022/acorex-components-highlight.mjs.map +1 -0
- package/fesm2022/acorex-components-image-editor.mjs +686 -416
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-inline-reaction.mjs +111 -0
- package/fesm2022/acorex-components-inline-reaction.mjs.map +1 -0
- package/fesm2022/acorex-components-kanban.mjs +1 -1
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +2 -2
- package/fesm2022/acorex-components-label.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-loading-dialog.mjs +59 -42
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-lookup.mjs +3505 -0
- package/fesm2022/acorex-components-lookup.mjs.map +1 -0
- package/fesm2022/acorex-components-map.mjs +9 -2
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +322 -79
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-message-status.mjs +71 -0
- package/fesm2022/acorex-components-message-status.mjs.map +1 -0
- package/fesm2022/acorex-components-message-time.mjs +36 -0
- package/fesm2022/acorex-components-message-time.mjs.map +1 -0
- package/fesm2022/acorex-components-message.mjs +120 -0
- package/fesm2022/acorex-components-message.mjs.map +1 -0
- package/fesm2022/acorex-components-notification.mjs +13 -6
- 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-paint.mjs +1 -1
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +3 -3
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +40 -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-radio.mjs +2 -2
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-rail-navigation.mjs +2 -2
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +2 -2
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-reaction.mjs +144 -0
- package/fesm2022/acorex-components-reaction.mjs.map +1 -0
- package/fesm2022/acorex-components-rest-api-generator.mjs +5 -5
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-rrule.mjs +1 -1
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +5 -5
- package/fesm2022/acorex-components-scheduler-picker.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 +55 -18
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +3 -4
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +2 -2
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +510 -74
- package/fesm2022/acorex-components-tabs.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/fesm2022/acorex-components-tree-view.mjs +86 -6
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +76 -6
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/highlight/README.md +13 -0
- package/inline-reaction/README.md +3 -0
- package/lookup/README.md +74 -0
- package/message/README.md +3 -0
- package/message-status/README.md +3 -0
- package/message-time/README.md +3 -0
- package/package.json +51 -16
- package/reaction/README.md +3 -0
- package/select-box/README.md +5 -0
- package/types/acorex-components-action-sheet.d.ts +9 -1
- package/types/acorex-components-audio-wave.d.ts +132 -73
- package/types/acorex-components-bubble.d.ts +31 -0
- package/types/acorex-components-button-group.d.ts +4 -0
- package/types/acorex-components-button.d.ts +1 -1
- package/types/acorex-components-calendar.d.ts +41 -9
- package/types/acorex-components-combo-box.d.ts +310 -0
- package/types/acorex-components-conversation.d.ts +1806 -1790
- package/types/acorex-components-data-table.d.ts +74 -12
- 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 +14 -1
- package/types/acorex-components-dialog.d.ts +9 -0
- package/types/acorex-components-emoji.d.ts +42 -0
- package/types/acorex-components-emojipicker.d.ts +146 -0
- package/types/acorex-components-file-viewer.d.ts +48 -4
- package/types/acorex-components-grid-layout-builder.d.ts +34 -2
- package/types/acorex-components-highlight.d.ts +31 -0
- package/types/acorex-components-image-editor.d.ts +68 -48
- package/types/acorex-components-inline-reaction.d.ts +52 -0
- package/types/acorex-components-loading-dialog.d.ts +12 -4
- package/types/acorex-components-lookup.d.ts +962 -0
- package/types/acorex-components-map.d.ts +5 -0
- package/types/acorex-components-menu.d.ts +43 -7
- package/types/acorex-components-message-status.d.ts +23 -0
- package/types/acorex-components-message-time.d.ts +19 -0
- package/types/acorex-components-message.d.ts +59 -0
- 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 +12 -1
- package/types/acorex-components-popup.d.ts +9 -1
- package/types/acorex-components-reaction.d.ts +85 -0
- package/types/acorex-components-scheduler.d.ts +2 -4
- package/types/acorex-components-select-box.d.ts +21 -4
- package/types/acorex-components-selection-list.d.ts +1 -1
- package/types/acorex-components-tabs.d.ts +148 -19
- package/types/acorex-components-toast.d.ts +10 -1
- package/types/acorex-components-tree-view.d.ts +39 -2
- package/types/acorex-components-wysiwyg.d.ts +13 -0
- 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
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs +0 -223
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs.map +0 -1
- package/fesm2022/acorex-components-flow-chart.mjs +0 -735
- package/fesm2022/acorex-components-flow-chart.mjs.map +0 -1
- package/fesm2022/acorex-components-query-builder.mjs +0 -267
- package/fesm2022/acorex-components-query-builder.mjs.map +0 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +0 -168
- package/fesm2022/acorex-components-selection-list-2.mjs.map +0 -1
- package/flow-chart/README.md +0 -3
- package/query-builder/README.md +0 -3
- package/selection-list-2/README.md +0 -3
- package/types/acorex-components-flow-chart.d.ts +0 -187
- package/types/acorex-components-query-builder.d.ts +0 -52
- package/types/acorex-components-selection-list-2.d.ts +0 -52
|
@@ -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,18 @@ 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
|
+
/** Vertical gap between the floating header bar and the context menu panel. */
|
|
112
|
+
const AX_CONTEXT_MENU_HEADER_GAP = 8;
|
|
113
|
+
/** Limits a fixed menu panel so it stays within the viewport below `top`. */
|
|
114
|
+
function axFitMenuPanelHeight(renderer, el, top) {
|
|
115
|
+
renderer.setStyle(el, 'max-height', `${Math.max(0, window.innerHeight - top - AX_MENU_VIEWPORT_MARGIN)}px`);
|
|
116
|
+
}
|
|
117
|
+
function axClearMenuPanelHeight(renderer, el) {
|
|
118
|
+
renderer.removeStyle(el, 'max-height');
|
|
119
|
+
}
|
|
120
|
+
|
|
108
121
|
/**
|
|
109
122
|
* Represents a menu item component used within an `ax-menu`.
|
|
110
123
|
* @category Components
|
|
@@ -139,8 +152,16 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
139
152
|
this.unsuscriber = inject(AXUnsubscriber);
|
|
140
153
|
this.renderer = inject(Renderer2);
|
|
141
154
|
this.injector = inject(Injector);
|
|
155
|
+
this.document = inject(DOCUMENT);
|
|
142
156
|
this.zIndexService = inject(AXZIndexService);
|
|
143
157
|
this.zToken = null;
|
|
158
|
+
this.submenuPortalParent = null;
|
|
159
|
+
this.submenuPortalNextSibling = null;
|
|
160
|
+
/** Survives submenu portaling when the DOM parent chain is broken. */
|
|
161
|
+
this.linkedParent = null;
|
|
162
|
+
this.mouseLeaveTimeout = null;
|
|
163
|
+
this.submenuUnlistenEnter = null;
|
|
164
|
+
this.submenuUnlistenLeave = null;
|
|
144
165
|
this.arrowIcon = computed(() => {
|
|
145
166
|
const isRtl = AXHtmlUtil.isRtl(this.nativeElement);
|
|
146
167
|
return this.root.orientation() == 'horizontal' && this.isFirstLevel()
|
|
@@ -159,12 +180,12 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
159
180
|
...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
160
181
|
this.color = input(/* @ts-ignore */
|
|
161
182
|
...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
162
|
-
this.mouseLeaveTimeout = null;
|
|
163
183
|
afterNextRender(() => {
|
|
164
184
|
if (!isPlatformBrowser(this.platformId)) {
|
|
165
185
|
return;
|
|
166
186
|
}
|
|
167
187
|
this.reparentOrphanedChildren();
|
|
188
|
+
this.linkChildItems();
|
|
168
189
|
this.updateDiscoveredSubmenuNodeCount();
|
|
169
190
|
this.childObserver = new MutationObserver((records) => {
|
|
170
191
|
if (!this.hasRelevantChildMutation(records)) {
|
|
@@ -185,6 +206,10 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
185
206
|
this.service.close$.pipe(this.unsuscriber.takeUntilDestroy).subscribe((item) => {
|
|
186
207
|
if (this == item) {
|
|
187
208
|
this.isOpen.set(false);
|
|
209
|
+
this.clearCloseTimeout();
|
|
210
|
+
this.restoreSubmenuPortal();
|
|
211
|
+
this.zIndexService.release(this.zToken);
|
|
212
|
+
this.zToken = null;
|
|
188
213
|
}
|
|
189
214
|
});
|
|
190
215
|
}
|
|
@@ -192,10 +217,13 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
192
217
|
return this.nativeElement.querySelector('ax-text')?.innerText;
|
|
193
218
|
}
|
|
194
219
|
/**
|
|
195
|
-
* Resolves the parent menu item.
|
|
196
|
-
*
|
|
220
|
+
* Resolves the parent menu item. Prefers an explicit link (survives submenu portaling),
|
|
221
|
+
* then DI, then the DOM tree.
|
|
197
222
|
*/
|
|
198
223
|
getParentMenuItem() {
|
|
224
|
+
if (this.linkedParent) {
|
|
225
|
+
return this.linkedParent;
|
|
226
|
+
}
|
|
199
227
|
if (this.parent) {
|
|
200
228
|
return this.parent;
|
|
201
229
|
}
|
|
@@ -203,8 +231,7 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
203
231
|
if (!parentHost || parentHost === this.nativeElement) {
|
|
204
232
|
return null;
|
|
205
233
|
}
|
|
206
|
-
|
|
207
|
-
return ctx instanceof AXMenuItemComponent ? ctx : null;
|
|
234
|
+
return this.getInstanceFromElement(parentHost) ?? null;
|
|
208
235
|
}
|
|
209
236
|
/**
|
|
210
237
|
* Opens the submenu of this menu item if it has sub-items and is not disabled.
|
|
@@ -214,7 +241,13 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
214
241
|
return;
|
|
215
242
|
}
|
|
216
243
|
this.reparentOrphanedChildren();
|
|
244
|
+
this.linkChildItems();
|
|
217
245
|
this.service.closeExcept(this);
|
|
246
|
+
const submenu = this.submenuSlot()?.nativeElement;
|
|
247
|
+
if (submenu) {
|
|
248
|
+
// Portal before `isOpen` so ancestor overflow cannot clip the first paint.
|
|
249
|
+
this.portalSubmenu(submenu);
|
|
250
|
+
}
|
|
218
251
|
if (!this.zToken) {
|
|
219
252
|
this.zToken = this.zIndexService.acquire();
|
|
220
253
|
}
|
|
@@ -224,9 +257,8 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
224
257
|
* Closes the submenu of this menu item if open.
|
|
225
258
|
*/
|
|
226
259
|
close() {
|
|
260
|
+
this.clearCloseTimeout();
|
|
227
261
|
this.service.markClosed(this);
|
|
228
|
-
this.zIndexService.release(this.zToken);
|
|
229
|
-
this.zToken = null;
|
|
230
262
|
}
|
|
231
263
|
/**
|
|
232
264
|
* Positions the submenu after layout so nested levels measure their full height.
|
|
@@ -245,30 +277,35 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
245
277
|
}
|
|
246
278
|
/**
|
|
247
279
|
* Calculate the position of the submenu to avoid it going out of the viewport.
|
|
280
|
+
* Tall panels are height-clamped; the panel is portaled so parent overflow cannot clip it.
|
|
248
281
|
*/
|
|
249
282
|
calculatePosition() {
|
|
250
283
|
const submenu = this.submenuSlot()?.nativeElement;
|
|
251
284
|
if (!submenu)
|
|
252
285
|
return;
|
|
286
|
+
this.portalSubmenu(submenu);
|
|
287
|
+
axClearMenuPanelHeight(this.renderer, submenu);
|
|
253
288
|
const submenuRect = this.measureSubmenuRect(submenu);
|
|
254
289
|
const itemRect = this.nativeElement.getBoundingClientRect();
|
|
255
290
|
const windowWidth = window.innerWidth;
|
|
256
291
|
const windowHeight = window.innerHeight;
|
|
292
|
+
const margin = AX_MENU_VIEWPORT_MARGIN;
|
|
257
293
|
const isRtl = AXHtmlUtil.isRtl(this.nativeElement);
|
|
294
|
+
const effectiveHeight = Math.min(submenuRect.height, Math.max(0, windowHeight - margin * 2));
|
|
258
295
|
let finalTop;
|
|
259
296
|
let finalLeft;
|
|
260
297
|
const preferredTop = this.isFirstLevel() && this.root.orientation() === 'horizontal' ? itemRect.bottom : itemRect.top;
|
|
261
|
-
const alternateTop = itemRect.top -
|
|
262
|
-
if (preferredTop +
|
|
298
|
+
const alternateTop = itemRect.top - effectiveHeight;
|
|
299
|
+
if (preferredTop + effectiveHeight <= windowHeight - margin) {
|
|
263
300
|
finalTop = preferredTop;
|
|
264
301
|
}
|
|
265
|
-
else if (alternateTop >=
|
|
302
|
+
else if (alternateTop >= margin) {
|
|
266
303
|
finalTop = alternateTop;
|
|
267
304
|
}
|
|
268
305
|
else {
|
|
269
|
-
finalTop =
|
|
306
|
+
finalTop = margin;
|
|
270
307
|
}
|
|
271
|
-
finalTop = this.clampVerticalPosition(finalTop,
|
|
308
|
+
finalTop = this.clampVerticalPosition(finalTop, effectiveHeight, windowHeight, margin);
|
|
272
309
|
if (this.isFirstLevel() && this.root.orientation() === 'horizontal') {
|
|
273
310
|
const preferredLeft = isRtl ? itemRect.right - submenuRect.width : itemRect.left;
|
|
274
311
|
const alternateLeft = isRtl ? itemRect.left : itemRect.right - submenuRect.width;
|
|
@@ -280,47 +317,30 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
280
317
|
}
|
|
281
318
|
}
|
|
282
319
|
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
|
-
}
|
|
320
|
+
const preferredLeft = isRtl ? itemRect.left - submenuRect.width : itemRect.right;
|
|
321
|
+
const alternateLeft = isRtl ? itemRect.right : itemRect.left - submenuRect.width;
|
|
322
|
+
if (isRtl ? preferredLeft >= 0 : preferredLeft + submenuRect.width <= windowWidth) {
|
|
323
|
+
finalLeft = preferredLeft;
|
|
324
|
+
}
|
|
325
|
+
else if (isRtl ? alternateLeft + submenuRect.width <= windowWidth : alternateLeft >= 0) {
|
|
326
|
+
finalLeft = alternateLeft;
|
|
297
327
|
}
|
|
298
328
|
else {
|
|
299
|
-
|
|
300
|
-
finalLeft = preferredLeftLtr;
|
|
301
|
-
}
|
|
302
|
-
else if (alternateLeftLtr >= 0) {
|
|
303
|
-
finalLeft = alternateLeftLtr;
|
|
304
|
-
}
|
|
305
|
-
else {
|
|
306
|
-
finalLeft = windowWidth - submenuRect.width;
|
|
307
|
-
}
|
|
329
|
+
finalLeft = isRtl ? 0 : windowWidth - submenuRect.width;
|
|
308
330
|
}
|
|
309
331
|
}
|
|
310
332
|
const isNestedMenu = !(this.isFirstLevel() && this.root.orientation() === 'horizontal');
|
|
311
333
|
if (isNestedMenu) {
|
|
312
334
|
const overlapsParent = finalLeft < itemRect.right && itemRect.left < finalLeft + submenuRect.width;
|
|
313
|
-
if (overlapsParent) {
|
|
314
|
-
|
|
315
|
-
if (shiftedTop + submenuRect.height <= windowHeight) {
|
|
316
|
-
finalTop = shiftedTop;
|
|
317
|
-
}
|
|
335
|
+
if (overlapsParent && itemRect.bottom + effectiveHeight <= windowHeight - margin) {
|
|
336
|
+
finalTop = itemRect.bottom;
|
|
318
337
|
}
|
|
319
338
|
}
|
|
320
|
-
finalTop = this.clampVerticalPosition(finalTop,
|
|
339
|
+
finalTop = this.clampVerticalPosition(finalTop, effectiveHeight, windowHeight, margin);
|
|
321
340
|
this.renderer.setStyle(submenu, 'position', 'fixed');
|
|
322
341
|
this.renderer.setStyle(submenu, 'top', `${finalTop}px`);
|
|
323
342
|
this.renderer.setStyle(submenu, 'left', `${finalLeft}px`);
|
|
343
|
+
axFitMenuPanelHeight(this.renderer, submenu, finalTop);
|
|
324
344
|
if (this.zToken) {
|
|
325
345
|
this.renderer.setStyle(submenu, 'z-index', String(this.zToken.zIndex));
|
|
326
346
|
}
|
|
@@ -334,6 +354,83 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
334
354
|
this.renderer.removeStyle(submenu, 'display');
|
|
335
355
|
return rect;
|
|
336
356
|
}
|
|
357
|
+
/** Moves the submenu under the context-menu backdrop (or body) to escape ancestor overflow. */
|
|
358
|
+
portalSubmenu(submenu) {
|
|
359
|
+
if (!isPlatformBrowser(this.platformId)) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
submenu.__axMenuOwner__ = this;
|
|
363
|
+
this.bindSubmenuPointerListeners(submenu);
|
|
364
|
+
if (this.submenuPortalParent) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
const parent = submenu.parentElement;
|
|
368
|
+
if (!parent) {
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
this.submenuPortalParent = parent;
|
|
372
|
+
this.submenuPortalNextSibling = submenu.nextSibling;
|
|
373
|
+
const rootEl = this.root.nativeElement;
|
|
374
|
+
const rootParent = rootEl.parentElement;
|
|
375
|
+
const portalHost = rootEl.tagName === 'AX-CONTEXT-MENU' && rootParent && rootParent !== this.document.body
|
|
376
|
+
? rootParent
|
|
377
|
+
: this.document.body;
|
|
378
|
+
if (submenu.parentElement !== portalHost) {
|
|
379
|
+
portalHost.appendChild(submenu);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
restoreSubmenuPortal() {
|
|
383
|
+
const submenu = this.submenuSlot()?.nativeElement;
|
|
384
|
+
this.unbindSubmenuPointerListeners();
|
|
385
|
+
if (submenu) {
|
|
386
|
+
axClearMenuPanelHeight(this.renderer, submenu);
|
|
387
|
+
delete submenu.__axMenuOwner__;
|
|
388
|
+
}
|
|
389
|
+
if (submenu && this.submenuPortalParent) {
|
|
390
|
+
try {
|
|
391
|
+
this.submenuPortalParent.insertBefore(submenu, this.submenuPortalNextSibling);
|
|
392
|
+
}
|
|
393
|
+
catch {
|
|
394
|
+
// Host may already be torn down while the context menu is closing.
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
this.submenuPortalParent = null;
|
|
398
|
+
this.submenuPortalNextSibling = null;
|
|
399
|
+
}
|
|
400
|
+
/** Keep this item open while the pointer is over its portaled submenu panel. */
|
|
401
|
+
bindSubmenuPointerListeners(submenu) {
|
|
402
|
+
this.unbindSubmenuPointerListeners();
|
|
403
|
+
this.submenuUnlistenEnter = this.renderer.listen(submenu, 'mouseenter', () => {
|
|
404
|
+
this.clearCloseTimeout();
|
|
405
|
+
this.clearAncestorCloseTimeouts();
|
|
406
|
+
});
|
|
407
|
+
this.submenuUnlistenLeave = this.renderer.listen(submenu, 'mouseleave', (event) => {
|
|
408
|
+
this.handlePointerLeave(event);
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
unbindSubmenuPointerListeners() {
|
|
412
|
+
this.submenuUnlistenEnter?.();
|
|
413
|
+
this.submenuUnlistenLeave?.();
|
|
414
|
+
this.submenuUnlistenEnter = null;
|
|
415
|
+
this.submenuUnlistenLeave = null;
|
|
416
|
+
}
|
|
417
|
+
/** Links direct children so parent resolution still works after the panel is portaled. */
|
|
418
|
+
linkChildItems() {
|
|
419
|
+
const submenu = this.submenuSlot()?.nativeElement;
|
|
420
|
+
if (!submenu) {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
submenu.querySelectorAll(':scope > ax-menu-item').forEach((el) => {
|
|
424
|
+
const child = this.getInstanceFromElement(el);
|
|
425
|
+
if (child) {
|
|
426
|
+
child.linkedParent = this;
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
getInstanceFromElement(el) {
|
|
431
|
+
const ctx = el.__axContext__;
|
|
432
|
+
return ctx instanceof AXMenuItemComponent ? ctx : undefined;
|
|
433
|
+
}
|
|
337
434
|
/**
|
|
338
435
|
* Moves nested `ax-menu-item` nodes rendered by recursive `ngTemplateOutlet` templates
|
|
339
436
|
* into the submenu slot. Angular content queries do not traverse those embedded views.
|
|
@@ -369,7 +466,13 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
369
466
|
});
|
|
370
467
|
}
|
|
371
468
|
updateDiscoveredSubmenuNodeCount() {
|
|
372
|
-
this.
|
|
469
|
+
const fromHost = this.getDirectSubmenuNodes().length;
|
|
470
|
+
const submenu = this.submenuSlot()?.nativeElement;
|
|
471
|
+
const fromPanel = submenu
|
|
472
|
+
? submenu.querySelectorAll(':scope > ax-menu-item, :scope > ax-title, :scope > ax-divider').length
|
|
473
|
+
: 0;
|
|
474
|
+
// After portaling, projected children live in the panel outside this host.
|
|
475
|
+
this.discoveredSubmenuNodeCount.set(Math.max(fromHost, fromPanel));
|
|
373
476
|
}
|
|
374
477
|
scheduleChildRefresh() {
|
|
375
478
|
if (this.childRefreshScheduled) {
|
|
@@ -379,6 +482,7 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
379
482
|
requestAnimationFrame(() => {
|
|
380
483
|
this.childRefreshScheduled = false;
|
|
381
484
|
this.reparentOrphanedChildren();
|
|
485
|
+
this.linkChildItems();
|
|
382
486
|
this.updateDiscoveredSubmenuNodeCount();
|
|
383
487
|
});
|
|
384
488
|
}
|
|
@@ -407,12 +511,12 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
407
511
|
return false;
|
|
408
512
|
}
|
|
409
513
|
/** Keeps the submenu fully inside the viewport vertically. */
|
|
410
|
-
clampVerticalPosition(top, height, windowHeight) {
|
|
411
|
-
if (top + height > windowHeight) {
|
|
412
|
-
top = windowHeight - height;
|
|
514
|
+
clampVerticalPosition(top, height, windowHeight, margin = 0) {
|
|
515
|
+
if (top + height > windowHeight - margin) {
|
|
516
|
+
top = windowHeight - margin - height;
|
|
413
517
|
}
|
|
414
|
-
if (top <
|
|
415
|
-
top =
|
|
518
|
+
if (top < margin) {
|
|
519
|
+
top = margin;
|
|
416
520
|
}
|
|
417
521
|
return top;
|
|
418
522
|
}
|
|
@@ -442,16 +546,17 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
442
546
|
}
|
|
443
547
|
handleMouseEnter(event) {
|
|
444
548
|
event.stopPropagation();
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
this.mouseLeaveTimeout = null;
|
|
448
|
-
}
|
|
549
|
+
this.clearCloseTimeout();
|
|
550
|
+
this.clearAncestorCloseTimeouts();
|
|
449
551
|
if (!this.isFirstLevel() || this.root.openOn() == 'hover') {
|
|
450
552
|
this.open();
|
|
451
553
|
}
|
|
452
554
|
}
|
|
453
555
|
handleMouseLeave(event) {
|
|
454
556
|
event.stopPropagation();
|
|
557
|
+
this.handlePointerLeave(event);
|
|
558
|
+
}
|
|
559
|
+
handlePointerLeave(event) {
|
|
455
560
|
if (!this.hasSubItems() || this.root.closeOn() !== 'leave') {
|
|
456
561
|
return;
|
|
457
562
|
}
|
|
@@ -459,25 +564,54 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
459
564
|
if (relatedTarget instanceof Node && this.containsSubmenuPointer(relatedTarget)) {
|
|
460
565
|
return;
|
|
461
566
|
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
567
|
+
this.scheduleClose();
|
|
568
|
+
}
|
|
569
|
+
scheduleClose() {
|
|
570
|
+
this.clearCloseTimeout();
|
|
465
571
|
this.mouseLeaveTimeout = setTimeout(() => {
|
|
572
|
+
this.mouseLeaveTimeout = null;
|
|
466
573
|
this.close();
|
|
467
574
|
}, 500);
|
|
468
575
|
}
|
|
469
|
-
|
|
576
|
+
clearCloseTimeout() {
|
|
577
|
+
if (this.mouseLeaveTimeout) {
|
|
578
|
+
clearTimeout(this.mouseLeaveTimeout);
|
|
579
|
+
this.mouseLeaveTimeout = null;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
clearAncestorCloseTimeouts() {
|
|
583
|
+
let current = this.getParentMenuItem();
|
|
584
|
+
while (current) {
|
|
585
|
+
current.clearCloseTimeout();
|
|
586
|
+
current = current.getParentMenuItem();
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
/** True when the pointer is still inside this item's submenu tree (including portaled panels). */
|
|
470
590
|
containsSubmenuPointer(node) {
|
|
471
|
-
|
|
472
|
-
if (submenu?.contains(node)) {
|
|
591
|
+
if (this.submenuSlot()?.nativeElement?.contains(node) || this.nativeElement.contains(node)) {
|
|
473
592
|
return true;
|
|
474
593
|
}
|
|
475
|
-
|
|
476
|
-
|
|
594
|
+
const el = node instanceof Element ? node : node.parentElement;
|
|
595
|
+
if (!el) {
|
|
596
|
+
return false;
|
|
477
597
|
}
|
|
478
|
-
|
|
598
|
+
const item = this.getInstanceFromElement(el.closest('ax-menu-item') ?? el) ??
|
|
599
|
+
el.closest('.ax-menu-items')?.__axMenuOwner__;
|
|
600
|
+
return !!item && this.isSelfOrAncestorOf(item);
|
|
601
|
+
}
|
|
602
|
+
isSelfOrAncestorOf(item) {
|
|
603
|
+
let current = item;
|
|
604
|
+
while (current) {
|
|
605
|
+
if (current === this) {
|
|
606
|
+
return true;
|
|
607
|
+
}
|
|
608
|
+
current = current.getParentMenuItem();
|
|
609
|
+
}
|
|
610
|
+
return false;
|
|
479
611
|
}
|
|
480
612
|
ngOnDestroy() {
|
|
613
|
+
this.clearCloseTimeout();
|
|
614
|
+
this.unbindSubmenuPointerListeners();
|
|
481
615
|
if (this.isOpen()) {
|
|
482
616
|
this.close();
|
|
483
617
|
}
|
|
@@ -488,7 +622,7 @@ class AXMenuItemComponent extends NXComponent {
|
|
|
488
622
|
if (this.disabled()) {
|
|
489
623
|
list.push('ax-state-disabled');
|
|
490
624
|
}
|
|
491
|
-
list.push(
|
|
625
|
+
list.push(resolveMenuItemColorClass(this.color()));
|
|
492
626
|
return list;
|
|
493
627
|
}
|
|
494
628
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -530,6 +664,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
530
664
|
type: HostBinding,
|
|
531
665
|
args: ['class']
|
|
532
666
|
}] } });
|
|
667
|
+
function resolveMenuItemColorClass(color) {
|
|
668
|
+
if (!color || color === 'default') {
|
|
669
|
+
return 'ax-default';
|
|
670
|
+
}
|
|
671
|
+
return `ax-${color}`;
|
|
672
|
+
}
|
|
533
673
|
|
|
534
674
|
class AXContextMenuOpeningEvent extends NXEvent {
|
|
535
675
|
constructor() {
|
|
@@ -546,6 +686,7 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
546
686
|
/** @ignore */
|
|
547
687
|
constructor() {
|
|
548
688
|
super();
|
|
689
|
+
this.supportsHeader = true;
|
|
549
690
|
// Inputs and Outputs
|
|
550
691
|
this.orientation = input('vertical', /* @ts-ignore */
|
|
551
692
|
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
@@ -578,6 +719,11 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
578
719
|
this.destroyRef = inject(DestroyRef);
|
|
579
720
|
this.originalNextSibling = null;
|
|
580
721
|
this.originalParent = null;
|
|
722
|
+
this.headerSlot = viewChild('headerSlot', /* @ts-ignore */
|
|
723
|
+
...(ngDevMode ? [{ debugName: "headerSlot" }] : /* istanbul ignore next */ []));
|
|
724
|
+
this.floatingHeader = null;
|
|
725
|
+
this.headerOriginalParent = null;
|
|
726
|
+
this.headerOriginalNextSibling = null;
|
|
581
727
|
this.items = signal([], /* @ts-ignore */
|
|
582
728
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
583
729
|
//
|
|
@@ -601,6 +747,7 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
601
747
|
if (isBrowser()) {
|
|
602
748
|
this.removeContextEvent();
|
|
603
749
|
}
|
|
750
|
+
this.restoreFloatingHeader();
|
|
604
751
|
}
|
|
605
752
|
/**
|
|
606
753
|
* Refreshes the context menu by rebinding event listeners to target elements.
|
|
@@ -643,6 +790,7 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
643
790
|
const wasOpen = this.nativeElement.classList.contains('ax-state-open');
|
|
644
791
|
this.nativeElement.classList.remove('ax-state-open');
|
|
645
792
|
this.lastOpenPoint = null;
|
|
793
|
+
axClearMenuPanelHeight(this.renderer, this.nativeElement);
|
|
646
794
|
// Drop rendered items before moving DOM nodes back to the original parent.
|
|
647
795
|
// This prevents a large menu tree from being re-parented/removed as a single heavy DOM operation.
|
|
648
796
|
if (wasOpen) {
|
|
@@ -721,8 +869,8 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
721
869
|
this.lastOpenPoint = point;
|
|
722
870
|
const elementRef = this.nativeElement;
|
|
723
871
|
elementRef.classList.add('ax-state-open');
|
|
724
|
-
this.positionAtPoint(point);
|
|
725
872
|
this.createBackdrop();
|
|
873
|
+
this.positionAtPoint(point);
|
|
726
874
|
// Items may render after the signal update (e.g. compact side-menu); reposition once laid out.
|
|
727
875
|
afterNextRender(() => {
|
|
728
876
|
if (this.lastOpenPoint && elementRef.classList.contains('ax-state-open')) {
|
|
@@ -732,13 +880,14 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
732
880
|
}
|
|
733
881
|
/**
|
|
734
882
|
* Positions the menu at `point`, flipping when it would overflow the viewport.
|
|
735
|
-
*
|
|
883
|
+
* When a floating header is present, positions header and panel as one clamped block.
|
|
736
884
|
*/
|
|
737
885
|
positionAtPoint(point) {
|
|
738
886
|
const elementRef = this.nativeElement;
|
|
739
887
|
const itemRect = this.measureMenuRect(elementRef);
|
|
740
888
|
const windowWidth = window.innerWidth;
|
|
741
889
|
const windowHeight = window.innerHeight;
|
|
890
|
+
const margin = AX_MENU_VIEWPORT_MARGIN;
|
|
742
891
|
const isRtl = AXHtmlUtil.isRtl(elementRef);
|
|
743
892
|
let left;
|
|
744
893
|
if (isRtl) {
|
|
@@ -753,23 +902,52 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
753
902
|
left = point.x - itemRect.width;
|
|
754
903
|
}
|
|
755
904
|
}
|
|
756
|
-
const
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
905
|
+
const headerEl = this.floatingHeader;
|
|
906
|
+
const headerRect = headerEl ? this.measureFloatingRect(headerEl) : null;
|
|
907
|
+
const gap = headerRect ? AX_CONTEXT_MENU_HEADER_GAP : 0;
|
|
908
|
+
const headerH = headerRect?.height ?? 0;
|
|
909
|
+
const menuH = itemRect.height;
|
|
910
|
+
const blockHeight = headerH + gap + menuH;
|
|
911
|
+
const maxBlockHeight = Math.max(0, windowHeight - margin * 2);
|
|
912
|
+
const effectiveBlockHeight = Math.min(blockHeight, maxBlockHeight);
|
|
913
|
+
let blockTop = point.y;
|
|
914
|
+
if (blockTop + effectiveBlockHeight > windowHeight - margin) {
|
|
915
|
+
blockTop = windowHeight - margin - effectiveBlockHeight;
|
|
763
916
|
}
|
|
764
|
-
|
|
765
|
-
|
|
917
|
+
if (blockTop < margin) {
|
|
918
|
+
blockTop = margin;
|
|
766
919
|
}
|
|
920
|
+
const menuTop = blockTop + headerH + gap;
|
|
767
921
|
this.renderer.setStyle(elementRef, 'left', `${left}px`);
|
|
768
|
-
this.renderer.setStyle(elementRef, 'top', `${
|
|
922
|
+
this.renderer.setStyle(elementRef, 'top', `${menuTop}px`);
|
|
769
923
|
this.renderer.setStyle(elementRef, 'position', 'fixed');
|
|
924
|
+
axFitMenuPanelHeight(this.renderer, elementRef, menuTop);
|
|
925
|
+
if (headerEl && headerRect) {
|
|
926
|
+
let headerLeft = isRtl ? left + itemRect.width - headerRect.width : left;
|
|
927
|
+
if (headerLeft < margin) {
|
|
928
|
+
headerLeft = margin;
|
|
929
|
+
}
|
|
930
|
+
if (headerLeft + headerRect.width > windowWidth - margin) {
|
|
931
|
+
headerLeft = windowWidth - margin - headerRect.width;
|
|
932
|
+
}
|
|
933
|
+
this.renderer.setStyle(headerEl, 'left', `${headerLeft}px`);
|
|
934
|
+
this.renderer.setStyle(headerEl, 'top', `${blockTop}px`);
|
|
935
|
+
this.renderer.setStyle(headerEl, 'position', 'fixed');
|
|
936
|
+
this.renderer.removeStyle(headerEl, 'visibility');
|
|
937
|
+
}
|
|
770
938
|
}
|
|
771
939
|
/** Measures menu size even when an ancestor hides the host with `display: none`. */
|
|
772
940
|
measureMenuRect(elementRef) {
|
|
941
|
+
axClearMenuPanelHeight(this.renderer, elementRef);
|
|
942
|
+
this.renderer.setStyle(elementRef, 'visibility', 'hidden');
|
|
943
|
+
this.renderer.setStyle(elementRef, 'display', 'flex');
|
|
944
|
+
const rect = elementRef.getBoundingClientRect();
|
|
945
|
+
this.renderer.removeStyle(elementRef, 'visibility');
|
|
946
|
+
this.renderer.removeStyle(elementRef, 'display');
|
|
947
|
+
return rect;
|
|
948
|
+
}
|
|
949
|
+
/** Measures the floating header bar using the same hidden-layout pass as the menu panel. */
|
|
950
|
+
measureFloatingRect(elementRef) {
|
|
773
951
|
this.renderer.setStyle(elementRef, 'visibility', 'hidden');
|
|
774
952
|
this.renderer.setStyle(elementRef, 'display', 'flex');
|
|
775
953
|
const rect = elementRef.getBoundingClientRect();
|
|
@@ -796,9 +974,68 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
796
974
|
this.createEventListeners(this.backdropElement);
|
|
797
975
|
this.document.body.appendChild(this.backdropElement);
|
|
798
976
|
this.backdropElement.appendChild(this.nativeElement);
|
|
977
|
+
const contextSource = this.resolveContextMenuTarget();
|
|
978
|
+
const context = resolveVisualContext(contextSource, this.document.documentElement);
|
|
979
|
+
applyVisualContext(this.backdropElement, context);
|
|
980
|
+
applyVisualContext(this.nativeElement, context);
|
|
981
|
+
this.floatHeaderToBackdrop(context);
|
|
982
|
+
}
|
|
983
|
+
/** Moves the projected header slot into the backdrop as a floating sibling of the panel. */
|
|
984
|
+
floatHeaderToBackdrop(context) {
|
|
985
|
+
const el = this.headerSlot()?.nativeElement;
|
|
986
|
+
if (!el || el.childElementCount === 0) {
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
989
|
+
this.headerOriginalParent = el.parentElement;
|
|
990
|
+
this.headerOriginalNextSibling = el.nextSibling;
|
|
991
|
+
this.floatingHeader = el;
|
|
992
|
+
this.renderer.addClass(el, 'ax-context-menu-header-floating');
|
|
993
|
+
this.renderer.setStyle(el, 'visibility', 'hidden');
|
|
994
|
+
if (this.zToken) {
|
|
995
|
+
this.renderer.setStyle(el, 'z-index', String(this.zToken.zIndex));
|
|
996
|
+
}
|
|
997
|
+
this.backdropElement.appendChild(el);
|
|
998
|
+
applyVisualContext(el, context);
|
|
999
|
+
}
|
|
1000
|
+
/** Restores the header slot to its original parent before the backdrop is removed. */
|
|
1001
|
+
restoreFloatingHeader() {
|
|
1002
|
+
if (this.floatingHeader && this.headerOriginalParent) {
|
|
1003
|
+
this.renderer.removeClass(this.floatingHeader, 'ax-context-menu-header-floating');
|
|
1004
|
+
this.renderer.removeStyle(this.floatingHeader, 'visibility');
|
|
1005
|
+
this.renderer.removeStyle(this.floatingHeader, 'z-index');
|
|
1006
|
+
this.renderer.removeStyle(this.floatingHeader, 'left');
|
|
1007
|
+
this.renderer.removeStyle(this.floatingHeader, 'top');
|
|
1008
|
+
this.renderer.removeStyle(this.floatingHeader, 'position');
|
|
1009
|
+
try {
|
|
1010
|
+
this.renderer.insertBefore(this.headerOriginalParent, this.floatingHeader, this.headerOriginalNextSibling);
|
|
1011
|
+
}
|
|
1012
|
+
catch {
|
|
1013
|
+
// Host may already be torn down while the context menu is closing.
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
this.floatingHeader = null;
|
|
1017
|
+
this.headerOriginalParent = null;
|
|
1018
|
+
this.headerOriginalNextSibling = null;
|
|
1019
|
+
}
|
|
1020
|
+
/** @ignore */
|
|
1021
|
+
resolveContextMenuTarget() {
|
|
1022
|
+
const target = this.target();
|
|
1023
|
+
if (!target) {
|
|
1024
|
+
return this.document.documentElement;
|
|
1025
|
+
}
|
|
1026
|
+
if (typeof target === 'string') {
|
|
1027
|
+
const el = this.document.querySelector(target);
|
|
1028
|
+
return el instanceof HTMLElement ? el : this.document.documentElement;
|
|
1029
|
+
}
|
|
1030
|
+
if (Array.isArray(target)) {
|
|
1031
|
+
const first = target[0];
|
|
1032
|
+
return first instanceof HTMLElement ? first : this.document.documentElement;
|
|
1033
|
+
}
|
|
1034
|
+
return target;
|
|
799
1035
|
}
|
|
800
1036
|
/** @ignore */
|
|
801
1037
|
removeBackdrop() {
|
|
1038
|
+
this.restoreFloatingHeader();
|
|
802
1039
|
if (this.backdropElement) {
|
|
803
1040
|
if (this.originalParent) {
|
|
804
1041
|
this.renderer.insertBefore(this.originalParent, this.nativeElement, this.originalNextSibling);
|
|
@@ -814,7 +1051,12 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
814
1051
|
this.close();
|
|
815
1052
|
l1();
|
|
816
1053
|
});
|
|
817
|
-
const l2 = this.renderer.listen(el, 'wheel', () => {
|
|
1054
|
+
const l2 = this.renderer.listen(el, 'wheel', (e) => {
|
|
1055
|
+
const target = e.target;
|
|
1056
|
+
if (target instanceof Element &&
|
|
1057
|
+
(this.nativeElement.contains(target) || target.closest('.ax-menu-items, .ax-context-menu-header'))) {
|
|
1058
|
+
return;
|
|
1059
|
+
}
|
|
818
1060
|
this.close();
|
|
819
1061
|
l2();
|
|
820
1062
|
});
|
|
@@ -870,7 +1112,7 @@ class AXContextMenuComponent extends NXComponent {
|
|
|
870
1112
|
provide: AXComponent,
|
|
871
1113
|
useExisting: AXContextMenuComponent,
|
|
872
1114
|
},
|
|
873
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;position:fixed;display:flex;height:max-content;width:max-content;flex-direction:column;border-style:var(--tw-border-style);border-width:1px;--tw-border-style: solid;border-style:solid;padding-block:calc(var(--spacing, .25rem) * 2);opacity:0%;transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));min-width:calc(var(--spacing, .25rem) * 48);border-radius:var(--radius-default, var(--ax-sys-border-radius));border-color:var(--color-border-lightest, rgba(var(--ax-sys-color-border-lightest-surface)));background-color:var(--color-lightest, rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-lightest, rgba(var(--ax-sys-color-on-lightest-surface)));box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){background-color:var(--ax-comp-bg);color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item ax-suffix ax-text{--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}ax-context-menu.ax-action-list-horizontal{padding-inline:calc(var(--spacing, .25rem) * 4)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:calc(var(--spacing, .25rem) * 2)}ax-menu.ax-action-list-horizontal{min-width:calc(var(--spacing, .25rem) * 48);gap:calc(var(--spacing, .25rem) * 5)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){margin-inline-end:calc(var(--spacing, .25rem) * 0)!important;padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu.ax-action-list-vertical{width:max-content;min-width:calc(var(--spacing, .25rem) * 48)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu>ax-menu-item{padding-block:calc(var(--spacing, .25rem) * 2)}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--radius-default, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:70%}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["subItems", "name", "data", "disabled", "color"], outputs: ["onClick"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1115
|
+
], viewQueries: [{ propertyName: "headerSlot", first: true, predicate: ["headerSlot"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (supportsHeader) {\n <div #headerSlot class=\"ax-context-menu-header\">\n <ng-content select=\"ax-header\"></ng-content>\n </div>\n}\n<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", 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-danger{color:var(--ax-comp-bg)}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item.ax-danger ax-prefix,:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item.ax-danger ax-suffix ax-text{color:inherit}: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-danger{color:var(--ax-comp-bg)}: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-context-menu-header:empty{display:none}.ax-context-menu-header-floating{--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-context-menu-header-padding: .375rem;--ax-comp-context-menu-header-item-gap: .25rem;--ax-comp-context-menu-header-border-radius: var(--ax-sys-border-radius);position:fixed;display:flex;align-items:center;gap:var(--ax-comp-context-menu-header-item-gap);width:max-content;max-width:calc(100vw - 1rem);overflow-x:auto;overscroll-behavior:contain;padding:var(--ax-comp-context-menu-header-padding);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));border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-context-menu-header-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)}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
1116
|
}
|
|
875
1117
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXContextMenuComponent, decorators: [{
|
|
876
1118
|
type: Component,
|
|
@@ -891,8 +1133,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
891
1133
|
AXDecoratorIconComponent,
|
|
892
1134
|
AsyncPipe,
|
|
893
1135
|
AXTranslatorPipe,
|
|
894
|
-
], template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;position:fixed;display:flex;height:max-content;width:max-content;flex-direction:column;border-style:var(--tw-border-style);border-width:1px;--tw-border-style: solid;border-style:solid;padding-block:calc(var(--spacing, .25rem) * 2);opacity:0%;transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));min-width:calc(var(--spacing, .25rem) * 48);border-radius:var(--radius-default, var(--ax-sys-border-radius));border-color:var(--color-border-lightest, rgba(var(--ax-sys-color-border-lightest-surface)));background-color:var(--color-lightest, rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-lightest, rgba(var(--ax-sys-color-on-lightest-surface)));box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){background-color:var(--ax-comp-bg);color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item ax-suffix ax-text{--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}ax-context-menu.ax-action-list-horizontal{padding-inline:calc(var(--spacing, .25rem) * 4)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:calc(var(--spacing, .25rem) * 2)}ax-menu.ax-action-list-horizontal{min-width:calc(var(--spacing, .25rem) * 48);gap:calc(var(--spacing, .25rem) * 5)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){margin-inline-end:calc(var(--spacing, .25rem) * 0)!important;padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu.ax-action-list-vertical{width:max-content;min-width:calc(var(--spacing, .25rem) * 48)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu>ax-menu-item{padding-block:calc(var(--spacing, .25rem) * 2)}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--radius-default, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:70%}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
895
|
-
}], 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: [{
|
|
1136
|
+
], template: "@if (supportsHeader) {\n <div #headerSlot class=\"ax-context-menu-header\">\n <ng-content select=\"ax-header\"></ng-content>\n </div>\n}\n<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", 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-danger{color:var(--ax-comp-bg)}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item.ax-danger ax-prefix,:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item.ax-danger ax-suffix ax-text{color:inherit}: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-danger{color:var(--ax-comp-bg)}: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-context-menu-header:empty{display:none}.ax-context-menu-header-floating{--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-context-menu-header-padding: .375rem;--ax-comp-context-menu-header-item-gap: .25rem;--ax-comp-context-menu-header-border-radius: var(--ax-sys-border-radius);position:fixed;display:flex;align-items:center;gap:var(--ax-comp-context-menu-header-item-gap);width:max-content;max-width:calc(100vw - 1rem);overflow-x:auto;overscroll-behavior:contain;padding:var(--ax-comp-context-menu-header-padding);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));border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-context-menu-header-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)}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"] }]
|
|
1137
|
+
}], 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"] }], headerSlot: [{ type: i0.ViewChild, args: ['headerSlot', { isSignal: true }] }], onWindowEvent: [{
|
|
896
1138
|
type: HostListener,
|
|
897
1139
|
args: ['window:scroll']
|
|
898
1140
|
}, {
|
|
@@ -910,6 +1152,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
910
1152
|
class AXMenuComponent extends NXComponent {
|
|
911
1153
|
constructor() {
|
|
912
1154
|
super();
|
|
1155
|
+
this.supportsHeader = false;
|
|
913
1156
|
this.orientation = input('horizontal', /* @ts-ignore */
|
|
914
1157
|
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
915
1158
|
this.openOn = input('hover', /* @ts-ignore */
|
|
@@ -954,7 +1197,7 @@ class AXMenuComponent extends NXComponent {
|
|
|
954
1197
|
provide: AXComponent,
|
|
955
1198
|
useExisting: AXMenuComponent,
|
|
956
1199
|
},
|
|
957
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;position:fixed;display:flex;height:max-content;width:max-content;flex-direction:column;border-style:var(--tw-border-style);border-width:1px;--tw-border-style: solid;border-style:solid;padding-block:calc(var(--spacing, .25rem) * 2);opacity:0%;transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));min-width:calc(var(--spacing, .25rem) * 48);border-radius:var(--radius-default, var(--ax-sys-border-radius));border-color:var(--color-border-lightest, rgba(var(--ax-sys-color-border-lightest-surface)));background-color:var(--color-lightest, rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-lightest, rgba(var(--ax-sys-color-on-lightest-surface)));box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){background-color:var(--ax-comp-bg);color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item ax-suffix ax-text{--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}ax-context-menu.ax-action-list-horizontal{padding-inline:calc(var(--spacing, .25rem) * 4)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:calc(var(--spacing, .25rem) * 2)}ax-menu.ax-action-list-horizontal{min-width:calc(var(--spacing, .25rem) * 48);gap:calc(var(--spacing, .25rem) * 5)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){margin-inline-end:calc(var(--spacing, .25rem) * 0)!important;padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu.ax-action-list-vertical{width:max-content;min-width:calc(var(--spacing, .25rem) * 48)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu>ax-menu-item{padding-block:calc(var(--spacing, .25rem) * 2)}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--radius-default, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:70%}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["subItems", "name", "data", "disabled", "color"], outputs: ["onClick"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1200
|
+
], usesInheritance: true, ngImport: i0, template: "@if (supportsHeader) {\n <div #headerSlot class=\"ax-context-menu-header\">\n <ng-content select=\"ax-header\"></ng-content>\n </div>\n}\n<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", 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-danger{color:var(--ax-comp-bg)}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item.ax-danger ax-prefix,:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item.ax-danger ax-suffix ax-text{color:inherit}: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-danger{color:var(--ax-comp-bg)}: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-context-menu-header:empty{display:none}.ax-context-menu-header-floating{--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-context-menu-header-padding: .375rem;--ax-comp-context-menu-header-item-gap: .25rem;--ax-comp-context-menu-header-border-radius: var(--ax-sys-border-radius);position:fixed;display:flex;align-items:center;gap:var(--ax-comp-context-menu-header-item-gap);width:max-content;max-width:calc(100vw - 1rem);overflow-x:auto;overscroll-behavior:contain;padding:var(--ax-comp-context-menu-header-padding);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));border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-context-menu-header-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)}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
1201
|
}
|
|
959
1202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMenuComponent, decorators: [{
|
|
960
1203
|
type: Component,
|
|
@@ -975,7 +1218,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
975
1218
|
AXDecoratorIconComponent,
|
|
976
1219
|
AsyncPipe,
|
|
977
1220
|
AXTranslatorPipe,
|
|
978
|
-
], template: "<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", styles: ["@layer properties;@layer components{ax-context-menu,ax-menu{display:flex;width:max-content;color:inherit}:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items{visibility:hidden;position:fixed;display:flex;height:max-content;width:max-content;flex-direction:column;border-style:var(--tw-border-style);border-width:1px;--tw-border-style: solid;border-style:solid;padding-block:calc(var(--spacing, .25rem) * 2);opacity:0%;transition-property:all;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));min-width:calc(var(--spacing, .25rem) * 48);border-radius:var(--radius-default, var(--ax-sys-border-radius));border-color:var(--color-border-lightest, rgba(var(--ax-sys-color-border-lightest-surface)));background-color:var(--color-lightest, rgba(var(--ax-sys-color-lightest-surface)));color:var(--color-on-lightest, rgba(var(--ax-sys-color-on-lightest-surface)));box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items).ax-state-open{visibility:visible;opacity:100%}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled){background-color:var(--ax-comp-bg);color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item:hover:not(.ax-state-disabled) ax-suffix ax-text{color:var(--ax-comp-bg)}:is(:is(ax-context-menu,ax-menu).ax-menu-container,:is(ax-context-menu,ax-menu) .ax-menu-items) ax-menu-item ax-suffix ax-text{--tw-font-weight: var(--font-weight-normal, 400) !important;font-weight:var(--font-weight-normal, 400)!important}ax-context-menu.ax-action-list-horizontal{padding-inline:calc(var(--spacing, .25rem) * 4)}ax-menu>ax-menu-item:has(>.ax-action-item-suffix:not(:empty)){gap:calc(var(--spacing, .25rem) * 2)}ax-menu.ax-action-list-horizontal{min-width:calc(var(--spacing, .25rem) * 48);gap:calc(var(--spacing, .25rem) * 5)}ax-menu.ax-action-list-horizontal>ax-title{display:none}ax-menu.ax-action-list-horizontal>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-prefix{padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item>.ax-action-item-suffix:not(ax-menu.ax-action-list-horizontal>ax-menu-item .ax-action-item-suffix:empty){margin-inline-end:calc(var(--spacing, .25rem) * 0)!important;padding-inline-start:calc(var(--spacing, .25rem) * 0)!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-horizontal>ax-menu-item:hover:not(ax-menu.ax-action-list-horizontal ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu.ax-action-list-vertical{width:max-content;min-width:calc(var(--spacing, .25rem) * 48)}ax-menu.ax-action-list-vertical>ax-menu-item{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled){background-color:transparent!important}ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-prefix,ax-menu.ax-action-list-vertical>ax-menu-item:hover:not(ax-menu.ax-action-list-vertical ax-menu-item.ax-state-disabled)>.ax-action-item-suffix{opacity:70%}ax-menu>ax-menu-item{padding-block:calc(var(--spacing, .25rem) * 2)}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled){border-radius:var(--radius-default, var(--ax-sys-border-radius))}ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-icon,ax-menu>ax-menu-item:hover:not(ax-menu ax-menu-item.ax-state-disabled)>ax-text{opacity:70%}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
|
|
1221
|
+
], template: "@if (supportsHeader) {\n <div #headerSlot class=\"ax-context-menu-header\">\n <ng-content select=\"ax-header\"></ng-content>\n </div>\n}\n<ng-content select=\"ax-menu-item,ax-divider,ax-title,ng-container\"></ng-content>\n\n@for (node of items(); track node) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: node }\"> </ng-container>\n}\n\n<ng-template #Recursion let-item>\n @if (item.group?.title) {\n <ax-title>{{ item.group?.title }}</ax-title>\n }\n <ax-menu-item\n [name]=\"item.name\"\n [data]=\"item.data\"\n [disabled]=\"item.disabled\"\n [color]=\"item.color\"\n [subItems]=\"item.items ?? []\"\n >\n @if (item.icon) {\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"> </ax-icon>\n </ax-prefix>\n }\n @if (item.text) {\n <ax-text>{{ item.text | translate | async }}</ax-text>\n }\n @if (item.suffix) {\n <ax-suffix>\n <ax-text>{{ item.suffix.text | translate | async }}</ax-text>\n </ax-suffix>\n }\n @for (child of item.items; track child) {\n <ng-container [ngTemplateOutlet]=\"Recursion\" [ngTemplateOutletContext]=\"{ $implicit: child }\"></ng-container>\n }\n </ax-menu-item>\n @if (item.break) {\n <ax-divider></ax-divider>\n }\n</ng-template>\n", 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-danger{color:var(--ax-comp-bg)}:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item.ax-danger ax-prefix,:is(ax-context-menu.ax-menu-container,.ax-menu-items) ax-menu-item.ax-danger ax-suffix ax-text{color:inherit}: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-danger{color:var(--ax-comp-bg)}: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-context-menu-header:empty{display:none}.ax-context-menu-header-floating{--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-context-menu-header-padding: .375rem;--ax-comp-context-menu-header-item-gap: .25rem;--ax-comp-context-menu-header-border-radius: var(--ax-sys-border-radius);position:fixed;display:flex;align-items:center;gap:var(--ax-comp-context-menu-header-item-gap);width:max-content;max-width:calc(100vw - 1rem);overflow-x:auto;overscroll-behavior:contain;padding:var(--ax-comp-context-menu-header-padding);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));border-width:var(--ax-comp-menu-items-border-width, 1px);border-style:solid;border-radius:var(--ax-comp-context-menu-header-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)}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
1222
|
}], 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
1223
|
type: HostBinding,
|
|
981
1224
|
args: ['class']
|