Skip to content

Designer Dynamic Structure and Features

Mehmet Can İnci edited this page Feb 26, 2021 · 4 revisions

Welcome to the react-dynamic-query-designer wiki!

You can find detailed information about the designer configuration and structure here.

The entire configuration of the designer is in the file below.With this file you can add or remove quick panel, string function, date function, number function, operands and operator items.Also you can set return types and programming language support through this file.

https://github.com/mcaninci/react-dynamic-query-designer/blob/main/src/query%20designer/helper/designerMetaData.js

QuickPanel Meta Data

 QuickPanel: [
    {
      id: 1, => must be uniqe
      content: "And", =>menu name
      type: "Operator", =>menu type
      component: "And", => Display name
      componentType: "Operator" => Display type
    },

Functions Meta Data

 stringFunctionItem: [
    {
     id: 0, => must be uniqe
      content: "SubstringCost", =>menu name
     type: "Operands", =>menu type
     componentType: "Function",=>Display type
      component: "SUB",=>Display name
      returnType: "String",=>Return type for rule
      parameter: [ =>Function parameter 
        "String",
        "Integer",
        "Integer"
      ],
      valueType: "String" =>Return type
    },

Function Convert

 functionConvertType: [
    {
      language: "c#",
      functions: [
        {
          functionName:"SUB", => compnenet content name
          functionFormula: "param1.Substring(param2,param3)" => designer return value for this function
        },
        {
          functionName:"Filter",
          functionFormula: "param1.FindAll(x=>x.param2 == param3)"
        },
        {
          functionName:"Sum",
          functionFormula: "param1.Sum(item => item.param2)"
        },
        {
          functionName:"Contains",
          functionFormula: "param1.Contains(param2)"
        },
        {
          functionName:"ISNULL",
          functionFormula: "IsNullOrEmpty(param1)"
        }
      ]
    },

Designer Properties

  • queryLanguange
  • isExpression
  • queryTextFormula
  • NumberFunctionItem
  • QuickPanel
  • stringFunctionItem
  • dateFunctionItem
  • relationalOperatorsItem
  • logicalOperatorsItem
  • expressionOperatorsItem
  • customOperandsItem
  • FixedValueItem
  • functionConvertType
  • operatorsConvertType

//TODO(mci)

  • Refactoring
  • Redux implementation
  • Bugfix
  • Design rules will be activated for functions and other items in the future.
Clone this wiki locally