1.0.3 • Published 6 months ago

npis-formio-custom-elements v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

npis-formio-custom-elements

This is a collection of custom FORMIO components and templates for the NPIS project.

Build

1) To create Build with all dependencies

npm run build

Output file name : customformio.js

2) To create build by excluding form-io dependencies so that it can resolve it from consumer application.

npm run buildExcludeFormio

Output file name : customformio-ex.js

Consumer projects

NPIS API in npis\npis-api\src\npis_api\templates\index.html

Including direct js

   <script src="https://unpkg.com/npis-formio-custom-elements/dist/customformio.js"></script>

NPIS WEB in npis\npis-web\src\index.js

npm install npis-formio-custom-elements --save
import { Components } from "react-formio";

// Set custom formio elements - Code splitted
import("npis-formio-custom-elements/dist/customformio-ex").then(
  (FormioCustomEx) => {
    Components.setComponents(FormioCustomEx.components);
  }
);