npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kie-tools/form-generation-tool

v0.32.0

Published

This is a utility CLI to help generating forms in differents formats for BPMN processes and User Tasks in your Kogito projects.

Downloads

27

Readme

Form Generation Tool

This is a utility CLI to help generating forms in differents formats for BPMN processes and User Tasks in your Kogito projects.

How does it work?

When building a Kogito project, Kogito generates JSON schemas to represent the data models for both Processes and User Tasks.

This tool locates those JSON Schemas in the project and taking advantage of the Uniforms APIs, processes them and generate static forms as a resources in the project src/main/resoures/form folder.

Form Types

There are two types of form supported with differnt styling and output format:

  • Patternfly: generates a React (.tsx) forms using Patternfly 4 components. Implementation can be found in @kie-tools/uniforms-patternfly-codegen

  • Bootstrap 4: generates a HTML (.html) forms using Bootstrap 4 styling.

Each generated form consist in two files, the source code (.tsx or .html) and a companion .config file that defines the external resources (css / js) the form may need.

Build

In order to build the CLI you must run the following command in the root folder of the repository:

pnpm -F @kie-tools/form-generation-tool... build:prod

After the command has finished, go to packages/form-generation-tool/dist folder and you'll find the CLI binary (form-generation-cli-macos, form-generation-cli-linux or form-generation-cli-win.exe depending on your OS).

Running the CLI

In the command line just execute the CLI binary:

./form-generation-cli-linux

This command will start a wizard to help you generate the forms:

  1. First set the path to your Kogito Project.

Step 1: Set the Kogito Project path

ℹ️ NOTE: Make sure your Kogito project has been compiled, otherwhise the CLI won't be able to find all the form schemas.

  1. Select one of the availables the Form types (Patternfly or Bootstrap 4).

Step 2: Select the Form type

  1. Confirm Selection to start the Form Generation process.

Step 3: Select the Form type

  1. If the Form generation process is succesful, you'll get a confirmation message.

Form generation succesfully finished

The generated forms will be stored in the src/main/resources/forms folder of the Kogito project.

List of generated forms in project

Using the Custom Forms with Runtime Tools Quarkus Extension

If your project is a Quarkus based Kogito project, you can use and test them by using the Runtime Tools Quarkus Extension.

To do so, just add the following dependency in your project pom.xml:

<dependency>
    <groupId>org.kie.kogito</groupId>
    <artifactId>runtime-tools-quarkus-extension</artifactId>
    <version>${version}</version>
</dependency>

And start the project in Dev mode with the command:

mvn clean quarkus:dev

For more information on how to setup the Runtime Tools Quarkus Extension in your project look at the oficial Kogito documentation.