File

assets-navigator/asset-selector/asset-selector-base.ts

Index

Properties
Methods

Constructor

constructor(groupNodeService: GroupNodeService, inventory: InventoryService, assetSelectorService: AssetSelectorService)
Parameters :
Name Type Optional
groupNodeService GroupNodeService No
inventory InventoryService No
assetSelectorService AssetSelectorService No

Properties

config
Type : AssetSelectorOptions
Default value : {}

Config object containing all options for the asset selector.

isLoading
Type : boolean
Default value : false

The loading state of the current node.

onSelected
Default value : new EventEmitter<AssetSelectionChangeEvent>()

Emit the selected asset or assets.

selected
Type : Array<Partial<IManagedObject>> | IIdentified[] | IIdentified

An array of predefined nodes.

Methods

createDefaultRootNode
createDefaultRootNode()
Returns : any
Async createManagedObjectRootNode
createManagedObjectRootNode(asset: IIdentified)
Parameters :
Name Type Optional
asset IIdentified No
Returns : unknown
deselect
deselect(selectedMo: IManagedObject)

Removes a managed object from the selected array and emits the change.

Parameters :
Name Type Optional Description
selectedMo IManagedObject No

The selected asset.

Returns : void
deselectAll
deselectAll(selectedMo?: IManagedObject)

Deselects all expect the given one.

Parameters :
Name Type Optional Description
selectedMo IManagedObject Yes

The selected asset (optional, if empty -> just deselect all).

Returns : void
emitChange
emitChange(selected: IIdentified | IIdentified[], item: IManagedObject, isSelected: boolean)
Parameters :
Name Type Optional
selected IIdentified | IIdentified[] No
item IManagedObject No
isSelected boolean No
Returns : void
getIndexOfSelected
getIndexOfSelected(selected: Array> | Partial, selectedMo: IIdentified)

Returns the index of the currently selected item.

Parameters :
Name Type Optional Description
selected Array<Partial<IIdentified>> | Partial<IIdentified> No

All selected items

selectedMo IIdentified No

The new selected item-

Returns : any

An index, or -1 if not found.

select
select(selectedMo: IManagedObject)

Adds an managed object to the selected array and emits the change.

Parameters :
Name Type Optional Description
selectedMo IManagedObject No

The selected asset.

Returns : void

results matching ""

    No results matching ""