Socket
Socket
Sign inDemoInstall

@lion/form-core

Package Overview
Dependencies
2
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

## [0.1.1](https://github.com/ing-bank/lion/compare/@lion/form-core@0.1.0...@lion/form-core@0.1.1) (2020-06-03)
### Bug Fixes
* **field:** remove validation toggled disable ([e24f2ef](https://github.com/ing-bank/lion/commit/e24f2efcff7ffba6076faa4f3ce17ca4c8062b72))
* remove all stories folders from npm ([1e04d06](https://github.com/ing-bank/lion/commit/1e04d06921f9d5e1a446b6d14045154ff83771c3))
# 0.1.0 (2020-05-29)

@@ -8,0 +20,0 @@

9

package.json
{
"name": "@lion/form-core",
"version": "0.1.0",
"version": "0.1.1",
"description": "Form-core contains all essential building blocks for creating form fields and fieldsets",

@@ -31,3 +31,2 @@ "author": "ing-bank",

"src",
"stories",
"test",

@@ -44,6 +43,6 @@ "test-suites",

"dependencies": {
"@lion/core": "0.6.0",
"@lion/localize": "0.11.0"
"@lion/core": "0.7.0",
"@lion/localize": "0.11.1"
},
"gitHead": "94b87c80f5c734cd7d2d2ecd1c6598b22575717e"
"gitHead": "83fc7110615fc317b618f050dff57f7c75cf1b69"
}

@@ -268,3 +268,3 @@ /* eslint-disable class-methods-use-this, camelcase, no-param-reassign, max-classes-per-file */

this.__clearValidationResults();
this.__validationResult = [];
this.__finishValidation({ source: 'sync', hasAsync: true });
this._updateFeedbackComponent();

@@ -271,0 +271,0 @@ return;

@@ -383,5 +383,34 @@ import { unsafeHTML } from '@lion/core';

expect(disabledEl.hasFeedbackFor).to.deep.equal([]);
expect(disabledEl.validationStates.error).to.equal(undefined);
expect(disabledEl.validationStates.error).to.deep.equal({});
});
it('should remove validation when disabled state toggles', async () => {
const HasX = class extends Validator {
constructor() {
super();
this.name = 'HasX';
}
execute(value) {
const result = value.indexOf('x') === -1;
return result;
}
};
const el = await fixture(html`
<${tag}
.validators=${[new HasX()]}
.modelValue=${'a@b.nl'}
>
${inputSlot}
</${tag}>
`);
expect(el.hasFeedbackFor).to.deep.equal(['error']);
expect(el.validationStates.error).to.have.a.property('HasX');
el.disabled = true;
await el.updateComplete;
expect(el.hasFeedbackFor).to.deep.equal([]);
expect(el.validationStates.error).to.deep.equal({});
});
it('can be required', async () => {

@@ -388,0 +417,0 @@ const el = await fixture(html`

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc