npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

valleform

v1.45.0

Published

Valle forms made with easy.

Downloads

150

Readme

valleForm

React component for convert the valle screens-api data structure to web component based forms.

npm dependencies Status

Write

<valleForm
    tabs = { [...] }
    buttons = { [...] }
    baseApi = ''
    canonicalApi = ''
    params = { {...} }
/>

... and build:

valleForm overview

Table of contents

Features

  • Mounts forms with infinite fields combinations easy.
  • Mounts fields with specific validations easy.
  • Mounts dynamic actions for Rest integrations (Post | Put | Delete).
  • Registration mode for dynamic CREATE.
  • View mode for dynamic vizualization.
  • Edit mode for dynamic UPDATE and DELETE.
  • Read only automatic for all fields.
  • a11y forms (by valle web components).
  • Responsive forms.
  • Dynamic speed dial buttons.
  • Inherited features.
  • Switch button for toggle visible_screen fields.
  • User feedbacks:
    • Snackbar report for all fields validation.
    • Snackbar report for CREATE submit success.
    • Snackbar report for CREATE submit error.
    • Snackbar report for UPDATE submit success.
    • Snackbar report for UPDATE submit error.
    • Snackbar report for DELETE submit success.
    • Snackbar report for DELETE submit error.
  • Keyboard controls:
    • Press enter for submit form.

Environment dependencies

Verify if you have this valle web components avaible in your project.

Installation

1 - Download the latest release.

2 - Import the styles on css/main.css folder to your project.

Usage

Registration mode

  • Mounts all fields.
  • Allow POST with all values and custom params.
import valleForm from './<path>/valleForm';

...
render() {
    return (
        <valleForm
            tabs = { equipamentos }
            buttons = { equipamentos.buttons }
            baseApi = 'http://localhost:3000/'
            canonicalApi = 'api/equipamentos'
            params = { {empresa: '', estabelecimento: ''} }
        />
    );
}
...

Result:

Registration mode example

View mode

  • Mounts all fields with values.
  • Allow edit mode for submit a update.
import valleForm from './<path>/valleForm';

...
render() {
    return (
        <valleForm
            tabs = { equipamentos.lines }
            buttons = { equipamentos.buttons }
            baseApi = 'http://localhost:3000/'
            canonicalApi = 'api/equipamentos'
            params = { {empresa: '', estabelecimento: ''} }
            values = { {valuesObj} }
            _id = '123'
            readOnly
        />
    );
}
...

Result:

View mode example

Edit mode

  • Mounts all fields with values.
  • Allow UPDATE and DELETE for any consulting.
import valleForm from './<path>/valleForm';

...
render() {
    return (
        <valleForm
            tabs = { equipamentos }
            buttons = { equipamentos.buttons }
            baseApi = 'http://localhost:3000/'
            canonicalApi = 'api/equipamentos'
            params = { {empresa: '', estabelecimento: ''} }
            values = { {valuesObj} }
            _id = '123'
            readOnly
        />
    );
}
...

Result:

Edit mode example

Props

  • tabs (array) - All form tabs with rows using the valle data structure.
  • buttons (array) - All form buttons using the valle data structure.
  • baseApi (string) - Base API url for RESTFul.
  • canonicalApi (string) - Canonial API url for RESTFul.
  • params (object) - Custom params that are added to all requests.
  • values (object) - All values for populate a view/edit form.
  • _id (string) - Unique Identifier for UPDATE and DELETE.
  • token (string) - JWT for requests authorization.
  • readOnly (boolean) - Make all fiels read only.

Development

Install dependencies

$ yarn

Tasks

  • yarn start - launch storybook to develop your component.
  • yarn build - build component to external use.
  • yarn pub - build and publish the component to npm.
  • yarn storybook - launch storybook to develop your component.
  • yarn build-storybook - build an static storybook to .out folder.
  • yarn deploy-storybook - build and deploy a storybook with component to gh-pages.
  • yarn test - run all specs.
  • yarn test:tdd - run all specs and watch.
  • yarn test:coverage - run all specs and coverage.
  • yarn lint:js - lint all files searching for errors.
  • yarn lint:fix - fix some lint errors.

Architecture

We've developed this component using the following boilerplate: lyef-react-component.

Versioning

To keep better organization of releases we follow the Semantic Versioning 2.0.0 guidelines.

Contributing

Find on our issues the next steps of the project ;) Want to contribute? Follow these recommendations.

History

See Releases for detailed changelog.

License

MIT License @ valleweb