How to map services to different components?

Example - I am attaching a script that returns label and value to the combobox. I attach value to value and label to text. Doesn’t work

Combobox
To map the script to the combobox it should return key, value pairs like below:

let output = [
        {
            'id': "1",
            'text': "value1"
        },
        {
            'id': "2",
            'text': "value2"
        }
    ];
    
    return output;

Then map id to id and text to text.

image

Textfield
The script should return a single value in text format, example:

let output = "Some value";
    
return [{'output': output}];

Map output of the script to parameter called value of the Textfield.

Checkbox
The script should return a single value of the checked or unchecked component (true / false by default)

let output = "true";
    
return [{'output': output}];

Map output of the script to parameter called value of the Checkbox.

Datepicker
The script should return a single value in the form of a timestamp in milliseconds

let output = 1680875739000;

return [{'output': output}];

Map output of the script to parameter called value of the DatePicker.