Home > @uniformdev/canvas > ChildEnhancerBuilder

ChildEnhancerBuilder class

Builds a definition of the enhancers to run on Canvas components to add data from other systems. Note that only the first matching enhancer will be run.

Signature:

Methods

<table><thead><tr><th>

Method

</th><th>

Modifiers

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

data(name, enhancer)

</td><td>

</td><td>

Targets an enhancer to set a specific object key on the component's data property. Note: an exception will be thrown if the same key is registered more than once.

</td></tr> <tr><td>

parameter(enhancer)

</td><td>

</td><td>

Targets an enhancer to modify the value of any parameter

</td></tr> <tr><td>

parameterName(name, enhancer)

</td><td>

</td><td>

Targets an enhancer to modify the value of any parameter with a specific name

</td></tr> <tr><td>

parameterType(type, enhancer)

</td><td>

</td><td>

Targets an enhancer to modify the value of any parameter with a specific type

</td></tr> <tr><td>

resolveComponentEnhancers()

</td><td>

</td><td>

Resolves component enhancer(s) for a given component. Returns a Map where the key is the name of the data property and the value is the enhancer.

</td></tr> <tr><td>

resolveParameterEnhancer(parameterName, parameter)

</td><td>

</td><td>

Resolves the parameter enhancer for a given parameter, if one exists. The first matching enhancer by registration order is returned, if more than one could match.

</td></tr> </tbody></table>