4.0.2 • Published 3 months ago

@allthings/structured-ticket-form v4.0.2

Weekly downloads
910
License
MIT
Repository
github
Last release
3 months ago

Build status

structured-ticket-form

Table of contents

General info

Simple component to create and edit jsonSchemaForm with possibility to adding translated fields and custom UISchema.

Technologies

  • TypeScript
  • JsonSchemaForm
  • React
  • snowpack

Setup

Install:

To use this component, install in your project using npm:

$ npm install @allthings/structured-ticket-form

How to use?:

import { AdminView } to your .tsx file.

You have to create and pass data object with specific types, for example like that:

const schema: FullFormSchema = {
    [EditorTab.JSON]: {},
    [EditorTab.UI]: {},
    [EditorTab.TRANSLATION]: {},
};

const lang: LanguageDisplay = {
    language: [],
    display: '',
};

You have to use two useState hooks and pass for your created data object, for example like that:

    const [textSchema, setTextSchema] = useState<FullFormSchema>(schema);
    const [lang, setLang] = useState<LanguageDisplay>(lang);

To use component it is required to pass props like that:

<AdminView
    FullFormSchema={schema}
    LanguageDisplay={lang}
    setSchema={(json) => setTextSchema(json)}
/>

What is FullFormSchema props?

It is an object with three properties declared as the following types:

export interface FullFormSchema {
    [EditorTab.JSON]: JSONSchema7;
    [EditorTab.UI]: JSONSchema7;
    [EditorTab.TRANSLATION]: Record<string, string>;
}

What is LanguageDisplay props?

It is an object with two properties declared as the following types:

export interface LanguageDisplay {
    language: string[];
    display: string;
}

Setup and lunch Sandbox View

You can try out how it works using our Sandbox View.

  1. Download repository
  2. Check your node version =>12.0.0 (if you are working on Macbook with M1 CPU use node =>15.0.0)
  3. Install the required packages:
     yarn install
  4. In first start:
    yarn build:sandbox
  5. To start sandbox view:
    yarn start

Deployment

$ yarn version
$ yarn release
4.0.2

3 months ago

4.0.2-dev.1

3 months ago

4.0.2-dev.0

3 months ago

4.0.0-dev.0

6 months ago

4.0.1

6 months ago

4.0.0

7 months ago

3.0.2-dev.0

8 months ago

3.0.2

7 months ago

3.0.1

1 year ago

3.0.0

1 year ago

3.0.0-beta.1

2 years ago

3.0.0-beta.0

2 years ago

3.0.0-beta.3

2 years ago

3.0.0-beta.2

2 years ago

2.0.0

3 years ago

2.0.0-beta.1

3 years ago

2.0.0-beta.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.3

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.48

3 years ago

0.0.46

3 years ago

0.0.40

3 years ago

0.0.41

3 years ago

0.0.42

3 years ago

0.0.43

3 years ago

0.0.44

3 years ago

0.0.37

3 years ago

0.0.38

3 years ago

0.0.39

3 years ago

0.0.36

3 years ago

0.0.35

3 years ago

0.0.34

3 years ago

0.0.33

3 years ago

0.0.32

3 years ago

0.0.31

3 years ago

0.0.30

3 years ago

0.0.29

3 years ago

0.0.27

3 years ago

0.0.28

3 years ago

0.0.26

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.25

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago