File

assets-navigator/asset-node.ts

Extends

NavigatorNode

Index

Properties
Methods
Accessors

Constructor

constructor(service: AssetNodeService, config: NavigatorNodeData)
Parameters :
Name Type Optional
service AssetNodeService No
config NavigatorNodeData No

Properties

children
Type : AssetNode[]
Default value : []

Asset node children (subentries).

events
Type : Subject<Action>
filterQuery$
Default value : new BehaviorSubject<string>('')
hideDevices
Type : boolean
Default value : false
Protected loadMoreNode
Type : LoadMoreNode
mo
Type : any
Static NAME
Type : string
Default value : 'AssetNode'
Protected paging
Type : Paging<AssetNodeMo>
root
Type : boolean
showChildDevices
Type : boolean
Default value : false
Optional breadcrumb
Type : string

The breadcrumb of the node, displaying the "path", but supports multiple levels. e.g. (Groups > Level 1 > Level 2)

confirm
Type : PopoverConfirmComponent
Default value : undefined

Confirmation popover displayed at the end of the process of moving the navigator menu item.

draggable
Type : boolean
Default value : false

Indicates that the navigator node is draggable.

dragged
Default value : false

Indicates that the navigator node is dragged.

draggedHover
Default value : false

Indicates that currently something is dragged over the node.

droppable
Type : boolean
Default value : false

Indicates that the navigator node is droppable.

Optional featureId
Type : string

Id to identify specific feature node.

hidden
Type : boolean
Default value : false

Indicates that the navigator node is visible/hidden.

icon
Type : string

Navigator node icon.

Optional iconComponent
Type : Type<any>

Custom icon component.

iconOpen
Type : string

Navigator node icon when expanded.

Optional iconTemplate
Type : TemplateRef<any>

Custom icon template.

label

Label to be displayed in the navigator node.

Optional loading
Type : boolean

Loading state indicator.

open
Type : boolean
Default value : false

Indicates that the navigator node is expanded/collapsed.

parents
Type : NavigatorNode[]
Default value : []

Navigator node parent nodes.

path
Type : string

The path to which the UI will be redirected after clicking the navigator node.

routerLinkExact
Type : boolean
Default value : true

Indicates whether the navigator node should be active based on matching the node path and the URL path. To match the URL exactly, set this option to true.

routerLinkExact set to true: When the URL path is set to /a/b/c and the node path to /a/b then the node will not be set active.

routerLinkExact set to false: When the URL path is set to /a/b/c and the node path to /a/b then the node will be set active.

Methods

addManagedObject
addManagedObject(mo)
Parameters :
Name Optional
mo No
Returns : void
Protected addNodes
addNodes(res)
Parameters :
Name Optional
res No
Returns : void
click
click(options: ClickOptions)
Parameters :
Name Type Optional Default value
options ClickOptions No {}
Returns : void
Protected countChildren
countChildren()
Returns : any
destroy
destroy()
Returns : void
dragEnd
dragEnd($event)
Parameters :
Name Optional
$event No
Returns : void
dragStart
dragStart($event)
Parameters :
Name Optional
$event No
Returns : void
Async drop
drop($event)
Parameters :
Name Optional
$event No
Returns : any
Protected fetch
fetch()
Returns : any
getPath
getPath()
Returns : any
Protected Async handleEvent
handleEvent(evt: Action)
Parameters :
Name Type Optional
evt Action No
Returns : any
hasChildDevices
hasChildDevices()

Checks if the current node has child devices.

Returns : boolean
hookEvents
hookEvents()
Returns : void
isChildAddition
isChildAddition(childAdditions, mo)
Parameters :
Name Optional
childAdditions No
mo No
Returns : any
openOnStart
openOnStart(url)
Parameters :
Name Optional
url No
Returns : boolean
refresh
refresh(mo: any, method: string)
Parameters :
Name Type Optional Default value
mo any No {}
method string No 'GET'
Returns : void
setLabel
setLabel()
Returns : void
sort
sort()
Returns : void
Protected toggleLoadMore
toggleLoadMore(show: boolean)
Parameters :
Name Type Optional
show boolean No
Returns : void
toString
toString()
Returns : string
add
add(node: NavigatorNode)

Adds a child navigator node to the node.

Parameters :
Name Type Optional Description
node NavigatorNode No

Child node.

Returns : void
dragEnter
dragEnter($event)

This event is fired when a dragged element enters a valid drop target.

Parameters :
Name Optional Description
$event No

DOM event.

Returns : void
dragLeave
dragLeave($event)

This event is fired when a dragged element leaves a valid drop target.

Parameters :
Name Optional Description
$event No

DOM event.

Returns : void
empty
empty()

Removes children nodes.

Returns : void
expand
expand()

Expands the navigator node if it is collapsed.

Returns : void
find
find(predicate, findBy)

Returns a child navigator node based on the predicate.

// The function will compare the labels to the string and return a matching result.
// The capitalization of the characters does not matter (case insensitive).
const predicate = 'group1';
const childNode = parentNode.find(predicate);

// Check: [lodash matches](https://lodash.com/docs/4.17.15#matches)
const predicate = { label: 'group2' };
const childNode = parentNode.find(predicate);
Parameters :
Name Optional Default value Description
predicate No

Filter criteria.

findBy No 'label'

NavigatorNode field name to compare.

Example :
<div><pre class="line-numbers"><code class="language-ts">// The function will compare the labels to the string and return a matching result.
// The capitalization of the characters does not matter (case insensitive).
const predicate = &#39;group1&#39;;
const childNode = parentNode.find(predicate);

// Check: [lodash matches](https://lodash.com/docs/4.17.15#matches)
const predicate = { label: &#39;group2&#39; };
const childNode = parentNode.find(predicate);</code></pre></div>
Returns : any
remove
remove(node: NavigatorNode)

Removes the child navigator node from the node.

Parameters :
Name Type Optional Description
node NavigatorNode No

Child node.

Returns : void
traverse
traverse(callback)

Performs a callback function recursively on each of the navigator node's children down the hierarchy.

const expandChild = (childNode) => childNode.expand();
parentNode.traverse(expandChild);
Parameters :
Name Optional Description
callback No

Function to be called.

Example :
<div><pre class="line-numbers"><code class="language-ts">const expandChild = (childNode) =&gt; childNode.expand();
parentNode.traverse(expandChild);</code></pre></div>
Returns : void
update
update(data?: NavigatorNodeData)

Updates the navigator node.

Parameters :
Name Type Optional Description
data NavigatorNodeData Yes

Data to be updated.

Returns : void
Protected updateChildren
updateChildren()

Updates the navigator node by sorting its children and also checking their visibility.

Returns : void
Protected updateHidden
updateHidden()

Checks if the navigator node should be hidden based on the visibility of its child nodes.

Returns : void

Accessors

hasChildren
gethasChildren()
isDevice
getisDevice()
isDeviceOrProbablyChildDevice
getisDeviceOrProbablyChildDevice()
isNeitherDeviceOrGroup
getisNeitherDeviceOrGroup()
canDrop
getcanDrop()

results matching ""

    No results matching ""