{"version":3,"sources":["../LuV.LUMAS.Services/scripts/services/lumasService.ts"],"names":["LumasService","prototype","getEmptyQuery","Keyword","BasePolymers","Brands","ProductLines","ProductGroups","Reinforcements","Modifiers","Colors","ContinuosUseTemperatureRange","MaximumUseTemperatureRange","UseTemperatureRange","TensileStrengthRange","TensileModulusRange","CapabilityGroups","Resistances","Properties","SelectedProducts","ISO","ASTM","Standard","queryIsEmpty","query","length","initializeAppData","force","_this","this","appData","initialized","$q","resolve","config","method","url","_lumasContext","svcBaseUrl","getMandatorKey","headers","content-type","token","authorization","$http","then","res","data","errorOccured","console","error","reject","errorMessage","responseData","isLoading","permissions","activeFilterGroup","sliderOptions","range","floor","ceil","onlyBindHandles","environment","capability","rightToLeft","showTicks","resistance","showSelectionBar","temperature","temperaturePotentiallyDisabled","tensileStrength","tensileModulus","salesManagerReinforcements","stepsArray","onlineReinforcements","onlineTriState","properties","Filters","TemperatureRanges","Id","disabled","admin","developer","TensileStrengthRanges","TensileModulusRanges","_i","_a","propertyFilter","propertySlider","MinValue","MaxValue","ValueSteps","map","val","value","sort","pf1","pf2","Group","Title","localeCompare","lastGroup","maxCount","index","bp","splice","IsGroup","err","status","showForbiddenError","findProducts","urlHelper","urlHelperService_1","UrlHelperService","clonedQuery","getQueryFromUriParam","getUriParamFromQuery","mandatorKey","mandator","getQueryParameterFromCurrentLocation","downloadTdsFile","productCode","language","standard","window","open","$inject","$log","Labels","ResistanceCategories","scrollTop","exports"],"mappings":"yIAKA,IAAAA,GA6BQA,EAAAC,UAAAC,cAAP,WACC,MAAO,CACNC,QAAS,GACTC,aAAc,GACdC,OAAQ,GACRC,aAAc,GACdC,cAAe,GACfC,eAAgB,GAChBC,UAAW,GACXC,OAAQ,GACRC,6BAA8B,EAC9BC,2BAA4B,EAC5BC,oBAAqB,EACrBC,qBAAsB,EACtBC,oBAAqB,EACrBC,iBAAkB,GAClBC,YAAa,GACbC,WAAY,GACZC,iBAAkB,GAClBC,KAAK,EACLC,MAAM,EACNC,S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EAAIC,KAAKA,QAIV/C,EAAAC,UAAAsC,eAAR,WACC,IAAI8E,EAAc,GACdC,EAAWN,EAAAC,iBAAiBM,qCAAqC,YAIrE,OAHID,IACHD,EAAc,IAAMC,GAEdD,GAGDrH,EAAAC,UAAAuH,gBAAP,SAAuBC,EAAqBC,EAAkBC,GAC7DC,OAAOC,KAAQhG,KAAKQ,cAAcC,WAAU,cAAcmF,EAAW,IAAIC,EAAQ,IAAIC,EAAY,WA1QpF3H,EAAA8H,QAAU,CAAC,QAAS,OAAQ,KAAM,iBA4QjD9H,GA3QC,SAAAA,EAAoB4C,EAAwBmF,EAA8B/F,EAA0BK,GAAhFR,KAAAe,MAAAA,EAAsDf,KAAAG,GAAAA,EAA0BH,KAAAQ,cAAAA,EAEpGR,KAAAC,QAAoB,CACnBwB,WAAW,EACXuD,oBAAoB,EACpBtD,YAAa,GACbxB,aAAa,EACb8C,QAAS,GACTmD,OAAQ,GACRxE,kBAAmB,EACnBC,cAAe,CACdC,MAAO,GACPK,WAAY,GACZG,WAAY,GACZE,YAAa,GACbC,+BAAgC,GAChCC,gBAAiB,GACjBC,eAAgB,GAChBK,WAAY,GACZJ,2BAA4B,GAC5BE,qBAAsB,GACtBC,eAAgB,IAEjBsD,qBAAsB,GACtBC,UAAW,GA1BAC,EAAAnI,aAAAA","file":"lumasService.js","sourcesContent":["import { IAppData, IQuery } from '../interfaces';\r\nimport { IRequestConfig } from 'angular';\r\nimport { UrlHelperService } from '../helpers/urlHelperService';\r\n\r\n\r\nexport class LumasService {\r\n\tpublic static $inject = ['$http', '$log', '$q', '_lumasContext'];\r\n\tconstructor(private $http: ng.IHttpService, $log: ng.ILogService, private $q: ng.IQService, private _lumasContext: any) { }\r\n\r\n\tappData: IAppData = {\r\n\t\tisLoading: false,\r\n\t\tshowForbiddenError: false,\r\n\t\tpermissions: {},\r\n\t\tinitialized: false,\r\n\t\tFilters: {},\r\n\t\tLabels: [],\r\n\t\tactiveFilterGroup: 0,\r\n\t\tsliderOptions: {\r\n\t\t\trange: {},\r\n\t\t\tcapability: {},\r\n\t\t\tresistance: {},\r\n\t\t\ttemperature: {},\r\n\t\t\ttemperaturePotentiallyDisabled: {},\r\n\t\t\ttensileStrength: {},\r\n\t\t\ttensileModulus: {},\r\n\t\t\tproperties: [],\r\n\t\t\tsalesManagerReinforcements: {},\r\n\t\t\tonlineReinforcements: {},\r\n\t\t\tonlineTriState: {}\r\n\t\t},\r\n\t\tResistanceCategories: {},\r\n\t\tscrollTop: 0,\r\n\t};\r\n\r\n\tpublic getEmptyQuery(): IQuery {\r\n\t\treturn {\r\n\t\t\tKeyword: '',\r\n\t\t\tBasePolymers: [],\r\n\t\t\tBrands: [],\r\n\t\t\tProductLines: [],\r\n\t\t\tProductGroups: [],\r\n\t\t\tReinforcements: [],\r\n\t\t\tModifiers: [],\r\n\t\t\tColors: [],\r\n\t\t\tContinuosUseTemperatureRange: 0,\r\n\t\t\tMaximumUseTemperatureRange: 0,\r\n\t\t\tUseTemperatureRange: 0,\r\n\t\t\tTensileStrengthRange: 0,\r\n\t\t\tTensileModulusRange: 0,\r\n\t\t\tCapabilityGroups: [],\r\n\t\t\tResistances: [],\r\n\t\t\tProperties: [],\r\n\t\t\tSelectedProducts: [],\r\n\t\t\tISO: true,\r\n\t\t\tASTM: false,\r\n\t\t\tStandard: 'ISO',\r\n\t\t};\r\n\t}\r\n\r\n\tpublic queryIsEmpty(query: IQuery) {\r\n\t\treturn (\r\n\t\t\tquery.BasePolymers.length == 0 &&\r\n\t\t\tquery.Brands.length == 0 &&\r\n\t\t\tquery.CapabilityGroups.length == 0 &&\r\n\t\t\tquery.Colors.length == 0 &&\r\n\t\t\tquery.ContinuosUseTemperatureRange == 0 &&\r\n\t\t\tquery.Keyword == '' &&\r\n\t\t\tquery.MaximumUseTemperatureRange == 0 &&\r\n\t\t\tquery.Modifiers.length == 0 &&\r\n\t\t\tquery.ProductGroups.length == 0 &&\r\n\t\t\tquery.ProductLines.length == 0 &&\r\n\t\t\tquery.Properties.length == 0 &&\r\n\t\t\tquery.Reinforcements.length == 0 &&\r\n\t\t\tquery.Resistances.length == 0 &&\r\n\t\t\tquery.TensileModulusRange == 0 &&\r\n\t\t\tquery.TensileStrengthRange == 0 &&\r\n\t\t\tquery.UseTemperatureRange == 0 &&\r\n\t\t\tquery.SelectedProducts.length == 0\r\n\t\t);\r\n\t}\r\n\r\n\tpublic initializeAppData(force: boolean) {\r\n\t\tif (this.appData.initialized && !force) {\r\n\t\t\treturn this.$q.resolve();\r\n\t\t}\r\n\t\tvar mandatorKey = '';\r\n\r\n\t\tlet config: IRequestConfig = {\r\n\t\t\tmethod: 'GET',\r\n\t\t\turl: this._lumasContext.svcBaseUrl + 'getinitialappdata' + this.getMandatorKey(),\r\n\t\t\theaders: {\r\n\t\t\t\t'content-type': 'application/json',\r\n\t\t\t},\r\n\t\t};\r\n\t\tif (this._lumasContext.token != '') {\r\n\t\t\tconfig.headers.authorization = `Bearer ${this._lumasContext.token}`;\r\n\t\t}\r\n\t\treturn this.$http(config).then(\r\n\t\t\t(res: any) => {\r\n\t\t\t\tif (res.data.errorOccured) {\r\n\t\t\t\t\tconsole.error(res.data);\r\n\t\t\t\t\treturn this.$q.reject(res.data.errorMessage);\r\n\t\t\t\t}\r\n\t\t\t\tlet responseData = res.data;\r\n\t\t\t\tthis.appData = responseData.data;\r\n\t\t\t\tthis.appData.isLoading = false;\r\n\t\t\t\tthis.appData.permissions = responseData.permissions;\r\n\t\t\t\tthis.appData.activeFilterGroup = 0;\r\n\t\t\t\tthis.appData.sliderOptions = {\r\n\t\t\t\t\trange: {\r\n\t\t\t\t\t\tfloor: 0,\r\n\t\t\t\t\t\tceil: 100,\r\n\t\t\t\t\t\tonlyBindHandles: this._lumasContext.environment != 'online'\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcapability: {\r\n\t\t\t\t\t\tfloor: -1,\r\n\t\t\t\t\t\tceil: 1,\r\n\t\t\t\t\t\trightToLeft: true,\r\n\t\t\t\t\t\tshowTicks: true,\r\n\t\t\t\t\t\tonlyBindHandles: true,\r\n\t\t\t\t\t},\r\n\t\t\t\t\tresistance: {\r\n\t\t\t\t\t\tfloor: -2,\r\n\t\t\t\t\t\tceil: 2,\r\n\t\t\t\t\t\tshowTicks: true,\r\n\t\t\t\t\t\tshowSelectionBar: true,\r\n\t\t\t\t\t\tonlyBindHandles: true,\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttemperature: {\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttemperaturePotentiallyDisabled: {\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttensileStrength: {\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttensileModulus: {\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsalesManagerReinforcements: {\r\n\t\t\t\t\t\tfloor: 0,\r\n\t\t\t\t\t\tceil: 100,\r\n\t\t\t\t\t\tstepsArray: [0, 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],\r\n\t\t\t\t\t\tonlyBindHandles: true\r\n\t\t\t\t\t},\r\n\t\t\t\t\tonlineReinforcements: {\r\n\t\t\t\t\t\tfloor: 0,\r\n\t\t\t\t\t\tceil: 100,\r\n\t\t\t\t\t\tstepsArray: [0, 10, 15, 20, 25, 30, 35, 40, 100],\r\n\t\t\t\t\t},\r\n\t\t\t\t\tonlineTriState: {\r\n\t\t\t\t\t\tfloor: 1,\r\n\t\t\t\t\t\tceil: 0,\r\n\t\t\t\t\t\tstepsArray: [1, -1, 0]\r\n\t\t\t\t\t},\r\n\t\t\t\t\tproperties: [],\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif (this.appData.Filters.TemperatureRanges && this.appData.Filters.TemperatureRanges.length > 0) {\r\n\t\t\t\t\tthis.appData.sliderOptions.temperature = {\r\n\t\t\t\t\t\tfloor: this.appData.Filters.TemperatureRanges[0].Id,\r\n\t\t\t\t\t\tceil: this.appData.Filters.TemperatureRanges[this.appData.Filters.TemperatureRanges.length - 1].Id,\r\n\t\t\t\t\t\tshowTicks: true,\r\n\t\t\t\t\t\tshowSelectionBar: true,\r\n\t\t\t\t\t\tonlyBindHandles: true,\r\n\t\t\t\t\t};\r\n\t\t\t\t\tthis.appData.sliderOptions.temperaturePotentiallyDisabled = {\r\n\t\t\t\t\t\tfloor: this.appData.Filters.TemperatureRanges[0].Id,\r\n\t\t\t\t\t\tceil: this.appData.Filters.TemperatureRanges[this.appData.Filters.TemperatureRanges.length - 1].Id,\r\n\t\t\t\t\t\tshowTicks: true,\r\n\t\t\t\t\t\tshowSelectionBar: true,\r\n\t\t\t\t\t\tonlyBindHandles: true,\r\n\t\t\t\t\t\tdisabled: !responseData.permissions.admin && !responseData.permissions.developer,\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\tif (this.appData.Filters.TensileStrengthRanges && this.appData.Filters.TensileStrengthRanges.length > 0) {\r\n\t\t\t\t\tthis.appData.sliderOptions.tensileStrength = {\r\n\t\t\t\t\t\tfloor: this.appData.Filters.TensileStrengthRanges[0].Id,\r\n\t\t\t\t\t\tceil: this.appData.Filters.TensileStrengthRanges[this.appData.Filters.TensileStrengthRanges.length - 1].Id,\r\n\t\t\t\t\t\tshowTicks: true,\r\n\t\t\t\t\t\tshowSelectionBar: true,\r\n\t\t\t\t\t\tonlyBindHandles: true,\r\n\t\t\t\t\t\tdisabled: !responseData.permissions.admin && !responseData.permissions.developer,\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (this.appData.Filters.TensileModulusRanges && this.appData.Filters.TensileModulusRanges.length > 0) {\r\n\t\t\t\t\tthis.appData.sliderOptions.tensileModulus = {\r\n\t\t\t\t\t\tfloor: this.appData.Filters.TensileModulusRanges[0].Id,\r\n\t\t\t\t\t\tceil: this.appData.Filters.TensileModulusRanges[this.appData.Filters.TensileModulusRanges.length - 1].Id,\r\n\t\t\t\t\t\tshowTicks: true,\r\n\t\t\t\t\t\tshowSelectionBar: true,\r\n\t\t\t\t\t\tonlyBindHandles: true,\r\n\t\t\t\t\t\tdisabled: !responseData.permissions.admin && !responseData.permissions.developer,\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (let propertyFilter of this.appData.Filters.Properties) {\r\n\t\t\t\t\tlet propertySlider = {\r\n\t\t\t\t\t\tfloor: propertyFilter.MinValue,\r\n\t\t\t\t\t\tceil: propertyFilter.MaxValue,\r\n\t\t\t\t\t\tstepsArray: propertyFilter.ValueSteps.map(val => {\r\n\t\t\t\t\t\t\treturn { value: val };\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\tshowSelectionBar: true,\r\n\t\t\t\t\t\tonlyBindHandles: this._lumasContext.environment != 'online',\r\n\t\t\t\t\t\tdisabled: propertyFilter.MinValue == propertyFilter.MaxValue,\r\n\t\t\t\t\t};\r\n\t\t\t\t\tthis.appData.sliderOptions.properties[propertyFilter.Id] = propertySlider;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._lumasContext.environment == 'onPrem') {\r\n\t\t\t\t\tthis.appData.Filters.BasePolymers.sort((pf1, pf2) => {\r\n\t\t\t\t\t\treturn pf1.Group == pf2.Group ? pf1.Title.localeCompare(pf2.Title) : pf1.Group.localeCompare(pf2.Group);\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlet lastGroup = '';\r\n\t\t\t\t\tlet maxCount = this.appData.Filters.BasePolymers.length;\r\n\t\t\t\t\tfor (let index = 0; index < maxCount; index++) {\r\n\t\t\t\t\t\tlet bp = this.appData.Filters.BasePolymers[index];\r\n\t\t\t\t\t\tif (bp.Group != lastGroup) {\r\n\t\t\t\t\t\t\tthis.appData.Filters.BasePolymers.splice(index, 0, {\r\n\t\t\t\t\t\t\t\tTitle: bp.Group,\r\n\t\t\t\t\t\t\t\tId: 'g_' + bp.Group,\r\n\t\t\t\t\t\t\t\tIsGroup: true,\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tlastGroup = bp.Group;\r\n\t\t\t\t\t\t\tmaxCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.appData.initialized = true;\r\n\t\t\t\treturn this.$q.resolve();\r\n\t\t\t},\r\n\t\t\terr => {\r\n\t\t\t\tconsole.error(err);\r\n\t\t\t\tif (err.status == 403) {\r\n\t\t\t\t\tthis.appData.showForbiddenError = true;\r\n\t\t\t\t\treturn this.$q.resolve();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\tpublic findProducts(query: any) {\r\n\t\tlet urlHelper = new UrlHelperService();\r\n\t\tlet clonedQuery = urlHelper.getQueryFromUriParam(urlHelper.getUriParamFromQuery(query));\r\n\t\tconst config: IRequestConfig = {\r\n\t\t\tmethod: 'POST',\r\n\t\t\turl: this._lumasContext.svcBaseUrl + 'findproducts' + this.getMandatorKey(),\r\n\t\t\theaders: {\r\n\t\t\t\t'content-type': 'application/json',\r\n\t\t\t},\r\n\t\t\tdata: clonedQuery,\r\n\t\t};\r\n\t\tif (this._lumasContext.token != '') {\r\n\t\t\tconfig.headers.authorization = `Bearer ${this._lumasContext.token}`;\r\n\t\t}\r\n\t\treturn this.$http(config).then((res: any) => {\r\n\t\t\tif (res.data.errorOccured) {\r\n\t\t\t\treturn this.$q.reject(res.data.errorMessage);\r\n\t\t\t}\r\n\t\t\treturn res.data.data;\r\n\t\t});\r\n\t}\r\n\r\n\tprivate getMandatorKey() {\r\n\t\tlet mandatorKey = '';\r\n\t\tlet mandator = UrlHelperService.getQueryParameterFromCurrentLocation('mandator');\r\n\t\tif (mandator) {\r\n\t\t\tmandatorKey = '/' + mandator;\r\n\t\t}\r\n\t\treturn mandatorKey;\r\n\t}\r\n\r\n\tpublic downloadTdsFile(productCode: string, language: string, standard: string) {\r\n\t\twindow.open(`${this._lumasContext.svcBaseUrl}gettdsfile/${productCode}/${language}/${standard}`, '_blank');\r\n\t}\r\n}\r\n"]}