APIs

Show:

Flexberry tree component with Semantic UI accordion style. Component must be used in combination with flexberry-treenode component, because it's only a wrapper for those tree nodes, which are placed on the same tree level.

Usage: templates/my-form.hbs

Methods

_accordionPropertiesDidChange

() private

Reinitializes Semantic UI accordion on component's wrapping

when following component's accordion-related properties changed: {{crossLink "FlexberryTreeComponent/exclusive:property"}}'exclusive'{{/crossLink}}, {{crossLink "FlexberryTreeComponent/collapsible:property"}}'collapsible'{{/crossLink}}, {{crossLink "FlexberryTreeComponent/animateChildren:property"}}'animateChildren'{{/crossLink}}, {{crossLink "FlexberryTreeComponent/duration:property"}}'duration'{{/crossLink}}

_actionHandlerIsDefined

(
  • options
)
Boolean private
Returns flag, indicating whether action handler is defined, for action with the specified name, or not.

Parameters:

  • options Object
    Method options
    • actionName String

      Name of component's action for which handler's existence this method should check.

Returns:

Boolean: Flag, indicating whether action handler is defined, for action with the specified name, or not.

_addDynamicProperty

(
  • propertyName
)
private
Adds component's new dynamic property. Gets related value from {{#crossLink "DynamicPropertiesMixin:dynamicProperties:property"}}dynamic properties{{/crossLink}}, and assignes it to related component's property, then attaches observer.

Parameters:

  • propertyName String
    Name of dynamic property that must be added.

_destroyAccordion

() private

Destroys Semantic UI accordion on component's wrapping

.

_dynamicPropertiesDidChange

() private
Observes & handles any changes in {{#crossLink "DynamicPropertiesMixin/dynamicProperties:property"}}'dynamicProperties'{{/crossLink}}, assigns actual values to a component's related properties (including initialization moment).

_initializeAccordion

() private

Initializes Semantic UI accordion on component's wrapping

depending on following component's accordion-related properties: {{crossLink "FlexberryTreeComponent/exclusive:property"}}'exclusive'{{/crossLink}}, {{crossLink "FlexberryTreeComponent/collapsible:property"}}'collapsible'{{/crossLink}}, {{crossLink "FlexberryTreeComponent/animateChildren:property"}}'animateChildren'{{/crossLink}}, {{crossLink "FlexberryTreeComponent/duration:property"}}'duration'{{/crossLink}}

_removeDynamicProperties

() private
Removes component's all previously added dynamic properties. Removes related component's properties & observers.

_removeDynamicProperty

(
  • propertyName
)
private
Removes component's previously added dynamic property. Removes related component's property & observer.

Parameters:

  • propertyName String
    Name of dynamic property that must be removed.

attachEventHandler

(
  • options
)
Attaches event handler for a given event-target. Also remembers attached handlers and related event-targets for clean up logic which will be executed before component will be destroyed, so use this method instead of explicit calls to [jQuery.on method](http://api.jquery.com/on/) to avoid possible memory leaks.

Parameters:

closeModalDialog

()
Close current modal window if it exists.

createdModalDialog

(
  • modalDialog
)
Handles create modal window action. It saves created window to have opportunity to close it later.

Parameters:

  • modalDialog JQuery
    Created modal window.

detachAllEventHandlers

()
Detaches all event-handlers remembered in metadata when event-handlers were attached through {{#crossLink "DomActionsMixin/attachEventHandler:method"}}'attachEventHandler' method {{/crossLink}}.

detachEventHandler

(
  • options
)
Detaches event-handler from a given event-target. Also cleans up metadata remembered when event-handler was attached through {{#crossLink "DomActionsMixin/attachEventHandler:method"}}'attachEventHandler' method {{/crossLink}}.

Parameters:

send

(
  • actionName
  • args
)
Any
Overridden ['send' method](https://github.com/emberjs/ember.js/blob/v2.7.0/packages/ember-runtime/lib/mixins/action_handler.js#L145). Method logic still the same, but method now returns value returned by the action handler. `

Parameters:

  • actionName String
    Name of the action that must be triggered.
  • args
    Arguments that must be passed to action.

Returns:

Any: Returns value returned by action handler.

Properties

_availableDomEvents

Object private
Dictionary containing names of DOM-events available for component's wrapping DOM-element and component's actions names related to them.

_componentWrapperIsAvailable

Boolean private
Flag: indicates whether component's wrapper DOM-element is available for select now.

_dynamicActions

Object private
Component's dynamic actions from {{#crossLink "DynamicActionsMixin:dynamicActions:property"}}'dynamicActions' property{{/crossLink}}, mapped from array into flat [JSON-object](http://www.json.org/).

_dynamicPropertiesMetadata

Object[] private
Array with objects containing names of already assigned {{#crossLink "DynamicPropertiesMixin:dynamicProperties:property"}}dynamic properties{{/crossLink}} and observer handlers related to them. Each object in array has following structure: { propertyName: '...', propertyObserverHandler: function() { ... } }.

Default: null

_eventsMetadata

Object[] private
Array with objects containing selected event targets & handlers attached to them. Each object in array has following structure: { eventTarget: ..., attachedEventHandlers: { click: [function() {}, function() {}, ...], dblclick: [function() {}, function() {}, ...], ... } }.

Default: null

_hasContent

Boolean private

Flag: indicates whether some nested content is defined (some yield markup or {{#crossLink "FlexberryTreeComponent/nodes:property"}}'nodes'{{/childNodes}} are defined).

_hasFooter

Boolean private

Flag: indicates whether some nested content for footer is defined (some yield markup for 'footer').

_hasHeader

Boolean private

Flag: indicates whether some nested content for header is defined (some yield markup for 'header').

_hasNodes

Boolean private

Flag: indicates whether some {{#crossLink "FlexberryTreeComponent/nodes:property"}}tree 'nodes'{{/childNodes}} are defined.

_isRoot

Boolean private

Flag: indicates whether tree is placed on root level (hasn't parent nodes).

_openedModalDialog

JQuery
Current opened modal window.

Default: undefined

_requiredActions

String[]
Component's required actions names. For actions enumerated in this array an assertion exceptions will be thrown, if actions handlers are not defined for them.

Default: null

animateChildren

Boolean

Flag: indicates whether nested child nodes content opacity should be animated (if true, it may cause performance issues with many nested child nodes).

Default: false

animationDuration

Number

Tree nodes expand/collapse animation duration in milliseconds.

Default: 350

classNameBindings

String[]

Component's wrapping

Default: ['_isRoot:ui']

classNames

String[]

Component's wrapping

CSS-classes names.

Any other CSS-class names can be added through component's 'class' property.

Default: ['flexberry-tree', 'accordion']

collapsible

Boolean

Flag: indicates whether it is allowed for already expanded tree nodes to collapse.

Default: true

dynamicActions

DynamicActionObject[]
Component's dynamic actions. If component consumes it's inner structure as [JSON-object](http://www.json.org/) or [Ember-object](https://emberjs.com/api/ember/release/classes/EmberObject) and there is no way to attach action handlers explicitly in hbs-markup, then you can define {{#crossLink "DynamicActionObject"}}dynamic actions{{/crossLink}} somewhere in code & pass defined array into this component's property.

Default: null

dynamicProperties

Object
Object containing dynamic properties that must be assigned to component using {{#crossLink "DynamicPropertiesMixin"}}dynamic-properties mixin{{/crossLink}}.

Default: null

exclusive

Boolean

Flag: indicates whether only one tree node can be expanded at the same time. If true, all expanded tree nodes will be automatically collapsed, on some other node expand.

Default: false

flexberryClassNames

Object static

Component's CSS-classes names. JSON-object containing string constants with CSS-classes names related to component's hbs-markup elements.

Sub-properties:

  • prefix String

    Component's CSS-class names prefix ('flexberry-tree').

  • wrapper String

    Component's wrapping

    CSS-class name ('flexberry-tree').

  • header String

    Component's start toolbar CSS-class name ('flexberry-tree-header').

  • footer String

    Component's end toolbar CSS-class name ('flexberry-tree-footer').

  • placeholder String

    Component's placeholder CSS-class name ('flexberry-tree-placeholder').

isTagless

Boolean
Flag: indicates whether component is tagless or not (has empty [tagName](https://emberjs.com/api/ember/release/classes/Component#property_tagName) or not).

nodes

FlexberryTreenodeObject

Tree nodes. This property is optional and must be used when there are too many child nodes, and you don't want to define them explicitly in the .hbs markup, then you can define nodes array somewhere in code & pass defined array to this component's property.

Default: null

placeholder

String

Component's placeholder. Will be displayed if nested tree nodes are not defined.

Default: t('components.flexberry-tree.placeholder')