Git Product home page Git Product logo

formstamp's Introduction

FormStamp

Build Status

This project is under development. Some API may be changed.

FormStamp is a pure AngularJS widgets library designed for rich front-end web applications. FormStamp core principles are:

  • all widgets are written from scratch;
  • maximum AngularJS compatibility (supports ngDisabled, ngModel and other standard directives);
  • styled with Twitter Bootstrap;
  • clean & minimalistic codebase.

Live Demo

Installation

FormStamp can be installed via Bower Package Manager:

bower install angular-formstamp

Structure

There are 3 levels of directives:

  • Form Builder - orchestrates building of complex forms; provides simple DSL-like markup for describing forms and hides complex markup from you.
  • Widget directives - most often used widgets.
  • Low-level directives - common concerns for widgets construction, can be used to build your own custom widgets.

Form Builder

  • fsFormFor - root form builder directive;
  • fsInput - renders a row with input in form builder;
  • fsRow - renders a custom row.

Widget Directives

  • fsSelect - select input with free text support (select/combo);
  • fsMultiselect - multiple select input with free text support;
  • fsTime - time input;
  • fsDate - date input with fsCalendar inside dropdown;
  • fsDatetime - widget composed from fsTime and fsDate to enter both date and time;
  • fsRadio - a group of radiobuttons;
  • fsCheck - a group of checkboxes.

Low-level Directives

  • fsList - renders a list of items and allows to move selection up and down (with custom templating for items);
  • fsNullForm - hides input with ngModel binding from a parent form;
  • fsInput - simplifies keyboard & focus events handling;
  • fsCalendar - draws a calendar and allows to mark one day as selected.

TODO

  • support I18n

Development Environment

Install node.js

curl https://raw.github.com/creationix/nvm/master/install.sh | sh # install nvm
nvm install 0.10

Clone FormStamp repository

git clone [email protected]:formstamp/formstamp.git

Install bower dependencies and node.js packages

cd formstamp
nvm use 0.10
npm install # server deps
bower install # demo deps

Build, start server and start watching changes using

grunt serve              # server starts on port 17405 by default
grunt serve --port 3000  # specify port

Now, point your browser to http://localhost:17405/ and you'll see FormStamp's demo page.

NOTE: These commands add nvm command to .bash_profile. It may not work if you are not using bash shell (like zsh). In this case you have to manually configure profile file.

Running Tests

Before run test suite:

`npm bin`/webdriver-manager update

To run protractor tests you could use:

grunt test:e2e:phantomjs
grunt test:e2e:chrome
grunt test:e2e:firefox

Alse you can provide option to protractor test to run specific test:

grunt test:e2e:chrome --specs test/build/e2e/fsDateSpec.js

Then you can run unit tests with following command:

`npm bin`/karma start test/karma.conf.js --single-run

License

FormStamp is released under MIT License.

formstamp's People

Contributors

serzh avatar mlapshin avatar niquola avatar mirasrael avatar danil avatar semalexa avatar viruzzz-kun avatar

Watchers

Dheeraj kumar avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.