{
  "custom": {},
  "params": {
    "configuring": false,
    "equipmentPath": "Enterprise\\\\El Dorado Hills\\Packaging Area\\\\Packaging Line 1",
    "multi": true,
    "title": "Inventory"
  },
  "propConfig": {
    "params.configuring": {
      "onChange": {
        "enabled": null,
        "script": "\tviewParams\u003dself.params\n\tconfigParams\u003dself.getChild(\"root/configuration\").props.params\n\tif currentValue.value:\n\t\tconfigParams.equipmentPathIn \u003d viewParams.equipmentPath\t\n\t\tconfigParams.titleIn \u003d viewParams.title\n\telif previousValue is not None and previousValue.value:\n\t\tviewParams.equipmentPath \u003d configParams.equipmentPathOut\n\t\tviewParams.title \u003d configParams.titleOut"
      },
      "paramDirection": "input",
      "persistent": true
    },
    "params.equipmentPath": {
      "paramDirection": "inout",
      "persistent": true
    },
    "params.title": {
      "paramDirection": "inout",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 500,
      "width": 740
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "Widget Title"
        },
        "position": {
          "height": 0.1,
          "width": 1
        },
        "propConfig": {
          "meta.visible": {
            "binding": {
              "config": {
                "expression": "!{view.params.configuring}"
              },
              "type": "expr"
            }
          },
          "props.params.text": {
            "binding": {
              "config": {
                "path": "view.params.title"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "path": "Page/Embedded/Widget Title"
        },
        "type": "ia.display.view"
      },
      {
        "children": [
          {
            "custom": {
              "colors": {
                "bad": "#F47C80AA",
                "good": "#FFFFFF00",
                "warn": "#E6B788AA"
              }
            },
            "meta": {
              "name": "tbl_inventory"
            },
            "position": {
              "height": 1,
              "width": 1
            },
            "propConfig": {
              "props.data": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "concat(replace({view.params.equipmentPath},\u0027\\\\\u0027,\u0027/\u0027),\u0027/Inventory\u0027)"
                  },
                  "transforms": [
                    {
                      "code": "\tif value:\n\t\tdata \u003d value\n\t\treturnData \u003d []\n\t\tfor matClass,mats in data.items():\n\t\t\tfor name,quantity in mats.items():\n\t\t\t\tquantity \u003d  float(quantity.toString())\n\t\t\t\tcolor \u003d \u0027good\u0027\n\t\t\t\tif quantity \u003c 12.0:\n\t\t\t\t\tcolor \u003d \u0027bad\u0027\n\t\t\t\telif quantity \u003c 24.0:\n\t\t\t\t\tcolor \u003d \u0027warn\u0027\n\t\t\t\t\n\t\t\t\treturnData.append(\n\t\t\t\t\t{\u0027MaterialGroup\u0027:matClass,\n\t\t\t\t\t\u0027Material\u0027:name,\n\t\t\t\t\t\u0027Quantity\u0027:\n\t\t\t\t\t{\n\t\t\t\t\t\t  \"value\": quantity,\n\t\t\t\t\t\t  \"editable\": False,\n\t\t\t\t\t\t  \"style\": {\n\t\t\t\t\t\t    \"backgroundColor\": self.custom.colors[color],\n\t\t\t\t\t\t   \n\t\t\t\t\t\t  },\n\t\t\t\t\t\t  \"align\": \"center\",\n\t\t\t\t\t\t  \"justify\": \"center\"\n\t\t\t\t\t\t  }\n\t\t\t\t\t})\n\t\treturn returnData\n\t\t\n\telse:\n\t\treturn []\n\treturn value\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t{\n\t  \"value\": \"Folsom\",\n\t  \"editable\": true,\n\t  \"style\": {\n\t    \"backgroundColor\": \"#F7901D\",\n\t    \"classes\": \"some-class\"\n\t  },\n\t  \"align\": \"center\",\n\t  \"justify\": \"left\"\n\t}",
                      "type": "script"
                    }
                  ],
                  "type": "tag"
                }
              },
              "props.data[0]": {
                "persistent": false
              }
            },
            "props": {
              "columns": [
                {
                  "align": "center",
                  "boolean": "checkbox",
                  "dateFormat": "MM/DD/YYYY",
                  "editable": false,
                  "field": "MaterialGroup",
                  "filter": {
                    "boolean": {
                      "condition": ""
                    },
                    "date": {
                      "condition": "",
                      "value": ""
                    },
                    "enabled": false,
                    "number": {
                      "condition": "",
                      "value": ""
                    },
                    "string": {
                      "condition": "",
                      "value": ""
                    },
                    "visible": "on-hover"
                  },
                  "footer": {
                    "align": "center",
                    "justify": "left",
                    "style": {
                      "classes": ""
                    },
                    "title": ""
                  },
                  "header": {
                    "align": "center",
                    "justify": "left",
                    "style": {
                      "classes": "",
                      "fontSize": 18
                    },
                    "title": ""
                  },
                  "justify": "auto",
                  "number": "value",
                  "numberFormat": "0,0.##",
                  "progressBar": {
                    "bar": {
                      "color": "",
                      "style": {
                        "classes": ""
                      }
                    },
                    "max": 100,
                    "min": 0,
                    "track": {
                      "color": "",
                      "style": {
                        "classes": ""
                      }
                    },
                    "value": {
                      "enabled": true,
                      "format": "0,0.##",
                      "justify": "center",
                      "style": {
                        "classes": ""
                      }
                    }
                  },
                  "render": "auto",
                  "resizable": true,
                  "sort": "none",
                  "sortable": true,
                  "strictWidth": false,
                  "style": {
                    "classes": ""
                  },
                  "toggleSwitch": {
                    "color": {
                      "selected": "",
                      "unselected": ""
                    }
                  },
                  "viewParams": {},
                  "viewPath": "",
                  "visible": true,
                  "width": ""
                },
                {
                  "align": "center",
                  "boolean": "checkbox",
                  "dateFormat": "MM/DD/YYYY",
                  "editable": false,
                  "field": "Material",
                  "filter": {
                    "boolean": {
                      "condition": ""
                    },
                    "date": {
                      "condition": "",
                      "value": ""
                    },
                    "enabled": false,
                    "number": {
                      "condition": "",
                      "value": ""
                    },
                    "string": {
                      "condition": "",
                      "value": ""
                    },
                    "visible": "on-hover"
                  },
                  "footer": {
                    "align": "center",
                    "justify": "left",
                    "style": {
                      "classes": ""
                    },
                    "title": ""
                  },
                  "header": {
                    "align": "center",
                    "justify": "left",
                    "style": {
                      "classes": "",
                      "fontSize": 18
                    },
                    "title": ""
                  },
                  "justify": "auto",
                  "number": "value",
                  "numberFormat": "0,0.##",
                  "progressBar": {
                    "bar": {
                      "color": "",
                      "style": {
                        "classes": ""
                      }
                    },
                    "max": 100,
                    "min": 0,
                    "track": {
                      "color": "",
                      "style": {
                        "classes": ""
                      }
                    },
                    "value": {
                      "enabled": true,
                      "format": "0,0.##",
                      "justify": "center",
                      "style": {
                        "classes": ""
                      }
                    }
                  },
                  "render": "auto",
                  "resizable": true,
                  "sort": "none",
                  "sortable": true,
                  "strictWidth": false,
                  "style": {
                    "classes": ""
                  },
                  "toggleSwitch": {
                    "color": {
                      "selected": "",
                      "unselected": ""
                    }
                  },
                  "viewParams": {},
                  "viewPath": "",
                  "visible": true,
                  "width": ""
                },
                {
                  "align": "center",
                  "boolean": "checkbox",
                  "dateFormat": "MM/DD/YYYY",
                  "editable": false,
                  "field": "Quantity",
                  "filter": {
                    "boolean": {
                      "condition": ""
                    },
                    "date": {
                      "condition": "",
                      "value": ""
                    },
                    "enabled": false,
                    "number": {
                      "condition": "",
                      "value": ""
                    },
                    "string": {
                      "condition": "",
                      "value": ""
                    },
                    "visible": "on-hover"
                  },
                  "footer": {
                    "align": "center",
                    "justify": "left",
                    "style": {
                      "classes": ""
                    },
                    "title": ""
                  },
                  "header": {
                    "align": "center",
                    "justify": "left",
                    "style": {
                      "classes": "",
                      "fontSize": 18
                    },
                    "title": ""
                  },
                  "justify": "auto",
                  "number": "value",
                  "numberFormat": "0,0.##",
                  "progressBar": {
                    "bar": {
                      "color": "",
                      "style": {
                        "classes": ""
                      }
                    },
                    "max": 100,
                    "min": 0,
                    "track": {
                      "color": "",
                      "style": {
                        "classes": ""
                      }
                    },
                    "value": {
                      "enabled": true,
                      "format": "0,0.##",
                      "justify": "center",
                      "style": {
                        "classes": ""
                      }
                    }
                  },
                  "render": "auto",
                  "resizable": true,
                  "sort": "none",
                  "sortable": true,
                  "strictWidth": false,
                  "style": {
                    "borderBottomLeftRadius": 50,
                    "borderBottomRightRadius": 50,
                    "borderTopLeftRadius": 50,
                    "borderTopRightRadius": 50,
                    "classes": "",
                    "fontSize": 25,
                    "textAlign": "center"
                  },
                  "toggleSwitch": {
                    "color": {
                      "selected": "",
                      "unselected": ""
                    }
                  },
                  "viewParams": {},
                  "viewPath": "",
                  "visible": true,
                  "width": ""
                }
              ],
              "dragOrderable": false,
              "pager": {
                "bottom": false
              },
              "rows": {
                "highlight": {
                  "enabled": false
                },
                "striped": {
                  "enabled": false
                },
                "style": {
                  "fontFamily": "Roboto",
                  "fontSize": 20,
                  "fontWeight": "normal",
                  "paddingBottom": 5,
                  "paddingLeft": 5,
                  "paddingRight": 5,
                  "paddingTop": 5
                }
              },
              "selection": {
                "enableRowSelection": false
              }
            },
            "type": "ia.display.table"
          }
        ],
        "meta": {
          "name": "runtime"
        },
        "position": {
          "height": 0.8929,
          "width": 0.9938,
          "x": 0.0049,
          "y": 0.1049
        },
        "propConfig": {
          "meta.visible": {
            "binding": {
              "config": {
                "expression": "!{view.params.configuring}"
              },
              "type": "expr"
            }
          }
        },
        "props": {
          "mode": "percent"
        },
        "type": "ia.container.coord"
      },
      {
        "meta": {
          "name": "configuration"
        },
        "position": {
          "height": 1,
          "width": 1
        },
        "propConfig": {
          "meta.visible": {
            "binding": {
              "config": {
                "path": "view.params.configuring"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "params": {
            "equipmentPathIn": "",
            "equipmentPathOut": "",
            "titleIn": "Title",
            "titleOut": "Title"
          },
          "path": "Page/Widgets/Configuration/Equipment Path, Title"
        },
        "type": "ia.display.view"
      }
    ],
    "events": {
      "system": {
        "onStartup": {
          "config": {
            "script": "\tshared.mes.inventory.updateCurrentInventory(self.view.params.equipmentPath, \u0027Raw Materials\u0027)"
          },
          "scope": "G",
          "type": "script"
        }
      }
    },
    "meta": {
      "name": "root"
    },
    "props": {
      "mode": "percent"
    },
    "type": "ia.container.coord"
  }
}