diff --git a/docs/.nojekyll b/docs/.nojekyll deleted file mode 100644 index e69de29..0000000 diff --git a/docs/classes/core_engine.default.html b/docs/classes/core_engine.default.html deleted file mode 100644 index 286429f..0000000 --- a/docs/classes/core_engine.default.html +++ /dev/null @@ -1,886 +0,0 @@ - - - - - - default | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Class default

-
-
-
-
-
-
-
-
-
-

Form engine.

-
-
-
-
-

Hierarchy

-
    -
  • - default -
  • -
-
-
-

Index

-
- -
-
-
-

Constructors

-
- -

constructor

- - -
-
-
-

Properties

-
- -

Private configuration

-
configuration: Configuration
- -
-
-

Form engine configuration. Contains steps, elements, ...

-
-
-
-
- -

Private formValues

-
formValues: FormValues
- -
-
-

Contains last value of each form field.

-
-
-
-
- -

Private generatedSteps

-
generatedSteps: Step[]
- -
-
-

Contains the actual form steps, as they are currently displayed to end-user.

-
-
-
-
- -

Private hooks

-
hooks: {}
- -
-
-

Contains all events hooks to trigger when events are fired.

-
-
-
-

Type declaration

-
    -
  • -
    [eventName: string]: Hook[]
    -
  • -
-
-
-
- -

Private store

-
store: default
- -
-
-

Diox store instance.

-
-
-
-
-
-

Methods

-
- -

displayStepLoader

-
    -
  • displayStepLoader(): void
  • -
-
    -
  • - -
    -
    -

    Displays a loader right after current step, indicating next step is being generated.

    -
    -
    -

    Returns void

    -
  • -
-
-
- -

generateField

-
    -
  • generateField(fieldId: string): Field
  • -
-
    -
  • - -
    -
    -

    Generates field with the given id from configuration.

    -
    -
    -
    throws
    -

    {Error} If the field does not exist.

    -
    -
    -
    -

    Parameters

    -
      -
    • -
      fieldId: string
      -
      -

      Field id.

      -
      -
    • -
    -

    Returns Field

    -

    Generated field.

    -
  • -
-
-
- -

generateStep

-
    -
  • generateStep(stepId: null | string): null | Step
  • -
-
    -
  • - -
    -
    -

    Generates step with the given id from configuration.

    -
    -
    -
    throws
    -

    {Error} If the step does not exist.

    -
    -
    -
    -

    Parameters

    -
      -
    • -
      stepId: null | string
      -
      -

      Step id.

      -
      -
    • -
    -

    Returns null | Step

    -

    Generated step if it exists in configuration, null otherwise.

    -
  • -
-
-
- -

getConfiguration

- - -
-
- -

getCurrentStep

-
    -
  • getCurrentStep(): Step
  • -
- -
-
- -

getStore

-
    -
  • getStore(): default
  • -
- -
-
- -

Private handleSubmit

- -
    -
  • - -
    -
    -

    Handles form submission and next step computation.

    -
    -
    -

    Parameters

    -
      -
    • -
      userAction: UserAction
      -
      -

      Last user action.

      -
      -
    • -
    -

    Returns void

    -
  • -
-
-
- -

Private handleUserAction

-
    -
  • handleUserAction(userAction: null | UserAction): void
  • -
-
    -
  • - -
    -
    -

    Handles user actions, applying core logic such as hooks triggering or next step generation.

    -
    -
    -

    Parameters

    -
      -
    • -
      userAction: null | UserAction
      -
      -

      New state sent by userActions store module.

      -
      -
    • -
    -

    Returns void

    -
  • -
-
-
- -

hideStepLoader

-
    -
  • hideStepLoader(): void
  • -
- -
-
- -

Private loadNextStep

-
    -
  • loadNextStep(nextStepId?: null | string): void
  • -
-
    -
  • - -
    -
    -

    Loads the next step with given id.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional nextStepId: null | string
      -
    • -
    -

    Returns void

    -
  • -
-
-
- -

loadValues

- -
    -
  • - -
    -
    -

    Loads the given form fields values into current step.

    -
    -
    -

    Parameters

    -
      -
    • -
      values: FormValues
      -
      -

      Form values to load in form.

      -
      -
    • -
    -

    Returns void

    -
  • -
-
-
- -

on

- -
    -
  • - -
    -
    -

    Registers a new hook for the given event.

    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: FormEvent
      -
      -

      Name of the event to register hook for.

      -
      -
    • -
    • -
      hook: Hook
      -
      -

      Hook to register.

      -
      -
    • -
    -

    Returns void

    -
  • -
-
-
- -

Private triggerHooks

-
    -
  • triggerHooks(eventName: FormEvent, data?: any): Promise<any>
  • -
-
    -
  • - -
    -
    -

    Triggers hooks chain for the given event.

    -
    -
    -
    throws
    -

    {Error} If any event hook does not return a Promise.

    -
    -
    -
    -

    Parameters

    -
      -
    • -
      eventName: FormEvent
      -
      -

      Event's name.

      -
      -
    • -
    • -
      Optional data: any
      -
    • -
    -

    Returns Promise<any>

    -

    Pending hooks chain.

    -
  • -
-
-
- -

updateCurrentStep

-
    -
  • updateCurrentStep(updatedStep: Step, notify?: boolean): void
  • -
-
    -
  • - -
    -
    -

    Updates current generated step with given info.

    -
    -
    -

    Parameters

    -
      -
    • -
      updatedStep: Step
      -
      -

      Updated info to set in current generated step.

      -
      -
    • -
    • -
      notify: boolean = false
      -
    • -
    -

    Returns void

    -
  • -
-
-
- -

Private updateGeneratedSteps

-
    -
  • updateGeneratedSteps(stepIndex: number, step: Step): void
  • -
-
    -
  • - -
    -
    -

    Updates list of generated steps.

    -
    -
    -

    Parameters

    -
      -
    • -
      stepIndex: number
      -
      -

      Index of the step to create or update.

      -
      -
    • -
    • -
      step: Step
      -
      -

      Created or updated step.

      -
      -
    • -
    -

    Returns void

    -
  • -
-
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index cc453ab..0000000 --- a/docs/index.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
-

gincko

-
-
-
-
-
-
-
- -

gincko

-
-

Build complex, dynamic forms or inputs-based UIs in seconds.

-

Build Status - Coverage Status - npm - node - Downloads

- -

Table of Contents

-
-
    -
  1. Installation
  2. -
  3. Features
  4. -
  5. Documentation
  6. -
  7. Contributing
  8. -
  9. Sponsor
  10. -
  11. Maintainers
  12. -
  13. License
  14. -
- -

Installation

-
-
yarn add gincko
-
- -

Features

-
- -

Documentation

-
-

The complete documentation is available here

- -

Contributing

-
-

You're free to contribute to this project by submitting issues and/or pull requests. For more information, please read the Contribution guide.

- -

Love this project and want to support it? You can buy me a coffee :)

-

Or just sending me a quick message saying "Thanks" is also very gratifying, and keeps me motivated to maintain open-source projects I work on!

- -

Maintainers

-
- - - - - - -
- -
- Matthieu Jabbour -
- -

License

-
-

MIT

-

Copyright (c) Matthieu Jabbour. All Rights Reserved.

-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/types.useraction.html b/docs/interfaces/types.useraction.html deleted file mode 100644 index 92b6472..0000000 --- a/docs/interfaces/types.useraction.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - UserAction | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface UserAction

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - UserAction -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

fieldId

-
fieldId: string
- -
-
- -

stepIndex

-
stepIndex: number
- -
-
- -

type

-
type: "input" | "click"
- -
-
- -

value

-
value: any
- -
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/interfaces/types.useractionsstate.html b/docs/interfaces/types.useractionsstate.html deleted file mode 100644 index da33cb5..0000000 --- a/docs/interfaces/types.useractionsstate.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - UserActionsState | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Interface UserActionsState

-
-
-
-
-
-
-
-

Hierarchy

-
    -
  • - UserActionsState -
  • -
-
-
-

Index

-
-
-
-

Properties

- -
-
-
-
-
-

Properties

-
- -

actionsPerStep

-
actionsPerStep: UserAction[][]
- -
-
- -

lastUserAction

