{
  "custom": {
    "no_items_selected": true,
    "numberOfRows": 3,
    "transformedData": [
      {
        "checkedState": false,
        "index": 0,
        "instancePosition": {},
        "instanceStyle": {
          "classes": ""
        },
        "rowData": [
          [
            "Seq",
            1
          ],
          [
            "Type",
            "StateChanged"
          ],
          [
            "When",
            1692112814922
          ],
          [
            "Source",
            "PLC01/054BV51"
          ],
          [
            "CurrentState",
            ""
          ],
          [
            "ReasonCode",
            ""
          ]
        ]
      },
      {
        "checkedState": false,
        "index": 1,
        "instancePosition": {},
        "instanceStyle": {
          "classes": ""
        },
        "rowData": [
          [
            "Seq",
            "1"
          ],
          [
            "Type",
            "ModeChanged"
          ],
          [
            "When",
            1692112814922
          ],
          [
            "Source",
            "PLC01/054BV51"
          ],
          [
            "CurrentMode",
            ""
          ]
        ]
      },
      {
        "checkedState": false,
        "index": 2,
        "instancePosition": {},
        "instanceStyle": {
          "classes": ""
        },
        "rowData": [
          [
            "Seq",
            "2"
          ],
          [
            "Type",
            "MeasurementEvent"
          ],
          [
            "When",
            1692112814922
          ],
          [
            "Source",
            "PLC01/054BV51"
          ],
          [
            "MeasurementName",
            ""
          ],
          [
            "SamplingInterval",
            ""
          ],
          [
            "Unit",
            ""
          ],
          [
            "DeltaValue",
            ""
          ]
        ]
      }
    ]
  },
  "params": {
    "last_message_index": 0,
    "tabledata": [
      {
        "CurrentMode": "",
        "CurrentState": "",
        "DeltaValue": "",
        "EventID": "",
        "EventState": "",
        "MeasurementName": "",
        "ReasonCode": "",
        "SamplingInterval": "",
        "Selected": false,
        "Seq": 1,
        "Source": "PLC01/054BV51",
        "Type": "StateChanged",
        "Unit": "",
        "When": 1692112814922
      },
      {
        "CurrentMode": "",
        "CurrentState": "",
        "DeltaValue": "",
        "EventID": "",
        "EventState": "",
        "MeasurementName": "",
        "ReasonCode": "",
        "SamplingInterval": "",
        "Selected": false,
        "Seq": "1",
        "Source": "PLC01/054BV51",
        "Type": "ModeChanged",
        "Unit": "",
        "When": 1692112814922
      },
      {
        "CurrentMode": "",
        "CurrentState": "",
        "DeltaValue": "",
        "EventID": "",
        "EventState": "",
        "MeasurementName": "",
        "ReasonCode": "",
        "SamplingInterval": "",
        "Selected": false,
        "Seq": "2",
        "Source": "PLC01/054BV51",
        "Type": "MeasurementEvent",
        "Unit": "",
        "When": 1692112814922
      }
    ]
  },
  "propConfig": {
    "custom.no_items_selected": {
      "binding": {
        "config": {
          "path": "view.params.tabledata"
        },
        "transforms": [
          {
            "code": "\tno_items_selected \u003d True\n\t\n\tfor i in value :\n\t\tif i[\"Selected\"]:\n\t\t\tno_items_selected \u003d False\n\t \t\n\treturn no_items_selected",
            "type": "script"
          }
        ],
        "type": "property"
      },
      "persistent": true
    },
    "custom.transformedData": {
      "onChange": {
        "enabled": false,
        "script": "\t\n\tinstances \u003d[]\n\t\n\tfor i , value in enumerate(self.custom.transformedData):\n\t\tinstance \u003d {\n\t\t\t\t    \"instanceStyle\": {\n\t\t\t\t      \"classes\": \"\"\n\t\t\t\t    },\n\t\t\t\t    \"instancePosition\": {},\n\t\t\t\t    \"index\": i,\n\t\t\t\t    \"rowData\": value\n\t\t\t\t  }\n\t\tinstances.append(instance)\n\t\t\n\tself.getChild(\"root\").getChild(\"FlexRepeater\").props.instances \u003d instances\n\t"
      },
      "persistent": true
    },
    "params.last_message_index": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.tabledata": {
      "onChange": {
        "enabled": null,
        "script": "\n\ttransformed_data \u003d []\n\t\n\tstateChangeParams \u003d [\"CurrentState\" , \"ReasonCode\"]\n\tmodeChangeParams \u003d [\"CurrentMode\"]\n\teventParams \u003d [\"EventID\" , \"EventState\"]\n\tmeasurementParams \u003d [\"MeasurementName\", \"SamplingInterval\", \"Unit\", \"DeltaValue\" ]\n\t\t\t\t\t\n\tfor item in self.params.tabledata:\n\t\trow_data \u003d []\n\t\tcol1 \u003d (\"Seq\", item[\"Seq\"])\n\t\trow_data.append(col1)\n\t\tcol2 \u003d (\"Type\",item[\"Type\"])\n\t\trow_data.append(col2)\n\t\tcol3 \u003d (\"When\",item[\"When\"])\n\t\trow_data.append(col3)\n\t\tcol4 \u003d (\"Source\", item[\"Source\"])\n\t\trow_data.append(col4)\n\t\t\n\t\tif item[\"Type\"] \u003d\u003d \"StateChanged\":\n\t\t\tcol5 \u003d (\"CurrentState\", item[\"CurrentState\"])\n\t\t\trow_data.append(col5)\n\t\t\tcol6 \u003d (\"ReasonCode\", item[\"ReasonCode\"]) \n\t\t\trow_data.append(col6)\n\t\t\n\t\tif item[\"Type\"] \u003d\u003d \"ModeChanged\":\n\t\t\tcol5 \u003d (\"CurrentMode\", item[\"CurrentMode\"])\n\t\t\trow_data.append(col5)\n\t\t\n\t\tif item[\"Type\"] \u003d\u003d \"Event\":\n\t\t\tcol5 \u003d (\"EventID\", item[\"EventID\"])\n\t\t\trow_data.append(col5)\n\t\t\t\n\t\t\tcol6 \u003d (\"EventState\", item[\"EventState\"])\n\t\t\trow_data.append(col6)\n\t\t\t\n\t\tif item[\"Type\"] \u003d\u003d \"MeasurementEvent\":\n\t\t\tcol5 \u003d (\"MeasurementName\", item[\"MeasurementName\"])\n\t\t\trow_data.append(col5)\n\t\t\tcol6 \u003d (\"SamplingInterval\", item[\"SamplingInterval\"])\n\t\t\trow_data.append(col6)\n\t\t\tcol7 \u003d (\"Unit\", item[\"Unit\"])\n\t\t\trow_data.append(col7)\n\t\t\tcol8 \u003d (\"DeltaValue\", item[\"DeltaValue\"])\n\t\t\trow_data.append(col8)\n\t\t\n\t\tselected \u003d item[\"Selected\"]\t\t\n\t\t\t\t\t\t\t\t\n\t\tsystem.perspective.print((row_data, selected ))\n\t\ttransformed_data.append((row_data, selected))\n\t\n\tself.custom.numberOfRows \u003d len(self.params.tabledata)\n\t\n\tsystem.perspective.print(transformed_data)\n\tself.custom.transformedData \u003d transformed_data\n\t\n\t\n\tsystem.perspective.print(type(self.custom.transformedData))\n\t\n\t\t\n\tinstances \u003d[]\n\t\n\tfor i , row in enumerate(transformed_data):\n\t\tinstance \u003d {\n\t\t\t\t    \"instanceStyle\": {\n\t\t\t\t      \"classes\": \"\"\n\t\t\t\t    },\n\t\t\t\t    \"instancePosition\": {},\n\t\t\t\t    \"index\": i,\n\t\t\t\t    \"rowData\": row[0], \n\t\t\t\t    \"checkedState\": row[1]\n\t\t\t\t  }\n\t\tinstances.append(instance)\n\t\t\n\tself.getChild(\"root\").getChild(\"FlexRepeater\").props.instances \u003d instances\n\t\n\tself.custom.transformedData \u003d instances\n\t\t"
      },
      "paramDirection": "input",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 788,
      "width": 1314
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "Label"
        },
        "position": {
          "basis": "32px"
        },
        "props": {
          "style": {
            "fontWeight": "bolder"
          },
          "text": "Sequence"
        },
        "type": "ia.display.label"
      },
      {
        "meta": {
          "name": "FlexRepeater"
        },
        "position": {
          "basis": "320px",
          "grow": 1,
          "shrink": 0
        },
        "props": {
          "direction": "column",
          "elementPosition": {
            "basis": "800px"
          },
          "elementStyle": {
            "max-height": "75px",
            "min-height": "75px"
          },
          "instances": [
            {
              "checkedState": false,
              "index": 0,
              "instancePosition": {},
              "instanceStyle": {
                "classes": ""
              },
              "rowData": [
                [
                  "Seq",
                  1
                ],
                [
                  "Type",
                  "StateChanged"
                ],
                [
                  "When",
                  1692112814922
                ],
                [
                  "Source",
                  "PLC01/054BV51"
                ],
                [
                  "CurrentState",
                  ""
                ],
                [
                  "ReasonCode",
                  ""
                ]
              ]
            },
            {
              "checkedState": false,
              "index": 1,
              "instancePosition": {},
              "instanceStyle": {
                "classes": ""
              },
              "rowData": [
                [
                  "Seq",
                  "1"
                ],
                [
                  "Type",
                  "ModeChanged"
                ],
                [
                  "When",
                  1692112814922
                ],
                [
                  "Source",
                  "PLC01/054BV51"
                ],
                [
                  "CurrentMode",
                  ""
                ]
              ]
            },
            {
              "checkedState": false,
              "index": 2,
              "instancePosition": {},
              "instanceStyle": {
                "classes": ""
              },
              "rowData": [
                [
                  "Seq",
                  "2"
                ],
                [
                  "Type",
                  "MeasurementEvent"
                ],
                [
                  "When",
                  1692112814922
                ],
                [
                  "Source",
                  "PLC01/054BV51"
                ],
                [
                  "MeasurementName",
                  ""
                ],
                [
                  "SamplingInterval",
                  ""
                ],
                [
                  "Unit",
                  ""
                ],
                [
                  "DeltaValue",
                  ""
                ]
              ]
            }
          ],
          "path": "Main-Views/Commissioning Tool/Row",
          "useDefaultViewHeight": false
        },
        "scripts": {
          "customMethods": [],
          "extensionFunctions": null,
          "messageHandlers": [
            {
              "messageType": "delete-instance",
              "pageScope": true,
              "script": "\t# implement your handler here\n\tsystem.perspective.print(payload)",
              "sessionScope": false,
              "viewScope": false
            }
          ]
        },
        "type": "ia.display.flex-repeater"
      },
      {
        "children": [
          {
            "events": {
              "component": {
                "onActionPerformed": {
                  "config": {
                    "script": "\tif self.view.custom.no_items_selected :\n\t\tsystem.perspective.sendMessage(\"SelectAll\", None , \"page\")\n\t\tMsg \u003d \"Selecting all messages \"\n\telse:\n\t\tsystem.perspective.sendMessage(\"ClearSelection\", None , \"page\")\n\t\tMsg \u003d \"Clearing selection \"\n\t\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")"
                  },
                  "scope": "G",
                  "type": "script"
                }
              }
            },
            "meta": {
              "name": "ClearSelection"
            },
            "position": {
              "basis": "55px",
              "shrink": 0
            },
            "propConfig": {
              "props.image.icon.path": {
                "binding": {
                  "config": {
                    "path": "view.custom.no_items_selected"
                  },
                  "transforms": [
                    {
                      "code": "\tif not value:\n\t\treturn \"material/clear\"\n\telse:\n\t\treturn \"material/check_box\"",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              }
            },
            "props": {
              "image": {
                "icon": {}
              },
              "primary": false,
              "style": {
                "marginLeft": "10px"
              },
              "text": ""
            },
            "type": "ia.input.button"
          },
          {
            "children": [
              {
                "events": {
                  "component": {
                    "onActionPerformed": {
                      "config": {
                        "script": "\t\n\tMsg \u003d \"Adding a State Message to the Sequence \"\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\tpayload \u003d {\"messageType\":\"StateChanged\"}\n\tsystem.perspective.sendMessage(\"measurementTab_addRow\",payload)"
                      },
                      "scope": "G",
                      "type": "script"
                    }
                  }
                },
                "meta": {
                  "name": "Button"
                },
                "position": {
                  "basis": "115px"
                },
                "props": {
                  "image": {
                    "icon": {
                      "path": "material/control_point"
                    }
                  },
                  "primary": false,
                  "text": "State"
                },
                "type": "ia.input.button"
              },
              {
                "events": {
                  "component": {
                    "onActionPerformed": {
                      "config": {
                        "script": "\t\n\tMsg \u003d \"Adding a Mode Message to the Sequence \"\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\tpayload \u003d {\"messageType\":\"ModeChanged\"}\n\tsystem.perspective.sendMessage(\"measurementTab_addRow\",payload)"
                      },
                      "scope": "G",
                      "type": "script"
                    }
                  }
                },
                "meta": {
                  "name": "Button_0"
                },
                "position": {
                  "basis": "115px"
                },
                "props": {
                  "image": {
                    "icon": {
                      "path": "material/control_point"
                    }
                  },
                  "primary": false,
                  "text": "Mode"
                },
                "type": "ia.input.button"
              },
              {
                "events": {
                  "component": {
                    "onActionPerformed": {
                      "config": {
                        "script": "\tMsg \u003d \"Adding a Event Message to the Sequence \"\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\t\n\tpayload \u003d {\"messageType\":\"Event\"}\n\tsystem.perspective.sendMessage(\"measurementTab_addRow\",payload)"
                      },
                      "scope": "G",
                      "type": "script"
                    }
                  }
                },
                "meta": {
                  "name": "Button_1"
                },
                "position": {
                  "basis": "115px"
                },
                "props": {
                  "image": {
                    "icon": {
                      "path": "material/control_point"
                    }
                  },
                  "primary": false,
                  "text": "Event"
                },
                "type": "ia.input.button"
              },
              {
                "events": {
                  "component": {
                    "onActionPerformed": {
                      "config": {
                        "script": "\tMsg \u003d \"Adding a Measurement Message to the Sequence \"\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\t\n\tpayload \u003d {\"messageType\":\"MeasurementEvent\"}\n\tsystem.perspective.sendMessage(\"measurementTab_addRow\",payload)"
                      },
                      "scope": "G",
                      "type": "script"
                    }
                  }
                },
                "meta": {
                  "name": "Button_2"
                },
                "position": {
                  "basis": "140px"
                },
                "props": {
                  "image": {
                    "icon": {
                      "path": "material/control_point"
                    }
                  },
                  "primary": false,
                  "text": "Measurement"
                },
                "type": "ia.input.button"
              }
            ],
            "meta": {
              "name": "FlexContainer_0"
            },
            "position": {
              "basis": "500px",
              "grow": 1,
              "shrink": 0
            },
            "props": {
              "justify": "space-around",
              "style": {
                "marginLeft": "10px",
                "marginRight": "10px"
              }
            },
            "type": "ia.container.flex"
          },
          {
            "meta": {
              "name": "Label_1"
            },
            "position": {
              "basis": "32px",
              "grow": 1
            },
            "props": {
              "style": {
                "fontWeight": "ClearAll",
                "min-width": "value"
              }
            },
            "type": "ia.display.label"
          },
          {
            "children": [
              {
                "meta": {
                  "name": "Label"
                },
                "position": {
                  "basis": "50px",
                  "grow": 1
                },
                "props": {
                  "text": "Row of last message sent:"
                },
                "type": "ia.display.label"
              },
              {
                "meta": {
                  "name": "TextField"
                },
                "position": {
                  "basis": "150px"
                },
                "propConfig": {
                  "props.text": {
                    "binding": {
                      "config": {
                        "path": "view.params.last_message_index"
                      },
                      "type": "property"
                    }
                  }
                },
                "props": {
                  "deferUpdates": false,
                  "enabled": false,
                  "style": {
                    "max-width": "50px",
                    "textAlign": "center"
                  }
                },
                "type": "ia.input.text-field"
              }
            ],
            "meta": {
              "name": "FlexContainer"
            },
            "position": {
              "basis": "250px",
              "shrink": 0
            },
            "props": {
              "justify": "space-between"
            },
            "type": "ia.container.flex"
          },
          {
            "meta": {
              "name": "Label_0"
            },
            "position": {
              "basis": "32px",
              "grow": 1
            },
            "props": {
              "style": {
                "fontWeight": "ClearAll",
                "min-width": "value"
              }
            },
            "type": "ia.display.label"
          },
          {
            "events": {
              "component": {
                "onActionPerformed": {
                  "config": {
                    "script": "\tMsg \u003d \"Removing All Messages from the Sequence\"\n\tpayload \u003d {\n\t\t\t\"Msg\":Msg\n\t}\n\t\t\n\tsystem.perspective.sendMessage(\"addFeedback\" , payload , \"page\")\n\t\n\tsystem.perspective.sendMessage(\"ClearAll\", None , \"page\")"
                  },
                  "scope": "G",
                  "type": "script"
                }
              }
            },
            "meta": {
              "name": "ClearAll",
              "tooltip": {
                "enabled": true,
                "text": "Clear All"
              }
            },
            "position": {
              "basis": "40px",
              "shrink": 0
            },
            "props": {
              "image": {
                "icon": {
                  "path": "material/delete_forever"
                }
              },
              "primary": false,
              "style": {
                "marginLeft": "15px"
              },
              "text": ""
            },
            "type": "ia.input.button"
          }
        ],
        "meta": {
          "name": "FlexContainer"
        },
        "position": {
          "basis": "40px",
          "shrink": 0
        },
        "props": {
          "justify": "space-around",
          "style": {
            "margin": "5px",
            "overflow": "visible"
          }
        },
        "type": "ia.container.flex"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column",
      "style": {
        "margin": "5px"
      },
      "wrap": "wrap"
    },
    "type": "ia.container.flex"
  }
}