1.3.3 • Published 3 days ago

@bigbinary/neeto-form-frontend v1.3.3

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
3 days ago

neeto-form-nano

The neeto-form-nano allows us to build forms within neeto applications. This nano exports @bigbinary/neeto-form-frontend NPM package and neeto-form-engine Rails engine.

Contents

  1. Development with Host Application
  2. Instructions for Publishing

Development with Host Application

Engine

The engine adds setup for form on backend and allows us to attach forms to any model. It also stores submissions.

Installation

  1. Add this line to your application's Gemfile:

    source "NEETO_GEM_SERVER_URL" do
      # ...existing gems
    
      gem 'neeto-form-engine'
    end
  2. And then execute:

    bundle install
  3. Install the migrations

    bundle exec rails neeto_form_engine:install:migrations
  4. Run the migrations

    bundle exec rails db:migrate
  5. Add this line to your application's config/routes.rb file (replace at to your desired route):

    mount NeetoFormEngine::Engine, at: "/neeto_form_engine"
  6. Create file neeto_form_engine.rb under config/initializers to provide the owner_class information

    NeetoFormEngine.owner_class = "Organization"
  7. Configure models to add below association to the provided owner class

    has_many :forms, class_name: "::NeetoFormEngine::Form", as: :owner
  8. Configure models to add below association to scope submission records (optional)

    has_one :submission, class_name: "::NeetoFormEngine::Submission", as: :record
  9. Configure model to add below association to attach form (optional)

    has_one :form, class_name: "::NeetoFormEngine::Form", as: :attachable

Customizability

The engine supports customizing the default behavior of Questions::UpdateService. The supported methods/constants can be overridden by defining them in the concern NeetoFormEngine::Customizable::Questions::Updateable

Available methods:

  1. create_question!: This takes 2 arguments: params and question. The params argument contains the question parameters passed from the front-end, and the question argument contains the current question. This argument is required if you need translation support.
  2. additional_question_params: If you want to include additional attributes while creating questions, you can specify them using this method. It takes one argument params which will be the question parameters passed from the front-end.

    Available constants:

  3. EXCLUDED_UPDATE_PARAMS: If you have included extra parameters other than kind for additional use cases that are not valid entity attributes, they need to be specified as EXCLUDED_UPDATE_PARAMS.

Frontend package

The frontend package allows us to create forms across neeto products.

Installation

  1. Install the NPM package

    yarn add @bigbinary/neeto-form-frontend
  2. The frontend package has a few peer dependencies that are required for the proper functioning of the package. Install all the peer dependencies using the below command:

    yarn add @bigbinary/neetoui @bigbinary/neeto-icons ramda@^0.28.0 classnames@^2.3.1 formik@2.2.9 @bigbinary/neeto-commons-frontend
  3. Import stylesheet from the following location:

    @import "@bigbinary/neeto-form-frontend/dist/main.css";

Instructions for development

Check the Frontend package development guide for step-by-step instructions to develop the frontend package.

Usage

You can learn more about the usage here: 1. Components 2. Hooks

Instructions for Publishing

Consult the building and releasing packages guide for details on how to publish.

1.3.3

3 days ago

1.3.1

4 days ago

1.3.0

9 days ago

1.2.56

11 days ago

1.2.55

12 days ago

1.2.54

17 days ago

1.2.53

18 days ago

1.2.52

19 days ago

1.2.50

19 days ago

1.2.51

19 days ago

1.2.49

22 days ago

1.2.48

23 days ago

1.2.47

26 days ago

1.2.46

1 month ago

1.2.45

1 month ago

1.2.44

1 month ago

1.2.43

1 month ago

1.2.42

1 month ago

1.2.41

2 months ago

1.2.40

2 months ago

1.2.39

2 months ago

1.2.38

2 months ago

1.2.37

2 months ago

1.2.34

2 months ago

1.2.35

2 months ago

1.2.36

2 months ago

1.2.33

2 months ago

1.2.32

2 months ago

1.2.31

2 months ago

1.2.29

2 months ago

1.2.30

2 months ago

1.2.28

2 months ago

1.2.27

3 months ago

1.2.25

3 months ago

1.2.26

3 months ago

1.2.24

3 months ago

1.2.23

3 months ago

1.2.22

4 months ago

1.2.18

4 months ago

1.2.19

4 months ago

1.2.20

4 months ago

1.2.21

4 months ago

1.2.17

4 months ago

1.2.16

4 months ago

1.2.15

4 months ago

1.2.13

4 months ago

1.2.14

4 months ago

1.2.12

4 months ago

1.2.10

5 months ago

1.2.11

5 months ago

1.2.8

6 months ago

1.2.9

5 months ago

1.2.0

7 months ago

1.2.7

6 months ago

1.2.6

6 months ago

1.2.5

6 months ago

1.2.4

6 months ago

1.2.3

7 months ago

1.2.2

7 months ago

1.2.1

7 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.1.9

7 months ago

1.1.8

7 months ago

1.1.7

7 months ago

1.1.6

8 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.12

7 months ago

1.1.11

7 months ago

1.1.10

7 months ago

1.0.48

10 months ago

1.0.47

10 months ago

1.0.46

11 months ago

1.1.13

7 months ago

1.0.49

10 months ago

1.0.51

10 months ago

1.0.50

10 months ago

1.0.52

10 months ago

1.0.40

11 months ago

1.0.44

11 months ago

1.0.43

11 months ago

1.0.42

11 months ago

1.0.41

11 months ago

1.0.45

11 months ago

1.0.39

12 months ago

1.0.38

12 months ago

1.0.29

1 year ago

1.0.33

12 months ago

1.0.32

12 months ago

1.0.31

12 months ago

1.0.30

1 year ago

1.0.37

12 months ago

1.0.36

12 months ago

1.0.35

12 months ago

1.0.34

12 months ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.19

1 year ago

1.0.2

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago