Module: addon/components/sl-menu

Extends

  • ember/Component
  • ember-stream/mixins/stream-enabled

Members

(inner) actions :Object

Type:
  • Object
Source:

(inner) allowShowAll :Boolean

Whether to show a menu item to display all sub-menus

Type:
  • Boolean
Default Value:
  • false
Source:

(inner) classNameBindings :Array.<String>

Type:
  • Array.<String>
Source:

(inner) classNames :Array.<String>

Type:
  • Array.<String>
Source:

(inner, nullable) items :Array.<Object>

The array of menu items

Type:
  • Array.<Object>
Default Value:
  • null
Source:

(inner) layout :Object

Type:
  • Object
Source:

(private, inner, nullable) selections :ember/Array

An array of objects containing data about the selected states

Type:
  • ember/Array
Default Value:
  • null
Source:

(private, inner) showingAll :Boolean

Whether to show all the menu's sub-items

Type:
  • Boolean
Default Value:
  • false
Source:

(inner) tagName :String

Type:
  • String
Default Value:
  • 'div'
Source:

Methods

(inner) actions:handleAction(actionName, data) → {undefined}

Handle an action from a sub-menu item

Parameters:
Name Type Description
actionName String

The name of an action to pass up to the parent controller

data *

Any data to also pass up to the parent controller

Source:
Returns:
Type
undefined

(inner) actions:hideAll() → {undefined}

Trigger hiding all of the menu's sub-menus

Source:
Returns:
Type
undefined

(inner) actions:showAll() → {undefined}

Trigger showing all the menu's sub-menus

Source:
Returns:
Type
undefined

(inner) clearSelections() → {undefined}

Clear the selections data

Source:
Returns:
Type
undefined

(inner) doAction() → {undefined}

Perform the currently selected item's action

Source:
Returns:
Type
undefined

(inner) hideAll() → {undefined}

Hide all the menu's sub-menus

Source:
Returns:
Type
undefined

(inner) initialize() → {undefined}

Initialize any computed properties that need setup

Source:
Listens to Events:
  • event:init
Returns:
Type
undefined

(inner) mouseLeave() → {undefined}

mouseLeave event handler

Source:
Returns:
Type
undefined

(inner) returns {undefined}()

mouseMove event handler

Source:

(inner) select(index) → {undefined}

Select an item by its index in the current selection context

Parameters:
Name Type Description
index Number

The index of the item to select

Source:
Throws:
ember/Error
Returns:
Type
undefined

(inner) selectDown() → {undefined}

Select a menu item in the "down" direction

At the top-level of the menu, "down" corresponds to opening and selecting the first child in its sub-menu. Inside a sub-menu, "down" corresponds to selecting the next sibling menu item.

Source:
Returns:
Type
undefined

(inner) selectedItem() → (nullable) {Object}

Retrieve the currently selected item

Source:
Observes:
  • selections.@each.item
Returns:
Type
Object

(inner) selectLeft() → {undefined}

Select a menu item in the "left" direction

At the top-level of the menu, "left" corresponds to selecting the previous sibling menu item. Inside a sub-menu, "left" corresponds to parsing back to the parent item

Source:
Returns:
Type
undefined

(inner) selectNext() → {undefined}

Select the next sibling in the current context

Source:
Throws:
ember/Error
Returns:
Type
undefined

(inner) selectParent() → {undefined}

Select the parent menu from the current context

Source:
Throws:
ember/Error
Returns:
Type
undefined

(inner) selectPrevious() → {undefined}

Select the previous sibling in the current context

Source:
Throws:
ember/Error
Returns:
Type
undefined

(inner) selectRight() → {undefined}

Select a menu item in the "right" direction

When at the top-level of the menu, "right" corresponds to the next sibling item. When inside a sub-menu, "right" corresponds to entering its sub-menu, if it has one.

Source:
Throws:
ember/Error
Returns:
Type
undefined

(inner) selectSubMenu() → {undefined}

Select the sub-menu in the current context

Source:
Throws:
ember/Error
Returns:
Type
undefined

(inner) selectUp() → {undefined}

Select a menu item in the "up" direction

When at the top level, "up" corresponds to no action. When in the first sub-menu and on the first item, "up" corresponds to selecting the top level. When in any other sub-menu, "up" corresponds to selecting the previous sibling menu item.

Source:
Throws:
ember/Error
Returns:
Type
undefined

(inner) setupStreamActions() → {undefined}

Setup the stream actions bindings

Source:
Listens to Events:
  • event:init
Returns:
Type
undefined

(inner) showAll() → {undefined}

Trigger the showAll menu-item

Source:
Returns:
Type
undefined