Description
In FunctionInputSetup.vue (VE dialog, second screen: function call configuration), add support in the TextInput field to handle inputs that expect types with Parser functions.
Store modules (ztype.js, library.js, testResults.js...) already provide the necessary functions to deal with these types.
See ZObjectStringRenderer component for an example of fields with parsers/renderers.
Desired behavior/Acceptance criteria
- When an input expected type has a parser, the text input field should be able to handle and validate the input
- On initialization, validate:
- non empty string, parser function must run without errors
- if the parser function fails, show an error
- On text field update, validate:
- non empty string, parser function must run without errors
- if the parser function fails, show an error and emit empty value to VE
- if the parser function succeeds, emit the string value to VE
Also, following ZObjectStringRenderer component:
- The collapsed field placeholder shows an example from the renderer function tests
- The example should be shown in the user language
- If no valid test is found for the renderer function, fallback to a hardcoded placeholder
Devices and Design (URLs or screenshots)
- Desktop: ...
- Small screens/mobile: ...
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Front-end_Task/Bug_Completion_Checklist