Skip to content

Releases

Formhaus 1.9.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 01:11
3ecb01b

Minor Changes

  • Format 1.8: options take description and disabled, fields take readOnly, groups take reorderable. disabled and readOnly are true or 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 defaultValue stays valid. checkDefinition() warns about it with default-disabled-option.
  • New previousValues option on validateSubmission(), validateFieldValue() and validateFields() passes the stored answers.
  • New engine.moveItem(key, from, to) moves a group item with its values, id, errors and loading state.
  • New engine.resetCount counts reset() calls.
  • New @formhaus/core/dirty entry: trackDirty(engine) reports dirty and dirtyKeys, and markClean() moves the baseline. reset() moves it too.
  • New schemaParse(schema) in @formhaus/core/schema passes the parsed schema output to the submit handler.
  • New optionAttrs, optionDescriptionId, readOnlyAttrs and optionLocked in @formhaus/core/fields.
  • Option descriptions are translatable under fields.<key>.optionDescriptions.<value>.
  • New moveUp, moveDown and itemMoved labels in every bundled locale.
  • checkDefinition() reports invalid-type for the format 1.8 properties, disabled-not-applicable for disabled on an option of a field type without options, and outdated-format-version below format 1.8.
  • The unknown-property warning for a property from a newer format names the version it needs.
  • The functions returned by trackDirty and schemaParse are 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.0

Formhaus 1.12.1

Choose a tag to compare

@github-actions github-actions released this 02 Nov 20:10
61df870

Patch Changes

  • Fixed renderToStaticMarkup() and checkDefinition() 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.1

Formhaus 1.12.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 17:32
28a51bd

Minor Changes

  • renderToStaticMarkup() takes autofocus, a field key to focus on load.
  • renderToStaticMarkup() takes secondaryActions, 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.0

Formhaus 1.11.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 15:18
30197ed

Minor Changes

  • New @formhaus/core/html entry with renderToStaticMarkup(). 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/html reads a post into typed values.
  • New @formhaus/core/html.iife.js bundle sets the global FormhausHtml.
  • Option image sources are checked without the URL global. 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.0

Formhaus 1.10.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 05:35
8b95b50

Minor Changes

  • Format 1.9: a group may contain hidden fields. Below "formatVersion": "1.9" they stay an invalid-nesting error.
  • 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() reports source-in-group for a source on a hidden field in a group.
  • New readOnly label ("Read only") in every bundled locale.

Patch Changes

  • trackDirty counts NaN as equal to NaN.
  • A field in a group item written with setValue gets its defaultValue when 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-helper next to plan gets 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.0

Formhaus 1.8.1

Choose a tag to compare

@github-actions github-actions released this 30 Oct 15:22
37ebd52

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.1

Formhaus 1.8.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 14:45
d8b4346

Minor Changes

  • onStepValidate, onValidate, onBeforeStepChange and onBeforeSubmit get an AbortSignal as their last argument. It aborts when the pending check goes stale: a checked value changes, the step changes, the form resets or unmounts, or cancelPendingActions() 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.0

Formhaus 1.7.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 10:33
e7d295c

Minor Changes

  • Format 1.7: "multiple": true on a file field holds a list of files. minLength and maxLength count files. Without maxLength the limit is 100.
  • validateSubmission() accepts a file list as an array of references or a single reference.
  • New isFileList, addFiles, removeFile, fileEntries, fileLimit, filesFull and pickFiles in @formhaus/core/fields.
  • checkDefinition() reports multiple-not-applicable, and outdated-format-version for multiple below 1.7.
  • New validateWithRules option runs onValidate even when the definition rules fail.
  • New translation() in @formhaus/core/i18n makes one locale source per language.
  • Translation files support plural forms.
  • Changing locale on an open form keeps its answers.
  • Breaking: localize(definition, locale) takes the same list as the locale option. Removed OverlaySource and LocalizeSource.
  • Breaking: TranslateSource.lang is renamed to locale and is required.

Patch Changes

  • Fixed onValidate and onStepValidate errors 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.0

Formhaus 1.6.2

Choose a tag to compare

@github-actions github-actions released this 25 Oct 02:24
47856a3

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.2

Formhaus 1.6.1

Choose a tag to compare

@github-actions github-actions released this 25 Oct 01:08
3081f57

Patch Changes

  • validateSubmission() no longer refuses definitions with patterns that checkDefinition() reports as slow-pattern. It runs every pattern, on values up to 10,000 characters.
  • checkDefinition() no longer warns with slow-pattern about 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