New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bigbinary/neeto-form-engine-frontend

Package Overview
Dependencies
Maintainers
9
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bigbinary/neeto-form-engine-frontend

Neeto Form Engine

  • 0.0.60
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
9
Weekly downloads
 
Created
Source

@bigbinary/neeto-form-engine-frontend

neetoFormEngine-frontend is the library that manages forms across neeto products.

Installation

yarn add @bigbinary/neeto-form-engine-frontend

neetoFormEngine-frontend 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

Import stylesheet from the following location:

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

Add NeetoFormProvider to the root of your application:

import React from "react";

import { NeetoFormProvider } from "@bigbinary/neeto-form-engine-frontend";

const App = () => {
  return (
    <>
      <NeetoFormProvider>{/* Other children */}</NeetoFormProvider>
    </>
  );
};

Components

BuildForm component is used to render a form builder.

import { BuildForm } from "@bigbinary/neeto-form-engine-frontend";
proptypedescription
isEmbeddedbooleanTo apply styles for embedding
idstringForm id
onUpdatefunctionCallback for form update
buildRequestArgsobjectArguments for build request
showAddQuestionDividerbooleanTo show add question divider
nonRemovableFieldsstring[]Field kinds that cant be deleted from a form. Accepts array of: name, email, phone, rating, checkbox, dropdown
submitButtonPropsobjectProps for submit button
cancelButtonPropsobjectProps for cancel button

ExternalForm component is used to render a form.

import { ExternalForm } from "@bigbinary/neeto-form-engine-frontend";
proptypedescription
formIdstringForm id
customSubmitHandlerfunctionCustom submit handler to be called instead of internal submit handlers
onBeforeSubmitfunctionCallback for before form submit
onCreateSuccessfunctionCallback for form creation success
showTitlebooleanTo show form title
submitRequestArgsobjectArguments for form submit request payload
footerReact.ComponentTo render a Footer Component
submitButtonPropsobjectProps for submit button
cancelButtonPropsobjectProps for cancel button
resetButtonPropsobjectProps for reset button
showPrefixIconsbooleanTo show prefix icons in input fields
displayThankYoubooleanTo show thank you message after form submit
classNamestringTo apply custom class to the form wrapper
submissionIdstringTo set submission id for updating the form
previewbooleanTo show form in preview mode
preserveValuesbooleanTo preserve form values in localStorage
formTitlestringTo set form title
titlePropsobjectTo set props for form title
clearValuesOnSubmitbooleanTo clear local storage values on submit
clearValuesOnResetbooleanTo clear local storage values on reset
formDomPropsobjectTo set props for form element

Submission component is used to render a form result.

import { Submission } from "@bigbinary/neeto-form-engine-frontend";
proptypedescription
formIdstringForm id
submissionIdstringSubmission id
classNamestringTo apply custom class component wrapper

Hooks

useBuildFormState hook is used to get the form state.

import {
  useBuildFormState,
  BuildForm,
} from "@bigbinary/neeto-form-engine-frontend";

const FormBuilder = () => {
  const {
    values,
    dirty,
    isSubmitting,
    isValid,
    submitForm,
    resetForm,
    errors,
  } = useBuildFormState();

  return <BuildForm />;
};

useFormSubmission hook is used to fetch the form submission data.

import { useFormSubmission } from "@bigbinary/neeto-form-engine-frontend";

const Component = () => {
  const { submission, isLoading } = useFormSubmission({
    formId: "form-id",
    submissionId: "submission-id",
  });

  return <></>;
};

Development

Install all the dependencies by executing the following command

yarn install

Building

The neetoFormEngine-frontend package gets auto-published to npm for every new merge to the master branch. You can checkout the publish workflow in git actions to get a live update.

FAQs

Package last updated on 14 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc