- Compute field enhancements:
- The new
value_typeoption turns thevalueoption into an arithmetic expression, like{{fields.price}} * {{fields.quantity}}. The result is saved as a number withintorfloat, or as a string withint/stringorfloat/string. An expression can use the+,-,*,/and%operators, parentheses, and theround,floor,ceilandabsfunctions. Small floating-point errors are removed, so0.1 * 3is saved as0.3. (#1086) - In a Compute field inside a List field, a
*in a field reference now stands for the current item, e.g.{{fields.lines.*.price}}. This also works in nested lists. - The new aggregate functions
sum,avg,min,maxandcountcan work on every item of a list, e.g.sum({{fields.lines.*.amount}}). See the Calculating a Total example. - Compute fields that refer to themselves, or to each other in a cycle, are now reported as configuration warnings, because their values never settle.
- The new
- The NPM package now generates PDF thumbnails, like the CDN builds. It bundles the PDF.js worker and the JPEG 2000 and JBIG2 image decoders, but not the character maps, standard fonts and colour profiles. Text in fonts a PDF doesn’t embed is drawn with a system font, and some Chinese, Japanese or Korean text may be missing from the thumbnail. (#1087)
- Bug fixes and improvements.
Full Changelog: v0.245.1...v0.246.0