Function: getArticulationState()
getArticulationState(
source
,data
):object
Defined in: src/utils/getArticulationState.ts:68
Retrieve the articulation state
The goal of this function is to provide insights about a roundabout using extra information inserted in the JSON source provided to Lunatic.
For instance
"articulation": {
"source": "roundabout",
"items": [
{
"label": "Prénom",
"value": "PRENOMS"
},
{
"label": "Sexe",
"value": "if SEXE = \"H\" then \"Homme\" else \"Femme\""
},
{
"label": "Age",
"value": "cast(AGE, string) || \" ans\""
}
]
},
- source is the ID of the roundabout component
- items define the field to extract from the roundabout data
Parameters
Parameter | Type |
---|---|
source | LunaticSource & object |
data | Partial |
Returns
object
items
items:
Item
[]