frappe_form 2.0.2
frappe_form: ^2.0.2 copied to clipboard
A library to render Frappe DocForm and generate a response
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Types of changes
Addedfor new features.Changedfor changes in existing functionality.Deprecatedfor soon-to-be removed features.Removedfor now removed features.Fixedfor any bug fixes.Securityin case of vulnerabilities.
2.0.1 #
Fixed #
- Fixed check and radio group fields inside a section hiding their tap feedback behind the section background and logging "ListTile background color or ink splashes may be invisible".
2.0.0 #
Added #
- Added
LegacyMaterialandLegacyMaterialScopeto apply the app'smaterial_uitheme to widgets still built onflutter/material.dart. - Added
searchFieldInputDecorationtoCustomIntlPhoneField.
Changed #
- BREAKING: Migrated from
flutter/material.darttomaterial_ui: ^1.5.0, so apps must use theMaterialAppandThemefrommaterial_ui. - BREAKING: Apps must add
LegacyMaterial.localizationsDelegatesto theirMaterialApp.localizationsDelegates. - BREAKING: Requires Flutter
>=3.47.0and Dart>=3.13.0. - BREAKING:
CustomTextField,CustomDropDownButtonFormField,DocFormViewState.theme,DocFieldViewState.themeand theTimeOfDayextensions now use thematerial_uitypes. - BREAKING:
CustomIntlPhoneFieldno longer extendsIntlPhoneField, and itsdecorationnow takes thematerial_uiInputDecoration. CustomIntlPhoneField's country picker now shows the localized search hint when the givenpickerDialogStylehas no search field decoration.
Removed #
- BREAKING: Removed the deprecated
CustomIntlPhoneField.searchText.
0.10.0 #
Added #
- Added support for the field
placeholderproperty, rendered as the input hint text (onAttachandAttach Imagefields, when the placeholder is an image url it is rendered as a preview image while no file is attached). - Added support for
===,!==,%, the unary!,-and+operators and thetrue,falseandnullliterals on Mandatory Depends On (JS), Read Only Depends On (JS) and Display Depends On (JS) expressions in fields. - Added support for the plain non
eval:form of thedepends_onproperty (likedepends_on: "my_check"). - Added a standalone JS expression analyzer (
JsExpression) that can be reused outside the depends-on properties.
Changed #
- Breaking: Depends-on expressions are now parsed into a syntax tree instead of splitting the text on operator symbols.
DocFieldDependsOnBundleno longer exposes theand,or,sum,subtract,multiplyanddividechildren, its generative constructor,withConditionnorwithArithmetic. - Breaking: The JS expression logic moved to
src/js_expressionwith its own naming, soDocFieldDependsOnOperatoris nowJsComparisonOperator,DocFieldDependsOnConditionisJsLogicalOperatorandDocFieldDependsOnArithmeticisJsArithmeticOperator.
Fixed #
- Fixed depends-on expressions ignoring operator precedence and grouping parentheses, which also dropped referenced fields from the expression.
- Fixed depends-on expressions losing the arithmetic part when mixed with conditions, like
doc.a + doc.b >= 3 && doc.c == 1. - Fixed depends-on expressions breaking on operator symbols inside string literals, like
doc.some_date == "2025-01-01". - Fixed depends-on expressions only supporting the
doc.field <operator> literalshape, so5 > doc.qtyanddoc.qty > doc.min_qtywere misinterpreted. - Fixed untouched fields not being read as their Frappe default, so
doc.some_check == 0did not hold for an untouched checkbox. - Fixed bare field expressions like
eval:doc.some_fieldbeing always satisfied regardless of the field value. - Fixed relational operators returning
falseinstead of comparing as strings when the operands are not numeric. - Fixed a field referenced more than once registering its change listener more than once.
- Fixed the listeners of a replaced depends-on expression not being detached.
Removed #
- Breaking: Removed the unused
DocFieldDependsOnBehaviorenum.
0.9.1 #
Changed #
- Improved phone number parsing when filling phone input field to ensure proper US number handling.
0.9.0 #
0.8.0 #
Added #
- Implemented link tap behavior for
HTMLfields. - Added visual indication for required fields by displaying a red asterisk (*) in field labels.
0.7.0 #
0.6.0 #
Added #
- Added support for a field custom property
render_rulesto allow custom rendering of fields based on definitions.
0.5.0 #
Added #
- Added support for Mandatory Depends On (JS) expressions in fields (
mandatory_depends_onproperty). - Added support for Read Only Depends On (JS) expressions in fields (
read_only_depends_onproperty).
Changed #
- Improved support for Display Depends On (JS) expressions in fields (
depends_onproperty).
Fixed #
- Fixed issue with content scrolling to ensure submit button to properly appear show up.
0.4.1 #
Fixed #
- Fixed
maxLengthvalidation to 140 chars max forDatafield (according to official docs) when nolengthis specified.
0.2.1 #
Changed #
- Improved answer generation to ignore null values.
Fixed #
- Fixed issue with DocFieldPhoneView parsing initial phone number with hyphens.
- Fixed issue with DocFieldGeolocationView initial value that was taking coordinates in the wrong order.
- Fixed issue with scroll controller when using multiple tabs.
0.2.0 #
Added #
- Added "Next" and "Back" buttons to the
DocFormfor easier navigation between tabs. - Added support for html formatting on descriptions and Heading.
Changed #
- Changed the description location on Sections and Columns to be below the title instead of below the content.
Fixed #
- Fixed an issue with the label on Checkbox fields.
0.1.1 #
Fixed #
- Fixed an issue with the
DocFieldRatingViewthat was not setting the initial rating correctly.