Socket
Socket
Sign inDemoInstall

svelte-formula

Package Overview
Dependencies
21
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
23Next

0.11.0

Diff

Changelog

Source

[0.11.0] - 2021-04-13

Changed

  • Types for Formula now provide stronger typing

Fixed

  • Formula now won't apply aria-role on items that already have a role set
  • Better handling of value and validation updates, store update is called less times
tanepiper
published 0.10.0 •

Changelog

Source

[0.10.0] - 2021-03-12

Added

  • New data-formula-bind attribute for elements - allows the event bindings to be customised. If used the default bindings are not made (so they must be also passed) - more than one event type can be bound to by using the pipe (|) separator.

    <!-- Use other browser event types to bind to -->
    <input type='text' name='myValue' data-formula-bind='mouseover' />
    <!-- Bind to more than one event type, such as including the original event  -->
    <input type='text' name='myValue' data-formula-bind='mouseover|keyup' />
    <!-- You can also emit your own custom events via elements inside custom components -->
    <input type='number' name='myValue' data-formula-bind='customEvent' bind:this='{el}' />
    <button on:click|preventDefault='{()' => el.dispatchEvent(new Event('customEvent'))}>Click Me</button>
    
  • options.preChanges method that is called when a change has been detected, but before any values are read or stores updated

  • options.postChanges method that is called after all changes have been made to the stores, with the most recent form values (this is functionally the same as formValues.subscribe(values => {})))

Fixed

  • options.formValidators now correctly update isFormValid after other validity checks have been carried out instead of before
  • <input type="hidden"> fields now supported, both single and multi-value. Formula can only set the value of this field via default values and cannot set the value ( but for example it can be changed in something like options.preChanges) - hidden fields have no events, so these are a special case where the values are read with each update.
  • Input types number, date, time and week now bind to both keyup and change handlers to handle both valid input cases on these elements

Changed

  • Existing attribute data-beaker-key has been renamed to data-formula-name - this allows a custom name to be used instead of the <input name="..."> value

  • Existing attributes data-beaker-form and data-beaker-row now correctly data-formula-form and data-formula-row

  • All event handlers wrapped in a setTimeout(()=> {}, 0) to defer an update until after DOM tick, this allows elements to ensure value changes have completed before reading

tanepiper
published 0.9.3 •

Changelog

Source

[0.9.3] - 2021-03-11

Fixed

  • Form validity check is not fired when novalidate it set on form and there is a submission
tanepiper
published 0.9.2 •

Changelog

Source

[0.9.2] - 2021-03-09

Changed

  • Removed Beaker changes for MutationObserver - reverted code back to using a check for all rows and re-create forms each time as tracking changes becomes too complex. New code in place that handles subscription correctly to child stores for each form instance within the group and better extraction of values. This also fixes infinite loop bug caused by new code.

Fixed

  • Beaker stores now correctly showing store values in a group without requiring bind:value
tanepiper
published 0.9.1 •

Changelog

Source

[0.9.1] - 2021-03-08

Fixed

  • Fix issue where updated mutation code expected default values
tanepiper
published 0.9.0 •

Changelog

Source

[0.9.0] - 2021-03-08

Removed

  • Group reset method - instead to reset a group of form instances call group.init with the initial data that was used to create the group.

Changed

  • Beaker now accepts defaultValues as an array (group.init will always override this)
  • Internal refactoring to improve group handling
  • Removed global state stores for initial values, now only generated internally for reset methods
  • Touched and Dirty and Invalid fields now have attributes set

Fixed

  • formValidity in Beaker stores is now an array
  • Group stores no longer emit twice on changes
  • Groups correctly now use MutationRecord added and removed nodes to be the reference to form instances when adding and removing data
tanepiper
published 0.8.7 •

Changelog

Source

[0.8.7] - 2021-02-23

Changed

  • Group elements now have data-in-group attribute set which allows for better filtering of groups from form data
tanepiper
published 0.8.6 •

Changelog

Source

[0.8.6] - 2021-02-23

Fixed

  • When a single value field is emptied after having values, correctly update the form state instead of leaving previous value
  • Removed a stay console introduced in 0.8.5, and fixed typo in 0.8.4
tanepiper
published 0.8.5 •

tanepiper
published 0.8.4 •

23Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc