Member Junction
    Preparing search index...

    <mj-left-nav> — Canonical left rail for MJ Explorer dashboards that have an internal section-nav (Admin shells, KH Config, KH Analytics, AI Analytics, Communication, Credentials, APIKeys, etc.).

    Replaces the bespoke .{name}-nav / .{name}-nav-item patterns each of those dashboards used to declare in their own CSS files.

    Supports:

    • Plain items (icon + label)
    • Items with a muted secondary description line (Admin shells pattern)
    • Items with a count badge (APIKeys pattern)
    • Sections with uppercase headers (Communication / Credentials pattern)
    • Optional [header] and [footer] content slots (KH Config logo header, etc.)
    • Responsive mobile drawer (≤700px): the rail hides off-canvas and a compact section switcher takes its place; tapping it slides the full rail in over a scrim. The rail keeps its full content (trees, slots, descriptions, badges) inside the drawer — no flattening. Set [MobileTitle] for the drawer label.
    sections: MJLeftNavSection[] = [
    {
    items: [
    { id: 'users', icon: 'fa-solid fa-users', label: 'Users', description: 'Manage user accounts' },
    { id: 'roles', icon: 'fa-solid fa-user-shield', label: 'Roles', description: 'Define roles and assignments' },
    ]
    }
    ];
    activeId = 'users';
    <mj-left-nav
    [Sections]="sections"
    [ActiveId]="activeId"
    (ItemClicked)="onItemClicked($event)">
    </mj-left-nav>

    Responsive — at ≤700px the rail becomes an off-canvas drawer (see the feature list above). The consumer should still switch the parent's flex-direction from row → column at the same breakpoint (e.g. <mj-page-body> Direction="row" with a @media override) so the in-flow section switcher stacks above the content pane rather than competing with it for horizontal space.

    Index

    Constructors

    Properties

    ActiveId: string | null = null

    The id of the currently active item. Items matching this id get the active styling and aria-current="page".

    ExpandedIds: string[] = []

    Ids of currently-expanded tree items. Items whose id appears here render with a down-chevron and their children are visible; items not in this list render with a right-chevron and their children stay collapsed. Consumer owns the state — toggle in response to (ItemToggled).

    Only applies to items where children !== undefined; flat items ignore it.

    ItemClicked: EventEmitter<MJLeftNavItem> = ...

    Emitted when a non-disabled item is clicked.

    ItemToggled: EventEmitter<MJLeftNavItem> = ...

    Emitted when a tree item's chevron is clicked. Consumer should toggle the item's id in / out of ExpandedIds. Does NOT also fire ItemClicked.

    MobileNavOpen: boolean = false

    Whether the mobile off-canvas drawer is open. Component-owned, transient UI state — no effect above the 700px breakpoint where the rail is always inline.

    MobileTitle: string = 'Menu'

    Label shown on the mobile drawer header and used as the switcher fallback label when no item is active. Defaults to 'Menu'. Set to something domain-specific (e.g. 'Sections', 'Test Suites') for clearer context.

    Sections: MJLeftNavSection[] = []

    The sections + items that make up the rail. Sections render top-to-bottom in array order; items inside each section render in array order.

    Width: number = 240

    Width of the rail in pixels. Defaults to 240. Set to a smaller value (e.g., 200) for denser shells. Only applies to the desktop rail — on mobile the rail becomes a fixed-width off-canvas drawer.

    Accessors

    Methods

    • Whether any top-level item in this section actually has children to expand. The template calls this once per section; the result is threaded through the recursive itemTpl so leaf nodes only reserve a chevron-column placeholder when a sibling will actually render a chevron.

      Top-level check is sufficient — if a deeply-nested item has children, its parent's children.length > 0 already qualifies the section as expandable.

      Parameters

      Returns boolean