-
lastUserAction: null | UserAction
- -
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/components_field.html b/docs/modules/components_field.html deleted file mode 100644 index 4a99a41..0000000 --- a/docs/modules/components_field.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - components/Field | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Module components/Field

-
-
-
-
-
-
-
-

Index

-
-
-
-

Namespaces

- -
-
-

Functions

- -
-
-
-
-
-

Functions

-
- -

default

-
    -
  • default(props: InferProps<typeof propTypes>): JSX.Element | null
  • -
- -
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/components_step.html b/docs/modules/components_step.html deleted file mode 100644 index 1e8ca51..0000000 --- a/docs/modules/components_step.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - components/Step | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Module components/Step

-
-
-
-
-
-
-
-

Index

-
-
-
-

Namespaces

- -
-
-

Functions

- -
-
-
-
-
-

Functions

-
- -

default

-
    -
  • default(props: InferProps<typeof default>): JSX.Element
  • -
- -
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/containers_form.html b/docs/modules/containers_form.html deleted file mode 100644 index 8f37e3a..0000000 --- a/docs/modules/containers_form.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - containers/Form | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Module containers/Form

-
-
-
-
-
-
-
-

Index

-
-
-
-

Namespaces

- -
-
-

Functions

- -
-
-
-
-
-

Functions

-
- -

default

-
    -
  • default(props: InferProps<typeof propTypes>): JSX.Element
  • -
- -
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/plugins_errorhandler.html b/docs/modules/plugins_errorhandler.html deleted file mode 100644 index 14efbdd..0000000 --- a/docs/modules/plugins_errorhandler.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - plugins/errorHandler | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Module plugins/errorHandler

-
-
-
-
-
-
-
-

Index

-
-
-
-

Functions

- -
-
-
-
-
-

Functions

-
- -

default

- - -
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/plugins_loaderdisplayer.html b/docs/modules/plugins_loaderdisplayer.html deleted file mode 100644 index d0ba946..0000000 --- a/docs/modules/plugins_loaderdisplayer.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - plugins/loaderDisplayer | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Module plugins/loaderDisplayer

-
-
-
-
-
-
-
-

Index

-
-
-
-

Functions

- -
-
-
-
-
-

Functions

-
- -

default

-
    -
  • default(options: Options): Plugin
  • -
-
    -
  • - -
    -
    -

    Displays a loader each time a new step is being loaded, for better UX.

    -
    -
    -

    Parameters

    -
      -
    • -
      options: Options
      -
      -

      Plugin's options.

      -
      -
    • -
    -

    Returns Plugin

    -

    The actual plugin.

    -
  • -
-
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/plugins_valueschecker.html b/docs/modules/plugins_valueschecker.html deleted file mode 100644 index bfaf75b..0000000 --- a/docs/modules/plugins_valueschecker.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - plugins/valuesChecker | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Module plugins/valuesChecker

-
-
-
-
-
-
-
-

Index

-
-
-
-

Functions

- -
-
-
-
-
-

Functions

-
- -

default

-
    -
  • default(options: Options): Plugin
  • -
-
    -
  • - -
    -
    -

    Checks that all necessary fields have correctly been filled-in by user.

    -
    -
    -

    Parameters

    -
      -
    • -
      options: Options
      -
      -

      Plugin's options.

      -
      -
    • -
    -

    Returns Plugin

    -

    The actual plugin.

    -
  • -
-
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/plugins_valuesloader.html b/docs/modules/plugins_valuesloader.html deleted file mode 100644 index c36fc29..0000000 --- a/docs/modules/plugins_valuesloader.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - plugins/valuesLoader | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Module plugins/valuesLoader

-
-
-
-
-
-
-
-

Index

-
-
-
-

Functions

- -
-
-
-
-
-

Functions

-
- -

default

-
    -
  • default(options: Options): Plugin
  • -
-
    -
  • - -
    -
    -

    Auto-loads values already filled by user when loading next steps, for better UX.

    -
    -
    -

    Parameters

    -
      -
    • -
      options: Options
      -
      -

      Plugin's options.

      -
      -
    • -
    -

    Returns Plugin

    -

    The actual plugin.

    -
  • -
-
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/plugins_valuesupdater.html b/docs/modules/plugins_valuesupdater.html deleted file mode 100644 index 0cc5208..0000000 --- a/docs/modules/plugins_valuesupdater.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - plugins/valuesUpdater | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Module plugins/valuesUpdater

-
-
-
-
-
-
-
-

Index

-
-
-
-

Functions

- -
-
-
-
-
-

Functions

-
- -

default

- - -
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file diff --git a/docs/modules/types.html b/docs/modules/types.html deleted file mode 100644 index 1c88af4..0000000 --- a/docs/modules/types.html +++ /dev/null @@ -1,495 +0,0 @@ - - - - - - types | gincko - - - - - - -
-
-
-
- -
-
- Options -
-
- All -
    -
  • Public
  • -
  • Public/Protected
  • -
  • All
  • -
-
- - - - -
-
- Menu -
-
-
-
-
-
- -

Module types

-
-
-
-
-
-
-
-

Index

-
-
-
-

Interfaces

- -
-
-

Type aliases

- -
-
-
-
-
-

Type aliases

-
- -

Component

-
Component: (field: Field, onUserAction: (newValue: string) => void) => JSX.Element
- -
-

Type declaration

-
    -
  • -
      -
    • (field: Field, onUserAction: (newValue: string) => void): JSX.Element
    • -
    -
      -
    • -

      Parameters

      -
        -
      • -
        field: Field
        -
      • -
      • -
        onUserAction: (newValue: string) => void
        -
          -
        • -
            -
          • (newValue: string): void
          • -
          -
            -
          • -

            Parameters

            -
              -
            • -
              newValue: string
              -
            • -
            -

            Returns void

            -
          • -
          -
        • -
        -
      • -
      -

      Returns JSX.Element

      -
    • -
    -
  • -
-
-
-
- -

Components

-
Components: {}
- -
-

Type declaration

- -
-
-
- -

Configuration

-
Configuration: InferProps<typeof default>
- -
-
- -

Field

-
Field: InferProps<typeof default>
- -
-
- -

FormEvent

-
FormEvent: "loadNextStep" | "loadedNextStep" | "userAction" | "submit" | "error"
- -
-
- -

FormValue

-
FormValue: Json
- -
-
- -

Hook

-
Hook: (data: Json, next: (data?: Json) => Promise<Json>) => Promise<Json>
- -
-

Type declaration

-
    -
  • -
      -
    • (data: Json, next: (data?: Json) => Promise<Json>): Promise<Json>
    • -
    -
      -
    • -

      Parameters

      -
        -
      • -
        data: Json
        -
      • -
      • -
        next: (data?: Json) => Promise<Json>
        -
          -
        • -
            -
          • (data?: Json): Promise<Json>
          • -
          -
            -
          • -

            Parameters

            -
              -
            • -
              Optional data: Json
              -
            • -
            -

            Returns Promise<Json>

            -
          • -
          -
        • -
        -
      • -
      -

      Returns Promise<Json>

      -
    • -
    -
  • -
-
-
-
- -

Listener

-
Listener: (data: Json, middlewaresChain: (data?: Json) => Promise<Json>) => Promise<Json>
- -
-

Type declaration

-
    -
  • -
      -
    • (data: Json, middlewaresChain: (data?: Json) => Promise<Json>): Promise<Json>
    • -
    -
      -
    • -

      Parameters

      -
        -
      • -
        data: Json
        -
      • -
      • -
        middlewaresChain: (data?: Json) => Promise<Json>
        -
          -
        • -
            -
          • (data?: Json): Promise<Json>
          • -
          -
            -
          • -

            Parameters

            -
              -
            • -
              Optional data: Json
              -
            • -
            -

            Returns Promise<Json>

            -
          • -
          -
        • -
        -
      • -
      -

      Returns Promise<Json>

      -
    • -
    -
  • -
-
-
-
- -

Plugin

-
Plugin: (engine: default) => void
- -
-

Type declaration

-
    -
  • - -
      -
    • -

      Parameters

      - -

      Returns void

      -
    • -
    -
  • -
-
-
-
- -

Step

-
Step: InferProps<typeof default>
- -
-
-
- -
-
- -
-

Generated using TypeDoc

-
-
- - - \ No newline at end of file