Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to enhance the handling of
widget_props
across different components and to improve the parsing of widget properties. The most important changes include the addition of new getter methods in theField
class, updates to theForm
class to merge widget properties, and the creation of a new utility function for parsing widget properties.Enhancements to
widget_props
handling:src/Field.ts
: Addedsuffix
andprefix
getter methods to theField
class to retrieve widget properties.src/Form.ts
: Updated imports to includeparseWidgetProps
and modified theForm
class to mergewidget_props
from the fields definition and XML attributes. [1] [2]src/Widget.ts
: Updated theWidget
class to use the newparseWidgetProps
utility function for parsingwidget_props
. [1] [2]Utility function creation:
src/helpers/attributeParser.ts
: Added a newparseWidgetProps
function to handle the parsing ofwidget_props
from both strings and objects.Testing improvements:
src/spec/Form.spec.ts
: Added a new test case to ensure thatwidget_props
from fields definition and XML attributes are correctly merged.