Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-formula

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-formula - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

7

CHANGELOG.md

@@ -8,2 +8,9 @@ # Changelog

## [0.7.1] 2021-02-19
### Fixed
- Correctly rebind touch and dirty handlers after resetting
- Remove stray `console.log`
## [0.7.0] 2021-02-19

@@ -10,0 +17,0 @@

2

package.json
{
"name": "svelte-formula",
"description": "Reactive Forms for Svelte",
"version": "0.7.0",
"version": "0.7.1",
"keywords": [

@@ -6,0 +6,0 @@ "svelte",

@@ -47,30 +47,4 @@ # Svelte Formula

## Roadmap
<br />
### Field Type Support
- [x] Support Basic Input fields (text, number, password, email, url) as text values
- [x] Support multiple named fields with unique `id` attributes, with an array of results sorted by ID alphabetically
- [x] Return correct value type for fields (return number as Number value)
- [x] Support Select Fields
- [x] Support Multiple Select Fields
- [x] Support Radio Fields
- [x] Support Checkbox Fields
- [x] Support Multiple Checkbox Fields
- [x] Support the Range input
- [x] Support the Color input
- [x] Support the Date / Time inputs
- [x] Support the File input
### Validation
- [x] Custom field-level validation via `formula` options
- [x] Custom form-level validation via `formula` options
- [x] Support for localised messages for validation errors
### Other Items
- [ ] Add Unit Tests - IN PROGRESS
- [ ] Add full documentation - IN PROGRESS
Icon made by [Eucalyp](https://creativemarket.com/eucalyp) from [flaticon.com](https://www.flaticon.com)

@@ -303,3 +303,2 @@ import { get, writable } from 'svelte/store';

element.files = value instanceof FileList ? value : null;
console.log(value);
} else {

@@ -894,2 +893,3 @@ element.value = value;

var dirtyHandlers = new Set();
var initialOptions = options;
var submitHandler = undefined;

@@ -899,2 +899,3 @@ var unsub; // eslint-disable-line

var innerReset;
var groupedMap = [];
/**

@@ -909,7 +910,6 @@ * Internal method to do binding of te action element

var groupedMap = __spread(formElements.reduce(function (entryMap, e) {
groupedMap = __spread(formElements.reduce(function (entryMap, e) {
var name = e.getAttribute('name');
return entryMap.set(name, __spread(entryMap.get(name) || [], [e]));
}, new Map()));
getInitialFormValues(groupedMap, stores, innerOpt);

@@ -1019,3 +1019,3 @@ innerReset = createReset(groupedMap, stores, innerOpt); // Loop over each group and setup up their initial touch and dirty handlers,

cleanupSubscriptions();
bindElements(currentNode, updatedOpts);
bindElements(currentNode, updatedOpts || initialOptions);
},

@@ -1031,3 +1031,17 @@ destroy: function destroy() {

reset: function reset() {
return innerReset();
innerReset();
__spread(touchHandlers, dirtyHandlers).forEach(function (fn) {
return fn();
});
groupedMap.forEach(function (_a) {
var _b = __read(_a, 2),
name = _b[0],
elements = _b[1];
touchHandlers.add(createTouchHandlers(name, elements, stores));
dirtyHandlers.add(createDirtyHandler(name, elements, stores));
});
bindElements(currentNode, initialOptions);
}

@@ -1034,0 +1048,0 @@ };

@@ -307,3 +307,2 @@ (function (global, factory) {

element.files = value instanceof FileList ? value : null;
console.log(value);
} else {

@@ -898,2 +897,3 @@ element.value = value;

var dirtyHandlers = new Set();
var initialOptions = options;
var submitHandler = undefined;

@@ -903,2 +903,3 @@ var unsub; // eslint-disable-line

var innerReset;
var groupedMap = [];
/**

@@ -913,7 +914,6 @@ * Internal method to do binding of te action element

var groupedMap = __spread(formElements.reduce(function (entryMap, e) {
groupedMap = __spread(formElements.reduce(function (entryMap, e) {
var name = e.getAttribute('name');
return entryMap.set(name, __spread(entryMap.get(name) || [], [e]));
}, new Map()));
getInitialFormValues(groupedMap, stores, innerOpt);

@@ -1023,3 +1023,3 @@ innerReset = createReset(groupedMap, stores, innerOpt); // Loop over each group and setup up their initial touch and dirty handlers,

cleanupSubscriptions();
bindElements(currentNode, updatedOpts);
bindElements(currentNode, updatedOpts || initialOptions);
},

@@ -1035,3 +1035,17 @@ destroy: function destroy() {

reset: function reset() {
return innerReset();
innerReset();
__spread(touchHandlers, dirtyHandlers).forEach(function (fn) {
return fn();
});
groupedMap.forEach(function (_a) {
var _b = __read(_a, 2),
name = _b[0],
elements = _b[1];
touchHandlers.add(createTouchHandlers(name, elements, stores));
dirtyHandlers.add(createDirtyHandler(name, elements, stores));
});
bindElements(currentNode, initialOptions);
}

@@ -1038,0 +1052,0 @@ };

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc