{"version":3,"sources":["inventory-search-results/hcpv_modelattribute.js"],"names":["hcpv_modelattribute","attributeList","_classCallCheck","this","attributeObj","codeList","i","length","edmundsAttributeList","indexOf","push","code","id","sort"],"mappings":"6XAaMA,+BAEF,QAAAA,GAAYC,GAAeC,gBAAAC,KAAAH,GAEvBG,KAAKF,cAAgBA,EAL7BE,KAAAC,gBACMJ,KAAAA,wBAEFG,KAAAE,WAOI,KAAK,GAAIC,GAAI,EAAGA,EAAIL,EAAcM,OAAQD,IAAK,CAJ/CH,KAAKC,aAALH,EAAAK,GAAA,QAAAL,EAAAK,IACA,IAAKE,EAAAA,GAAAA,SAALC,QAAA,YAAAN,KAAAK,qBAAAE,KAAAT,EAAAK,GACA,IAAKD,GAALJ,EAAAK,GAAA,UAOqC,GAA9BH,KAAKE,SAASI,QAAQE,IALxBR,KAAQE,SAAOJ,KAAAA,GAGhBE,KAAAE,SAAGJ,qEAIFW,GAEL,IAAKP,GAAAA,GAAL,EAAcQ,EAAdV,KAAAF,cAAAM,OAAAD,IAQI,GAAIH,KAAKF,cAAcK,GAAG,QAAUM,EAAI,MAAOT,MAAKF,cAAcK,EAGtE,OAAO,gDAIOM,GATd,MAAAT,MAAKC,aAAeQ","file":"hcpv_modelattribute.min.js","sourcesContent":["/*\r\n\r\nSample Model Attribute\r\n\r\n {\r\n \"@id\": \"1\",\r\n \"@Code\": \"TRIM\",\r\n \"@Name\": \"SI\"\r\n },\r\n\r\n*/\r\n\r\n// Holds the Model Attributes List from the return ajax data\r\nclass hcpv_modelattribute {\r\n\r\n constructor(attributeList) {\r\n\r\n this.attributeList = attributeList;\r\n this.attributeObj = {};\r\n this.edmundsAttributeList=[];\r\n this.codeList=[];\r\n\r\n for (var i = 0; i < attributeList.length; i++) {\r\n\r\n this.attributeObj[attributeList[i][\"@id\"]] = attributeList[i];\r\n if(attributeList[i][\"@Code\"].indexOf(\"Edmunds\")!==-1)this.edmundsAttributeList.push(attributeList[i]);\r\n var code=attributeList[i][\"@Code\"];\r\n if(this.codeList.indexOf(code)==-1){\r\n this.codeList.push(code);\r\n }\r\n }\r\n this.codeList.sort();\r\n }\r\n\r\n // Return a Model Attribute with matching id\r\n getAttributeById(id) {\r\n\r\n for (var i = 0; i < this.attributeList.length; i++) {\r\n\r\n if (this.attributeList[i][\"@id\"] == id) return this.attributeList[i];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Return a Model Attribute with matching id \r\n getAttributeById2(id) {\r\n return this.attributeObj[id];\r\n }\r\n\r\n\r\n \r\n\r\n}"]}