{"version":3,"file":"app-be9d7543.cb8a9dde8284f43f.bundle.js","mappings":"sIAAAA,EAAOC,QAAU,ugoB,uLCGV,MAAMC,EACZ,MAAAC,CAAOC,EAAsBC,GAC5B,IAAIC,EAAkB,GACtB,OAAkBC,MAAfH,GAGHA,EAAYI,SAAQC,IACnB,IAAIC,EAAWL,EAAcM,MAAKC,GAAKA,EAAEH,IAAMA,IAC1CC,IACJA,EAAW,CACVG,KAAM,IAAIJ,cACVA,GAAIA,EAAIK,6BAA6B,EAAOC,iCAAiC,IAG/ET,EAAIU,KAAKN,EAAS,IAVXJ,CAcT,EAGM,MAAMW,EACZ,MAAAd,CAAOe,EAA8BC,EAAuBC,GAC3D,OAAiBb,MAAdY,GAAkDZ,MAAvBW,EACtBC,EACK,IAAVC,EACKD,EAAWE,QAAOT,IAAuD,GAAlDM,EAAoBI,WAAUC,GAAKA,GAAKX,EAAEH,OACvEY,QAAOT,GAAKA,EAAEE,8BAEH,IAAVM,EACKD,EAAWE,QAAOT,IAAuD,GAAlDM,EAAoBI,WAAUC,GAAKA,GAAKX,EAAEH,OACvEY,QAAOT,GAAKA,EAAEG,uCAFhB,CAID,E","sources":["webpack://client-app/./src/app/project/parameters/manage/manage-parameter.html","webpack://client-app/./src/app/project/parameters/manage/category-id-to-category.ts"],"sourcesContent":["module.exports = \"\\r\\n\";","import {Category} from \"../../../models/parameter-definition-dto\";\r\n\r\n\r\nexport class CategoryIdToCategoryValueConverter {\r\n\ttoView(categoryIds:number[], allCategories:Category[]) : Category[]{\r\n\t\tlet arr: Category[] = [];\r\n\t\tif(categoryIds == undefined)\r\n\t\t\treturn arr;\r\n\r\n\t\tcategoryIds.forEach(id => {\r\n\t\t\tlet foundCat = allCategories.find(x => x.id == id);\r\n\t\t\tif (!foundCat) { // (We don't want to delete them from the user's data, but we give a hint that they are currently not active.)\r\n\t\t\t\tfoundCat = {\r\n\t\t\t\t\tname: `(${id} inactive)`,\r\n\t\t\t\t\tid: id, allowsBoundParametersAsType: false, allowsBoundParametersAsInstance: false\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tarr.push(foundCat);\r\n\t\t});\r\n\r\n\t\treturn arr;\r\n\t}\r\n}\r\n\r\nexport class FilterExistingCategoriesValueConverter{\r\n\ttoView(parameterCategories:number[], categories:Category[], scope:number){\r\n\t\tif(categories == undefined || parameterCategories == undefined)\r\n\t\t\treturn categories;\r\n\t\tif(scope === 0){ //Type\r\n\t\t\treturn categories.filter(x => parameterCategories.findIndex(y => y == x.id) == -1)\r\n\t\t\t.filter(x => x.allowsBoundParametersAsType);\r\n\t\t}\r\n\t\tif(scope === 1){ //Instance\r\n\t\t\treturn categories.filter(x => parameterCategories.findIndex(y => y == x.id) == -1)\r\n\t\t\t.filter(x => x.allowsBoundParametersAsInstance);\r\n\t\t}\r\n\t}\r\n}\r\n"],"names":["module","exports","CategoryIdToCategoryValueConverter","toView","categoryIds","allCategories","arr","undefined","forEach","id","foundCat","find","x","name","allowsBoundParametersAsType","allowsBoundParametersAsInstance","push","FilterExistingCategoriesValueConverter","parameterCategories","categories","scope","filter","findIndex","y"],"sourceRoot":""}