CngxContextMenuTriggerCoreDeps
projects/common/interactive/menu/context-menu-trigger-core.ts
Import#
import { CngxContextMenuTriggerCoreDeps } from '@cngx/common/interactive'
Description#
Dependencies for createContextMenuTriggerCore. The caller injects the DI-backed collaborators (dismiss factory, announcer, config) and passes them in, keeping the core a pure factory.
Index#
Instance Properties#
Receives the resolved context on a successful open. No-op by default.
Document writing direction. Resolves the physical arrow to its
inline-logical intent at the dispatch site, so under rtl physical
ArrowLeft opens the submenu and physical ArrowRight pops it.
CngxMenuDismissHandlerFactoryDismiss-handler factory (from CNGX_MENU_DISMISS_HANDLER_FACTORY).
CngxMenuFocusStackFactoryFocus-stack factory (from CNGX_MENU_FOCUS_STACK_FACTORY).
Veto/datum seam for the keyboard open gesture (Shift+F10). Evaluated
before preventDefault(), mirroring resolveOpen; the resolved
context goes through commitContext exactly like a pointer open,
so a keyboard open never serves a stale datum from an earlier
right-click. Defaults to always-open with undefined context.
Veto/datum seam. Evaluated as the FIRST thing in the contextmenu
handler, BEFORE preventDefault(). { open: false } leaves the native
menu untouched (no preventDefault, no anchor, no open).
{ open: true, context } prevents default, hands context to
commitContext, then opens. Defaults to always-open with
undefined context, so a consumer that omits it keeps the plain
right-click-always-opens behaviour.