Skip to main content
Version: 0.0.10

Concept

The CalcGatewayForm is the central component of the library, handling the user interface for the Kampmann Calculation Gateway. It provides a form with input fields and sliders that allow users to configure their calculation requests. This form is dynamically generated based on UIControls, which have to be fetched from Kampmanns backend.

UIControls

UIControls are crucial as they define the logic for min-max values and dependencies between sliders and inputs. These controls must be fetched from the Kampmann Backend.

info

Since system requirements differ, you will need a specific URL to request the UIControls. Please contact us for further information.

Flow

  1. Fetching UIControls: The UIControls are fetched from the Kampmann Backend.
  2. Passing UIControls to CalcGatewayForm: The retrieved UIControls are passed as a prop to the CalcGatewayForm component.
  3. Rendering the Form: The CalcGatewayForm uses these UIControls to render a form with appropriate sliders and input fields.
  4. Callback on Form Change: Once the user changes any form values, the CalcGatewayForm returns the data to a Callback. This Callback is a setState function provided as a prop.

Callback Details

The Callback is an object which includes the following properties:

  • requestBody: The correct calculation format which is parsed from the user input.
  • requestUrl: The URL where the data should be sent.
  • requestState: The request state, which can be used to initialize the CalcGatewayForm with previous values.

Sequence Diagram

Sequence Diagram