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

ready-forms

v1.0.12

Published

Ready forms allows you to create forms by simply providing a compliant json schema

Downloads

9

Readme

Ready forms

Json schema based forms made simple (currently supports React 16.x versions)

Installation and Usage

Step 1 : Install ready-forms

npm i --save ready-forms

Step 2 : Add CSS

Add the below lines to your index.js file

import 'bootstrap/dist/css/bootstrap.min.css'; import "react-datepicker/dist/react-datepicker.css";

Step 3 : Add core-js package to avoid errors

Currently there is an error in the build process. So when using this library you'll need to manually also install core-js using the below command : npm i --save core-js@2

Read about this issue here : https://github.com/babel/babel/issues/9734#issuecomment-475175676

Step 4 : You're done!

If you face difficulties finding your way around this library I suggest looking at the below How to section.

How to see an Example form running

  1. Install ready-forms in your React 16.x project
  2. Find the demo folder in github repo OR in your node_modules => ready-forms folder, download or copy the files from Demo folder into your own project's src folder.
  3. Now import the Example component in your main component where you want to see the demo app running.
  4. That's it! you should see a demo form loaded.

Demo Form

What works

  1. Support for different input types:
    • Currency
    • DateControl
    • Dropdownlist
    • Label
    • Number
    • Percentage
    • Radio
    • Table - (Note : nested tables are not supported)
    • Text
    • Website
    • Year
    • Zipcode
  2. Support for templates for Form layout and individual control layout - Default implementations of these templates are FormInCardTemplate and BasicFormControlTemplate respectively
  3. Validations on form elements
  4. Form state is available on passing setFormState and formState state variables.
  5. Disabling of fields is available via isDisabled property
  6. Multiple forms on same page are supported however, please note that separate state variables and json schemas should be used.

Roadmap

  1. Add pending form controls :
    • Button
    • FormTooltip
    • Custom fields
  2. Remove dependency on bootstrap, reactstrap - no default styling
  3. Remove dependency on availity input controls - implement validation logic to remove this dependency
  4. Easy schema creation tool
  5. Get form's and individual control's validity statuses
  6. Support reflection of one field's value in another non-related field in the same form (use-case : password and confirm password)
  7. Custom hooks when updating values
  8. Adding and Removing of new rows from Table
  9. Toolbar elements for table type (for table action buttons)
  10. Allow updating any property on a field - dynamic field labels to be made possible.
  11. Differentiating optional fields by default - user should be able to override this behaviour.
  12. Code cleanup and making better use of Typescript
  13. Currency, Number, Year, Zipcode - currently all these work the same way. Need to have correct behaviours assigned as per the field type (for now the number field can be used in replacement for any of these)

Dependencies

Ready-forms currently depends upon availity-reactstrap-validation, bootstrap, react-datepicker and reactstrap libraries which will get installed automatically when ready-forms is installed. If any of these libraries are not installed you can run this command to install all dependencies :

npm i availity-reactstrap-validation bootstrap react-datepicker reactstrap