Releases: HRADigital/smartforms
Releases · HRADigital/smartforms
Release list
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
Fixed
NumberInputstep validation no longer rejects legal decimal values.value % stepleft a floating point residue for any step binary cannot hold exactly, so a value such as41.7015againststep="0.0000001"was marked invalid; the same residue carried the sign of the value, so negative values were never checked at all. The count of steps from the step base is now compared against a whole number within a magnitude-aware tolerance, and the base is taken fromminwhere one is declared, as the HTML step base is defined.
Full Changelog: 1.1.0...1.2.0
1.1.0
Added
TextAreaInputcharacter limit enforcement (data-limit) and an optional live counter guide (data-guide) that warns when nearing the limit.SmartFormList.resource()returning the list'sdata-resourceattribute, mirroringSmartForm.resource()soTaskExecutorcan read the resource from either form body.
Fixed
- Documentation:
README.mdnow listsEmailInputand theinput[type=password] -> TextInputmapping, documents theedit,destroy, andbacktoolbar roles, and corrects the per-state button-enable matrix and the form-level state list. types/index.d.tsrewritten to match the actual public API.CONTRIBUTING.mdno longer references a non-existent.nvmrc.
1.0.0
First stable release. SmartForms is a zero-dependency, framework-free client-side manager for static HTML forms: it tracks per-field state, drives toolbar actions from that state, and submits via configurable HTTP tasks. From this release on, the public API follows Semantic Versioning.
Highlights
- State-aware fields � every input is tracked as new, unchanged, changed, invalid, or empty, and the form aggregates a single state that UI reacts to.
- Toolbar driven by state � edit, save, cancel, destroy, back, and toggle roles enable/disable automatically per the current form state.
- HTTP submission via TaskExecutor � synchronous and asynchronous form submissions with verb/mode resolution, Laravel resource-controller defaults, and CSRF support.
- Zero dependencies, any setup � ships as ESM, CJS, and UMD with TypeScript definitions; drop in via autoInit() or instantiate classes directly.
Components
- Forms: SmartForm, SmartFormList, SmartFormRecord
- Inputs: TextInput, EmailInput, UrlInput, NumberInput, DateTimeInput, ColorInput, FileInput, SelectInput, TextAreaInput, CheckBoxInput, RadioInput, DynamicTableInput
- Toolbar: Toolbar, Button, AdminForm
- Constants: Roles, State, Tasks
- HTTP: TaskExecutor
- Entry point: autoInit(), plus data-track-form trackers and a toggleable debug logger
Changes since 0.1.1
Added
- SmartFormList.resource() returning the list's data-resource attribute, mirroring SmartForm.resource(), so TaskExecutor can resolve the resource from either a form or a list body.
Fixed
- README.md now documents EmailInput, the input[type=password] � TextInput mapping, the edit / destroy / back toolbar roles, and the corrected per-state button-enable matrix.
- types/index.d.ts rewritten to match the real public API (dropped the non-existent reordered state and LINK / REORDER roles; added EmailInput, Tasks, TaskExecutor).
- CONTRIBUTING.md no longer references a non-existent .nvmrc.
Install
npm install @hradigital/smartforms
Full Changelog: https://github.com/HRADigital/smartforms/commits/1.0.0