1.0.3 • Published 5 months ago

wims-formio-custom-elements v1.0.3

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

wims-formio-custom-elements

This is a collection of custom FORMIO components and templates for the WIMS 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

WIMS API in wims\wims-api\src\wims_api\templates\index.html

Including direct js

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

WIMS WEB in wims\wims-web\src\index.js

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

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