Repository navigation
Releases
Releases · formhaus-dev/formhaus
Formhaus 1.9.0
Minor Changes
- Format 1.8: options take
descriptionanddisabled, fields takereadOnly, groups takereorderable.disabledandreadOnlyaretrueor a list of conditions that must all match. - The format 1.8 properties are ignored below
"formatVersion": "1.8". - A disabled option fails validation unless the stored answer already holds it.
- A disabled
defaultValuestays valid.checkDefinition()warns about it withdefault-disabled-option. - New
previousValuesoption onvalidateSubmission(),validateFieldValue()andvalidateFields()passes the stored answers. - New
engine.moveItem(key, from, to)moves a group item with its values, id, errors and loading state. - New
engine.resetCountcountsreset()calls. - New
@formhaus/core/dirtyentry:trackDirty(engine)reportsdirtyanddirtyKeys, andmarkClean()moves the baseline.reset()moves it too. - New
schemaParse(schema)in@formhaus/core/schemapasses the parsed schema output to the submit handler. - New
optionAttrs,optionDescriptionId,readOnlyAttrsandoptionLockedin@formhaus/core/fields. - Option descriptions are translatable under
fields.<key>.optionDescriptions.<value>. - New
moveUp,moveDownanditemMovedlabels in every bundled locale. checkDefinition()reportsinvalid-typefor the format 1.8 properties,disabled-not-applicablefordisabledon an option of a field type without options, andoutdated-format-versionbelow format 1.8.- The
unknown-propertywarning for a property from a newer format names the version it needs. - The functions returned by
trackDirtyandschemaParseare typed as properties, so they pass@typescript-eslint/unbound-method.
Changes in the adapters: @formhaus/react, @formhaus/vue.
npm install @formhaus/core@1.9.0 @formhaus/react@1.9.0
npm install @formhaus/core@1.9.0 @formhaus/vue@1.9.0Formhaus 1.12.1
Patch Changes
- Fixed
renderToStaticMarkup()andcheckDefinition()taking quadratic time on fields with thousands of options.
Changes in the adapters: @formhaus/react, @formhaus/vue.
npm install @formhaus/core@1.12.1 @formhaus/react@1.12.1
npm install @formhaus/core@1.12.1 @formhaus/vue@1.12.1Formhaus 1.12.0
Minor Changes
renderToStaticMarkup()takesautofocus, a field key to focus on load.renderToStaticMarkup()takessecondaryActions, extra submit buttons with a name and value. They show before the primary button, and Enter still submits the primary one.
Changes in the adapters: @formhaus/react, @formhaus/vue.
npm install @formhaus/core@1.12.0 @formhaus/react@1.12.0
npm install @formhaus/core@1.12.0 @formhaus/vue@1.12.0Formhaus 1.11.0
Minor Changes
- New
@formhaus/core/htmlentry withrenderToStaticMarkup(). It renders a single-page form to an HTML string with the React and Vue markup and class names. The form posts without JavaScript. It throws for steps, groups and file fields. parseFormData()in@formhaus/core/htmlreads a post into typed values.- New
@formhaus/core/html.iife.jsbundle sets the globalFormhausHtml. - Option image sources are checked without the
URLglobal. A source with a user name is still rejected.
Changes in the adapters: @formhaus/react, @formhaus/vue.
npm install @formhaus/core@1.11.0 @formhaus/react@1.11.0
npm install @formhaus/core@1.11.0 @formhaus/vue@1.11.0Formhaus 1.10.0
Minor Changes
- Format 1.9: a group may contain
hiddenfields. Below"formatVersion": "1.9"they stay aninvalid-nestingerror. - A hidden field in a group is submitted with its item, and moves and is removed with it.
- Errors of hidden fields in a group are listed in
topLevelErrors. checkDefinition()reportssource-in-groupfor asourceon a hidden field in a group.- New
readOnlylabel ("Read only") in every bundled locale.
Patch Changes
trackDirtycountsNaNas equal toNaN.- A field in a group item written with
setValuegets itsdefaultValuewhen it is shown again. - Field ids no longer collide with the helper, error, label, option or group button ids of another field. A field keyed
plan-helpernext toplangets a short stable suffix.
Changes in the adapters: @formhaus/react, @formhaus/vue.
npm install @formhaus/core@1.10.0 @formhaus/react@1.10.0
npm install @formhaus/core@1.10.0 @formhaus/vue@1.10.0Formhaus 1.8.1
Patch Changes
- A disabled file picker greys out its button.
- Under forced colors the file picker hides "No file chosen" and a full picker looks disabled.
Changes in the adapters: @formhaus/react, @formhaus/vue.
npm install @formhaus/core@1.8.1 @formhaus/react@1.8.1
npm install @formhaus/core@1.8.1 @formhaus/vue@1.8.1Formhaus 1.8.0
Minor Changes
onStepValidate,onValidate,onBeforeStepChangeandonBeforeSubmitget anAbortSignalas their last argument. It aborts when the pending check goes stale: a checked value changes, the step changes, the form resets or unmounts, orcancelPendingActions()runs.
Changes in the adapters: @formhaus/react, @formhaus/vue.
npm install @formhaus/core@1.8.0 @formhaus/react@1.8.0
npm install @formhaus/core@1.8.0 @formhaus/vue@1.8.0Formhaus 1.7.0
Minor Changes
- Format 1.7:
"multiple": trueon afilefield holds a list of files.minLengthandmaxLengthcount files. WithoutmaxLengththe limit is 100. validateSubmission()accepts a file list as an array of references or a single reference.- New
isFileList,addFiles,removeFile,fileEntries,fileLimit,filesFullandpickFilesin@formhaus/core/fields. checkDefinition()reportsmultiple-not-applicable, andoutdated-format-versionformultiplebelow 1.7.- New
validateWithRulesoption runsonValidateeven when the definition rules fail. - New
translation()in@formhaus/core/i18nmakes onelocalesource per language. - Translation files support plural forms.
- Changing
localeon an open form keeps its answers. - Breaking:
localize(definition, locale)takes the same list as thelocaleoption. RemovedOverlaySourceandLocalizeSource. - Breaking:
TranslateSource.langis renamed tolocaleand is required.
Patch Changes
- Fixed
onValidateandonStepValidateerrors staying after Continue passed and showing again after Back. - Unpacked size down from 1.83 MB to 1.24 MB.
Changes in the adapters: @formhaus/react, @formhaus/vue.
npm install @formhaus/core@1.7.0 @formhaus/react@1.7.0
npm install @formhaus/core@1.7.0 @formhaus/vue@1.7.0Formhaus 1.6.2
Patch Changes
- Fixed Cloud forms showing nothing when the server refused a submission without any field errors. They now show "Could not send. Try again."
Changes in the adapters: @formhaus/react, @formhaus/vue.
npm install @formhaus/core@1.6.2 @formhaus/react@1.6.2
npm install @formhaus/core@1.6.2 @formhaus/vue@1.6.2Formhaus 1.6.1
Patch Changes
validateSubmission()no longer refuses definitions with patterns thatcheckDefinition()reports asslow-pattern. It runs every pattern, on values up to 10,000 characters.checkDefinition()no longer warns withslow-patternabout a repeated group that starts with a separator class nothing else in the group matches, such as[A-Za-z]+([ '-][A-Za-z]+)*or\w+(\s+\w+)*, or about a fixed-length group repeated a few times, such as#(?:[0-9a-f]{3}){1,2}.checkDefinition()checks patterns with long Unicode character classes faster.
Changes in the adapters: @formhaus/react, @formhaus/vue.
npm install @formhaus/core@1.6.1 @formhaus/react@1.6.1
npm install @formhaus/core@1.6.1 @formhaus/vue@1.6.1