Component Method

Wait for all properties to be assigned

Description:
Observe component properties. It waits for all the properties to have values and then performs a callback function.

{
    "type": "component",
    "action": "observe",
    "args": {
       "element": "#my-element",
       "properties": ["property1", "property2"],
       "callback": "$context.methodName",
       "target": "$process.observeId"
   }
}

This method returns a observation id that is used to remove it again once done.

Remove observation

Description:
Stop observing properties that were previously being observed

{
    "type": "component",
    "action": "unobserve",
    "args": {
        "element": "my-element",
        "ids": ["$process.observeId"]
    }
}

Notify loading

Description:
This functionality is implemented in components to execute a callback function when the component is prepared to accept input but is not yet fully operational. It is invoked prior to the “notify_ready” action and acts as a remedy for timing-related issues. This dispatches the “loading” event.

{
    "type": "component",
    "action": "notify_loading",
    "args": {
         "element": "my-element"
    }
}

Notify ready

Description:
This method is used in components to notify the process engine that the component is ready. This dispatches the “ready” event.

{
   "type": "component",
   "action": "notify_ready",
   "args": {
      "element": "my-element"
   }
}

Wait for loading event

Description:
Wait for the loading event and call callback when it fires.

{
    "type": "component",
    "action": "on_loading",
    "args": {
       "element": "my-element",
       "callback": "$context.callback",
       "caller": "$context"
    }
}

Wait for ready event

Description:
Wait for the ready event and call callback when it fires.

{
    "type": "component",
    "action": "on_ready",
    "args": {
        "element": "my-element",
        "callback": "$context.callback",
        "caller": "$context"
    }
}

Wait for element to be rendered

Description:
Wait until a specific element in the user interface has fully rendered. This could be useful in scenarios where subsequent actions or computations depend on the full rendering of this element.

{
    "type": "component",
    "action": "wait_for_element_render",
    "args": {
        "element": "my-element"
    }
}