import { storiesOf, html } from '@open-wc/demoing-storybook'; import { Unparseable } from '@lion/validate'; import '@lion/input/lion-input.js'; import './helper-wc/h-output.js'; function newDateValid(d) { const result = d ? new Date(d) : new Date(); return !isNaN(result.getTime()) ? result : null; // eslint-disable-line no-restricted-globals } storiesOf('Form Fundaments|Formatting and Parsing', module) .add( 'model value', () => html`

Note: we always use lion-input to demonstrate, but all things that extend lion-input have this functionality!

`, ) .add( 'parser', () => html` `, ) .add( 'formatter', () => html` `, ) /* .add( 'preprocessor', () => html` `, ) */ .add( '(de)serializer', () => html` `, ) .add( 'Unparseable', () => html`
`, ) .add( 'Unparseable restore', () => html` `, );