How-to template/doc for creating new product templates

Template Documentation

A template is a pre-designed layout or format that can be used as a starting point for creating something new. It is often used to help people save time and effort by providing a pre-built structure or design that can be customized to meet specific needs.

Schema Declaration

  • Standard Form Component : It is type of component that doesn't have any specific type to a create schema/ object. It is commonly used to representing specific type of data that are not predefined. i.e. Table, Column, Row, etc
  • Special Form Component : It is type of component that have specific type to create a schema/ object. It is commonly used to representing specific type of data that are already defined. i.e text, number, dropdown, select etc.
JSON Structure 

  • name :  It refers to a unique identifier that is assigned to Schema object or It is a representation of uniquely identification of data.
  • label : It refers to a textual or descriptive tag that is assigned to a Schema object. It is used to describing particular object.
  • placeholder :  It refers to a temporary or incomplete value that is used to indicate that data will be inserted or updated at a later time. 
  • tooltipText : Tooltiptext is a graphical user interface element that provides additional information about a particular Object, 
  • parentTab : Parent tabs are often used in combination with child tabs, which allow users to access specific content or functionality within a particular category. 
  • tabName : The tabname is the text that appears on the tab and provides a brief description of the content or functionality that is associated with the tab. For example, Identifier, Manufacturer, Category etc.
  • readOnly: It prevent users from editing or modifying its value. When a field is set to "readonly :true", users can still view its value, but they cannot change it.
  • type : It is attribute is used to define the type of data that can be entered into an input field. for example, text, number, checkbox, radio, etc.
  • isMultilingual : It refers to this section support multiple language or not.
Yup Validation 
documentation link -  npm i yup 
    Yup is a JavaScript schema validation library that is commonly used for validating data in web applications. It provides a simple and intuitive API for defining schemas, which are used to validate data against a set of predefined rules. Yup is often used in React applications, where it can be used to validate forms and input fields.
        In Schema 
  • validationType: "string" : This property is used for checking standard datatype of schema. for example "string", "number", "array" etc.
validations : This is a array that include "type" and "params" 
1. Type : It provides a simple and expressive way to define validation rules for objects and supports a wide range of data types. Here are some common validation types in Yup: 
1. string(): Validates that the input is a string. 
2. number(): Validates that the input is a number. 
3. boolean(): Validates that the input is a boolean. 
4. date(): Validates that the input is a date. 
5. array(): Validates that the input is an array. 
6. object(): Validates that the input is an object. 
7. email(): Validates that the input is a valid email address. 
8. url(): Validates that the input is a valid URL. 
9. matches(): Validates that the input matches a specific regular expression pattern. 
10. required(): Validates that the input is not empty or undefined. 
11. min(): Validates that the input meets a minimum value requirement. 
12. max(): Validates that the input meets a maximum value requirement. 
13. oneOf(): Validates that the input matches one of a set of predefined values. 
14. notOneOf(): Validates that the input does not match any of a set of predefined values. 
These are just a few examples of the validation types available in Yup. Yup provides many more validation methods and also allows you to create custom validation rules to suit your specific needs.

2. params : It is for validation massage and we can pass regex for validation of value.

JSON object nesting 
      It helps to save / get data in Object. It is refers to the practice of including one or more JSON objects within another JSON object. This is done by placing the nested object within the braces of a property of the parent object.
 
specific type info : 
    It is used to special type of component that does not have actual meaning. supposed text, number, select, checkbox, radio this are predefined types we can directly create a component. but in our case have feedback, versioning, etc types it doesn't have actual meaning that type of information is called specific type info

Thank you for reading....